Initial Ccheckin of prozilla 2.0.4
This commit is contained in:
8
libprozilla/.cvsignore
Normal file
8
libprozilla/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
||||
Makefile
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
stamp-h1
|
||||
*.tar.gz
|
||||
.tm_project.cache
|
||||
226
libprozilla/ABOUT-NLS
Normal file
226
libprozilla/ABOUT-NLS
Normal file
@@ -0,0 +1,226 @@
|
||||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do *not*
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
One advise in advance
|
||||
=====================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias or message inheritance) as the
|
||||
implementation here. It is also not possible to offer this additional
|
||||
functionality on top of a `catgets' implementation. Future versions of
|
||||
GNU `gettext' will very likely convey even more functionality. So it
|
||||
might be a good idea to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need not provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system provides
|
||||
usable `catgets' (if using this is selected by the installer) or
|
||||
`gettext' functions. If neither is available, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is *not* required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --with-catgets
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `catgets' or `gettext' to use
|
||||
the internationalizing routines provided within this package, enable
|
||||
the use of the `catgets' functions (if found on the locale system), or
|
||||
else, *totally* disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
By default the configuration process will not test for the `catgets'
|
||||
function and therefore they will not be used. The reasons are already
|
||||
given above: the emulation on top of `catgets' cannot provide all the
|
||||
extensions provided by the GNU `gettext' library. If you nevertheless
|
||||
want to use the `catgets' functions use
|
||||
|
||||
./configure --with-catgets
|
||||
|
||||
to enable the test for `catgets' (this causes no harm if `catgets' is
|
||||
not available on your system). If you really select this option we
|
||||
would like to hear about the reasons because we cannot think of any
|
||||
good one ourself.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
ISO 639 `LL' two-letter code prior to using the programs in the
|
||||
package. For example, let's suppose that you speak German. At the
|
||||
shell prompt, merely execute `setenv LANG de' (in `csh'),
|
||||
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
|
||||
can be done from your `.login' or `.profile' file, once and for all.
|
||||
|
||||
An operating system might already offer message localization for
|
||||
many of its programs, while other programs have been installed locally
|
||||
with the full capabilities of GNU `gettext'. Just using `gettext'
|
||||
extended syntax for `LANG' would break proper localization of already
|
||||
available operating system programs. In this case, users should set
|
||||
both `LANGUAGE' and `LANG' variables in their environment, as programs
|
||||
using GNU `gettext' give preference to `LANGUAGE'. For example, some
|
||||
Swedish users would rather read translations in German than English for
|
||||
when Swedish is not available. This is easily accomplished by setting
|
||||
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list, courtesy of Linux
|
||||
International. You may reach your translation team at the address
|
||||
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
|
||||
language. Language codes are *not* the same as the country codes given
|
||||
in ISO 3166. The following translation teams exist, as of December
|
||||
1997:
|
||||
|
||||
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
|
||||
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
|
||||
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
|
||||
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
|
||||
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
|
||||
Swedish `sv', and Turkish `tr'.
|
||||
|
||||
For example, you may reach the Chinese translation team by writing to
|
||||
`zh@li.org'.
|
||||
|
||||
If you'd like to volunteer to *work* at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is *not* the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
*actively* in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of December
|
||||
1997. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination.
|
||||
|
||||
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
.----------------------------------------------------.
|
||||
bash | [] [] [] | 3
|
||||
bison | [] [] [] | 3
|
||||
clisp | [] [] [] [] | 4
|
||||
cpio | [] [] [] [] [] [] | 6
|
||||
diffutils | [] [] [] [] [] | 5
|
||||
enscript | [] [] [] [] [] [] | 6
|
||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
findutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
flex | [] [] [] [] | 4
|
||||
gcal | [] [] [] [] [] | 5
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
|
||||
grep | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
id-utils | [] [] [] | 3
|
||||
indent | [] [] [] [] [] | 5
|
||||
libc | [] [] [] [] [] [] [] | 7
|
||||
m4 | [] [] [] [] [] [] | 6
|
||||
make | [] [] [] [] [] [] | 6
|
||||
music | [] [] | 2
|
||||
ptx | [] [] [] [] [] [] [] [] | 8
|
||||
recode | [] [] [] [] [] [] [] [] [] | 9
|
||||
sh-utils | [] [] [] [] [] [] [] [] | 8
|
||||
sharutils | [] [] [] [] [] [] | 6
|
||||
tar | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
texinfo | [] [] [] | 3
|
||||
textutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
wdiff | [] [] [] [] [] [] [] [] | 8
|
||||
`----------------------------------------------------'
|
||||
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If December 1997 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites.
|
||||
|
||||
23
libprozilla/AUTHORS
Normal file
23
libprozilla/AUTHORS
Normal file
@@ -0,0 +1,23 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Authors
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Main author:
|
||||
------------
|
||||
|
||||
Kalum Somaratana <kalum@genesys.ro>
|
||||
|
||||
|
||||
Contributions:
|
||||
--------------
|
||||
|
||||
Sean Covel <seanecovel@comcast.net>
|
||||
Uwe Hermann <uh1763@hermann-uwe.de>
|
||||
Michael Duelli <m.duelli@web.de>
|
||||
Gustavo Noronha Silva <kov@debian.org>
|
||||
Ralph Slooten <ralph.slooten@quicknet.nl>
|
||||
Ruben Boer <ruben@dirty-pages.nl>
|
||||
Flower <floweros@golia.ro>
|
||||
Emanuele Tatti <emanu_mary@inwind.it>
|
||||
Tavis Ormandy <taviso@gentoo.org>
|
||||
Hans de Goede <j.w.r.degoede@hhs.nl>
|
||||
340
libprozilla/COPYING
Normal file
340
libprozilla/COPYING
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
1104
libprozilla/ChangeLog
Normal file
1104
libprozilla/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
182
libprozilla/INSTALL
Normal file
182
libprozilla/INSTALL
Normal file
@@ -0,0 +1,182 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
7
libprozilla/Makefile.am
Normal file
7
libprozilla/Makefile.am
Normal file
@@ -0,0 +1,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = intl po docs src
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DIST_OTHER = COPYING
|
||||
394
libprozilla/Makefile.in
Normal file
394
libprozilla/Makefile.in
Normal file
@@ -0,0 +1,394 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
|
||||
SUBDIRS = intl po docs src
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DIST_OTHER = COPYING
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||
INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h acinclude.m4 \
|
||||
aclocal.m4 config.guess config.h.in config.sub configure configure.in \
|
||||
install-sh ltconfig ltmain.sh missing mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): configure.in acinclude.m4
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
config.h: stamp-h
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h 2> /dev/null
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h.in; \
|
||||
else :; fi
|
||||
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
|
||||
maintainer-clean-hdr:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" != "." || dot_seen=yes; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(DIST_SUBDIRS); do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
install-exec-am:
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile config.h
|
||||
all-redirect: all-recursive-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
install-data-recursive uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
4
libprozilla/NEWS
Normal file
4
libprozilla/NEWS
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
News
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
65
libprozilla/README
Normal file
65
libprozilla/README
Normal file
@@ -0,0 +1,65 @@
|
||||
-------------------------------------------------------------------------------
|
||||
libprozilla README
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
libprozilla is a library which provides functions to download a file in
|
||||
portions using multiple connections, thus speeding up the download process.
|
||||
It supports the HTTP and FTP protocols as well as the file resume feature.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
See COPYING for details.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
* ./configure
|
||||
* make
|
||||
* make install
|
||||
|
||||
|
||||
Mailinglists
|
||||
------------
|
||||
|
||||
There are several mailinglists you can subscribe to.
|
||||
All mailinglists are archived. The archives can be viewed online.
|
||||
|
||||
prozilla-users:
|
||||
* Discussions, user requests, suggestions and help.
|
||||
* Subscribe at: http://www.genesys.ro/mailman/listinfo/prozilla-users
|
||||
* Archive: http://www.genesys.ro/pipermail/prozilla-users/
|
||||
|
||||
prozilla-dev:
|
||||
* Development mailinglist.
|
||||
* Subscribe at: http://www.genesys.ro/mailman/listinfo/prozilla-dev
|
||||
* Archive: http://www.genesys.ro/pipermail/prozilla-dev/
|
||||
|
||||
|
||||
Homepage
|
||||
--------
|
||||
|
||||
prozilla.genesys.ro
|
||||
|
||||
40
libprozilla/TODO
Normal file
40
libprozilla/TODO
Normal file
@@ -0,0 +1,40 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Todo
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
* FIXED: Look into "Average Speed" way off on resumes.
|
||||
* Look into making the downloaded file's date/time match the remote file
|
||||
* Check the Remotely exploitable format string in 1.3
|
||||
* Check the handling of bad Commandline options in 1.3
|
||||
* Take a look at the k variable in the mass_ping request, upgrade url.c
|
||||
to latest versions, move all the logfile locks to a single section,
|
||||
there is no need for seperate mutex loxks etc.
|
||||
|
||||
* Write or generate API documentation.
|
||||
|
||||
* Honor the environment variables http_proxy and ftp_proxy.
|
||||
NOTE: Should this be part of libprozilla or the interface?
|
||||
Grendel: I think this should be part of the interface, the interface
|
||||
can allways tell libprozilla the proxy to use.
|
||||
|
||||
* Port to other platforms than GNU/Linux, e.g. SunOS/Solaris, FreeBSD etc...
|
||||
|
||||
* Add cookies support.
|
||||
|
||||
* Make the threads download to a single file, will need a state monitor
|
||||
which saves the state of each thread to resume properly.
|
||||
Note:libprozilla already does this.
|
||||
|
||||
* Bandwidth throttling? Note:ALready done.
|
||||
|
||||
* Use libtool.
|
||||
|
||||
* I need to stat the file's size, so we have to check and include
|
||||
sys/stat.h in common.h
|
||||
|
||||
* DONE: refreer support ftp
|
||||
|
||||
* The FTP through HTTP proxying needs a bit of chechin on how it would
|
||||
handle login rejection attempts when the ftp server disallows it
|
||||
|
||||
* DONE: write a function for getting the version of libprozilla
|
||||
25
libprozilla/acconfig.h
Normal file
25
libprozilla/acconfig.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* For use by autoheader. */
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H /* To stop multiple inclusions. */
|
||||
|
||||
|
||||
/* Enable GNU extensions. */
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* How many arguments does gethostbyname_r() take? */
|
||||
#undef HAVE_FUNC_GETHOSTBYNAME_R_6
|
||||
#undef HAVE_FUNC_GETHOSTBYNAME_R_5
|
||||
#undef HAVE_FUNC_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define to 'int' if not already defined by the system. */
|
||||
#undef socklen_t
|
||||
|
||||
|
||||
@TOP@
|
||||
/* autoheader generated things inserted here. */
|
||||
@BOTTOM@
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
1107
libprozilla/acinclude.m4
Normal file
1107
libprozilla/acinclude.m4
Normal file
File diff suppressed because it is too large
Load Diff
2149
libprozilla/aclocal.m4
vendored
Normal file
2149
libprozilla/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1438
libprozilla/config.guess
vendored
Executable file
1438
libprozilla/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
335
libprozilla/config.h.in
Normal file
335
libprozilla/config.h.in
Normal file
@@ -0,0 +1,335 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
/* For use by autoheader. */
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H /* To stop multiple inclusions. */
|
||||
|
||||
|
||||
/* Enable GNU extensions. */
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* How many arguments does gethostbyname_r() take? */
|
||||
#undef HAVE_FUNC_GETHOSTBYNAME_R_6
|
||||
#undef HAVE_FUNC_GETHOSTBYNAME_R_5
|
||||
#undef HAVE_FUNC_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define to 'int' if not already defined by the system. */
|
||||
#undef socklen_t
|
||||
|
||||
|
||||
/* autoheader generated things inserted here. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <argz.h> header file. */
|
||||
#undef HAVE_ARGZ_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#undef HAVE_ASSERT_H
|
||||
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#undef HAVE_CTYPE_H
|
||||
|
||||
/* Define to 1 if you have the `dcgettext' function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `feof_unlocked' function. */
|
||||
#undef HAVE_FEOF_UNLOCKED
|
||||
|
||||
/* Define to 1 if you have the `fgets_unlocked' function. */
|
||||
#undef HAVE_FGETS_UNLOCKED
|
||||
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define to 1 if you have the `getegid' function. */
|
||||
#undef HAVE_GETEGID
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define to 1 if you have the `getgid' function. */
|
||||
#undef HAVE_GETGID
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
#undef HAVE_GETUID
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
#undef HAVE_LANGINFO_CODESET
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
#undef HAVE_MEMPCPY
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <nl_types.h> header file. */
|
||||
#undef HAVE_NL_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#undef HAVE_PTHREAD_H
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#undef HAVE_STRNCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
/* Define to 1 if you have the `strtol' function. */
|
||||
#undef HAVE_STRTOL
|
||||
|
||||
/* Define to 1 if you have the `strtoul' function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the `tsearch' function. */
|
||||
#undef HAVE_TSEARCH
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `__argz_count' function. */
|
||||
#undef HAVE___ARGZ_COUNT
|
||||
|
||||
/* Define to 1 if you have the `__argz_next' function. */
|
||||
#undef HAVE___ARGZ_NEXT
|
||||
|
||||
/* Define to 1 if you have the `__argz_stringify' function. */
|
||||
#undef HAVE___ARGZ_STRINGIFY
|
||||
|
||||
/* Define to 1 if you have the `__snprintf' function. */
|
||||
#undef HAVE___SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `__vsnprintf' function. */
|
||||
#undef HAVE___VSNPRINTF
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of a `off_t', as computed by sizeof. */
|
||||
#undef SIZEOF_OFF_T
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
1544
libprozilla/config.sub
vendored
Executable file
1544
libprozilla/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
11647
libprozilla/configure
vendored
Executable file
11647
libprozilla/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
197
libprozilla/configure.in
Normal file
197
libprozilla/configure.in
Normal file
@@ -0,0 +1,197 @@
|
||||
dnl ***************************************************************************
|
||||
dnl libprozilla - a download accelerator library
|
||||
dnl Copyright (C) 2001 Kalum Somaratna
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl ***************************************************************************
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_INIT(src/connect.c)
|
||||
AC_INIT([libprozilla], [1.0.x-cvs],[prozilla@genesys.ro])
|
||||
|
||||
dnl AM_INIT_AUTOMAKE(libprozilla, 1.0.x-cvs)
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_DEFINE(_GNU_SOURCE)
|
||||
|
||||
AC_LANG_C
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
AC_AIX
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AM_ENABLE_STATIC
|
||||
AM_DISABLE_SHARED
|
||||
|
||||
AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
dnl -------------
|
||||
dnl gettext stuff
|
||||
dnl -------------
|
||||
ALL_LINGUAS="pt_BR ro nl it"
|
||||
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Checks for libraries.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
case $host in
|
||||
*-*-freebsd*)
|
||||
THREAD_LIBS="-pthread"
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
THREAD_LIBS="-pthread"
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(pthread, pthread_create,
|
||||
THREAD_LIBS="-lpthread",
|
||||
AC_MSG_ERROR([** The pthread library is not installed.**]))
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(THREAD_LIBS)
|
||||
|
||||
# Whenever both -lsocket and -lnsl are needed, it seems to be always the
|
||||
# case that gethostbyname requires -lnsl. So, check -lnsl first, for it
|
||||
# to be in LIBS before the setsockopt checks are performed. *However*,
|
||||
# on SINIX-N 5.43, this is false, and gethostent seems to be a better
|
||||
# candidate. So, let's use it below instead of gethostbyname, and see.
|
||||
|
||||
# [ This is ripped from GNU tar. ]
|
||||
|
||||
AC_CHECK_FUNC(gethostent)
|
||||
if test $ac_cv_func_gethostent = no; then
|
||||
AC_CHECK_LIB(nsl, gethostent)
|
||||
fi
|
||||
AC_CHECK_FUNC(setsockopt)
|
||||
if test $ac_cv_func_setsockopt = no; then
|
||||
AC_CHECK_LIB(socket, setsockopt)
|
||||
fi
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Checks for header files.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(stdio.h stdlib.h unistd.h ctype.h errno.h sys/types.h)
|
||||
AC_CHECK_HEADERS(sys/stat.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pthread.h)
|
||||
AC_CHECK_HEADERS(memory.h string.h strings.h time.h sys/time.h pwd.h)
|
||||
AC_CHECK_HEADERS(fcntl.h assert.h limits.h)
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
TYPE_SOCKLEN_T
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Checks for library functions.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(select socket strdup strerror strtol strncasecmp)
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf __snprintf __vsnprintf strchr strrchr)
|
||||
|
||||
AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Handle user-specified --enable-FEATURE options.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(compiler-warnings, [ --enable-compiler-warnings=[no/min/yes] Issue warnings? (default=no)], , enable_compiler_warnings=no, enable_compiler_warnings=no)
|
||||
|
||||
|
||||
dnl ============================================================ NLS Support ===
|
||||
dnl
|
||||
dnl AC_CHECK_LIB(intl, gettext,
|
||||
dnl [LIBS="$LIBS -lintl"])
|
||||
|
||||
AC_CHECK_FUNC(bindtextdomain,,
|
||||
[ AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[ LIBS="${LIBS} -lintl"
|
||||
],
|
||||
[ AC_MSG_ERROR([NLS (national language support) has been requested but
|
||||
*** the 'bindtextdomain' function neither has been found in your C runtime library
|
||||
*** nor in an external library called 'libintl'.
|
||||
***
|
||||
*** Install your vendor's version of libintl or get GNU gettext available
|
||||
*** from ftp://ftp.gnu.org/pub/gnu/gettext/.
|
||||
***])])])
|
||||
|
||||
|
||||
AC_PATH_PROG(XGETTEXT, xgettext)
|
||||
AC_PATH_PROG(MSGMERGE, msgmerge)
|
||||
AC_PATH_PROG(MSGFMT, msgfmt)
|
||||
|
||||
MSGMERGE="${MSGMERGE}" # --indent --verbose"
|
||||
MSGFMT="${MSGFMT}" # --check --statistics --verbose"
|
||||
|
||||
if test ! -x "$MSGFMT" ; then
|
||||
AC_MSG_ERROR(['msgfmt' not found. Perhaps you need to install 'gettext'?.])
|
||||
fi
|
||||
|
||||
|
||||
AC_SUBST(XGETTEXT)
|
||||
AC_SUBST(MSGMERGE)
|
||||
AC_SUBST(MSGFMT)
|
||||
|
||||
|
||||
CFLAGS="-Wall -O0 -D_REENTRANT"
|
||||
|
||||
if test "x$GCC" != "xyes"; then
|
||||
enable_compiler_warnings = "no";
|
||||
fi
|
||||
|
||||
if test "x$enable_compiler_warnings" != "xno"; then
|
||||
if test "x$enable_compiler_warnings" = "xmin"; then
|
||||
CFLAGS="$CFLAGS -g -ansi -pedantic"
|
||||
fi
|
||||
if test "x$enable_compiler_warnings" = "xyes"; then
|
||||
CFLAGS="$CFLAGS \
|
||||
-g -ansi -pedantic -W -Wtraditional -Wshadow -Wpointer-arith \
|
||||
-Wcast-qual -Wcast-align -Wwrite-strings -Wconversion \
|
||||
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -Winline"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Large File Summit support
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Now we've enabled/disabled LFS, see how big file sizes can be.
|
||||
AC_CHECK_SIZEOF([off_t])
|
||||
|
||||
AC_OUTPUT(Makefile docs/Makefile src/Makefile intl/Makefile po/Makefile.in)
|
||||
|
||||
198
libprozilla/docs/HACKING
Normal file
198
libprozilla/docs/HACKING
Normal file
@@ -0,0 +1,198 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Information for developers and contributors
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This documentation shall give some hints to developers and contributors.
|
||||
Please send comments and suggestions to the prozilla-dev mailinglist.
|
||||
|
||||
|
||||
Coding guidelines
|
||||
-----------------
|
||||
|
||||
* Use an indentation width of 2 spaces.
|
||||
Braces are put on a separate line, not on the same line as the
|
||||
if/while/for etc. statements. The braces themselves are not indented, only
|
||||
the code within the braces.
|
||||
|
||||
Example:
|
||||
|
||||
if (foo == TRUE)
|
||||
{
|
||||
while (bar != NULL)
|
||||
{
|
||||
do_something("Test.", 19);
|
||||
do_something_else();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Foo is not TRUE.\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
* Put a space after each comma.
|
||||
|
||||
* Do *not* put spaces between the function-name and the opening brace:
|
||||
Wrong: foo ("Test", 19);
|
||||
Correct: foo("Test", 19);
|
||||
|
||||
* Do not put a space when referring to a pointer.
|
||||
Wrong: void foo(const char * message);
|
||||
Correct: void foo(const char *message);
|
||||
|
||||
* Do not use any TABs in the code. The only files where you should use TABs
|
||||
is the ChangeLog and the Makefile.am's.
|
||||
|
||||
* Write only 80 characters per line where possible.
|
||||
|
||||
Have a look at the already existing code for examples.
|
||||
|
||||
|
||||
Names
|
||||
-----
|
||||
|
||||
Always use good, unabbreviated, correctly-spelled meaningful names.
|
||||
|
||||
All functions, variables, enums, #defines etc. which are intended to be used
|
||||
by the programs which link against libprozilla, are prefixed with proz_
|
||||
or PROZ_.
|
||||
|
||||
Examples:
|
||||
proz_init();
|
||||
#define PROZ_MAX_CONNECTIONS 19
|
||||
etc.
|
||||
|
||||
|
||||
TODO, FIXME and NOTE
|
||||
--------------------
|
||||
|
||||
Use the keywords 'TODO', 'FIXME' and 'NOTE' in the source-code comments
|
||||
to remind yourself or other developers of things which still need to be
|
||||
done or fixed.
|
||||
|
||||
You can then do a simple 'grep TODO *.[ch]' to find all those comments...
|
||||
|
||||
|
||||
ChangeLog entries
|
||||
-----------------
|
||||
|
||||
Everytime you make a change to any of the files, you must write a ChangeLog
|
||||
entry with your name, email adress and the date. Please try to write
|
||||
verbosive comments and also give reasons why you wrote/changed something
|
||||
if that reason is not obvious...
|
||||
|
||||
You can use 'cvs -z3 diff -Nu * | vim -' to view the differences between your
|
||||
code and the latest CVS-code. Use this as a help to write the ChangeLog entry.
|
||||
|
||||
Changes to the file 'ChangeLog' can be omitted, because this file is changed
|
||||
*everytime* anyway...
|
||||
|
||||
If you commit a patch from another developer or a contributor, add his name
|
||||
and email-adress to the file AUTHORS. Also write a small message in the
|
||||
ChangeLog which says e.g. 'Applied patch from Joe Foo <foo@bar.com>.'.
|
||||
|
||||
Do the same if someone reports and/or fixes a bug: Add him to AUTHORS and add
|
||||
a ChangeLog entry, e.g. 'Fixed a bug reported by Joe Foo <foo@bar.com>.'.
|
||||
|
||||
|
||||
Comments
|
||||
--------
|
||||
|
||||
* Do not comment obvious code (i++ /* Increment i. */ etc...).
|
||||
|
||||
* Only use C-style comments (/* Foo. */) and not C++-style comments (// Foo.).
|
||||
|
||||
* All comments should start with a capital letter and end with a dot.
|
||||
|
||||
|
||||
Tools used
|
||||
----------
|
||||
|
||||
We use the following tools for this project:
|
||||
|
||||
* autoconf 2.13 or better
|
||||
ftp://ftp.gnu.org/gnu/autoconf/
|
||||
|
||||
* automake 1.4 or better
|
||||
ftp://ftp.gnu.org/gnu/automake/
|
||||
|
||||
|
||||
Code from other projects
|
||||
------------------------
|
||||
|
||||
* getopt.c, getopt.h:
|
||||
Purpose: Commandline options parsing code.
|
||||
Author: ???
|
||||
License: GPL.
|
||||
From: ftp://ftp.gnu.org/gnu/glibc/
|
||||
Comments: Unmodified version from glibc.
|
||||
|
||||
* netrc.c, netrc.h:
|
||||
Purpose: Parse the .netrc file to get hosts, accounts, and passwords.
|
||||
Author: Gordon Matzigkeit <gord@gnu.ai.mit.edu>
|
||||
License: GPL
|
||||
From: ???
|
||||
Comments: Modified for libprozilla.
|
||||
|
||||
* url.c, url.h:
|
||||
Purpose: URL handling code.
|
||||
Author: ???
|
||||
License: GPL.
|
||||
From: ???
|
||||
Comments: Modified for libprozilla.
|
||||
|
||||
|
||||
Automatically generated files
|
||||
-----------------------------
|
||||
|
||||
The following files are automatically generated by either aclocal, autoheader
|
||||
autoconf or automake. Do not edit them directly.
|
||||
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
config.h.in
|
||||
configure
|
||||
install-sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
stamp-h.in
|
||||
docs/Makefile.in
|
||||
src/Makefile.in
|
||||
|
||||
|
||||
common.h
|
||||
--------
|
||||
|
||||
All libprozilla files include the common.h file. This file #includes all
|
||||
headers we need, #defines some things like TRUE and FALSE, typedefs
|
||||
a 'boolean' type etc...
|
||||
|
||||
|
||||
Patches
|
||||
-------
|
||||
|
||||
Send your patches (diff -u) to the prozilla-dev mailinglist.
|
||||
|
||||
If you changed several things in the code or fixed more than one problem,
|
||||
please send a separate patch for each of the fixes. If everything is in one
|
||||
single patch file, the patch is a lot harder to understand, check and apply.
|
||||
|
||||
|
||||
Mailinglists
|
||||
------------
|
||||
|
||||
Read the README.
|
||||
|
||||
|
||||
CVS
|
||||
---
|
||||
|
||||
You can access the libprozilla CVS repository anonymously (read-only access)
|
||||
by issueing the following commands:
|
||||
|
||||
cvs -d :pserver:anonymous@cvs.delrom.ro:/home/cvsroot login
|
||||
|
||||
Press enter when prompted for the password.
|
||||
|
||||
cvs -d :pserver:anonymous@cvs.delrom.ro:/home/cvsroot co libprozilla
|
||||
|
||||
6
libprozilla/docs/Makefile.am
Normal file
6
libprozilla/docs/Makefile.am
Normal file
@@ -0,0 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
EXTRA_DIST = HACKING
|
||||
|
||||
211
libprozilla/docs/Makefile.in
Normal file
211
libprozilla/docs/Makefile.in
Normal file
@@ -0,0 +1,211 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
|
||||
EXTRA_DIST = HACKING
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = docs
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu docs/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
251
libprozilla/install-sh
Executable file
251
libprozilla/install-sh
Executable file
@@ -0,0 +1,251 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
1746
libprozilla/intl/ChangeLog
Normal file
1746
libprozilla/intl/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
312
libprozilla/intl/Makefile.in
Normal file
312
libprozilla/intl/Makefile.in
Normal file
@@ -0,0 +1,312 @@
|
||||
# Makefile for directory with message catalog handling in GNU NLS Utilities.
|
||||
# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ..
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
transform = @program_transform_name@
|
||||
libdir = @libdir@
|
||||
includedir = @includedir@
|
||||
datadir = @datadir@
|
||||
localedir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/gettext/intl
|
||||
aliaspath = $(localedir)
|
||||
subdir = intl
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||
|
||||
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
|
||||
AR = ar
|
||||
CC = @CC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
RANLIB = @RANLIB@
|
||||
YACC = @INTLBISON@ -y -d
|
||||
YFLAGS = --name-prefix=__gettext
|
||||
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
|
||||
-DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
|
||||
COMHDRS = gettext.h gettextP.h hash-string.h
|
||||
SOURCES = $(COMSRCS) intl-compat.c
|
||||
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
|
||||
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
|
||||
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
|
||||
localcharset.c
|
||||
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
|
||||
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
|
||||
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
|
||||
plural.$lo localcharset.$lo
|
||||
GETTOBJS = intl-compat.$lo
|
||||
DISTFILES.common = Makefile.in \
|
||||
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
||||
DISTFILES.generated = plural.c
|
||||
DISTFILES.normal = VERSION
|
||||
DISTFILES.gettext = libintl.glibc
|
||||
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
|
||||
|
||||
# Libtool's library version information for libintl.
|
||||
# Before making a gettext release, the gettext maintainer must change this
|
||||
# according to the libtool documentation, section "Library interface versions".
|
||||
# Maintainers of other packages that include the intl directory must *not*
|
||||
# change these values.
|
||||
LTV_CURRENT=1
|
||||
LTV_REVISION=1
|
||||
LTV_AGE=0
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .y .o .lo .sin .sed
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) $<
|
||||
|
||||
.y.c:
|
||||
$(YACC) $(YFLAGS) --output $@ $<
|
||||
rm -f $*.h
|
||||
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
INCLUDES = -I.. -I. -I$(top_srcdir)/intl
|
||||
|
||||
all: all-@USE_INCLUDED_LIBINTL@
|
||||
all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
|
||||
all-no: all-no-@BUILD_INCLUDED_LIBINTL@
|
||||
all-no-yes: libgnuintl.$la
|
||||
all-no-no:
|
||||
|
||||
libintl.a libgnuintl.a: $(OBJECTS)
|
||||
rm -f $@
|
||||
$(AR) cru $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libintl.la libgnuintl.la: $(OBJECTS)
|
||||
$(LIBTOOL) --mode=link \
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
|
||||
$(OBJECTS) @LIBICONV@ \
|
||||
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
|
||||
-rpath $(libdir) \
|
||||
-no-undefined
|
||||
|
||||
libintl.h: libgnuintl.h
|
||||
cp $(srcdir)/libgnuintl.h libintl.h
|
||||
|
||||
charset.alias: config.charset
|
||||
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
check: all
|
||||
|
||||
# This installation goal is only used in GNU gettext. Packages which
|
||||
# only use the library should use install instead.
|
||||
|
||||
# We must not install the libintl.h/libintl.a files if we are on a
|
||||
# system which has the GNU gettext() function in its C library or in a
|
||||
# separate library.
|
||||
# If you want to use the one which comes with this version of the
|
||||
# package, you have to use `configure --with-included-gettext'.
|
||||
install: install-exec install-data
|
||||
install-exec: all
|
||||
if test "$(PACKAGE)" = "gettext" \
|
||||
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
|
||||
$(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
|
||||
$(LIBTOOL) --mode=install \
|
||||
$(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
||||
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
||||
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
||||
orig=$(DESTDIR)$(libdir)/charset.alias; \
|
||||
sed -f ref-add.sed $$orig > $$temp; \
|
||||
$(INSTALL_DATA) $$temp $$dest; \
|
||||
rm -f $$temp; \
|
||||
else \
|
||||
if test @GLIBC21@ = no; then \
|
||||
orig=charset.alias; \
|
||||
sed -f ref-add.sed $$orig > $$temp; \
|
||||
$(INSTALL_DATA) $$temp $$dest; \
|
||||
rm -f $$temp; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(localedir); \
|
||||
test -f $(DESTDIR)$(localedir)/locale.alias \
|
||||
&& orig=$(DESTDIR)$(localedir)/locale.alias \
|
||||
|| orig=$(srcdir)/locale.alias; \
|
||||
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
||||
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
||||
sed -f ref-add.sed $$orig > $$temp; \
|
||||
$(INSTALL_DATA) $$temp $$dest; \
|
||||
rm -f $$temp; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data: all
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
||||
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
||||
dists="$(DISTFILES.common)"; \
|
||||
for file in $$dists; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
|
||||
dists="$(DISTFILES.generated)"; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||
$(INSTALL_DATA) $$dir/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
dists="$(DISTFILES.obsolete)"; \
|
||||
for file in $$dists; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
if test "$(PACKAGE)" = "gettext" \
|
||||
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
||||
rm -f $(DESTDIR)$(includedir)/libintl.h; \
|
||||
$(LIBTOOL) --mode=uninstall \
|
||||
rm -f $(DESTDIR)$(libdir)/libintl.$la; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
|
||||
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
||||
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
||||
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
||||
sed -f ref-del.sed $$dest > $$temp; \
|
||||
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
|
||||
rm -f $$dest; \
|
||||
else \
|
||||
$(INSTALL_DATA) $$temp $$dest; \
|
||||
fi; \
|
||||
rm -f $$temp; \
|
||||
fi; \
|
||||
if test -f $(DESTDIR)$(localedir)/locale.alias; then \
|
||||
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
||||
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
||||
sed -f ref-del.sed $$dest > $$temp; \
|
||||
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
|
||||
rm -f $$dest; \
|
||||
else \
|
||||
$(INSTALL_DATA) $$temp $$dest; \
|
||||
fi; \
|
||||
rm -f $$temp; \
|
||||
fi; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
for file in VERSION ChangeLog $(DISTFILES.common) $(DISTFILES.generated); do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
info dvi:
|
||||
|
||||
$(OBJECTS): ../config.h libgnuintl.h
|
||||
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
|
||||
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
|
||||
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES)
|
||||
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
|
||||
|
||||
id: ID
|
||||
|
||||
ID: $(HEADERS) $(SOURCES)
|
||||
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
|
||||
|
||||
|
||||
mostlyclean:
|
||||
rm -f *.a *.la *.o *.lo core core.*
|
||||
rm -f libintl.h charset.alias ref-add.sed ref-del.sed
|
||||
rm -f -r .libs _libs
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile ID TAGS
|
||||
if test "$(PACKAGE)" = gettext; then \
|
||||
rm -f ChangeLog.inst $(DISTFILES.normal); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
|
||||
# GNU gettext needs not contain the file `VERSION' but contains some
|
||||
# other files which should not be distributed in other packages.
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: Makefile
|
||||
if test "$(PACKAGE)" = gettext; then \
|
||||
additional="$(DISTFILES.gettext)"; \
|
||||
else \
|
||||
additional="$(DISTFILES.normal)"; \
|
||||
fi; \
|
||||
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
|
||||
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
|
||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||
ln $$dir/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $$dir/$$file $(distdir); \
|
||||
done
|
||||
|
||||
Makefile: Makefile.in ../config.status
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
1
libprozilla/intl/VERSION
Normal file
1
libprozilla/intl/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
GNU gettext library from gettext-0.10.38
|
||||
368
libprozilla/intl/bindtextdom.c
Normal file
368
libprozilla/intl/bindtextdom.c
Normal file
@@ -0,0 +1,368 @@
|
||||
/* Implementation of the bindtextdomain(3) function
|
||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
#include "gettextP.h"
|
||||
|
||||
#ifdef _LIBC
|
||||
/* We have to handle multi-threaded applications. */
|
||||
# include <bits/libc-lock.h>
|
||||
#else
|
||||
/* Provide dummy implementation if this is outside glibc. */
|
||||
# define __libc_rwlock_define(CLASS, NAME)
|
||||
# define __libc_rwlock_wrlock(NAME)
|
||||
# define __libc_rwlock_unlock(NAME)
|
||||
#endif
|
||||
|
||||
/* The internal variables in the standalone libintl.a must have different
|
||||
names than the internal variables in GNU libc, otherwise programs
|
||||
using libintl.a cannot be linked statically. */
|
||||
#if !defined _LIBC
|
||||
# define _nl_default_dirname _nl_default_dirname__
|
||||
# define _nl_domain_bindings _nl_domain_bindings__
|
||||
#endif
|
||||
|
||||
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
|
||||
#ifndef offsetof
|
||||
# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Contains the default location of the message catalogs. */
|
||||
extern const char _nl_default_dirname[];
|
||||
|
||||
/* List with bindings of specific domains. */
|
||||
extern struct binding *_nl_domain_bindings;
|
||||
|
||||
/* Lock variable to protect the global data in the gettext implementation. */
|
||||
__libc_rwlock_define (extern, _nl_state_lock)
|
||||
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define BINDTEXTDOMAIN __bindtextdomain
|
||||
# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
|
||||
# ifndef strdup
|
||||
# define strdup(str) __strdup (str)
|
||||
# endif
|
||||
#else
|
||||
# define BINDTEXTDOMAIN bindtextdomain__
|
||||
# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
|
||||
#endif
|
||||
|
||||
/* Prototypes for local functions. */
|
||||
static void set_binding_values PARAMS ((const char *domainname,
|
||||
const char **dirnamep,
|
||||
const char **codesetp));
|
||||
|
||||
/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
|
||||
to be used for the DOMAINNAME message catalog.
|
||||
If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
|
||||
modified, only the current value is returned.
|
||||
If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
|
||||
modified nor returned. */
|
||||
static void
|
||||
set_binding_values (domainname, dirnamep, codesetp)
|
||||
const char *domainname;
|
||||
const char **dirnamep;
|
||||
const char **codesetp;
|
||||
{
|
||||
struct binding *binding;
|
||||
int modified;
|
||||
|
||||
/* Some sanity checks. */
|
||||
if (domainname == NULL || domainname[0] == '\0')
|
||||
{
|
||||
if (dirnamep)
|
||||
*dirnamep = NULL;
|
||||
if (codesetp)
|
||||
*codesetp = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
__libc_rwlock_wrlock (_nl_state_lock);
|
||||
|
||||
modified = 0;
|
||||
|
||||
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
|
||||
{
|
||||
int compare = strcmp (domainname, binding->domainname);
|
||||
if (compare == 0)
|
||||
/* We found it! */
|
||||
break;
|
||||
if (compare < 0)
|
||||
{
|
||||
/* It is not in the list. */
|
||||
binding = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (binding != NULL)
|
||||
{
|
||||
if (dirnamep)
|
||||
{
|
||||
const char *dirname = *dirnamep;
|
||||
|
||||
if (dirname == NULL)
|
||||
/* The current binding has be to returned. */
|
||||
*dirnamep = binding->dirname;
|
||||
else
|
||||
{
|
||||
/* The domain is already bound. If the new value and the old
|
||||
one are equal we simply do nothing. Otherwise replace the
|
||||
old binding. */
|
||||
char *result = binding->dirname;
|
||||
if (strcmp (dirname, result) != 0)
|
||||
{
|
||||
if (strcmp (dirname, _nl_default_dirname) == 0)
|
||||
result = (char *) _nl_default_dirname;
|
||||
else
|
||||
{
|
||||
#if defined _LIBC || defined HAVE_STRDUP
|
||||
result = strdup (dirname);
|
||||
#else
|
||||
size_t len = strlen (dirname) + 1;
|
||||
result = (char *) malloc (len);
|
||||
if (__builtin_expect (result != NULL, 1))
|
||||
memcpy (result, dirname, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (__builtin_expect (result != NULL, 1))
|
||||
{
|
||||
if (binding->dirname != _nl_default_dirname)
|
||||
free (binding->dirname);
|
||||
|
||||
binding->dirname = result;
|
||||
modified = 1;
|
||||
}
|
||||
}
|
||||
*dirnamep = result;
|
||||
}
|
||||
}
|
||||
|
||||
if (codesetp)
|
||||
{
|
||||
const char *codeset = *codesetp;
|
||||
|
||||
if (codeset == NULL)
|
||||
/* The current binding has be to returned. */
|
||||
*codesetp = binding->codeset;
|
||||
else
|
||||
{
|
||||
/* The domain is already bound. If the new value and the old
|
||||
one are equal we simply do nothing. Otherwise replace the
|
||||
old binding. */
|
||||
char *result = binding->codeset;
|
||||
if (result == NULL || strcmp (codeset, result) != 0)
|
||||
{
|
||||
#if defined _LIBC || defined HAVE_STRDUP
|
||||
result = strdup (codeset);
|
||||
#else
|
||||
size_t len = strlen (codeset) + 1;
|
||||
result = (char *) malloc (len);
|
||||
if (__builtin_expect (result != NULL, 1))
|
||||
memcpy (result, codeset, len);
|
||||
#endif
|
||||
|
||||
if (__builtin_expect (result != NULL, 1))
|
||||
{
|
||||
if (binding->codeset != NULL)
|
||||
free (binding->codeset);
|
||||
|
||||
binding->codeset = result;
|
||||
binding->codeset_cntr++;
|
||||
modified = 1;
|
||||
}
|
||||
}
|
||||
*codesetp = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((dirnamep == NULL || *dirnamep == NULL)
|
||||
&& (codesetp == NULL || *codesetp == NULL))
|
||||
{
|
||||
/* Simply return the default values. */
|
||||
if (dirnamep)
|
||||
*dirnamep = _nl_default_dirname;
|
||||
if (codesetp)
|
||||
*codesetp = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We have to create a new binding. */
|
||||
size_t len = strlen (domainname) + 1;
|
||||
struct binding *new_binding =
|
||||
(struct binding *) malloc (offsetof (struct binding, domainname) + len);
|
||||
|
||||
if (__builtin_expect (new_binding == NULL, 0))
|
||||
goto failed;
|
||||
|
||||
memcpy (new_binding->domainname, domainname, len);
|
||||
|
||||
if (dirnamep)
|
||||
{
|
||||
const char *dirname = *dirnamep;
|
||||
|
||||
if (dirname == NULL)
|
||||
/* The default value. */
|
||||
dirname = _nl_default_dirname;
|
||||
else
|
||||
{
|
||||
if (strcmp (dirname, _nl_default_dirname) == 0)
|
||||
dirname = _nl_default_dirname;
|
||||
else
|
||||
{
|
||||
char *result;
|
||||
#if defined _LIBC || defined HAVE_STRDUP
|
||||
result = strdup (dirname);
|
||||
if (__builtin_expect (result == NULL, 0))
|
||||
goto failed_dirname;
|
||||
#else
|
||||
size_t len = strlen (dirname) + 1;
|
||||
result = (char *) malloc (len);
|
||||
if (__builtin_expect (result == NULL, 0))
|
||||
goto failed_dirname;
|
||||
memcpy (result, dirname, len);
|
||||
#endif
|
||||
dirname = result;
|
||||
}
|
||||
}
|
||||
*dirnamep = dirname;
|
||||
new_binding->dirname = (char *) dirname;
|
||||
}
|
||||
else
|
||||
/* The default value. */
|
||||
new_binding->dirname = (char *) _nl_default_dirname;
|
||||
|
||||
new_binding->codeset_cntr = 0;
|
||||
|
||||
if (codesetp)
|
||||
{
|
||||
const char *codeset = *codesetp;
|
||||
|
||||
if (codeset != NULL)
|
||||
{
|
||||
char *result;
|
||||
|
||||
#if defined _LIBC || defined HAVE_STRDUP
|
||||
result = strdup (codeset);
|
||||
if (__builtin_expect (result == NULL, 0))
|
||||
goto failed_codeset;
|
||||
#else
|
||||
size_t len = strlen (codeset) + 1;
|
||||
result = (char *) malloc (len);
|
||||
if (__builtin_expect (result == NULL, 0))
|
||||
goto failed_codeset;
|
||||
memcpy (result, codeset, len);
|
||||
#endif
|
||||
codeset = result;
|
||||
new_binding->codeset_cntr++;
|
||||
}
|
||||
*codesetp = codeset;
|
||||
new_binding->codeset = (char *) codeset;
|
||||
}
|
||||
else
|
||||
new_binding->codeset = NULL;
|
||||
|
||||
/* Now enqueue it. */
|
||||
if (_nl_domain_bindings == NULL
|
||||
|| strcmp (domainname, _nl_domain_bindings->domainname) < 0)
|
||||
{
|
||||
new_binding->next = _nl_domain_bindings;
|
||||
_nl_domain_bindings = new_binding;
|
||||
}
|
||||
else
|
||||
{
|
||||
binding = _nl_domain_bindings;
|
||||
while (binding->next != NULL
|
||||
&& strcmp (domainname, binding->next->domainname) > 0)
|
||||
binding = binding->next;
|
||||
|
||||
new_binding->next = binding->next;
|
||||
binding->next = new_binding;
|
||||
}
|
||||
|
||||
modified = 1;
|
||||
|
||||
/* Here we deal with memory allocation failures. */
|
||||
if (0)
|
||||
{
|
||||
failed_codeset:
|
||||
if (new_binding->dirname != _nl_default_dirname)
|
||||
free (new_binding->dirname);
|
||||
failed_dirname:
|
||||
free (new_binding);
|
||||
failed:
|
||||
if (dirnamep)
|
||||
*dirnamep = NULL;
|
||||
if (codesetp)
|
||||
*codesetp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we modified any binding, we flush the caches. */
|
||||
if (modified)
|
||||
++_nl_msg_cat_cntr;
|
||||
|
||||
__libc_rwlock_unlock (_nl_state_lock);
|
||||
}
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
char *
|
||||
BINDTEXTDOMAIN (domainname, dirname)
|
||||
const char *domainname;
|
||||
const char *dirname;
|
||||
{
|
||||
set_binding_values (domainname, &dirname, NULL);
|
||||
return (char *) dirname;
|
||||
}
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
char *
|
||||
BIND_TEXTDOMAIN_CODESET (domainname, codeset)
|
||||
const char *domainname;
|
||||
const char *codeset;
|
||||
{
|
||||
set_binding_values (domainname, NULL, &codeset);
|
||||
return (char *) codeset;
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Aliases for function names in GNU C Library. */
|
||||
weak_alias (__bindtextdomain, bindtextdomain);
|
||||
weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
|
||||
#endif
|
||||
438
libprozilla/intl/config.charset
Executable file
438
libprozilla/intl/config.charset
Executable file
@@ -0,0 +1,438 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# The table consists of lines of the form
|
||||
# ALIAS CANONICAL
|
||||
#
|
||||
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
|
||||
# ALIAS is compared in a case sensitive way.
|
||||
#
|
||||
# CANONICAL is the GNU canonical name for this character encoding.
|
||||
# It must be an encoding supported by libiconv. Support by GNU libc is
|
||||
# also desirable. CANONICAL is case insensitive. Usually an upper case
|
||||
# MIME charset name is preferred.
|
||||
# The current list of GNU canonical charset names is as follows.
|
||||
#
|
||||
# name used by which systems a MIME name?
|
||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
||||
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-3 glibc yes
|
||||
# ISO-8859-4 osf solaris freebsd yes
|
||||
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-6 glibc aix hpux solaris yes
|
||||
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-8 glibc aix hpux osf solaris yes
|
||||
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-13 glibc
|
||||
# ISO-8859-15 glibc aix osf solaris freebsd
|
||||
# KOI8-R glibc solaris freebsd yes
|
||||
# KOI8-U glibc freebsd yes
|
||||
# CP437 dos
|
||||
# CP775 dos
|
||||
# CP850 aix osf dos
|
||||
# CP852 dos
|
||||
# CP855 dos
|
||||
# CP856 aix
|
||||
# CP857 dos
|
||||
# CP861 dos
|
||||
# CP862 dos
|
||||
# CP864 dos
|
||||
# CP865 dos
|
||||
# CP866 freebsd dos
|
||||
# CP869 dos
|
||||
# CP874 win32 dos
|
||||
# CP922 aix
|
||||
# CP932 aix win32 dos
|
||||
# CP943 aix
|
||||
# CP949 osf win32 dos
|
||||
# CP950 win32 dos
|
||||
# CP1046 aix
|
||||
# CP1124 aix
|
||||
# CP1129 aix
|
||||
# CP1250 win32
|
||||
# CP1251 glibc win32
|
||||
# CP1252 aix win32
|
||||
# CP1253 win32
|
||||
# CP1254 win32
|
||||
# CP1255 win32
|
||||
# CP1256 win32
|
||||
# CP1257 win32
|
||||
# GB2312 glibc aix hpux irix solaris freebsd yes
|
||||
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
||||
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
||||
# EUC-TW glibc aix hpux irix osf solaris
|
||||
# BIG5 glibc aix hpux osf solaris freebsd yes
|
||||
# BIG5HKSCS glibc
|
||||
# GBK aix osf win32 dos
|
||||
# GB18030 glibc
|
||||
# SJIS hpux osf solaris freebsd
|
||||
# JOHAB glibc win32
|
||||
# TIS-620 glibc aix hpux osf solaris
|
||||
# VISCII glibc yes
|
||||
# HP-ROMAN8 hpux
|
||||
# HP-ARABIC8 hpux
|
||||
# HP-GREEK8 hpux
|
||||
# HP-HEBREW8 hpux
|
||||
# HP-TURKISH8 hpux
|
||||
# HP-KANA8 hpux
|
||||
# DEC-KANJI osf
|
||||
# DEC-HANYU osf
|
||||
# UTF-8 glibc aix hpux osf solaris yes
|
||||
#
|
||||
# Note: Names which are not marked as being a MIME name should not be used in
|
||||
# Internet protocols for information interchange (mail, news, etc.).
|
||||
#
|
||||
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
||||
# must understand both names and treat them as equivalent.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
|
||||
host="$1"
|
||||
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
|
||||
echo "# This file contains a table of character encoding aliases,"
|
||||
echo "# suitable for operating system '${os}'."
|
||||
echo "# It was automatically generated from config.charset."
|
||||
# List of references, updated during installation:
|
||||
echo "# Packages using this file: "
|
||||
case "$os" in
|
||||
linux* | *-gnu*)
|
||||
# With glibc-2.1 or newer, we don't need any canonicalization,
|
||||
# because glibc has iconv and both glibc and libiconv support all
|
||||
# GNU canonical names directly. Therefore, the Makefile does not
|
||||
# need to install the alias file at all.
|
||||
# The following applies only to glibc-2.0.x and older libcs.
|
||||
echo "ISO_646.IRV:1983 ASCII"
|
||||
;;
|
||||
aix*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-6 ISO-8859-6"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "IBM-850 CP850"
|
||||
echo "IBM-856 CP856"
|
||||
echo "IBM-921 ISO-8859-13"
|
||||
echo "IBM-922 CP922"
|
||||
echo "IBM-932 CP932"
|
||||
echo "IBM-943 CP943"
|
||||
echo "IBM-1046 CP1046"
|
||||
echo "IBM-1124 CP1124"
|
||||
echo "IBM-1129 CP1129"
|
||||
echo "IBM-1252 CP1252"
|
||||
echo "IBM-eucCN GB2312"
|
||||
echo "IBM-eucJP EUC-JP"
|
||||
echo "IBM-eucKR EUC-KR"
|
||||
echo "IBM-eucTW EUC-TW"
|
||||
echo "big5 BIG5"
|
||||
echo "GBK GBK"
|
||||
echo "TIS-620 TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
hpux*)
|
||||
echo "iso88591 ISO-8859-1"
|
||||
echo "iso88592 ISO-8859-2"
|
||||
echo "iso88595 ISO-8859-5"
|
||||
echo "iso88596 ISO-8859-6"
|
||||
echo "iso88597 ISO-8859-7"
|
||||
echo "iso88598 ISO-8859-8"
|
||||
echo "iso88599 ISO-8859-9"
|
||||
echo "iso885915 ISO-8859-15"
|
||||
echo "roman8 HP-ROMAN8"
|
||||
echo "arabic8 HP-ARABIC8"
|
||||
echo "greek8 HP-GREEK8"
|
||||
echo "hebrew8 HP-HEBREW8"
|
||||
echo "turkish8 HP-TURKISH8"
|
||||
echo "kana8 HP-KANA8"
|
||||
echo "tis620 TIS-620"
|
||||
echo "big5 BIG5"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "hp15CN GB2312"
|
||||
#echo "ccdc ?" # what is this?
|
||||
echo "SJIS SJIS"
|
||||
echo "utf8 UTF-8"
|
||||
;;
|
||||
irix*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "eucCN GB2312"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
;;
|
||||
osf*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "cp850 CP850"
|
||||
echo "big5 BIG5"
|
||||
echo "dechanyu DEC-HANYU"
|
||||
echo "dechanzi GB2312"
|
||||
echo "deckanji DEC-KANJI"
|
||||
echo "deckorean EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "GBK GBK"
|
||||
echo "KSC5601 CP949"
|
||||
echo "sdeckanji EUC-JP"
|
||||
echo "SJIS SJIS"
|
||||
echo "TACTIS TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
solaris*)
|
||||
echo "646 ASCII"
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-6 ISO-8859-6"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "koi8-r KOI8-R"
|
||||
echo "BIG5 BIG5"
|
||||
echo "gb2312 GB2312"
|
||||
echo "cns11643 EUC-TW"
|
||||
echo "5601 EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "PCK SJIS"
|
||||
echo "TIS620.2533 TIS-620"
|
||||
#echo "sun_eu_greek ?" # what is this?
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
freebsd*)
|
||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "C ASCII"
|
||||
echo "US-ASCII ASCII"
|
||||
for l in la_LN lt_LN; do
|
||||
echo "$l.ASCII ASCII"
|
||||
done
|
||||
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||
echo "$l.ISO_8859-1 ISO-8859-1"
|
||||
echo "$l.DIS_8859-15 ISO-8859-15"
|
||||
done
|
||||
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
|
||||
echo "$l.ISO_8859-2 ISO-8859-2"
|
||||
done
|
||||
for l in la_LN lt_LT; do
|
||||
echo "$l.ISO_8859-4 ISO-8859-4"
|
||||
done
|
||||
for l in ru_RU ru_SU; do
|
||||
echo "$l.KOI8-R KOI8-R"
|
||||
echo "$l.ISO_8859-5 ISO-8859-5"
|
||||
echo "$l.CP866 CP866"
|
||||
done
|
||||
echo "uk_UA.KOI8-U KOI8-U"
|
||||
echo "zh_TW.BIG5 BIG5"
|
||||
echo "zh_TW.Big5 BIG5"
|
||||
echo "zh_CN.EUC GB2312"
|
||||
echo "ja_JP.EUC EUC-JP"
|
||||
echo "ja_JP.SJIS SJIS"
|
||||
echo "ja_JP.Shift_JIS SJIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
beos*)
|
||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||
echo "* UTF-8"
|
||||
;;
|
||||
msdosdjgpp*)
|
||||
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "#"
|
||||
echo "# The encodings given here may not all be correct."
|
||||
echo "# If you find that the encoding given for your language and"
|
||||
echo "# country is not the one your DOS machine actually uses, just"
|
||||
echo "# correct it in this file, and send a mail to"
|
||||
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
||||
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
||||
echo "#"
|
||||
echo "C ASCII"
|
||||
# ISO-8859-1 languages
|
||||
echo "ca CP850"
|
||||
echo "ca_ES CP850"
|
||||
echo "da CP865" # not CP850 ??
|
||||
echo "da_DK CP865" # not CP850 ??
|
||||
echo "de CP850"
|
||||
echo "de_AT CP850"
|
||||
echo "de_CH CP850"
|
||||
echo "de_DE CP850"
|
||||
echo "en CP850"
|
||||
echo "en_AU CP850" # not CP437 ??
|
||||
echo "en_CA CP850"
|
||||
echo "en_GB CP850"
|
||||
echo "en_NZ CP437"
|
||||
echo "en_US CP437"
|
||||
echo "en_ZA CP850" # not CP437 ??
|
||||
echo "es CP850"
|
||||
echo "es_AR CP850"
|
||||
echo "es_BO CP850"
|
||||
echo "es_CL CP850"
|
||||
echo "es_CO CP850"
|
||||
echo "es_CR CP850"
|
||||
echo "es_CU CP850"
|
||||
echo "es_DO CP850"
|
||||
echo "es_EC CP850"
|
||||
echo "es_ES CP850"
|
||||
echo "es_GT CP850"
|
||||
echo "es_HN CP850"
|
||||
echo "es_MX CP850"
|
||||
echo "es_NI CP850"
|
||||
echo "es_PA CP850"
|
||||
echo "es_PY CP850"
|
||||
echo "es_PE CP850"
|
||||
echo "es_SV CP850"
|
||||
echo "es_UY CP850"
|
||||
echo "es_VE CP850"
|
||||
echo "et CP850"
|
||||
echo "et_EE CP850"
|
||||
echo "eu CP850"
|
||||
echo "eu_ES CP850"
|
||||
echo "fi CP850"
|
||||
echo "fi_FI CP850"
|
||||
echo "fr CP850"
|
||||
echo "fr_BE CP850"
|
||||
echo "fr_CA CP850"
|
||||
echo "fr_CH CP850"
|
||||
echo "fr_FR CP850"
|
||||
echo "ga CP850"
|
||||
echo "ga_IE CP850"
|
||||
echo "gd CP850"
|
||||
echo "gd_GB CP850"
|
||||
echo "gl CP850"
|
||||
echo "gl_ES CP850"
|
||||
echo "id CP850" # not CP437 ??
|
||||
echo "id_ID CP850" # not CP437 ??
|
||||
echo "is CP861" # not CP850 ??
|
||||
echo "is_IS CP861" # not CP850 ??
|
||||
echo "it CP850"
|
||||
echo "it_CH CP850"
|
||||
echo "it_IT CP850"
|
||||
echo "lt CP775"
|
||||
echo "lt_LT CP775"
|
||||
echo "lv CP775"
|
||||
echo "lv_LV CP775"
|
||||
echo "nb CP865" # not CP850 ??
|
||||
echo "nb_NO CP865" # not CP850 ??
|
||||
echo "nl CP850"
|
||||
echo "nl_BE CP850"
|
||||
echo "nl_NL CP850"
|
||||
echo "nn CP865" # not CP850 ??
|
||||
echo "nn_NO CP865" # not CP850 ??
|
||||
echo "no CP865" # not CP850 ??
|
||||
echo "no_NO CP865" # not CP850 ??
|
||||
echo "pt CP850"
|
||||
echo "pt_BR CP850"
|
||||
echo "pt_PT CP850"
|
||||
echo "sv CP850"
|
||||
echo "sv_SE CP850"
|
||||
# ISO-8859-2 languages
|
||||
echo "cs CP852"
|
||||
echo "cs_CZ CP852"
|
||||
echo "hr CP852"
|
||||
echo "hr_HR CP852"
|
||||
echo "hu CP852"
|
||||
echo "hu_HU CP852"
|
||||
echo "pl CP852"
|
||||
echo "pl_PL CP852"
|
||||
echo "ro CP852"
|
||||
echo "ro_RO CP852"
|
||||
echo "sk CP852"
|
||||
echo "sk_SK CP852"
|
||||
echo "sl CP852"
|
||||
echo "sl_SI CP852"
|
||||
echo "sq CP852"
|
||||
echo "sq_AL CP852"
|
||||
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||
# ISO-8859-3 languages
|
||||
echo "mt CP850"
|
||||
echo "mt_MT CP850"
|
||||
# ISO-8859-5 languages
|
||||
echo "be CP866"
|
||||
echo "be_BE CP866"
|
||||
echo "bg CP866" # not CP855 ??
|
||||
echo "bg_BG CP866" # not CP855 ??
|
||||
echo "mk CP866" # not CP855 ??
|
||||
echo "mk_MK CP866" # not CP855 ??
|
||||
echo "ru KOI8-R" # not CP866 ??
|
||||
echo "ru_RU KOI8-R" # not CP866 ??
|
||||
# ISO-8859-6 languages
|
||||
echo "ar CP864"
|
||||
echo "ar_AE CP864"
|
||||
echo "ar_DZ CP864"
|
||||
echo "ar_EG CP864"
|
||||
echo "ar_IQ CP864"
|
||||
echo "ar_IR CP864"
|
||||
echo "ar_JO CP864"
|
||||
echo "ar_KW CP864"
|
||||
echo "ar_MA CP864"
|
||||
echo "ar_OM CP864"
|
||||
echo "ar_QA CP864"
|
||||
echo "ar_SA CP864"
|
||||
echo "ar_SY CP864"
|
||||
# ISO-8859-7 languages
|
||||
echo "el CP869"
|
||||
echo "el_GR CP869"
|
||||
# ISO-8859-8 languages
|
||||
echo "he CP862"
|
||||
echo "he_IL CP862"
|
||||
# ISO-8859-9 languages
|
||||
echo "tr CP857"
|
||||
echo "tr_TR CP857"
|
||||
# Japanese
|
||||
echo "ja CP932"
|
||||
echo "ja_JP CP932"
|
||||
# Chinese
|
||||
echo "zh_CN GBK"
|
||||
echo "zh_TW CP950" # not CP938 ??
|
||||
# Korean
|
||||
echo "kr CP949" # not CP934 ??
|
||||
echo "kr_KR CP949" # not CP934 ??
|
||||
# Thai
|
||||
echo "th CP874"
|
||||
echo "th_TH CP874"
|
||||
# Other
|
||||
echo "eo CP850"
|
||||
echo "eo_EO CP850"
|
||||
;;
|
||||
esac
|
||||
57
libprozilla/intl/dcgettext.c
Normal file
57
libprozilla/intl/dcgettext.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Implementation of the dcgettext(3) function.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define DCGETTEXT __dcgettext
|
||||
# define DCIGETTEXT __dcigettext
|
||||
#else
|
||||
# define DCGETTEXT dcgettext__
|
||||
# define DCIGETTEXT dcigettext__
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
char *
|
||||
DCGETTEXT (domainname, msgid, category)
|
||||
const char *domainname;
|
||||
const char *msgid;
|
||||
int category;
|
||||
{
|
||||
return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__dcgettext, dcgettext);
|
||||
#endif
|
||||
1257
libprozilla/intl/dcigettext.c
Normal file
1257
libprozilla/intl/dcigettext.c
Normal file
File diff suppressed because it is too large
Load Diff
59
libprozilla/intl/dcngettext.c
Normal file
59
libprozilla/intl/dcngettext.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Implementation of the dcngettext(3) function.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define DCNGETTEXT __dcngettext
|
||||
# define DCIGETTEXT __dcigettext
|
||||
#else
|
||||
# define DCNGETTEXT dcngettext__
|
||||
# define DCIGETTEXT dcigettext__
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
char *
|
||||
DCNGETTEXT (domainname, msgid1, msgid2, n, category)
|
||||
const char *domainname;
|
||||
const char *msgid1;
|
||||
const char *msgid2;
|
||||
unsigned long int n;
|
||||
int category;
|
||||
{
|
||||
return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__dcngettext, dcngettext);
|
||||
#endif
|
||||
58
libprozilla/intl/dgettext.c
Normal file
58
libprozilla/intl/dgettext.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Implementation of the dgettext(3) function.
|
||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define DGETTEXT __dgettext
|
||||
# define DCGETTEXT __dcgettext
|
||||
#else
|
||||
# define DGETTEXT dgettext__
|
||||
# define DCGETTEXT dcgettext__
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
||||
LC_MESSAGES locale. */
|
||||
char *
|
||||
DGETTEXT (domainname, msgid)
|
||||
const char *domainname;
|
||||
const char *msgid;
|
||||
{
|
||||
return DCGETTEXT (domainname, msgid, LC_MESSAGES);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__dgettext, dgettext);
|
||||
#endif
|
||||
60
libprozilla/intl/dngettext.c
Normal file
60
libprozilla/intl/dngettext.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* Implementation of the dngettext(3) function.
|
||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define DNGETTEXT __dngettext
|
||||
# define DCNGETTEXT __dcngettext
|
||||
#else
|
||||
# define DNGETTEXT dngettext__
|
||||
# define DCNGETTEXT dcngettext__
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
||||
LC_MESSAGES locale and skip message according to the plural form. */
|
||||
char *
|
||||
DNGETTEXT (domainname, msgid1, msgid2, n)
|
||||
const char *domainname;
|
||||
const char *msgid1;
|
||||
const char *msgid2;
|
||||
unsigned long int n;
|
||||
{
|
||||
return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__dngettext, dngettext);
|
||||
#endif
|
||||
191
libprozilla/intl/explodename.c
Normal file
191
libprozilla/intl/explodename.c
Normal file
@@ -0,0 +1,191 @@
|
||||
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "loadinfo.h"
|
||||
|
||||
/* On some strange systems still no definition of NULL is found. Sigh! */
|
||||
#ifndef NULL
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define NULL ((void *) 0)
|
||||
# else
|
||||
# define NULL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
char *
|
||||
_nl_find_language (name)
|
||||
const char *name;
|
||||
{
|
||||
while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
|
||||
&& name[0] != '+' && name[0] != ',')
|
||||
++name;
|
||||
|
||||
return (char *) name;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_nl_explode_name (name, language, modifier, territory, codeset,
|
||||
normalized_codeset, special, sponsor, revision)
|
||||
char *name;
|
||||
const char **language;
|
||||
const char **modifier;
|
||||
const char **territory;
|
||||
const char **codeset;
|
||||
const char **normalized_codeset;
|
||||
const char **special;
|
||||
const char **sponsor;
|
||||
const char **revision;
|
||||
{
|
||||
enum { undecided, xpg, cen } syntax;
|
||||
char *cp;
|
||||
int mask;
|
||||
|
||||
*modifier = NULL;
|
||||
*territory = NULL;
|
||||
*codeset = NULL;
|
||||
*normalized_codeset = NULL;
|
||||
*special = NULL;
|
||||
*sponsor = NULL;
|
||||
*revision = NULL;
|
||||
|
||||
/* Now we determine the single parts of the locale name. First
|
||||
look for the language. Termination symbols are `_' and `@' if
|
||||
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
|
||||
mask = 0;
|
||||
syntax = undecided;
|
||||
*language = cp = name;
|
||||
cp = _nl_find_language (*language);
|
||||
|
||||
if (*language == cp)
|
||||
/* This does not make sense: language has to be specified. Use
|
||||
this entry as it is without exploding. Perhaps it is an alias. */
|
||||
cp = strchr (*language, '\0');
|
||||
else if (cp[0] == '_')
|
||||
{
|
||||
/* Next is the territory. */
|
||||
cp[0] = '\0';
|
||||
*territory = ++cp;
|
||||
|
||||
while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
|
||||
&& cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
|
||||
++cp;
|
||||
|
||||
mask |= TERRITORY;
|
||||
|
||||
if (cp[0] == '.')
|
||||
{
|
||||
/* Next is the codeset. */
|
||||
syntax = xpg;
|
||||
cp[0] = '\0';
|
||||
*codeset = ++cp;
|
||||
|
||||
while (cp[0] != '\0' && cp[0] != '@')
|
||||
++cp;
|
||||
|
||||
mask |= XPG_CODESET;
|
||||
|
||||
if (*codeset != cp && (*codeset)[0] != '\0')
|
||||
{
|
||||
*normalized_codeset = _nl_normalize_codeset (*codeset,
|
||||
cp - *codeset);
|
||||
if (strcmp (*codeset, *normalized_codeset) == 0)
|
||||
free ((char *) *normalized_codeset);
|
||||
else
|
||||
mask |= XPG_NORM_CODESET;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
|
||||
{
|
||||
/* Next is the modifier. */
|
||||
syntax = cp[0] == '@' ? xpg : cen;
|
||||
cp[0] = '\0';
|
||||
*modifier = ++cp;
|
||||
|
||||
while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
|
||||
&& cp[0] != ',' && cp[0] != '_')
|
||||
++cp;
|
||||
|
||||
mask |= XPG_MODIFIER | CEN_AUDIENCE;
|
||||
}
|
||||
|
||||
if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
|
||||
{
|
||||
syntax = cen;
|
||||
|
||||
if (cp[0] == '+')
|
||||
{
|
||||
/* Next is special application (CEN syntax). */
|
||||
cp[0] = '\0';
|
||||
*special = ++cp;
|
||||
|
||||
while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
|
||||
++cp;
|
||||
|
||||
mask |= CEN_SPECIAL;
|
||||
}
|
||||
|
||||
if (cp[0] == ',')
|
||||
{
|
||||
/* Next is sponsor (CEN syntax). */
|
||||
cp[0] = '\0';
|
||||
*sponsor = ++cp;
|
||||
|
||||
while (cp[0] != '\0' && cp[0] != '_')
|
||||
++cp;
|
||||
|
||||
mask |= CEN_SPONSOR;
|
||||
}
|
||||
|
||||
if (cp[0] == '_')
|
||||
{
|
||||
/* Next is revision (CEN syntax). */
|
||||
cp[0] = '\0';
|
||||
*revision = ++cp;
|
||||
|
||||
mask |= CEN_REVISION;
|
||||
}
|
||||
}
|
||||
|
||||
/* For CEN syntax values it might be important to have the
|
||||
separator character in the file name, not for XPG syntax. */
|
||||
if (syntax == xpg)
|
||||
{
|
||||
if (*territory != NULL && (*territory)[0] == '\0')
|
||||
mask &= ~TERRITORY;
|
||||
|
||||
if (*codeset != NULL && (*codeset)[0] == '\0')
|
||||
mask &= ~XPG_CODESET;
|
||||
|
||||
if (*modifier != NULL && (*modifier)[0] == '\0')
|
||||
mask &= ~XPG_MODIFIER;
|
||||
}
|
||||
|
||||
return mask;
|
||||
}
|
||||
197
libprozilla/intl/finddomain.c
Normal file
197
libprozilla/intl/finddomain.c
Normal file
@@ -0,0 +1,197 @@
|
||||
/* Handle list of needed message catalogs
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
/* List of already loaded domains. */
|
||||
static struct loaded_l10nfile *_nl_loaded_domains;
|
||||
|
||||
|
||||
/* Return a data structure describing the message catalog described by
|
||||
the DOMAINNAME and CATEGORY parameters with respect to the currently
|
||||
established bindings. */
|
||||
struct loaded_l10nfile *
|
||||
internal_function
|
||||
_nl_find_domain (dirname, locale, domainname, domainbinding)
|
||||
const char *dirname;
|
||||
char *locale;
|
||||
const char *domainname;
|
||||
struct binding *domainbinding;
|
||||
{
|
||||
struct loaded_l10nfile *retval;
|
||||
const char *language;
|
||||
const char *modifier;
|
||||
const char *territory;
|
||||
const char *codeset;
|
||||
const char *normalized_codeset;
|
||||
const char *special;
|
||||
const char *sponsor;
|
||||
const char *revision;
|
||||
const char *alias_value;
|
||||
int mask;
|
||||
|
||||
/* LOCALE can consist of up to four recognized parts for the XPG syntax:
|
||||
|
||||
language[_territory[.codeset]][@modifier]
|
||||
|
||||
and six parts for the CEN syntax:
|
||||
|
||||
language[_territory][+audience][+special][,[sponsor][_revision]]
|
||||
|
||||
Beside the first part all of them are allowed to be missing. If
|
||||
the full specified locale is not found, the less specific one are
|
||||
looked for. The various parts will be stripped off according to
|
||||
the following order:
|
||||
(1) revision
|
||||
(2) sponsor
|
||||
(3) special
|
||||
(4) codeset
|
||||
(5) normalized codeset
|
||||
(6) territory
|
||||
(7) audience/modifier
|
||||
*/
|
||||
|
||||
/* If we have already tested for this locale entry there has to
|
||||
be one data set in the list of loaded domains. */
|
||||
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
|
||||
strlen (dirname) + 1, 0, locale, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, domainname, 0);
|
||||
if (retval != NULL)
|
||||
{
|
||||
/* We know something about this locale. */
|
||||
int cnt;
|
||||
|
||||
if (retval->decided == 0)
|
||||
_nl_load_domain (retval, domainbinding);
|
||||
|
||||
if (retval->data != NULL)
|
||||
return retval;
|
||||
|
||||
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
||||
{
|
||||
if (retval->successor[cnt]->decided == 0)
|
||||
_nl_load_domain (retval->successor[cnt], domainbinding);
|
||||
|
||||
if (retval->successor[cnt]->data != NULL)
|
||||
break;
|
||||
}
|
||||
return cnt >= 0 ? retval : NULL;
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
/* See whether the locale value is an alias. If yes its value
|
||||
*overwrites* the alias name. No test for the original value is
|
||||
done. */
|
||||
alias_value = _nl_expand_alias (locale);
|
||||
if (alias_value != NULL)
|
||||
{
|
||||
#if defined _LIBC || defined HAVE_STRDUP
|
||||
locale = strdup (alias_value);
|
||||
if (locale == NULL)
|
||||
return NULL;
|
||||
#else
|
||||
size_t len = strlen (alias_value) + 1;
|
||||
locale = (char *) malloc (len);
|
||||
if (locale == NULL)
|
||||
return NULL;
|
||||
|
||||
memcpy (locale, alias_value, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Now we determine the single parts of the locale name. First
|
||||
look for the language. Termination symbols are `_' and `@' if
|
||||
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
|
||||
mask = _nl_explode_name (locale, &language, &modifier, &territory,
|
||||
&codeset, &normalized_codeset, &special,
|
||||
&sponsor, &revision);
|
||||
|
||||
/* Create all possible locale entries which might be interested in
|
||||
generalization. */
|
||||
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
|
||||
strlen (dirname) + 1, mask, language, territory,
|
||||
codeset, normalized_codeset, modifier, special,
|
||||
sponsor, revision, domainname, 1);
|
||||
if (retval == NULL)
|
||||
/* This means we are out of core. */
|
||||
return NULL;
|
||||
|
||||
if (retval->decided == 0)
|
||||
_nl_load_domain (retval, domainbinding);
|
||||
if (retval->data == NULL)
|
||||
{
|
||||
int cnt;
|
||||
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
||||
{
|
||||
if (retval->successor[cnt]->decided == 0)
|
||||
_nl_load_domain (retval->successor[cnt], domainbinding);
|
||||
if (retval->successor[cnt]->data != NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* The room for an alias was dynamically allocated. Free it now. */
|
||||
if (alias_value != NULL)
|
||||
free (locale);
|
||||
|
||||
/* The space for normalized_codeset is dynamically allocated. Free it. */
|
||||
if (mask & XPG_NORM_CODESET)
|
||||
free ((void *) normalized_codeset);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
static void __attribute__ ((unused))
|
||||
free_mem (void)
|
||||
{
|
||||
struct loaded_l10nfile *runp = _nl_loaded_domains;
|
||||
|
||||
while (runp != NULL)
|
||||
{
|
||||
struct loaded_l10nfile *here = runp;
|
||||
if (runp->data != NULL)
|
||||
_nl_unload_domain ((struct loaded_domain *) runp->data);
|
||||
runp = runp->next;
|
||||
free ((char *) here->filename);
|
||||
free (here);
|
||||
}
|
||||
}
|
||||
|
||||
text_set_element (__libc_subfreeres, free_mem);
|
||||
#endif
|
||||
63
libprozilla/intl/gettext.c
Normal file
63
libprozilla/intl/gettext.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* Implementation of gettext(3) function.
|
||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define __need_NULL
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# include <stdlib.h> /* Just for NULL. */
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define GETTEXT __gettext
|
||||
# define DCGETTEXT __dcgettext
|
||||
#else
|
||||
# define GETTEXT gettext__
|
||||
# define DCGETTEXT dcgettext__
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
char *
|
||||
GETTEXT (msgid)
|
||||
const char *msgid;
|
||||
{
|
||||
return DCGETTEXT (NULL, msgid, LC_MESSAGES);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__gettext, gettext);
|
||||
#endif
|
||||
101
libprozilla/intl/gettext.h
Normal file
101
libprozilla/intl/gettext.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* Description of GNU message catalog format: general file layout.
|
||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _GETTEXT_H
|
||||
#define _GETTEXT_H 1
|
||||
|
||||
#if HAVE_LIMITS_H || _LIBC
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* The magic number of the GNU message catalog format. */
|
||||
#define _MAGIC 0x950412de
|
||||
#define _MAGIC_SWAPPED 0xde120495
|
||||
|
||||
/* Revision number of the currently used .mo (binary) file format. */
|
||||
#define MO_REVISION_NUMBER 0
|
||||
|
||||
/* The following contortions are an attempt to use the C preprocessor
|
||||
to determine an unsigned integral type that is 32 bits wide. An
|
||||
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
|
||||
as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
|
||||
when cross-compiling. */
|
||||
|
||||
#if __STDC__
|
||||
# define UINT_MAX_32_BITS 4294967295U
|
||||
#else
|
||||
# define UINT_MAX_32_BITS 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
|
||||
This should be valid for all systems GNU cares about because
|
||||
that doesn't include 16-bit systems, and only modern systems
|
||||
(that certainly have <limits.h>) have 64+-bit integral types. */
|
||||
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX UINT_MAX_32_BITS
|
||||
#endif
|
||||
|
||||
#if UINT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned nls_uint32;
|
||||
#else
|
||||
# if USHRT_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned short nls_uint32;
|
||||
# else
|
||||
# if ULONG_MAX == UINT_MAX_32_BITS
|
||||
typedef unsigned long nls_uint32;
|
||||
# else
|
||||
/* The following line is intended to throw an error. Using #error is
|
||||
not portable enough. */
|
||||
"Cannot determine unsigned 32-bit data type."
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Header for binary .mo file format. */
|
||||
struct mo_file_header
|
||||
{
|
||||
/* The magic number. */
|
||||
nls_uint32 magic;
|
||||
/* The revision number of the file format. */
|
||||
nls_uint32 revision;
|
||||
/* The number of strings pairs. */
|
||||
nls_uint32 nstrings;
|
||||
/* Offset of table with start offsets of original strings. */
|
||||
nls_uint32 orig_tab_offset;
|
||||
/* Offset of table with start offsets of translation strings. */
|
||||
nls_uint32 trans_tab_offset;
|
||||
/* Size of hashing table. */
|
||||
nls_uint32 hash_tab_size;
|
||||
/* Offset of first hashing entry. */
|
||||
nls_uint32 hash_tab_offset;
|
||||
};
|
||||
|
||||
struct string_desc
|
||||
{
|
||||
/* Length of addressed string. */
|
||||
nls_uint32 length;
|
||||
/* Offset of string in file. */
|
||||
nls_uint32 offset;
|
||||
};
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
||||
#endif /* gettext.h */
|
||||
251
libprozilla/intl/gettextP.h
Normal file
251
libprozilla/intl/gettextP.h
Normal file
@@ -0,0 +1,251 @@
|
||||
/* Header describing internals of libintl library.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _GETTEXTP_H
|
||||
#define _GETTEXTP_H
|
||||
|
||||
#include <stddef.h> /* Get size_t. */
|
||||
|
||||
#ifdef _LIBC
|
||||
# include "../iconv/gconv_int.h"
|
||||
#else
|
||||
# if HAVE_ICONV
|
||||
# include <iconv.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "loadinfo.h"
|
||||
|
||||
#include "gettext.h" /* Get nls_uint32. */
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef internal_function
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
/* Tell the compiler when a conditional or integer expression is
|
||||
almost always true or almost always false. */
|
||||
#ifndef HAVE_BUILTIN_EXPECT
|
||||
# define __builtin_expect(expr, val) (expr)
|
||||
#endif
|
||||
|
||||
#ifndef W
|
||||
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <byteswap.h>
|
||||
# define SWAP(i) bswap_32 (i)
|
||||
#else
|
||||
static inline nls_uint32
|
||||
SWAP (i)
|
||||
nls_uint32 i;
|
||||
{
|
||||
return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* This is the representation of the expressions to determine the
|
||||
plural form. */
|
||||
struct expression
|
||||
{
|
||||
int nargs; /* Number of arguments. */
|
||||
enum operator
|
||||
{
|
||||
/* Without arguments: */
|
||||
var, /* The variable "n". */
|
||||
num, /* Decimal number. */
|
||||
/* Unary operators: */
|
||||
lnot, /* Logical NOT. */
|
||||
/* Binary operators: */
|
||||
mult, /* Multiplication. */
|
||||
divide, /* Division. */
|
||||
module, /* Module operation. */
|
||||
plus, /* Addition. */
|
||||
minus, /* Subtraction. */
|
||||
less_than, /* Comparison. */
|
||||
greater_than, /* Comparison. */
|
||||
less_or_equal, /* Comparison. */
|
||||
greater_or_equal, /* Comparison. */
|
||||
equal, /* Comparision for equality. */
|
||||
not_equal, /* Comparision for inequality. */
|
||||
land, /* Logical AND. */
|
||||
lor, /* Logical OR. */
|
||||
/* Ternary operators: */
|
||||
qmop /* Question mark operator. */
|
||||
} operation;
|
||||
union
|
||||
{
|
||||
unsigned long int num; /* Number value for `num'. */
|
||||
struct expression *args[3]; /* Up to three arguments. */
|
||||
} val;
|
||||
};
|
||||
|
||||
/* This is the data structure to pass information to the parser and get
|
||||
the result in a thread-safe way. */
|
||||
struct parse_args
|
||||
{
|
||||
const char *cp;
|
||||
struct expression *res;
|
||||
};
|
||||
|
||||
|
||||
/* The representation of an opened message catalog. */
|
||||
struct loaded_domain
|
||||
{
|
||||
const char *data;
|
||||
int use_mmap;
|
||||
size_t mmap_size;
|
||||
int must_swap;
|
||||
nls_uint32 nstrings;
|
||||
struct string_desc *orig_tab;
|
||||
struct string_desc *trans_tab;
|
||||
nls_uint32 hash_size;
|
||||
nls_uint32 *hash_tab;
|
||||
int codeset_cntr;
|
||||
#ifdef _LIBC
|
||||
__gconv_t conv;
|
||||
#else
|
||||
# if HAVE_ICONV
|
||||
iconv_t conv;
|
||||
# endif
|
||||
#endif
|
||||
char **conv_tab;
|
||||
|
||||
struct expression *plural;
|
||||
unsigned long int nplurals;
|
||||
};
|
||||
|
||||
/* We want to allocate a string at the end of the struct. But ISO C
|
||||
doesn't allow zero sized arrays. */
|
||||
#ifdef __GNUC__
|
||||
# define ZERO 0
|
||||
#else
|
||||
# define ZERO 1
|
||||
#endif
|
||||
|
||||
/* A set of settings bound to a message domain. Used to store settings
|
||||
from bindtextdomain() and bind_textdomain_codeset(). */
|
||||
struct binding
|
||||
{
|
||||
struct binding *next;
|
||||
char *dirname;
|
||||
int codeset_cntr; /* Incremented each time codeset changes. */
|
||||
char *codeset;
|
||||
char domainname[ZERO];
|
||||
};
|
||||
|
||||
/* A counter which is incremented each time some previous translations
|
||||
become invalid.
|
||||
This variable is part of the external ABI of the GNU libintl. */
|
||||
extern int _nl_msg_cat_cntr;
|
||||
|
||||
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
|
||||
char *__locale,
|
||||
const char *__domainname,
|
||||
struct binding *__domainbinding))
|
||||
internal_function;
|
||||
void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
|
||||
struct binding *__domainbinding))
|
||||
internal_function;
|
||||
void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
|
||||
internal_function;
|
||||
const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
|
||||
struct loaded_domain *__domain,
|
||||
struct binding *__domainbinding))
|
||||
internal_function;
|
||||
void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
|
||||
internal_function;
|
||||
|
||||
char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
|
||||
struct binding *domainbinding,
|
||||
const char *msgid, size_t *lengthp))
|
||||
internal_function;
|
||||
|
||||
#ifdef _LIBC
|
||||
extern char *__gettext PARAMS ((const char *__msgid));
|
||||
extern char *__dgettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid));
|
||||
extern char *__dcgettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid, int __category));
|
||||
extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *__dngettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int n));
|
||||
extern char *__dcngettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category));
|
||||
extern char *__dcigettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
int __plural, unsigned long int __n,
|
||||
int __category));
|
||||
extern char *__textdomain PARAMS ((const char *__domainname));
|
||||
extern char *__bindtextdomain PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
#else
|
||||
extern char *gettext__ PARAMS ((const char *__msgid));
|
||||
extern char *dgettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid));
|
||||
extern char *dcgettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid, int __category));
|
||||
extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *dngettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *dcngettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category));
|
||||
extern char *dcigettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
int __plural, unsigned long int __n,
|
||||
int __category));
|
||||
extern char *textdomain__ PARAMS ((const char *__domainname));
|
||||
extern char *bindtextdomain__ PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
extern void __gettext_free_exp PARAMS ((struct expression *exp))
|
||||
internal_function;
|
||||
extern int __gettextparse PARAMS ((void *arg));
|
||||
#else
|
||||
extern void gettext_free_exp__ PARAMS ((struct expression *exp))
|
||||
internal_function;
|
||||
extern int gettextparse__ PARAMS ((void *arg));
|
||||
#endif
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
||||
#endif /* gettextP.h */
|
||||
58
libprozilla/intl/hash-string.h
Normal file
58
libprozilla/intl/hash-string.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Description of GNU message catalog format: string hashing function.
|
||||
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* We assume to have `unsigned long int' value with at least 32 bits. */
|
||||
#define HASHWORDBITS 32
|
||||
|
||||
|
||||
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
||||
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
||||
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
||||
static unsigned long int hash_string PARAMS ((const char *__str_param));
|
||||
|
||||
static inline unsigned long int
|
||||
hash_string (str_param)
|
||||
const char *str_param;
|
||||
{
|
||||
unsigned long int hval, g;
|
||||
const char *str = str_param;
|
||||
|
||||
/* Compute the hash value for the given string. */
|
||||
hval = 0;
|
||||
while (*str != '\0')
|
||||
{
|
||||
hval <<= 4;
|
||||
hval += (unsigned long int) *str++;
|
||||
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
|
||||
if (g != 0)
|
||||
{
|
||||
hval ^= g >> (HASHWORDBITS - 8);
|
||||
hval ^= g;
|
||||
}
|
||||
}
|
||||
return hval;
|
||||
}
|
||||
165
libprozilla/intl/intl-compat.c
Normal file
165
libprozilla/intl/intl-compat.c
Normal file
@@ -0,0 +1,165 @@
|
||||
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
|
||||
Library.
|
||||
Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libgnuintl.h"
|
||||
#include "gettextP.h"
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* This file redirects the gettext functions (without prefix or suffix) to
|
||||
those defined in the included GNU gettext library (with "__" suffix).
|
||||
It is compiled into libintl when the included GNU gettext library is
|
||||
configured --with-included-gettext.
|
||||
|
||||
This redirection works also in the case that the system C library or
|
||||
the system libintl library contain gettext/textdomain/... functions.
|
||||
If it didn't, we would need to add preprocessor level redirections to
|
||||
libgnuintl.h of the following form:
|
||||
|
||||
# define gettext gettext__
|
||||
# define dgettext dgettext__
|
||||
# define dcgettext dcgettext__
|
||||
# define ngettext ngettext__
|
||||
# define dngettext dngettext__
|
||||
# define dcngettext dcngettext__
|
||||
# define textdomain textdomain__
|
||||
# define bindtextdomain bindtextdomain__
|
||||
# define bind_textdomain_codeset bind_textdomain_codeset__
|
||||
|
||||
How does this redirection work? There are two cases.
|
||||
A. When libintl.a is linked into an executable, it works because
|
||||
functions defined in the executable always override functions in
|
||||
the shared libraries.
|
||||
B. When libintl.so is used, it works because
|
||||
1. those systems defining gettext/textdomain/... in the C library
|
||||
(namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
|
||||
ELF systems and define these symbols as weak, thus explicitly
|
||||
letting other shared libraries override it.
|
||||
2. those systems defining gettext/textdomain/... in a standalone
|
||||
libintl.so library (namely, Solaris 2.3 and newer) have this
|
||||
shared library in /usr/lib, and the linker will search /usr/lib
|
||||
*after* the directory where the GNU gettext library is installed.
|
||||
|
||||
A third case, namely when libintl.a is linked into a shared library
|
||||
whose name is not libintl.so, is not supported. In this case, on
|
||||
Solaris, when -lintl precedes the linker option for the shared library
|
||||
containing GNU gettext, the system's gettext would indeed override
|
||||
the GNU gettext. Anyone doing this kind of stuff must be clever enough
|
||||
to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
|
||||
command line. */
|
||||
|
||||
|
||||
#undef gettext
|
||||
#undef dgettext
|
||||
#undef dcgettext
|
||||
#undef ngettext
|
||||
#undef dngettext
|
||||
#undef dcngettext
|
||||
#undef textdomain
|
||||
#undef bindtextdomain
|
||||
#undef bind_textdomain_codeset
|
||||
|
||||
|
||||
char *
|
||||
gettext (msgid)
|
||||
const char *msgid;
|
||||
{
|
||||
return gettext__ (msgid);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
dgettext (domainname, msgid)
|
||||
const char *domainname;
|
||||
const char *msgid;
|
||||
{
|
||||
return dgettext__ (domainname, msgid);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
dcgettext (domainname, msgid, category)
|
||||
const char *domainname;
|
||||
const char *msgid;
|
||||
int category;
|
||||
{
|
||||
return dcgettext__ (domainname, msgid, category);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
ngettext (msgid1, msgid2, n)
|
||||
const char *msgid1;
|
||||
const char *msgid2;
|
||||
unsigned long int n;
|
||||
{
|
||||
return ngettext__ (msgid1, msgid2, n);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
dngettext (domainname, msgid1, msgid2, n)
|
||||
const char *domainname;
|
||||
const char *msgid1;
|
||||
const char *msgid2;
|
||||
unsigned long int n;
|
||||
{
|
||||
return dngettext__ (domainname, msgid1, msgid2, n);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
dcngettext (domainname, msgid1, msgid2, n, category)
|
||||
const char *domainname;
|
||||
const char *msgid1;
|
||||
const char *msgid2;
|
||||
unsigned long int n;
|
||||
int category;
|
||||
{
|
||||
return dcngettext__ (domainname, msgid1, msgid2, n, category);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
textdomain (domainname)
|
||||
const char *domainname;
|
||||
{
|
||||
return textdomain__ (domainname);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
bindtextdomain (domainname, dirname)
|
||||
const char *domainname;
|
||||
const char *dirname;
|
||||
{
|
||||
return bindtextdomain__ (domainname, dirname);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
bind_textdomain_codeset (domainname, codeset)
|
||||
const char *domainname;
|
||||
const char *codeset;
|
||||
{
|
||||
return bind_textdomain_codeset__ (domainname, codeset);
|
||||
}
|
||||
404
libprozilla/intl/l10nflist.c
Normal file
404
libprozilla/intl/l10nflist.c
Normal file
@@ -0,0 +1,404 @@
|
||||
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
<features.h>, and once <features.h> has been included, it's too late. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#if !HAVE_STRCHR && !defined _LIBC
|
||||
# ifndef strchr
|
||||
# define strchr index
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _LIBC || defined HAVE_ARGZ_H
|
||||
# include <argz.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "loadinfo.h"
|
||||
|
||||
/* On some strange systems still no definition of NULL is found. Sigh! */
|
||||
#ifndef NULL
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define NULL ((void *) 0)
|
||||
# else
|
||||
# define NULL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Rename the non ANSI C functions. This is required by the standard
|
||||
because some ANSI C functions will require linking with this object
|
||||
file and the name space must not be polluted. */
|
||||
# ifndef stpcpy
|
||||
# define stpcpy(dest, src) __stpcpy(dest, src)
|
||||
# endif
|
||||
#else
|
||||
# ifndef HAVE_STPCPY
|
||||
static char *stpcpy PARAMS ((char *dest, const char *src));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define function which are usually not available. */
|
||||
|
||||
#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
|
||||
/* Returns the number of strings in ARGZ. */
|
||||
static size_t argz_count__ PARAMS ((const char *argz, size_t len));
|
||||
|
||||
static size_t
|
||||
argz_count__ (argz, len)
|
||||
const char *argz;
|
||||
size_t len;
|
||||
{
|
||||
size_t count = 0;
|
||||
while (len > 0)
|
||||
{
|
||||
size_t part_len = strlen (argz);
|
||||
argz += part_len + 1;
|
||||
len -= part_len + 1;
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
# undef __argz_count
|
||||
# define __argz_count(argz, len) argz_count__ (argz, len)
|
||||
#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
|
||||
|
||||
#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
|
||||
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
|
||||
except the last into the character SEP. */
|
||||
static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
|
||||
|
||||
static void
|
||||
argz_stringify__ (argz, len, sep)
|
||||
char *argz;
|
||||
size_t len;
|
||||
int sep;
|
||||
{
|
||||
while (len > 0)
|
||||
{
|
||||
size_t part_len = strlen (argz);
|
||||
argz += part_len;
|
||||
len -= part_len + 1;
|
||||
if (len > 0)
|
||||
*argz++ = sep;
|
||||
}
|
||||
}
|
||||
# undef __argz_stringify
|
||||
# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
|
||||
#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
|
||||
|
||||
#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
|
||||
static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
|
||||
const char *entry));
|
||||
|
||||
static char *
|
||||
argz_next__ (argz, argz_len, entry)
|
||||
char *argz;
|
||||
size_t argz_len;
|
||||
const char *entry;
|
||||
{
|
||||
if (entry)
|
||||
{
|
||||
if (entry < argz + argz_len)
|
||||
entry = strchr (entry, '\0') + 1;
|
||||
|
||||
return entry >= argz + argz_len ? NULL : (char *) entry;
|
||||
}
|
||||
else
|
||||
if (argz_len > 0)
|
||||
return argz;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
# undef __argz_next
|
||||
# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
|
||||
#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
|
||||
|
||||
|
||||
/* Return number of bits set in X. */
|
||||
static int pop PARAMS ((int x));
|
||||
|
||||
static inline int
|
||||
pop (x)
|
||||
int x;
|
||||
{
|
||||
/* We assume that no more than 16 bits are used. */
|
||||
x = ((x & ~0x5555) >> 1) + (x & 0x5555);
|
||||
x = ((x & ~0x3333) >> 2) + (x & 0x3333);
|
||||
x = ((x >> 4) + x) & 0x0f0f;
|
||||
x = ((x >> 8) + x) & 0xff;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
struct loaded_l10nfile *
|
||||
_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
|
||||
territory, codeset, normalized_codeset, modifier, special,
|
||||
sponsor, revision, filename, do_allocate)
|
||||
struct loaded_l10nfile **l10nfile_list;
|
||||
const char *dirlist;
|
||||
size_t dirlist_len;
|
||||
int mask;
|
||||
const char *language;
|
||||
const char *territory;
|
||||
const char *codeset;
|
||||
const char *normalized_codeset;
|
||||
const char *modifier;
|
||||
const char *special;
|
||||
const char *sponsor;
|
||||
const char *revision;
|
||||
const char *filename;
|
||||
int do_allocate;
|
||||
{
|
||||
char *abs_filename;
|
||||
struct loaded_l10nfile *last = NULL;
|
||||
struct loaded_l10nfile *retval;
|
||||
char *cp;
|
||||
size_t entries;
|
||||
int cnt;
|
||||
|
||||
/* Allocate room for the full file name. */
|
||||
abs_filename = (char *) malloc (dirlist_len
|
||||
+ strlen (language)
|
||||
+ ((mask & TERRITORY) != 0
|
||||
? strlen (territory) + 1 : 0)
|
||||
+ ((mask & XPG_CODESET) != 0
|
||||
? strlen (codeset) + 1 : 0)
|
||||
+ ((mask & XPG_NORM_CODESET) != 0
|
||||
? strlen (normalized_codeset) + 1 : 0)
|
||||
+ (((mask & XPG_MODIFIER) != 0
|
||||
|| (mask & CEN_AUDIENCE) != 0)
|
||||
? strlen (modifier) + 1 : 0)
|
||||
+ ((mask & CEN_SPECIAL) != 0
|
||||
? strlen (special) + 1 : 0)
|
||||
+ (((mask & CEN_SPONSOR) != 0
|
||||
|| (mask & CEN_REVISION) != 0)
|
||||
? (1 + ((mask & CEN_SPONSOR) != 0
|
||||
? strlen (sponsor) + 1 : 0)
|
||||
+ ((mask & CEN_REVISION) != 0
|
||||
? strlen (revision) + 1 : 0)) : 0)
|
||||
+ 1 + strlen (filename) + 1);
|
||||
|
||||
if (abs_filename == NULL)
|
||||
return NULL;
|
||||
|
||||
retval = NULL;
|
||||
last = NULL;
|
||||
|
||||
/* Construct file name. */
|
||||
memcpy (abs_filename, dirlist, dirlist_len);
|
||||
__argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
|
||||
cp = abs_filename + (dirlist_len - 1);
|
||||
*cp++ = '/';
|
||||
cp = stpcpy (cp, language);
|
||||
|
||||
if ((mask & TERRITORY) != 0)
|
||||
{
|
||||
*cp++ = '_';
|
||||
cp = stpcpy (cp, territory);
|
||||
}
|
||||
if ((mask & XPG_CODESET) != 0)
|
||||
{
|
||||
*cp++ = '.';
|
||||
cp = stpcpy (cp, codeset);
|
||||
}
|
||||
if ((mask & XPG_NORM_CODESET) != 0)
|
||||
{
|
||||
*cp++ = '.';
|
||||
cp = stpcpy (cp, normalized_codeset);
|
||||
}
|
||||
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
|
||||
{
|
||||
/* This component can be part of both syntaces but has different
|
||||
leading characters. For CEN we use `+', else `@'. */
|
||||
*cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
|
||||
cp = stpcpy (cp, modifier);
|
||||
}
|
||||
if ((mask & CEN_SPECIAL) != 0)
|
||||
{
|
||||
*cp++ = '+';
|
||||
cp = stpcpy (cp, special);
|
||||
}
|
||||
if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
|
||||
{
|
||||
*cp++ = ',';
|
||||
if ((mask & CEN_SPONSOR) != 0)
|
||||
cp = stpcpy (cp, sponsor);
|
||||
if ((mask & CEN_REVISION) != 0)
|
||||
{
|
||||
*cp++ = '_';
|
||||
cp = stpcpy (cp, revision);
|
||||
}
|
||||
}
|
||||
|
||||
*cp++ = '/';
|
||||
stpcpy (cp, filename);
|
||||
|
||||
/* Look in list of already loaded domains whether it is already
|
||||
available. */
|
||||
last = NULL;
|
||||
for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
|
||||
if (retval->filename != NULL)
|
||||
{
|
||||
int compare = strcmp (retval->filename, abs_filename);
|
||||
if (compare == 0)
|
||||
/* We found it! */
|
||||
break;
|
||||
if (compare < 0)
|
||||
{
|
||||
/* It's not in the list. */
|
||||
retval = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
last = retval;
|
||||
}
|
||||
|
||||
if (retval != NULL || do_allocate == 0)
|
||||
{
|
||||
free (abs_filename);
|
||||
return retval;
|
||||
}
|
||||
|
||||
retval = (struct loaded_l10nfile *)
|
||||
malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
|
||||
* (1 << pop (mask))
|
||||
* sizeof (struct loaded_l10nfile *)));
|
||||
if (retval == NULL)
|
||||
return NULL;
|
||||
|
||||
retval->filename = abs_filename;
|
||||
retval->decided = (__argz_count (dirlist, dirlist_len) != 1
|
||||
|| ((mask & XPG_CODESET) != 0
|
||||
&& (mask & XPG_NORM_CODESET) != 0));
|
||||
retval->data = NULL;
|
||||
|
||||
if (last == NULL)
|
||||
{
|
||||
retval->next = *l10nfile_list;
|
||||
*l10nfile_list = retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
retval->next = last->next;
|
||||
last->next = retval;
|
||||
}
|
||||
|
||||
entries = 0;
|
||||
/* If the DIRLIST is a real list the RETVAL entry corresponds not to
|
||||
a real file. So we have to use the DIRLIST separation mechanism
|
||||
of the inner loop. */
|
||||
cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
|
||||
for (; cnt >= 0; --cnt)
|
||||
if ((cnt & ~mask) == 0
|
||||
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
|
||||
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
|
||||
{
|
||||
/* Iterate over all elements of the DIRLIST. */
|
||||
char *dir = NULL;
|
||||
|
||||
while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
|
||||
!= NULL)
|
||||
retval->successor[entries++]
|
||||
= _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
|
||||
language, territory, codeset,
|
||||
normalized_codeset, modifier, special,
|
||||
sponsor, revision, filename, 1);
|
||||
}
|
||||
retval->successor[entries] = NULL;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Normalize codeset name. There is no standard for the codeset
|
||||
names. Normalization allows the user to use any of the common
|
||||
names. The return value is dynamically allocated and has to be
|
||||
freed by the caller. */
|
||||
const char *
|
||||
_nl_normalize_codeset (codeset, name_len)
|
||||
const char *codeset;
|
||||
size_t name_len;
|
||||
{
|
||||
int len = 0;
|
||||
int only_digit = 1;
|
||||
char *retval;
|
||||
char *wp;
|
||||
size_t cnt;
|
||||
|
||||
for (cnt = 0; cnt < name_len; ++cnt)
|
||||
if (isalnum (codeset[cnt]))
|
||||
{
|
||||
++len;
|
||||
|
||||
if (isalpha (codeset[cnt]))
|
||||
only_digit = 0;
|
||||
}
|
||||
|
||||
retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
|
||||
|
||||
if (retval != NULL)
|
||||
{
|
||||
if (only_digit)
|
||||
wp = stpcpy (retval, "iso");
|
||||
else
|
||||
wp = retval;
|
||||
|
||||
for (cnt = 0; cnt < name_len; ++cnt)
|
||||
if (isalpha (codeset[cnt]))
|
||||
*wp++ = tolower (codeset[cnt]);
|
||||
else if (isdigit (codeset[cnt]))
|
||||
*wp++ = codeset[cnt];
|
||||
|
||||
*wp = '\0';
|
||||
}
|
||||
|
||||
return (const char *) retval;
|
||||
}
|
||||
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
||||
/* We don't want libintl.a to depend on any other library. So we
|
||||
avoid the non-standard function stpcpy. In GNU C Library this
|
||||
function is available, though. Also allow the symbol HAVE_STPCPY
|
||||
to be defined. */
|
||||
#if !_LIBC && !HAVE_STPCPY
|
||||
static char *
|
||||
stpcpy (dest, src)
|
||||
char *dest;
|
||||
const char *src;
|
||||
{
|
||||
while ((*dest++ = *src++) != '\0')
|
||||
/* Do nothing. */ ;
|
||||
return dest - 1;
|
||||
}
|
||||
#endif
|
||||
48
libprozilla/intl/libgettext.h
Normal file
48
libprozilla/intl/libgettext.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
/* NLS can be disabled through the configure --disable-nls option. */
|
||||
#if ENABLE_NLS
|
||||
|
||||
/* Get declarations of GNU message catalog functions. */
|
||||
# include <libintl.h>
|
||||
|
||||
#else
|
||||
|
||||
# define gettext(Msgid) (Msgid)
|
||||
# define dgettext(Domainname, Msgid) (Msgid)
|
||||
# define dcgettext(Domainname, Msgid, Category) (Msgid)
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
|
||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
|
||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
|
||||
# define textdomain(Domainname) ((char *) (Domainname))
|
||||
# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
|
||||
# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
|
||||
|
||||
#endif
|
||||
|
||||
/* For automatical extraction of messages sometimes no real
|
||||
translation is needed. Instead the string itself is the result. */
|
||||
#define gettext_noop(Str) (Str)
|
||||
|
||||
#endif /* _LIBGETTEXT_H */
|
||||
127
libprozilla/intl/libgnuintl.h
Normal file
127
libprozilla/intl/libgnuintl.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
/* The LC_MESSAGES locale category is the category used by the functions
|
||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||
On systems that don't define it, use an arbitrary value instead.
|
||||
On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
|
||||
this file!) and then only defines LC_MESSAGES. To avoid a redefinition
|
||||
warning, don't define LC_MESSAGES in this case. */
|
||||
#if !defined LC_MESSAGES && !defined __LOCALE_H
|
||||
# define LC_MESSAGES 1729
|
||||
#endif
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
#ifdef __DJGPP__
|
||||
# undef gettext
|
||||
# define gettext gettext
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__ || defined __cplusplus
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
extern char *gettext PARAMS ((const char *__msgid));
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
|
||||
int __category));
|
||||
|
||||
|
||||
/* Similar to `gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
|
||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n));
|
||||
|
||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n,
|
||||
int __category));
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
extern char *textdomain PARAMS ((const char *__domainname));
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
extern char *bindtextdomain PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
|
||||
|
||||
/* Optimized version of the functions above. */
|
||||
#if defined __OPTIMIZED
|
||||
/* These are macros, but could also be inline functions. */
|
||||
|
||||
# define gettext(msgid) \
|
||||
dgettext (NULL, msgid)
|
||||
|
||||
# define dgettext(domainname, msgid) \
|
||||
dcgettext (domainname, msgid, LC_MESSAGES)
|
||||
|
||||
# define ngettext(msgid1, msgid2, n) \
|
||||
dngettext (NULL, msgid1, msgid2, n)
|
||||
|
||||
# define dngettext(domainname, msgid1, msgid2, n) \
|
||||
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
|
||||
|
||||
#endif /* Optimizing. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libintl.h */
|
||||
116
libprozilla/intl/libintl.glibc
Normal file
116
libprozilla/intl/libintl.glibc
Normal file
@@ -0,0 +1,116 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
|
||||
This file is derived from the file libgettext.h in the GNU gettext package.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
extern char *gettext (__const char *__msgid) __THROW;
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
extern char *dgettext (__const char *__domainname, __const char *__msgid)
|
||||
__THROW;
|
||||
extern char *__dgettext (__const char *__domainname, __const char *__msgid)
|
||||
__THROW __attribute_format_arg__ (2);
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
extern char *dcgettext (__const char *__domainname,
|
||||
__const char *__msgid, int __category) __THROW;
|
||||
extern char *__dcgettext (__const char *__domainname,
|
||||
__const char *__msgid, int __category)
|
||||
__THROW __attribute_format_arg__ (2);
|
||||
|
||||
|
||||
/* Similar to `gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
__THROW __attribute_format_arg__ (1);
|
||||
|
||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *dngettext (__const char *__domainname, __const char *__msgid1,
|
||||
__const char *__msgid2, unsigned long int __n)
|
||||
__THROW __attribute_format_arg__ (2);
|
||||
|
||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
|
||||
__const char *__msgid2, unsigned long int __n,
|
||||
int __category)
|
||||
__THROW __attribute_format_arg__ (2);
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
extern char *textdomain (__const char *__domainname) __THROW;
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
extern char *bindtextdomain (__const char *__domainname,
|
||||
__const char *__dirname) __THROW;
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
extern char *bind_textdomain_codeset (__const char *__domainname,
|
||||
__const char *__codeset) __THROW;
|
||||
|
||||
|
||||
/* Optimized version of the function above. */
|
||||
#if defined __OPTIMIZE__
|
||||
|
||||
/* We need NULL for `gettext'. */
|
||||
# define __need_NULL
|
||||
# include <stddef.h>
|
||||
|
||||
/* We need LC_MESSAGES for `dgettext'. */
|
||||
# include <locale.h>
|
||||
|
||||
/* These must be macros. Inlined functions are useless because the
|
||||
`__builtin_constant_p' predicate in dcgettext would always return
|
||||
false. */
|
||||
|
||||
# define gettext(msgid) dgettext (NULL, msgid)
|
||||
|
||||
# define dgettext(domainname, msgid) \
|
||||
dcgettext (domainname, msgid, LC_MESSAGES)
|
||||
|
||||
# define ngettext(msgid1, msgid2, n) dngettext (NULL, msgid1, msgid2, n)
|
||||
|
||||
# define dngettext(domainname, msgid1, msgid2, n) \
|
||||
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
|
||||
|
||||
#endif /* Optimizing. */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* libintl.h */
|
||||
108
libprozilla/intl/loadinfo.h
Normal file
108
libprozilla/intl/loadinfo.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LOADINFO_H
|
||||
#define _LOADINFO_H 1
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef internal_function
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
/* Tell the compiler when a conditional or integer expression is
|
||||
almost always true or almost always false. */
|
||||
#ifndef HAVE_BUILTIN_EXPECT
|
||||
# define __builtin_expect(expr, val) (expr)
|
||||
#endif
|
||||
|
||||
/* Separator in PATH like lists of pathnames. */
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
# define PATH_SEPARATOR ';'
|
||||
#else
|
||||
/* Unix */
|
||||
# define PATH_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
/* Encoding of locale name parts. */
|
||||
#define CEN_REVISION 1
|
||||
#define CEN_SPONSOR 2
|
||||
#define CEN_SPECIAL 4
|
||||
#define XPG_NORM_CODESET 8
|
||||
#define XPG_CODESET 16
|
||||
#define TERRITORY 32
|
||||
#define CEN_AUDIENCE 64
|
||||
#define XPG_MODIFIER 128
|
||||
|
||||
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
|
||||
#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
|
||||
|
||||
|
||||
struct loaded_l10nfile
|
||||
{
|
||||
const char *filename;
|
||||
int decided;
|
||||
|
||||
const void *data;
|
||||
|
||||
struct loaded_l10nfile *next;
|
||||
struct loaded_l10nfile *successor[1];
|
||||
};
|
||||
|
||||
|
||||
/* Normalize codeset name. There is no standard for the codeset
|
||||
names. Normalization allows the user to use any of the common
|
||||
names. The return value is dynamically allocated and has to be
|
||||
freed by the caller. */
|
||||
extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
|
||||
size_t name_len));
|
||||
|
||||
extern struct loaded_l10nfile *
|
||||
_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
|
||||
const char *dirlist, size_t dirlist_len, int mask,
|
||||
const char *language, const char *territory,
|
||||
const char *codeset,
|
||||
const char *normalized_codeset,
|
||||
const char *modifier, const char *special,
|
||||
const char *sponsor, const char *revision,
|
||||
const char *filename, int do_allocate));
|
||||
|
||||
|
||||
extern const char *_nl_expand_alias PARAMS ((const char *name));
|
||||
|
||||
/* normalized_codeset is dynamically allocated and has to be freed by
|
||||
the caller. */
|
||||
extern int _nl_explode_name PARAMS ((char *name, const char **language,
|
||||
const char **modifier,
|
||||
const char **territory,
|
||||
const char **codeset,
|
||||
const char **normalized_codeset,
|
||||
const char **special,
|
||||
const char **sponsor,
|
||||
const char **revision));
|
||||
|
||||
extern char *_nl_find_language PARAMS ((const char *name));
|
||||
|
||||
#endif /* loadinfo.h */
|
||||
566
libprozilla/intl/loadmsgcat.c
Normal file
566
libprozilla/intl/loadmsgcat.c
Normal file
@@ -0,0 +1,566 @@
|
||||
/* Load needed message catalogs.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
<features.h>, and once <features.h> has been included, it's too late. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
# define HAVE_ALLOCA 1
|
||||
#else
|
||||
# if defined HAVE_ALLOCA_H || defined _LIBC
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <langinfo.h>
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|
||||
|| (defined _LIBC && defined _POSIX_MAPPED_FILES)
|
||||
# include <sys/mman.h>
|
||||
# undef HAVE_MMAP
|
||||
# define HAVE_MMAP 1
|
||||
#else
|
||||
# undef HAVE_MMAP
|
||||
#endif
|
||||
|
||||
#include "gettext.h"
|
||||
#include "gettextP.h"
|
||||
|
||||
#ifdef _LIBC
|
||||
# include "../locale/localeinfo.h"
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Rename the non ISO C functions. This is required by the standard
|
||||
because some ISO C functions will require linking with this object
|
||||
file and the name space must not be polluted. */
|
||||
# define open __open
|
||||
# define close __close
|
||||
# define read __read
|
||||
# define mmap __mmap
|
||||
# define munmap __munmap
|
||||
#endif
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define PLURAL_PARSE __gettextparse
|
||||
#else
|
||||
# define PLURAL_PARSE gettextparse__
|
||||
#endif
|
||||
|
||||
/* For those losing systems which don't have `alloca' we have to add
|
||||
some additional code emulating it. */
|
||||
#ifdef HAVE_ALLOCA
|
||||
# define freea(p) /* nothing */
|
||||
#else
|
||||
# define alloca(n) malloc (n)
|
||||
# define freea(p) free (p)
|
||||
#endif
|
||||
|
||||
/* For systems that distinguish between text and binary I/O.
|
||||
O_BINARY is usually declared in <fcntl.h>. */
|
||||
#if !defined O_BINARY && defined _O_BINARY
|
||||
/* For MSC-compatible compilers. */
|
||||
# define O_BINARY _O_BINARY
|
||||
# define O_TEXT _O_TEXT
|
||||
#endif
|
||||
#ifdef __BEOS__
|
||||
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
|
||||
# undef O_BINARY
|
||||
# undef O_TEXT
|
||||
#endif
|
||||
/* On reasonable systems, binary I/O is the default. */
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
||||
/* We need a sign, whether a new catalog was loaded, which can be associated
|
||||
with all translations. This is important if the translations are
|
||||
cached by one of GCC's features. */
|
||||
int _nl_msg_cat_cntr;
|
||||
|
||||
#if (defined __GNUC__ && !defined __APPLE_CC__) \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
|
||||
|
||||
/* These structs are the constant expression for the germanic plural
|
||||
form determination. It represents the expression "n != 1". */
|
||||
static const struct expression plvar =
|
||||
{
|
||||
.nargs = 0,
|
||||
.operation = var,
|
||||
};
|
||||
static const struct expression plone =
|
||||
{
|
||||
.nargs = 0,
|
||||
.operation = num,
|
||||
.val =
|
||||
{
|
||||
.num = 1
|
||||
}
|
||||
};
|
||||
static struct expression germanic_plural =
|
||||
{
|
||||
.nargs = 2,
|
||||
.operation = not_equal,
|
||||
.val =
|
||||
{
|
||||
.args =
|
||||
{
|
||||
[0] = (struct expression *) &plvar,
|
||||
[1] = (struct expression *) &plone
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
# define INIT_GERMANIC_PLURAL()
|
||||
|
||||
#else
|
||||
|
||||
/* For compilers without support for ISO C 99 struct/union initializers:
|
||||
Initialization at run-time. */
|
||||
|
||||
static struct expression plvar;
|
||||
static struct expression plone;
|
||||
static struct expression germanic_plural;
|
||||
|
||||
static void
|
||||
init_germanic_plural ()
|
||||
{
|
||||
if (plone.val.num == 0)
|
||||
{
|
||||
plvar.nargs = 0;
|
||||
plvar.operation = var;
|
||||
|
||||
plone.nargs = 0;
|
||||
plone.operation = num;
|
||||
plone.val.num = 1;
|
||||
|
||||
germanic_plural.nargs = 2;
|
||||
germanic_plural.operation = not_equal;
|
||||
germanic_plural.val.args[0] = &plvar;
|
||||
germanic_plural.val.args[1] = &plone;
|
||||
}
|
||||
}
|
||||
|
||||
# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Initialize the codeset dependent parts of an opened message catalog.
|
||||
Return the header entry. */
|
||||
const char *
|
||||
internal_function
|
||||
_nl_init_domain_conv (domain_file, domain, domainbinding)
|
||||
struct loaded_l10nfile *domain_file;
|
||||
struct loaded_domain *domain;
|
||||
struct binding *domainbinding;
|
||||
{
|
||||
/* Find out about the character set the file is encoded with.
|
||||
This can be found (in textual form) in the entry "". If this
|
||||
entry does not exist or if this does not contain the `charset='
|
||||
information, we will assume the charset matches the one the
|
||||
current locale and we don't have to perform any conversion. */
|
||||
char *nullentry;
|
||||
size_t nullentrylen;
|
||||
|
||||
/* Preinitialize fields, to avoid recursion during _nl_find_msg. */
|
||||
domain->codeset_cntr =
|
||||
(domainbinding != NULL ? domainbinding->codeset_cntr : 0);
|
||||
#ifdef _LIBC
|
||||
domain->conv = (__gconv_t) -1;
|
||||
#else
|
||||
# if HAVE_ICONV
|
||||
domain->conv = (iconv_t) -1;
|
||||
# endif
|
||||
#endif
|
||||
domain->conv_tab = NULL;
|
||||
|
||||
/* Get the header entry. */
|
||||
nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
|
||||
|
||||
if (nullentry != NULL)
|
||||
{
|
||||
#if defined _LIBC || HAVE_ICONV
|
||||
const char *charsetstr;
|
||||
|
||||
charsetstr = strstr (nullentry, "charset=");
|
||||
if (charsetstr != NULL)
|
||||
{
|
||||
size_t len;
|
||||
char *charset;
|
||||
const char *outcharset;
|
||||
|
||||
charsetstr += strlen ("charset=");
|
||||
len = strcspn (charsetstr, " \t\n");
|
||||
|
||||
charset = (char *) alloca (len + 1);
|
||||
# if defined _LIBC || HAVE_MEMPCPY
|
||||
*((char *) mempcpy (charset, charsetstr, len)) = '\0';
|
||||
# else
|
||||
memcpy (charset, charsetstr, len);
|
||||
charset[len] = '\0';
|
||||
# endif
|
||||
|
||||
/* The output charset should normally be determined by the
|
||||
locale. But sometimes the locale is not used or not correctly
|
||||
set up, so we provide a possibility for the user to override
|
||||
this. Moreover, the value specified through
|
||||
bind_textdomain_codeset overrides both. */
|
||||
if (domainbinding != NULL && domainbinding->codeset != NULL)
|
||||
outcharset = domainbinding->codeset;
|
||||
else
|
||||
{
|
||||
outcharset = getenv ("OUTPUT_CHARSET");
|
||||
if (outcharset == NULL || outcharset[0] == '\0')
|
||||
{
|
||||
# ifdef _LIBC
|
||||
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
|
||||
# else
|
||||
# if HAVE_ICONV
|
||||
extern const char *locale_charset (void);
|
||||
outcharset = locale_charset ();
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef _LIBC
|
||||
/* We always want to use transliteration. */
|
||||
outcharset = norm_add_slashes (outcharset, "TRANSLIT");
|
||||
charset = norm_add_slashes (charset, NULL);
|
||||
if (__gconv_open (outcharset, charset, &domain->conv,
|
||||
GCONV_AVOID_NOCONV)
|
||||
!= __GCONV_OK)
|
||||
domain->conv = (__gconv_t) -1;
|
||||
# else
|
||||
# if HAVE_ICONV
|
||||
/* When using GNU libiconv, we want to use transliteration. */
|
||||
# if _LIBICONV_VERSION >= 0x0105
|
||||
len = strlen (outcharset);
|
||||
{
|
||||
char *tmp = (char *) alloca (len + 10 + 1);
|
||||
memcpy (tmp, outcharset, len);
|
||||
memcpy (tmp + len, "//TRANSLIT", 10 + 1);
|
||||
outcharset = tmp;
|
||||
}
|
||||
# endif
|
||||
domain->conv = iconv_open (outcharset, charset);
|
||||
# if _LIBICONV_VERSION >= 0x0105
|
||||
freea (outcharset);
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
freea (charset);
|
||||
}
|
||||
#endif /* _LIBC || HAVE_ICONV */
|
||||
}
|
||||
|
||||
return nullentry;
|
||||
}
|
||||
|
||||
/* Frees the codeset dependent parts of an opened message catalog. */
|
||||
void
|
||||
internal_function
|
||||
_nl_free_domain_conv (domain)
|
||||
struct loaded_domain *domain;
|
||||
{
|
||||
if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
|
||||
free (domain->conv_tab);
|
||||
|
||||
#ifdef _LIBC
|
||||
if (domain->conv != (__gconv_t) -1)
|
||||
__gconv_close (domain->conv);
|
||||
#else
|
||||
# if HAVE_ICONV
|
||||
if (domain->conv != (iconv_t) -1)
|
||||
iconv_close (domain->conv);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Load the message catalogs specified by FILENAME. If it is no valid
|
||||
message catalog do nothing. */
|
||||
void
|
||||
internal_function
|
||||
_nl_load_domain (domain_file, domainbinding)
|
||||
struct loaded_l10nfile *domain_file;
|
||||
struct binding *domainbinding;
|
||||
{
|
||||
int fd;
|
||||
size_t size;
|
||||
#ifdef _LIBC
|
||||
struct stat64 st;
|
||||
#else
|
||||
struct stat st;
|
||||
#endif
|
||||
struct mo_file_header *data = (struct mo_file_header *) -1;
|
||||
int use_mmap = 0;
|
||||
struct loaded_domain *domain;
|
||||
const char *nullentry;
|
||||
|
||||
domain_file->decided = 1;
|
||||
domain_file->data = NULL;
|
||||
|
||||
/* Note that it would be useless to store domainbinding in domain_file
|
||||
because domainbinding might be == NULL now but != NULL later (after
|
||||
a call to bind_textdomain_codeset). */
|
||||
|
||||
/* If the record does not represent a valid locale the FILENAME
|
||||
might be NULL. This can happen when according to the given
|
||||
specification the locale file name is different for XPG and CEN
|
||||
syntax. */
|
||||
if (domain_file->filename == NULL)
|
||||
return;
|
||||
|
||||
/* Try to open the addressed file. */
|
||||
fd = open (domain_file->filename, O_RDONLY | O_BINARY);
|
||||
if (fd == -1)
|
||||
return;
|
||||
|
||||
/* We must know about the size of the file. */
|
||||
if (
|
||||
#ifdef _LIBC
|
||||
__builtin_expect (fstat64 (fd, &st) != 0, 0)
|
||||
#else
|
||||
__builtin_expect (fstat (fd, &st) != 0, 0)
|
||||
#endif
|
||||
|| __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
|
||||
|| __builtin_expect (size < sizeof (struct mo_file_header), 0))
|
||||
{
|
||||
/* Something went wrong. */
|
||||
close (fd);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
/* Now we are ready to load the file. If mmap() is available we try
|
||||
this first. If not available or it failed we try to load it. */
|
||||
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
|
||||
MAP_PRIVATE, fd, 0);
|
||||
|
||||
if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
|
||||
{
|
||||
/* mmap() call was successful. */
|
||||
close (fd);
|
||||
use_mmap = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If the data is not yet available (i.e. mmap'ed) we try to load
|
||||
it manually. */
|
||||
if (data == (struct mo_file_header *) -1)
|
||||
{
|
||||
size_t to_read;
|
||||
char *read_ptr;
|
||||
|
||||
data = (struct mo_file_header *) malloc (size);
|
||||
if (data == NULL)
|
||||
return;
|
||||
|
||||
to_read = size;
|
||||
read_ptr = (char *) data;
|
||||
do
|
||||
{
|
||||
long int nb = (long int) read (fd, read_ptr, to_read);
|
||||
if (nb <= 0)
|
||||
{
|
||||
#ifdef EINTR
|
||||
if (nb == -1 && errno == EINTR)
|
||||
continue;
|
||||
#endif
|
||||
close (fd);
|
||||
return;
|
||||
}
|
||||
read_ptr += nb;
|
||||
to_read -= nb;
|
||||
}
|
||||
while (to_read > 0);
|
||||
|
||||
close (fd);
|
||||
}
|
||||
|
||||
/* Using the magic number we can test whether it really is a message
|
||||
catalog file. */
|
||||
if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
|
||||
0))
|
||||
{
|
||||
/* The magic number is wrong: not a message catalog file. */
|
||||
#ifdef HAVE_MMAP
|
||||
if (use_mmap)
|
||||
munmap ((caddr_t) data, size);
|
||||
else
|
||||
#endif
|
||||
free (data);
|
||||
return;
|
||||
}
|
||||
|
||||
domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
|
||||
if (domain == NULL)
|
||||
return;
|
||||
domain_file->data = domain;
|
||||
|
||||
domain->data = (char *) data;
|
||||
domain->use_mmap = use_mmap;
|
||||
domain->mmap_size = size;
|
||||
domain->must_swap = data->magic != _MAGIC;
|
||||
|
||||
/* Fill in the information about the available tables. */
|
||||
switch (W (domain->must_swap, data->revision))
|
||||
{
|
||||
case 0:
|
||||
domain->nstrings = W (domain->must_swap, data->nstrings);
|
||||
domain->orig_tab = (struct string_desc *)
|
||||
((char *) data + W (domain->must_swap, data->orig_tab_offset));
|
||||
domain->trans_tab = (struct string_desc *)
|
||||
((char *) data + W (domain->must_swap, data->trans_tab_offset));
|
||||
domain->hash_size = W (domain->must_swap, data->hash_tab_size);
|
||||
domain->hash_tab = (nls_uint32 *)
|
||||
((char *) data + W (domain->must_swap, data->hash_tab_offset));
|
||||
break;
|
||||
default:
|
||||
/* This is an invalid revision. */
|
||||
#ifdef HAVE_MMAP
|
||||
if (use_mmap)
|
||||
munmap ((caddr_t) data, size);
|
||||
else
|
||||
#endif
|
||||
free (data);
|
||||
free (domain);
|
||||
domain_file->data = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Now initialize the character set converter from the character set
|
||||
the file is encoded with (found in the header entry) to the domain's
|
||||
specified character set or the locale's character set. */
|
||||
nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
|
||||
|
||||
/* Also look for a plural specification. */
|
||||
if (nullentry != NULL)
|
||||
{
|
||||
const char *plural;
|
||||
const char *nplurals;
|
||||
|
||||
plural = strstr (nullentry, "plural=");
|
||||
nplurals = strstr (nullentry, "nplurals=");
|
||||
if (plural == NULL || nplurals == NULL)
|
||||
goto no_plural;
|
||||
else
|
||||
{
|
||||
/* First get the number. */
|
||||
char *endp;
|
||||
unsigned long int n;
|
||||
struct parse_args args;
|
||||
|
||||
nplurals += 9;
|
||||
while (*nplurals != '\0' && isspace (*nplurals))
|
||||
++nplurals;
|
||||
#if defined HAVE_STRTOUL || defined _LIBC
|
||||
n = strtoul (nplurals, &endp, 10);
|
||||
#else
|
||||
for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
|
||||
n = n * 10 + (*endp - '0');
|
||||
#endif
|
||||
domain->nplurals = n;
|
||||
if (nplurals == endp)
|
||||
goto no_plural;
|
||||
|
||||
/* Due to the restrictions bison imposes onto the interface of the
|
||||
scanner function we have to put the input string and the result
|
||||
passed up from the parser into the same structure which address
|
||||
is passed down to the parser. */
|
||||
plural += 7;
|
||||
args.cp = plural;
|
||||
if (PLURAL_PARSE (&args) != 0)
|
||||
goto no_plural;
|
||||
domain->plural = args.res;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* By default we are using the Germanic form: singular form only
|
||||
for `one', the plural form otherwise. Yes, this is also what
|
||||
English is using since English is a Germanic language. */
|
||||
no_plural:
|
||||
INIT_GERMANIC_PLURAL ();
|
||||
domain->plural = &germanic_plural;
|
||||
domain->nplurals = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
void
|
||||
internal_function
|
||||
_nl_unload_domain (domain)
|
||||
struct loaded_domain *domain;
|
||||
{
|
||||
if (domain->plural != &germanic_plural)
|
||||
__gettext_free_exp (domain->plural);
|
||||
|
||||
_nl_free_domain_conv (domain);
|
||||
|
||||
# ifdef _POSIX_MAPPED_FILES
|
||||
if (domain->use_mmap)
|
||||
munmap ((caddr_t) domain->data, domain->mmap_size);
|
||||
else
|
||||
# endif /* _POSIX_MAPPED_FILES */
|
||||
free ((void *) domain->data);
|
||||
|
||||
free (domain);
|
||||
}
|
||||
#endif
|
||||
271
libprozilla/intl/localcharset.c
Normal file
271
libprozilla/intl/localcharset.c
Normal file
@@ -0,0 +1,271 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __WIN32__
|
||||
# undef WIN32 /* avoid warning on mingw32 */
|
||||
# define WIN32
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
# include <langinfo.h>
|
||||
# else
|
||||
# if HAVE_SETLOCALE
|
||||
# include <locale.h>
|
||||
# endif
|
||||
# endif
|
||||
#else /* WIN32 */
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
/* The following static variable is declared 'volatile' to avoid a
|
||||
possible multithread problem in the function get_charset_aliases. If we
|
||||
are running in a threaded environment, and if two threads initialize
|
||||
'charset_aliases' simultaneously, both will produce the same value,
|
||||
and everything will be ok if the two assignments to 'charset_aliases'
|
||||
are atomic. But I don't know what will happen if the two assignments mix. */
|
||||
#if __STDC__ != 1
|
||||
# define volatile /* empty */
|
||||
#endif
|
||||
/* Pointer to the contents of the charset.alias file, if it has already been
|
||||
read, else NULL. Its format is:
|
||||
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
|
||||
static char * volatile charset_aliases;
|
||||
|
||||
/* Return a pointer to the contents of the charset.alias file. */
|
||||
static const char *
|
||||
get_charset_aliases ()
|
||||
{
|
||||
char *cp;
|
||||
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
#ifndef WIN32
|
||||
FILE *fp;
|
||||
const char *dir = LIBDIR;
|
||||
const char *base = "charset.alias";
|
||||
char *file_name;
|
||||
|
||||
/* Concatenate dir and base into freshly allocated file_name. */
|
||||
{
|
||||
size_t dir_len = strlen (dir);
|
||||
size_t base_len = strlen (base);
|
||||
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
|
||||
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
|
||||
if (file_name != NULL)
|
||||
{
|
||||
memcpy (file_name, dir, dir_len);
|
||||
if (add_slash)
|
||||
file_name[dir_len] = DIRECTORY_SEPARATOR;
|
||||
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
|
||||
/* Out of memory or file not found, treat it as empty. */
|
||||
cp = "";
|
||||
else
|
||||
{
|
||||
/* Parse the file's contents. */
|
||||
int c;
|
||||
char buf1[50+1];
|
||||
char buf2[50+1];
|
||||
char *res_ptr = NULL;
|
||||
size_t res_size = 0;
|
||||
size_t l1, l2;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
c = getc (fp);
|
||||
if (c == EOF)
|
||||
break;
|
||||
if (c == '\n' || c == ' ' || c == '\t')
|
||||
continue;
|
||||
if (c == '#')
|
||||
{
|
||||
/* Skip comment, to end of line. */
|
||||
do
|
||||
c = getc (fp);
|
||||
while (!(c == EOF || c == '\n'));
|
||||
if (c == EOF)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
ungetc (c, fp);
|
||||
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
||||
break;
|
||||
l1 = strlen (buf1);
|
||||
l2 = strlen (buf2);
|
||||
if (res_size == 0)
|
||||
{
|
||||
res_size = l1 + 1 + l2 + 1;
|
||||
res_ptr = malloc (res_size + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
res_size += l1 + 1 + l2 + 1;
|
||||
res_ptr = realloc (res_ptr, res_size + 1);
|
||||
}
|
||||
if (res_ptr == NULL)
|
||||
{
|
||||
/* Out of memory. */
|
||||
res_size = 0;
|
||||
break;
|
||||
}
|
||||
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
|
||||
strcpy (res_ptr + res_size - (l2 + 1), buf2);
|
||||
}
|
||||
fclose (fp);
|
||||
if (res_size == 0)
|
||||
cp = "";
|
||||
else
|
||||
{
|
||||
*(res_ptr + res_size) = '\0';
|
||||
cp = res_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_name != NULL)
|
||||
free (file_name);
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
/* To avoid the troubles of installing a separate file in the same
|
||||
directory as the DLL and of retrieving the DLL's directory at
|
||||
runtime, simply inline the aliases here. */
|
||||
|
||||
cp = "CP936" "\0" "GBK" "\0"
|
||||
"CP1361" "\0" "JOHAB" "\0";
|
||||
#endif
|
||||
|
||||
charset_aliases = cp;
|
||||
}
|
||||
|
||||
return cp;
|
||||
}
|
||||
|
||||
/* Determine the current locale's character encoding, and canonicalize it
|
||||
into one of the canonical names listed in config.charset.
|
||||
The result must not be freed; it is statically allocated.
|
||||
If the canonical name cannot be determined, the result is a non-canonical
|
||||
name. */
|
||||
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
#endif
|
||||
const char *
|
||||
locale_charset ()
|
||||
{
|
||||
const char *codeset;
|
||||
const char *aliases;
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
|
||||
/* Most systems support nl_langinfo (CODESET) nowadays. */
|
||||
codeset = nl_langinfo (CODESET);
|
||||
|
||||
# else
|
||||
|
||||
/* On old systems which lack it, use setlocale or getenv. */
|
||||
const char *locale = NULL;
|
||||
|
||||
/* But most old systems don't have a complete set of locales. Some
|
||||
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
|
||||
use setlocale here; it would return "C" when it doesn't support the
|
||||
locale name the user has set. */
|
||||
# if HAVE_SETLOCALE && 0
|
||||
locale = setlocale (LC_CTYPE, NULL);
|
||||
# endif
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
{
|
||||
locale = getenv ("LC_ALL");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
{
|
||||
locale = getenv ("LC_CTYPE");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
locale = getenv ("LANG");
|
||||
}
|
||||
}
|
||||
|
||||
/* On some old systems, one used to set locale = "iso8859_1". On others,
|
||||
you set it to "language_COUNTRY.charset". In any case, we resolve it
|
||||
through the charset.alias file. */
|
||||
codeset = locale;
|
||||
|
||||
# endif
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
static char buf[2 + 10 + 1];
|
||||
|
||||
/* Win32 has a function returning the locale's codepage as a number. */
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
codeset = buf;
|
||||
|
||||
#endif
|
||||
|
||||
if (codeset == NULL)
|
||||
/* The canonical name cannot be determined. */
|
||||
codeset = "";
|
||||
|
||||
/* Resolve alias. */
|
||||
for (aliases = get_charset_aliases ();
|
||||
*aliases != '\0';
|
||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||
if (strcmp (codeset, aliases) == 0
|
||||
|| (aliases[0] == '*' && aliases[1] == '\0'))
|
||||
{
|
||||
codeset = aliases + strlen (aliases) + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return codeset;
|
||||
}
|
||||
77
libprozilla/intl/locale.alias
Normal file
77
libprozilla/intl/locale.alias
Normal file
@@ -0,0 +1,77 @@
|
||||
# Locale name alias data base.
|
||||
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# The format of this file is the same as for the corresponding file of
|
||||
# the X Window System, which normally can be found in
|
||||
# /usr/lib/X11/locale/locale.alias
|
||||
# A single line contains two fields: an alias and a substitution value.
|
||||
# All entries are case independent.
|
||||
|
||||
# Note: This file is far from being complete. If you have a value for
|
||||
# your own site which you think might be useful for others too, share
|
||||
# it with the rest of us. Send it using the `glibcbug' script to
|
||||
# bugs@gnu.org.
|
||||
|
||||
# Packages using this file:
|
||||
|
||||
bokmal no_NO.ISO-8859-1
|
||||
bokm<EFBFBD>l no_NO.ISO-8859-1
|
||||
catalan ca_ES.ISO-8859-1
|
||||
croatian hr_HR.ISO-8859-2
|
||||
czech cs_CZ.ISO-8859-2
|
||||
danish da_DK.ISO-8859-1
|
||||
dansk da_DK.ISO-8859-1
|
||||
deutsch de_DE.ISO-8859-1
|
||||
dutch nl_NL.ISO-8859-1
|
||||
eesti et_EE.ISO-8859-1
|
||||
estonian et_EE.ISO-8859-1
|
||||
finnish fi_FI.ISO-8859-1
|
||||
fran<EFBFBD>ais fr_FR.ISO-8859-1
|
||||
french fr_FR.ISO-8859-1
|
||||
galego gl_ES.ISO-8859-1
|
||||
galician gl_ES.ISO-8859-1
|
||||
german de_DE.ISO-8859-1
|
||||
greek el_GR.ISO-8859-7
|
||||
hebrew iw_IL.ISO-8859-8
|
||||
hrvatski hr_HR.ISO-8859-2
|
||||
hungarian hu_HU.ISO-8859-2
|
||||
icelandic is_IS.ISO-8859-1
|
||||
italian it_IT.ISO-8859-1
|
||||
japanese ja_JP.eucJP
|
||||
japanese.euc ja_JP.eucJP
|
||||
ja_JP ja_JP.eucJP
|
||||
ja_JP.ujis ja_JP.eucJP
|
||||
japanese.sjis ja_JP.SJIS
|
||||
korean ko_KR.eucKR
|
||||
korean.euc ko_KR.eucKR
|
||||
ko_KR ko_KR.eucKR
|
||||
lithuanian lt_LT.ISO-8859-13
|
||||
nb_NO no_NO.ISO-8859-1
|
||||
nb_NO.ISO-8859-1 no_NO.ISO-8859-1
|
||||
norwegian no_NO.ISO-8859-1
|
||||
nynorsk nn_NO.ISO-8859-1
|
||||
polish pl_PL.ISO-8859-2
|
||||
portuguese pt_PT.ISO-8859-1
|
||||
romanian ro_RO.ISO-8859-2
|
||||
russian ru_RU.ISO-8859-5
|
||||
slovak sk_SK.ISO-8859-2
|
||||
slovene sl_SI.ISO-8859-2
|
||||
slovenian sl_SI.ISO-8859-2
|
||||
spanish es_ES.ISO-8859-1
|
||||
swedish sv_SE.ISO-8859-1
|
||||
thai th_TH.TIS-620
|
||||
turkish tr_TR.ISO-8859-9
|
||||
403
libprozilla/intl/localealias.c
Normal file
403
libprozilla/intl/localealias.c
Normal file
@@ -0,0 +1,403 @@
|
||||
/* Handle aliases for locale names.
|
||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
This must come before <config.h> because <config.h> may include
|
||||
<features.h>, and once <features.h> has been included, it's too late. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
# define HAVE_ALLOCA 1
|
||||
#else
|
||||
# if defined HAVE_ALLOCA_H || defined _LIBC
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string.h>
|
||||
#if !HAVE_STRCHR && !defined _LIBC
|
||||
# ifndef strchr
|
||||
# define strchr index
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Rename the non ANSI C functions. This is required by the standard
|
||||
because some ANSI C functions will require linking with this object
|
||||
file and the name space must not be polluted. */
|
||||
# define strcasecmp __strcasecmp
|
||||
|
||||
# ifndef mempcpy
|
||||
# define mempcpy __mempcpy
|
||||
# endif
|
||||
# define HAVE_MEMPCPY 1
|
||||
|
||||
/* We need locking here since we can be called from different places. */
|
||||
# include <bits/libc-lock.h>
|
||||
|
||||
__libc_lock_define_initialized (static, lock);
|
||||
#endif
|
||||
|
||||
#ifndef internal_function
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
/* For those losing systems which don't have `alloca' we have to add
|
||||
some additional code emulating it. */
|
||||
#ifdef HAVE_ALLOCA
|
||||
# define freea(p) /* nothing */
|
||||
#else
|
||||
# define alloca(n) malloc (n)
|
||||
# define freea(p) free (p)
|
||||
#endif
|
||||
|
||||
#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
|
||||
# undef fgets
|
||||
# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
|
||||
#endif
|
||||
#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
|
||||
# undef feof
|
||||
# define feof(s) feof_unlocked (s)
|
||||
#endif
|
||||
|
||||
|
||||
struct alias_map
|
||||
{
|
||||
const char *alias;
|
||||
const char *value;
|
||||
};
|
||||
|
||||
|
||||
static char *string_space;
|
||||
static size_t string_space_act;
|
||||
static size_t string_space_max;
|
||||
static struct alias_map *map;
|
||||
static size_t nmap;
|
||||
static size_t maxmap;
|
||||
|
||||
|
||||
/* Prototypes for local functions. */
|
||||
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
|
||||
internal_function;
|
||||
static int extend_alias_table PARAMS ((void));
|
||||
static int alias_compare PARAMS ((const struct alias_map *map1,
|
||||
const struct alias_map *map2));
|
||||
|
||||
|
||||
const char *
|
||||
_nl_expand_alias (name)
|
||||
const char *name;
|
||||
{
|
||||
static const char *locale_alias_path = LOCALE_ALIAS_PATH;
|
||||
struct alias_map *retval;
|
||||
const char *result = NULL;
|
||||
size_t added;
|
||||
|
||||
#ifdef _LIBC
|
||||
__libc_lock_lock (lock);
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
struct alias_map item;
|
||||
|
||||
item.alias = name;
|
||||
|
||||
if (nmap > 0)
|
||||
retval = (struct alias_map *) bsearch (&item, map, nmap,
|
||||
sizeof (struct alias_map),
|
||||
(int (*) PARAMS ((const void *,
|
||||
const void *))
|
||||
) alias_compare);
|
||||
else
|
||||
retval = NULL;
|
||||
|
||||
/* We really found an alias. Return the value. */
|
||||
if (retval != NULL)
|
||||
{
|
||||
result = retval->value;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Perhaps we can find another alias file. */
|
||||
added = 0;
|
||||
while (added == 0 && locale_alias_path[0] != '\0')
|
||||
{
|
||||
const char *start;
|
||||
|
||||
while (locale_alias_path[0] == PATH_SEPARATOR)
|
||||
++locale_alias_path;
|
||||
start = locale_alias_path;
|
||||
|
||||
while (locale_alias_path[0] != '\0'
|
||||
&& locale_alias_path[0] != PATH_SEPARATOR)
|
||||
++locale_alias_path;
|
||||
|
||||
if (start < locale_alias_path)
|
||||
added = read_alias_file (start, locale_alias_path - start);
|
||||
}
|
||||
}
|
||||
while (added != 0);
|
||||
|
||||
#ifdef _LIBC
|
||||
__libc_lock_unlock (lock);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static size_t
|
||||
internal_function
|
||||
read_alias_file (fname, fname_len)
|
||||
const char *fname;
|
||||
int fname_len;
|
||||
{
|
||||
FILE *fp;
|
||||
char *full_fname;
|
||||
size_t added;
|
||||
static const char aliasfile[] = "/locale.alias";
|
||||
|
||||
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
|
||||
#ifdef HAVE_MEMPCPY
|
||||
mempcpy (mempcpy (full_fname, fname, fname_len),
|
||||
aliasfile, sizeof aliasfile);
|
||||
#else
|
||||
memcpy (full_fname, fname, fname_len);
|
||||
memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
|
||||
#endif
|
||||
|
||||
fp = fopen (full_fname, "r");
|
||||
freea (full_fname);
|
||||
if (fp == NULL)
|
||||
return 0;
|
||||
|
||||
added = 0;
|
||||
while (!feof (fp))
|
||||
{
|
||||
/* It is a reasonable approach to use a fix buffer here because
|
||||
a) we are only interested in the first two fields
|
||||
b) these fields must be usable as file names and so must not
|
||||
be that long
|
||||
*/
|
||||
char buf[BUFSIZ];
|
||||
char *alias;
|
||||
char *value;
|
||||
char *cp;
|
||||
|
||||
if (fgets (buf, sizeof buf, fp) == NULL)
|
||||
/* EOF reached. */
|
||||
break;
|
||||
|
||||
/* Possibly not the whole line fits into the buffer. Ignore
|
||||
the rest of the line. */
|
||||
if (strchr (buf, '\n') == NULL)
|
||||
{
|
||||
char altbuf[BUFSIZ];
|
||||
do
|
||||
if (fgets (altbuf, sizeof altbuf, fp) == NULL)
|
||||
/* Make sure the inner loop will be left. The outer loop
|
||||
will exit at the `feof' test. */
|
||||
break;
|
||||
while (strchr (altbuf, '\n') == NULL);
|
||||
}
|
||||
|
||||
cp = buf;
|
||||
/* Ignore leading white space. */
|
||||
while (isspace (cp[0]))
|
||||
++cp;
|
||||
|
||||
/* A leading '#' signals a comment line. */
|
||||
if (cp[0] != '\0' && cp[0] != '#')
|
||||
{
|
||||
alias = cp++;
|
||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||
++cp;
|
||||
/* Terminate alias name. */
|
||||
if (cp[0] != '\0')
|
||||
*cp++ = '\0';
|
||||
|
||||
/* Now look for the beginning of the value. */
|
||||
while (isspace (cp[0]))
|
||||
++cp;
|
||||
|
||||
if (cp[0] != '\0')
|
||||
{
|
||||
size_t alias_len;
|
||||
size_t value_len;
|
||||
|
||||
value = cp++;
|
||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||
++cp;
|
||||
/* Terminate value. */
|
||||
if (cp[0] == '\n')
|
||||
{
|
||||
/* This has to be done to make the following test
|
||||
for the end of line possible. We are looking for
|
||||
the terminating '\n' which do not overwrite here. */
|
||||
*cp++ = '\0';
|
||||
*cp = '\n';
|
||||
}
|
||||
else if (cp[0] != '\0')
|
||||
*cp++ = '\0';
|
||||
|
||||
if (nmap >= maxmap)
|
||||
if (__builtin_expect (extend_alias_table (), 0))
|
||||
return added;
|
||||
|
||||
alias_len = strlen (alias) + 1;
|
||||
value_len = strlen (value) + 1;
|
||||
|
||||
if (string_space_act + alias_len + value_len > string_space_max)
|
||||
{
|
||||
/* Increase size of memory pool. */
|
||||
size_t new_size = (string_space_max
|
||||
+ (alias_len + value_len > 1024
|
||||
? alias_len + value_len : 1024));
|
||||
char *new_pool = (char *) realloc (string_space, new_size);
|
||||
if (new_pool == NULL)
|
||||
return added;
|
||||
|
||||
if (__builtin_expect (string_space != new_pool, 0))
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < nmap; i++)
|
||||
{
|
||||
map[i].alias += new_pool - string_space;
|
||||
map[i].value += new_pool - string_space;
|
||||
}
|
||||
}
|
||||
|
||||
string_space = new_pool;
|
||||
string_space_max = new_size;
|
||||
}
|
||||
|
||||
map[nmap].alias = memcpy (&string_space[string_space_act],
|
||||
alias, alias_len);
|
||||
string_space_act += alias_len;
|
||||
|
||||
map[nmap].value = memcpy (&string_space[string_space_act],
|
||||
value, value_len);
|
||||
string_space_act += value_len;
|
||||
|
||||
++nmap;
|
||||
++added;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Should we test for ferror()? I think we have to silently ignore
|
||||
errors. --drepper */
|
||||
fclose (fp);
|
||||
|
||||
if (added > 0)
|
||||
qsort (map, nmap, sizeof (struct alias_map),
|
||||
(int (*) PARAMS ((const void *, const void *))) alias_compare);
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
extend_alias_table ()
|
||||
{
|
||||
size_t new_size;
|
||||
struct alias_map *new_map;
|
||||
|
||||
new_size = maxmap == 0 ? 100 : 2 * maxmap;
|
||||
new_map = (struct alias_map *) realloc (map, (new_size
|
||||
* sizeof (struct alias_map)));
|
||||
if (new_map == NULL)
|
||||
/* Simply don't extend: we don't have any more core. */
|
||||
return -1;
|
||||
|
||||
map = new_map;
|
||||
maxmap = new_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
static void __attribute__ ((unused))
|
||||
free_mem (void)
|
||||
{
|
||||
if (string_space != NULL)
|
||||
free (string_space);
|
||||
if (map != NULL)
|
||||
free (map);
|
||||
}
|
||||
text_set_element (__libc_subfreeres, free_mem);
|
||||
#endif
|
||||
|
||||
|
||||
static int
|
||||
alias_compare (map1, map2)
|
||||
const struct alias_map *map1;
|
||||
const struct alias_map *map2;
|
||||
{
|
||||
#if defined _LIBC || defined HAVE_STRCASECMP
|
||||
return strcasecmp (map1->alias, map2->alias);
|
||||
#else
|
||||
const unsigned char *p1 = (const unsigned char *) map1->alias;
|
||||
const unsigned char *p2 = (const unsigned char *) map2->alias;
|
||||
unsigned char c1, c2;
|
||||
|
||||
if (p1 == p2)
|
||||
return 0;
|
||||
|
||||
do
|
||||
{
|
||||
/* I know this seems to be odd but the tolower() function in
|
||||
some systems libc cannot handle nonalpha characters. */
|
||||
c1 = isupper (*p1) ? tolower (*p1) : *p1;
|
||||
c2 = isupper (*p2) ? tolower (*p2) : *p2;
|
||||
if (c1 == '\0')
|
||||
break;
|
||||
++p1;
|
||||
++p2;
|
||||
}
|
||||
while (c1 == c2);
|
||||
|
||||
return c1 - c2;
|
||||
#endif
|
||||
}
|
||||
67
libprozilla/intl/ngettext.c
Normal file
67
libprozilla/intl/ngettext.c
Normal file
@@ -0,0 +1,67 @@
|
||||
/* Implementation of ngettext(3) function.
|
||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define __need_NULL
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# include <stdlib.h> /* Just for NULL. */
|
||||
#endif
|
||||
|
||||
#include "gettextP.h"
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define NGETTEXT __ngettext
|
||||
# define DCNGETTEXT __dcngettext
|
||||
#else
|
||||
# define NGETTEXT ngettext__
|
||||
# define DCNGETTEXT dcngettext__
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
char *
|
||||
NGETTEXT (msgid1, msgid2, n)
|
||||
const char *msgid1;
|
||||
const char *msgid2;
|
||||
unsigned long int n;
|
||||
{
|
||||
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__ngettext, ngettext);
|
||||
#endif
|
||||
1325
libprozilla/intl/plural.c
Normal file
1325
libprozilla/intl/plural.c
Normal file
File diff suppressed because it is too large
Load Diff
412
libprozilla/intl/plural.y
Normal file
412
libprozilla/intl/plural.y
Normal file
@@ -0,0 +1,412 @@
|
||||
%{
|
||||
/* Expression parsing for plural form selection.
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
||||
declaration at the beginning of the file. The declaration in bison's
|
||||
skeleton file comes too late. This must come before <config.h>
|
||||
because <config.h> may include arbitrary system headers. */
|
||||
#if defined _AIX && !defined __GNUC__
|
||||
#pragma alloca
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "gettextP.h"
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define FREE_EXPRESSION __gettext_free_exp
|
||||
#else
|
||||
# define FREE_EXPRESSION gettext_free_exp__
|
||||
# define __gettextparse gettextparse__
|
||||
#endif
|
||||
|
||||
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||
#define YYPARSE_PARAM arg
|
||||
%}
|
||||
%pure_parser
|
||||
%expect 10
|
||||
|
||||
%union {
|
||||
unsigned long int num;
|
||||
enum operator op;
|
||||
struct expression *exp;
|
||||
}
|
||||
|
||||
%{
|
||||
/* Prototypes for local functions. */
|
||||
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
||||
struct expression * const *args));
|
||||
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
|
||||
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
|
||||
struct expression *right));
|
||||
static struct expression *new_exp_2 PARAMS ((enum operator op,
|
||||
struct expression *left,
|
||||
struct expression *right));
|
||||
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
|
||||
struct expression *bexp,
|
||||
struct expression *tbranch,
|
||||
struct expression *fbranch));
|
||||
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
|
||||
static void yyerror PARAMS ((const char *str));
|
||||
|
||||
/* Allocation of expressions. */
|
||||
|
||||
static struct expression *
|
||||
new_exp (nargs, op, args)
|
||||
int nargs;
|
||||
enum operator op;
|
||||
struct expression * const *args;
|
||||
{
|
||||
int i;
|
||||
struct expression *newp;
|
||||
|
||||
/* If any of the argument could not be malloc'ed, just return NULL. */
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
if (args[i] == NULL)
|
||||
goto fail;
|
||||
|
||||
/* Allocate a new expression. */
|
||||
newp = (struct expression *) malloc (sizeof (*newp));
|
||||
if (newp != NULL)
|
||||
{
|
||||
newp->nargs = nargs;
|
||||
newp->operation = op;
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
newp->val.args[i] = args[i];
|
||||
return newp;
|
||||
}
|
||||
|
||||
fail:
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
FREE_EXPRESSION (args[i]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct expression *
|
||||
new_exp_0 (op)
|
||||
enum operator op;
|
||||
{
|
||||
return new_exp (0, op, NULL);
|
||||
}
|
||||
|
||||
static inline struct expression *
|
||||
new_exp_1 (op, right)
|
||||
enum operator op;
|
||||
struct expression *right;
|
||||
{
|
||||
struct expression *args[1];
|
||||
|
||||
args[0] = right;
|
||||
return new_exp (1, op, args);
|
||||
}
|
||||
|
||||
static struct expression *
|
||||
new_exp_2 (op, left, right)
|
||||
enum operator op;
|
||||
struct expression *left;
|
||||
struct expression *right;
|
||||
{
|
||||
struct expression *args[2];
|
||||
|
||||
args[0] = left;
|
||||
args[1] = right;
|
||||
return new_exp (2, op, args);
|
||||
}
|
||||
|
||||
static inline struct expression *
|
||||
new_exp_3 (op, bexp, tbranch, fbranch)
|
||||
enum operator op;
|
||||
struct expression *bexp;
|
||||
struct expression *tbranch;
|
||||
struct expression *fbranch;
|
||||
{
|
||||
struct expression *args[3];
|
||||
|
||||
args[0] = bexp;
|
||||
args[1] = tbranch;
|
||||
args[2] = fbranch;
|
||||
return new_exp (3, op, args);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
/* This declares that all operators have the same associativity and the
|
||||
precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
|
||||
There is no unary minus and no bitwise operators.
|
||||
Operators with the same syntactic behaviour have been merged into a single
|
||||
token, to save space in the array generated by bison. */
|
||||
%right '?' /* ? */
|
||||
%left '|' /* || */
|
||||
%left '&' /* && */
|
||||
%left EQUOP2 /* == != */
|
||||
%left CMPOP2 /* < > <= >= */
|
||||
%left ADDOP2 /* + - */
|
||||
%left MULOP2 /* * / % */
|
||||
%right '!' /* ! */
|
||||
|
||||
%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
|
||||
%token <num> NUMBER
|
||||
%type <exp> exp
|
||||
|
||||
%%
|
||||
|
||||
start: exp
|
||||
{
|
||||
if ($1 == NULL)
|
||||
YYABORT;
|
||||
((struct parse_args *) arg)->res = $1;
|
||||
}
|
||||
;
|
||||
|
||||
exp: exp '?' exp ':' exp
|
||||
{
|
||||
$$ = new_exp_3 (qmop, $1, $3, $5);
|
||||
}
|
||||
| exp '|' exp
|
||||
{
|
||||
$$ = new_exp_2 (lor, $1, $3);
|
||||
}
|
||||
| exp '&' exp
|
||||
{
|
||||
$$ = new_exp_2 (land, $1, $3);
|
||||
}
|
||||
| exp EQUOP2 exp
|
||||
{
|
||||
$$ = new_exp_2 ($2, $1, $3);
|
||||
}
|
||||
| exp CMPOP2 exp
|
||||
{
|
||||
$$ = new_exp_2 ($2, $1, $3);
|
||||
}
|
||||
| exp ADDOP2 exp
|
||||
{
|
||||
$$ = new_exp_2 ($2, $1, $3);
|
||||
}
|
||||
| exp MULOP2 exp
|
||||
{
|
||||
$$ = new_exp_2 ($2, $1, $3);
|
||||
}
|
||||
| '!' exp
|
||||
{
|
||||
$$ = new_exp_1 (lnot, $2);
|
||||
}
|
||||
| 'n'
|
||||
{
|
||||
$$ = new_exp_0 (var);
|
||||
}
|
||||
| NUMBER
|
||||
{
|
||||
if (($$ = new_exp_0 (num)) != NULL)
|
||||
$$->val.num = $1;
|
||||
}
|
||||
| '(' exp ')'
|
||||
{
|
||||
$$ = $2;
|
||||
}
|
||||
;
|
||||
|
||||
%%
|
||||
|
||||
void
|
||||
internal_function
|
||||
FREE_EXPRESSION (exp)
|
||||
struct expression *exp;
|
||||
{
|
||||
if (exp == NULL)
|
||||
return;
|
||||
|
||||
/* Handle the recursive case. */
|
||||
switch (exp->nargs)
|
||||
{
|
||||
case 3:
|
||||
FREE_EXPRESSION (exp->val.args[2]);
|
||||
/* FALLTHROUGH */
|
||||
case 2:
|
||||
FREE_EXPRESSION (exp->val.args[1]);
|
||||
/* FALLTHROUGH */
|
||||
case 1:
|
||||
FREE_EXPRESSION (exp->val.args[0]);
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
free (exp);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
yylex (lval, pexp)
|
||||
YYSTYPE *lval;
|
||||
const char **pexp;
|
||||
{
|
||||
const char *exp = *pexp;
|
||||
int result;
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (exp[0] == '\0')
|
||||
{
|
||||
*pexp = exp;
|
||||
return YYEOF;
|
||||
}
|
||||
|
||||
if (exp[0] != ' ' && exp[0] != '\t')
|
||||
break;
|
||||
|
||||
++exp;
|
||||
}
|
||||
|
||||
result = *exp++;
|
||||
switch (result)
|
||||
{
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
{
|
||||
unsigned long int n = result - '0';
|
||||
while (exp[0] >= '0' && exp[0] <= '9')
|
||||
{
|
||||
n *= 10;
|
||||
n += exp[0] - '0';
|
||||
++exp;
|
||||
}
|
||||
lval->num = n;
|
||||
result = NUMBER;
|
||||
}
|
||||
break;
|
||||
|
||||
case '=':
|
||||
if (exp[0] == '=')
|
||||
{
|
||||
++exp;
|
||||
lval->op = equal;
|
||||
result = EQUOP2;
|
||||
}
|
||||
else
|
||||
result = YYERRCODE;
|
||||
break;
|
||||
|
||||
case '!':
|
||||
if (exp[0] == '=')
|
||||
{
|
||||
++exp;
|
||||
lval->op = not_equal;
|
||||
result = EQUOP2;
|
||||
}
|
||||
break;
|
||||
|
||||
case '&':
|
||||
case '|':
|
||||
if (exp[0] == result)
|
||||
++exp;
|
||||
else
|
||||
result = YYERRCODE;
|
||||
break;
|
||||
|
||||
case '<':
|
||||
if (exp[0] == '=')
|
||||
{
|
||||
++exp;
|
||||
lval->op = less_or_equal;
|
||||
}
|
||||
else
|
||||
lval->op = less_than;
|
||||
result = CMPOP2;
|
||||
break;
|
||||
|
||||
case '>':
|
||||
if (exp[0] == '=')
|
||||
{
|
||||
++exp;
|
||||
lval->op = greater_or_equal;
|
||||
}
|
||||
else
|
||||
lval->op = greater_than;
|
||||
result = CMPOP2;
|
||||
break;
|
||||
|
||||
case '*':
|
||||
lval->op = mult;
|
||||
result = MULOP2;
|
||||
break;
|
||||
|
||||
case '/':
|
||||
lval->op = divide;
|
||||
result = MULOP2;
|
||||
break;
|
||||
|
||||
case '%':
|
||||
lval->op = module;
|
||||
result = MULOP2;
|
||||
break;
|
||||
|
||||
case '+':
|
||||
lval->op = plus;
|
||||
result = ADDOP2;
|
||||
break;
|
||||
|
||||
case '-':
|
||||
lval->op = minus;
|
||||
result = ADDOP2;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
case '?':
|
||||
case ':':
|
||||
case '(':
|
||||
case ')':
|
||||
/* Nothing, just return the character. */
|
||||
break;
|
||||
|
||||
case ';':
|
||||
case '\n':
|
||||
case '\0':
|
||||
/* Be safe and let the user call this function again. */
|
||||
--exp;
|
||||
result = YYEOF;
|
||||
break;
|
||||
|
||||
default:
|
||||
result = YYERRCODE;
|
||||
#if YYDEBUG != 0
|
||||
--exp;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
*pexp = exp;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
yyerror (str)
|
||||
const char *str;
|
||||
{
|
||||
/* Do nothing. We don't print error messages here. */
|
||||
}
|
||||
0
libprozilla/intl/po2tbl.sed
Normal file
0
libprozilla/intl/po2tbl.sed
Normal file
31
libprozilla/intl/ref-add.sin
Normal file
31
libprozilla/intl/ref-add.sin
Normal file
@@ -0,0 +1,31 @@
|
||||
# Add this package to a list of references stored in a text file.
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||
#
|
||||
/^# Packages using this file: / {
|
||||
s/# Packages using this file://
|
||||
ta
|
||||
:a
|
||||
s/ @PACKAGE@ / @PACKAGE@ /
|
||||
tb
|
||||
s/ $/ @PACKAGE@ /
|
||||
:b
|
||||
s/^/# Packages using this file:/
|
||||
}
|
||||
26
libprozilla/intl/ref-del.sin
Normal file
26
libprozilla/intl/ref-del.sin
Normal file
@@ -0,0 +1,26 @@
|
||||
# Remove this package from a list of references stored in a text file.
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||
#
|
||||
/^# Packages using this file: / {
|
||||
s/# Packages using this file://
|
||||
s/ @PACKAGE@ / /
|
||||
s/^/# Packages using this file:/
|
||||
}
|
||||
141
libprozilla/intl/textdomain.c
Normal file
141
libprozilla/intl/textdomain.c
Normal file
@@ -0,0 +1,141 @@
|
||||
/* Implementation of the textdomain(3) function.
|
||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "libgnuintl.h"
|
||||
#endif
|
||||
#include "gettextP.h"
|
||||
|
||||
#ifdef _LIBC
|
||||
/* We have to handle multi-threaded applications. */
|
||||
# include <bits/libc-lock.h>
|
||||
#else
|
||||
/* Provide dummy implementation if this is outside glibc. */
|
||||
# define __libc_rwlock_define(CLASS, NAME)
|
||||
# define __libc_rwlock_wrlock(NAME)
|
||||
# define __libc_rwlock_unlock(NAME)
|
||||
#endif
|
||||
|
||||
/* The internal variables in the standalone libintl.a must have different
|
||||
names than the internal variables in GNU libc, otherwise programs
|
||||
using libintl.a cannot be linked statically. */
|
||||
#if !defined _LIBC
|
||||
# define _nl_default_default_domain _nl_default_default_domain__
|
||||
# define _nl_current_default_domain _nl_current_default_domain__
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
/* Name of the default text domain. */
|
||||
extern const char _nl_default_default_domain[];
|
||||
|
||||
/* Default text domain in which entries for gettext(3) are to be found. */
|
||||
extern const char *_nl_current_default_domain;
|
||||
|
||||
|
||||
/* Names for the libintl functions are a problem. They must not clash
|
||||
with existing names and they should follow ANSI C. But this source
|
||||
code is also used in GNU C Library where the names have a __
|
||||
prefix. So we have to make a difference here. */
|
||||
#ifdef _LIBC
|
||||
# define TEXTDOMAIN __textdomain
|
||||
# ifndef strdup
|
||||
# define strdup(str) __strdup (str)
|
||||
# endif
|
||||
#else
|
||||
# define TEXTDOMAIN textdomain__
|
||||
#endif
|
||||
|
||||
/* Lock variable to protect the global data in the gettext implementation. */
|
||||
__libc_rwlock_define (extern, _nl_state_lock)
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
char *
|
||||
TEXTDOMAIN (domainname)
|
||||
const char *domainname;
|
||||
{
|
||||
char *new_domain;
|
||||
char *old_domain;
|
||||
|
||||
/* A NULL pointer requests the current setting. */
|
||||
if (domainname == NULL)
|
||||
return (char *) _nl_current_default_domain;
|
||||
|
||||
__libc_rwlock_wrlock (_nl_state_lock);
|
||||
|
||||
old_domain = (char *) _nl_current_default_domain;
|
||||
|
||||
/* If domain name is the null string set to default domain "messages". */
|
||||
if (domainname[0] == '\0'
|
||||
|| strcmp (domainname, _nl_default_default_domain) == 0)
|
||||
{
|
||||
_nl_current_default_domain = _nl_default_default_domain;
|
||||
new_domain = (char *) _nl_current_default_domain;
|
||||
}
|
||||
else if (strcmp (domainname, old_domain) == 0)
|
||||
/* This can happen and people will use it to signal that some
|
||||
environment variable changed. */
|
||||
new_domain = old_domain;
|
||||
else
|
||||
{
|
||||
/* If the following malloc fails `_nl_current_default_domain'
|
||||
will be NULL. This value will be returned and so signals we
|
||||
are out of core. */
|
||||
#if defined _LIBC || defined HAVE_STRDUP
|
||||
new_domain = strdup (domainname);
|
||||
#else
|
||||
size_t len = strlen (domainname) + 1;
|
||||
new_domain = (char *) malloc (len);
|
||||
if (new_domain != NULL)
|
||||
memcpy (new_domain, domainname, len);
|
||||
#endif
|
||||
|
||||
if (new_domain != NULL)
|
||||
_nl_current_default_domain = new_domain;
|
||||
}
|
||||
|
||||
/* We use this possibility to signal a change of the loaded catalogs
|
||||
since this is most likely the case and there is no other easy we
|
||||
to do it. Do it only when the call was successful. */
|
||||
if (new_domain != NULL)
|
||||
{
|
||||
++_nl_msg_cat_cntr;
|
||||
|
||||
if (old_domain != new_domain && old_domain != _nl_default_default_domain)
|
||||
free (old_domain);
|
||||
}
|
||||
|
||||
__libc_rwlock_unlock (_nl_state_lock);
|
||||
|
||||
return new_domain;
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Alias for function name in GNU C Library. */
|
||||
weak_alias (__textdomain, textdomain);
|
||||
#endif
|
||||
3114
libprozilla/ltconfig
Executable file
3114
libprozilla/ltconfig
Executable file
File diff suppressed because it is too large
Load Diff
6495
libprozilla/ltmain.sh
Normal file
6495
libprozilla/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
190
libprozilla/missing
Executable file
190
libprozilla/missing
Executable file
@@ -0,0 +1,190 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing - GNU libit 0.0"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`configure.in'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`configure.in'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`configure.in'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
40
libprozilla/mkinstalldirs
Executable file
40
libprozilla/mkinstalldirs
Executable file
@@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.2 2001/04/14 15:32:04 uwe Exp $
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
||||
654
libprozilla/po/.pot
Normal file
654
libprozilla/po/.pot
Normal file
@@ -0,0 +1,654 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-12-11 21:59+0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/connection.c:177 src/connection.c:274
|
||||
msgid "write failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:180 src/connection.c:277
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:201 src/connection.c:258
|
||||
msgid "connection timed out"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:212 src/connection.c:296
|
||||
#, c-format
|
||||
msgid "download for this connection completed%s : %ld received"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:249
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:346
|
||||
msgid "Idle"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:349
|
||||
msgid "Connecting"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:352
|
||||
msgid "Logging in"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:355
|
||||
msgid "Downloading"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:358
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:361
|
||||
msgid "Login Denied"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:364
|
||||
msgid "Connect Refused"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:367
|
||||
msgid "Remote Fatal"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:370
|
||||
msgid "Local Fatal"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:373
|
||||
msgid "Timed Out"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:375
|
||||
msgid "Max attempts reached"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:378
|
||||
msgid "Unkown Status!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:469 src/misc.c:471
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:493
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:502
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/debug.c:60 src/download.c:826
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:133 src/download.c:158 src/download.c:2050
|
||||
#: src/download.c:2068
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:301
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:320 src/download.c:331 src/download.c:473 src/download.c:499
|
||||
#: src/download.c:534 src/download.c:579 src/download.c:600 src/download.c:626
|
||||
#: src/download.c:671 src/download.c:692 src/download.c:1276
|
||||
#: src/download.c:1448 src/download.c:1536 src/download.c:1614
|
||||
#: src/download.c:1667 src/download.c:1722 src/download.c:1747
|
||||
#: src/download.c:1773 src/download.c:1823 src/download.c:1878
|
||||
#: src/download.c:1903
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:335
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:339
|
||||
msgid "All threads created"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:459 src/download.c:1378
|
||||
msgid "The file was not found in all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:465 src/download.c:491 src/download.c:575 src/download.c:596
|
||||
#: src/download.c:667 src/download.c:688 src/download.c:1443
|
||||
#: src/download.c:1663 src/download.c:1718 src/download.c:1743
|
||||
#: src/download.c:1874 src/download.c:1899
|
||||
msgid "Relaunching download"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:485 src/download.c:1469
|
||||
msgid "Failed to change to the working directory on all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:511 src/download.c:1592
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:526 src/download.c:1607
|
||||
msgid "All logins rejected! Retrying connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:618 src/download.c:1765
|
||||
msgid "All connections attempts have been rejected! Retrying connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1416 src/download.c:1508
|
||||
msgid "Trying additional paths available on this server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1556
|
||||
msgid "The server(s) do not support REST on all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1579
|
||||
msgid ""
|
||||
"This server does not support resuming downloads, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1645
|
||||
msgid ""
|
||||
"This server has rejected the login attempt, so will switch to another server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1803
|
||||
msgid ""
|
||||
"This server has rejected the connection attempt, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:127
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:144
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:168
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:173
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:217
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:355
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr ""
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:775
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:847 src/http.c:564 src/http.c:579
|
||||
#: src/http-retr.c:69 src/http-retr.c:84
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:838 src/ftp.c:856
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:843 src/ftp.c:860
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:888 src/ftp.c:897
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:911
|
||||
msgid "Logged in successfully"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:931
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:940
|
||||
msgid "CWD not needed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:947
|
||||
msgid "REST failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:952
|
||||
msgid "REST ok"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1043
|
||||
msgid "FTP LIST failed: File not found or access not permitted."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1073
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1078
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1094
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"prozilla@genesys.ro "
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1129
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1205
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1224 src/http.c:736
|
||||
msgid "Successfully got info"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1232 src/http.c:748
|
||||
msgid "File not found!"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1251 src/ftp-retr.c:319 src/http.c:767 src/http-retr.c:335
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid ""
|
||||
"I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:259
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:271 src/http-retr.c:288
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:302 src/http-retr.c:315
|
||||
msgid "Successfully got download"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:308
|
||||
msgid "Error occured in connection..."
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:378
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:399
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:403
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:414
|
||||
msgid "Read error in headers"
|
||||
msgstr ""
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:440
|
||||
msgid "UNKNOWN"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:442
|
||||
msgid "(no description)"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:573 src/http.c:585 src/http.c:803 src/http-retr.c:77
|
||||
#: src/http-retr.c:91 src/http-retr.c:398
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:613 src/http.c:830 src/http-retr.c:119 src/http-retr.c:425
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:614 src/http.c:831 src/http-retr.c:120 src/http-retr.c:426
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:684 src/http-retr.c:199 src/http-retr.c:481
|
||||
msgid "Sending HTTP request"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:719 src/http-retr.c:276
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/http-retr.c:308
|
||||
msgid "Will be handled in main "
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:97 src/logfile.c:110
|
||||
#: src/logfile.c:122 src/logfile.c:135
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:188
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:221
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:259 src/logfile.c:274 src/logfile.c:290 src/logfile.c:305
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:332 src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:399 src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "The Download encountered a local fatal error"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "Error while Proxying"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:439
|
||||
msgid "The location is a directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:442
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr ""
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr ""
|
||||
4
libprozilla/po/ChangeLog
Normal file
4
libprozilla/po/ChangeLog
Normal file
@@ -0,0 +1,4 @@
|
||||
2001-06-03 gettextize <bug-gnu-utils@gnu.org>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.10.38.
|
||||
|
||||
248
libprozilla/po/Makefile.in.in
Normal file
248
libprozilla/po/Makefile.in.in
Normal file
@@ -0,0 +1,248 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = $(prefix)/@DATADIRNAME@
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
gettextsrcdir = $(prefix)/share/gettext/po
|
||||
subdir = po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
|
||||
MSGMERGE = PATH=../src:$$PATH msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES = cat-id-tbl.c
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: cat-id-tbl.c $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
&& test ! -f $(PACKAGE).po \
|
||||
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
||||
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
|
||||
|
||||
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
|
||||
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
|
||||
rm -f cat-id-tbl.tmp
|
||||
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
|
||||
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
|
||||
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
|
||||
rm cat-id-tbl.tmp; \
|
||||
else \
|
||||
echo cat-id-tbl.c changed; \
|
||||
rm -f $(srcdir)/cat-id-tbl.c; \
|
||||
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
|
||||
fi
|
||||
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
rm -f $(gettextsrcdir)/po-Makefile.in.in
|
||||
|
||||
check: all
|
||||
|
||||
cat-id-tbl.o: ../intl/libgettext.h
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: update-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../src:$$PATH; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
14
libprozilla/po/POTFILES.in
Normal file
14
libprozilla/po/POTFILES.in
Normal file
@@ -0,0 +1,14 @@
|
||||
src/connect.c
|
||||
src/connection.c
|
||||
src/debug.c
|
||||
src/download.c
|
||||
src/ftp.c
|
||||
src/ftpparse.c
|
||||
src/ftp-retr.c
|
||||
src/http.c
|
||||
src/http-retr.c
|
||||
src/logfile.c
|
||||
src/main.c
|
||||
src/misc.c
|
||||
src/netrc.c
|
||||
src/url.c
|
||||
654
libprozilla/po/cat-id-tbl.c
Normal file
654
libprozilla/po/cat-id-tbl.c
Normal file
@@ -0,0 +1,654 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-12-11 21:59+0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/connection.c:177 src/connection.c:274
|
||||
msgid "write failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:180 src/connection.c:277
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:201 src/connection.c:258
|
||||
msgid "connection timed out"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:212 src/connection.c:296
|
||||
#, c-format
|
||||
msgid "download for this connection completed%s : %ld received"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:249
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:346
|
||||
msgid "Idle"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:349
|
||||
msgid "Connecting"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:352
|
||||
msgid "Logging in"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:355
|
||||
msgid "Downloading"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:358
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:361
|
||||
msgid "Login Denied"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:364
|
||||
msgid "Connect Refused"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:367
|
||||
msgid "Remote Fatal"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:370
|
||||
msgid "Local Fatal"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:373
|
||||
msgid "Timed Out"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:375
|
||||
msgid "Max attempts reached"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:378
|
||||
msgid "Unkown Status!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:469 src/misc.c:471
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:493
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:502
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/debug.c:60 src/download.c:826
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:133 src/download.c:158 src/download.c:2050
|
||||
#: src/download.c:2068
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:301
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:320 src/download.c:331 src/download.c:473 src/download.c:499
|
||||
#: src/download.c:534 src/download.c:579 src/download.c:600 src/download.c:626
|
||||
#: src/download.c:671 src/download.c:692 src/download.c:1276
|
||||
#: src/download.c:1448 src/download.c:1536 src/download.c:1614
|
||||
#: src/download.c:1667 src/download.c:1722 src/download.c:1747
|
||||
#: src/download.c:1773 src/download.c:1823 src/download.c:1878
|
||||
#: src/download.c:1903
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:335
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:339
|
||||
msgid "All threads created"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:459 src/download.c:1378
|
||||
msgid "The file was not found in all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:465 src/download.c:491 src/download.c:575 src/download.c:596
|
||||
#: src/download.c:667 src/download.c:688 src/download.c:1443
|
||||
#: src/download.c:1663 src/download.c:1718 src/download.c:1743
|
||||
#: src/download.c:1874 src/download.c:1899
|
||||
msgid "Relaunching download"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:485 src/download.c:1469
|
||||
msgid "Failed to change to the working directory on all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:511 src/download.c:1592
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:526 src/download.c:1607
|
||||
msgid "All logins rejected! Retrying connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:618 src/download.c:1765
|
||||
msgid "All connections attempts have been rejected! Retrying connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1416 src/download.c:1508
|
||||
msgid "Trying additional paths available on this server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1556
|
||||
msgid "The server(s) do not support REST on all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1579
|
||||
msgid ""
|
||||
"This server does not support resuming downloads, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1645
|
||||
msgid ""
|
||||
"This server has rejected the login attempt, so will switch to another server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1803
|
||||
msgid ""
|
||||
"This server has rejected the connection attempt, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:127
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:144
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:168
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:173
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:217
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:355
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr ""
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:775
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:847 src/http.c:564 src/http.c:579
|
||||
#: src/http-retr.c:69 src/http-retr.c:84
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:838 src/ftp.c:856
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:843 src/ftp.c:860
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:888 src/ftp.c:897
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:911
|
||||
msgid "Logged in successfully"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:931
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:940
|
||||
msgid "CWD not needed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:947
|
||||
msgid "REST failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:952
|
||||
msgid "REST ok"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1043
|
||||
msgid "FTP LIST failed: File not found or access not permitted."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1073
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1078
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1094
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"prozilla@genesys.ro "
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1129
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1205
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1224 src/http.c:736
|
||||
msgid "Successfully got info"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1232 src/http.c:748
|
||||
msgid "File not found!"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1251 src/ftp-retr.c:319 src/http.c:767 src/http-retr.c:335
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid ""
|
||||
"I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:259
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:271 src/http-retr.c:288
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:302 src/http-retr.c:315
|
||||
msgid "Successfully got download"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:308
|
||||
msgid "Error occured in connection..."
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:378
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:399
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:403
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:414
|
||||
msgid "Read error in headers"
|
||||
msgstr ""
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:440
|
||||
msgid "UNKNOWN"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:442
|
||||
msgid "(no description)"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:573 src/http.c:585 src/http.c:803 src/http-retr.c:77
|
||||
#: src/http-retr.c:91 src/http-retr.c:398
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:613 src/http.c:830 src/http-retr.c:119 src/http-retr.c:425
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:614 src/http.c:831 src/http-retr.c:120 src/http-retr.c:426
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:684 src/http-retr.c:199 src/http-retr.c:481
|
||||
msgid "Sending HTTP request"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:719 src/http-retr.c:276
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/http-retr.c:308
|
||||
msgid "Will be handled in main "
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:97 src/logfile.c:110
|
||||
#: src/logfile.c:122 src/logfile.c:135
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:188
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:221
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:259 src/logfile.c:274 src/logfile.c:290 src/logfile.c:305
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:332 src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:399 src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "The Download encountered a local fatal error"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "Error while Proxying"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:439
|
||||
msgid "The location is a directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:442
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr ""
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr ""
|
||||
BIN
libprozilla/po/it.gmo
Normal file
BIN
libprozilla/po/it.gmo
Normal file
Binary file not shown.
793
libprozilla/po/it.po
Normal file
793
libprozilla/po/it.po
Normal file
@@ -0,0 +1,793 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2001-09-29 19:49+0200\n"
|
||||
"PO-Revision-Date: 2001-10-05 20:55+GMT\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: <de@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=iso-8859-15\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 0.7\n"
|
||||
|
||||
#: src/connection.c:163 src/connection.c:253
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr "Impossibile aprire il file %s: %s!"
|
||||
|
||||
#: src/connection.c:185 src/connection.c:300
|
||||
msgid "write failed"
|
||||
msgstr "Scrittura fallita"
|
||||
|
||||
#: src/connection.c:188 src/connection.c:303
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr "Impossibile scrivere sul file %s: %s!"
|
||||
|
||||
#: src/connection.c:211 src/connection.c:284
|
||||
msgid "connection timed out"
|
||||
msgstr "Time Out Connessione"
|
||||
|
||||
#: src/connection.c:222 src/connection.c:323
|
||||
#, c-format
|
||||
msgid "download for this connection completed%s : %ld received"
|
||||
msgstr "Il download per questa connessione completato %s: %ld ricevuto"
|
||||
|
||||
#: src/connection.c:275
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr "Il Server Ha Chiuso La Connessione Prematuramente!"
|
||||
|
||||
#: src/connection.c:381
|
||||
#, c-format
|
||||
msgid "orig start pos= %d\n"
|
||||
msgstr "Pos Part Orig= %d\n"
|
||||
|
||||
#: src/connection.c:412
|
||||
msgid "Idle"
|
||||
msgstr "Inattivo"
|
||||
|
||||
#: src/connection.c:415
|
||||
msgid "Connecting"
|
||||
msgstr "Connettendo"
|
||||
|
||||
#: src/connection.c:418
|
||||
msgid "Logging in"
|
||||
msgstr "Effettuando login"
|
||||
|
||||
#: src/connection.c:421
|
||||
msgid "Downloading"
|
||||
msgstr "Sto Scaricando"
|
||||
|
||||
#: src/connection.c:424
|
||||
msgid "Completed"
|
||||
msgstr "Completato"
|
||||
|
||||
#: src/connection.c:427
|
||||
msgid "Login Denied"
|
||||
msgstr "Login Rifiutato"
|
||||
|
||||
#: src/connection.c:430
|
||||
msgid "Connect Refused"
|
||||
msgstr "Connessione Rifiutata"
|
||||
|
||||
#: src/connection.c:433
|
||||
msgid "Remote Fatal"
|
||||
msgstr "Errore Remoto Fatale"
|
||||
|
||||
#: src/connection.c:436
|
||||
msgid "Local Fatal"
|
||||
msgstr "Errore Locale Fatale"
|
||||
|
||||
#: src/connection.c:439
|
||||
msgid "Timed Out"
|
||||
msgstr "Time Out"
|
||||
|
||||
#: src/connection.c:441
|
||||
msgid "Max attempts reached"
|
||||
msgstr "Numero massimo di tentativi raggiunto"
|
||||
|
||||
#: src/connection.c:444
|
||||
msgid "Unkown Status!"
|
||||
msgstr "Stato Sconosciuto!"
|
||||
|
||||
#: src/connection.c:526 src/misc.c:471
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr "Errore: protocollo non supportato"
|
||||
|
||||
#: src/connection.c:548
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr "La posizione indicata dal server <20> sbagliata: %s!"
|
||||
|
||||
#: src/connection.c:556
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr "Reindirizzato a => %s"
|
||||
|
||||
#: src/debug.c:60 src/download.c:692 src/download.c:1065
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr "Non riesco a cancellare il file %s. Ragione-: %s"
|
||||
|
||||
#: src/download.c:174
|
||||
#, c-format
|
||||
msgid "Error while processing prior download of connection number %d"
|
||||
msgstr "Errore durante l'elaborazione del precedente download della connessione numero %d"
|
||||
|
||||
#: src/download.c:203
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr "Attenzione! Impossibile creare il file di log!"
|
||||
|
||||
#: src/download.c:228 src/download.c:239 src/download.c:350 src/download.c:372
|
||||
#: src/download.c:404 src/download.c:446 src/download.c:467 src/download.c:492
|
||||
#: src/download.c:534 src/download.c:555 src/download.c:1353
|
||||
#: src/download.c:1398 src/download.c:1481 src/download.c:1528
|
||||
#: src/download.c:1567 src/download.c:1619 src/download.c:1644
|
||||
#: src/download.c:1669 src/download.c:1721 src/download.c:1746
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr "Errore: Risore di sistema Insufficienti"
|
||||
|
||||
#: src/download.c:243
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr "Errore: E' stato specificato un protocollo non supportato"
|
||||
|
||||
#: src/download.c:247
|
||||
msgid "All threads created"
|
||||
msgstr "Tutti i procressi creati"
|
||||
|
||||
#: src/download.c:338 src/download.c:1287
|
||||
msgid "The file was not found in all the connections!"
|
||||
msgstr "Il file non <20> stato trovato in tutte le connessioni!"
|
||||
|
||||
#: src/download.c:344 src/download.c:366 src/download.c:442 src/download.c:463
|
||||
#: src/download.c:530 src/download.c:551 src/download.c:1615
|
||||
#: src/download.c:1640 src/download.c:1717 src/download.c:1742
|
||||
msgid "Relaunching download"
|
||||
msgstr "Rilanciando il download"
|
||||
|
||||
#: src/download.c:360 src/download.c:1414
|
||||
msgid "Failed to change to the working directory on all the connections!"
|
||||
msgstr "Non <20> stato possibile cambiare alla directory di lavoro per tutte le connessioni!"
|
||||
|
||||
#: src/download.c:382 src/download.c:1545
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr "La connessione %d ha subito un errrore fatale locale: %s. Abortendo il download."
|
||||
|
||||
#: src/download.c:397 src/download.c:1560
|
||||
msgid "All logins rejected!.Retrying connection"
|
||||
msgstr "Tutti i logins rifiutati! Ritentando la connessione"
|
||||
|
||||
#: src/download.c:485 src/download.c:1662
|
||||
msgid "All connections attempts have been rejected!.Retrying connection"
|
||||
msgstr "Tutti i tentativi di connessione sono stati rifiutati! Ritentando la connessione"
|
||||
|
||||
#: src/download.c:755
|
||||
#, c-format
|
||||
msgid "Unable to allocate %ld bytes to recreate files"
|
||||
msgstr "Impossibile allocare %ld bytes per ricreare i files"
|
||||
|
||||
#: src/download.c:773
|
||||
#, c-format
|
||||
msgid "Error: unable to open the file %s for writing-: %s\n"
|
||||
msgstr "Errore: impossibile aprire il file %s in scrittura-: %s\n"
|
||||
|
||||
#: src/download.c:792
|
||||
#, c-format
|
||||
msgid "Error: Unable to open the file %s for reading-: %s\n"
|
||||
msgstr "Errore: Impossibile aprire il file %s in lettura-: %s\n"
|
||||
|
||||
#: src/download.c:830
|
||||
#, c-format
|
||||
msgid "Unable to delete the file %s before exiting. Reason-: %s"
|
||||
msgstr "Impossibile cancellare il file %s prima di uscire. Ragione-: %s"
|
||||
|
||||
#: src/download.c:837
|
||||
#, c-format
|
||||
msgid "Error:A write error occured while writing to %s -: %s\n"
|
||||
msgstr "Errore: E' occorso un errore di scrittura su %s -: %s\n"
|
||||
|
||||
#: src/download.c:852
|
||||
#, c-format
|
||||
msgid "Successfully Wrote %s \n"
|
||||
msgstr "Creato con Successo %s \n"
|
||||
|
||||
#: src/download.c:1325 src/download.c:1453
|
||||
msgid "Trying additional paths aailable on this server"
|
||||
msgstr "Provando altri indirizzi disponibili su server"
|
||||
|
||||
#: src/download.c:1380 src/download.c:1509
|
||||
msgid ""
|
||||
"No additional paths on this server available, so will switch to another "
|
||||
"server"
|
||||
msgstr "Non sono stati trovati altri indirizzi su questo server, tenter<65> su un altro server"
|
||||
|
||||
#: src/ftp.c:106
|
||||
#, c-format
|
||||
msgid "Message = %s"
|
||||
msgstr "Messaggio = %s"
|
||||
|
||||
#: src/ftp.c:126
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr "Errore durante il controllo dei dati FTP: %s"
|
||||
|
||||
#: src/ftp.c:143
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr "Errore durante la ricezione dei dati FTP: %s"
|
||||
|
||||
#: src/ftp.c:167
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr "Inviando: %s"
|
||||
|
||||
#: src/ftp.c:172
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr "Errore durante l'invio di dati FTP: %s"
|
||||
|
||||
#: src/ftp.c:213
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr "Ricevuto: %s"
|
||||
|
||||
#: src/ftp.c:344
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr "FTP PASV Header = %s"
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:759
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr "Codice sconosciuto %d ritornato durante il login FTP"
|
||||
|
||||
#: src/ftp.c:811 src/ftp.c:831 src/http-retr.c:69 src/http-retr.c:84
|
||||
#: src/http.c:562 src/http.c:577
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Connettendo a %s"
|
||||
|
||||
#: src/ftp.c:822 src/ftp.c:840
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr "Errore durante la connessione a %s"
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:844
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr "Connesso a %s"
|
||||
|
||||
#: src/ftp.c:872 src/ftp.c:881
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr "Effettuando il login come utente %s con password %s"
|
||||
|
||||
#: src/ftp.c:895
|
||||
msgid "Logged in successfully"
|
||||
msgstr "Effettuato il login con successo"
|
||||
|
||||
#: src/ftp.c:915
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr "Il comando CWD non <20> riuscito a cambiare la directory di lavoro in '%s'"
|
||||
|
||||
#: src/ftp.c:924
|
||||
msgid "CWD not needed"
|
||||
msgstr "CWD non necessario"
|
||||
|
||||
#: src/ftp.c:931
|
||||
msgid "REST failed"
|
||||
msgstr "REST fallito"
|
||||
|
||||
#: src/ftp.c:936
|
||||
msgid "REST ok"
|
||||
msgstr "REST ok"
|
||||
|
||||
#: src/ftp.c:1016
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr "Errore durante la ricezione dei dati di trasferimento FTP: %s"
|
||||
|
||||
#: src/ftp.c:1021
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr "Stringa ricevuta dopo il comando LIST = %s"
|
||||
|
||||
#: src/ftp.c:1039
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"kalum@delrom.ro "
|
||||
msgstr ""
|
||||
"Impossibile analizzare la stringa ritornata dal server FTP: per favore riporta l'URL a "
|
||||
"Kalum@delrom.ro"
|
||||
|
||||
#: src/ftp.c:1066
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr "Sembra che il server non supporti PASV"
|
||||
|
||||
#: src/ftp.c:1142
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr "Tenter<65> per la %d<> fra %d secondi"
|
||||
|
||||
#: src/ftp.c:1161 src/http.c:734
|
||||
msgid "Seccessfully got info"
|
||||
msgstr "Informazioni ottenute con successo"
|
||||
|
||||
#: src/ftp.c:1169 src/http.c:746
|
||||
msgid "File not found!"
|
||||
msgstr "File non trovato!"
|
||||
|
||||
#: src/ftp-retr.c:319 src/ftp.c:1188 src/http-retr.c:331 src/http.c:765
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr "Ho tentato per %d volte(a) e ho fallito, sto abortendo"
|
||||
|
||||
#: src/ftpparse.c:194
|
||||
#, c-format
|
||||
msgid "MULTINET Size: %d\n"
|
||||
msgstr "Grandezza MULTINET: %d\n"
|
||||
|
||||
#: src/ftpparse.c:235
|
||||
#, c-format
|
||||
msgid "BINLS size: %d\n"
|
||||
msgstr "Grandezza BINLS: %d\n"
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr "Effettuando il login come utente %s con password %s"
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr "CWD ha fallito nel cambiare la directory a '%s'."
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr "CWD ok."
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr "CWD non necessario"
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid "I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr "C'<27> un bug nel mio codice!!, controlla i valori di remote_startpos e resume_support."
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr "RETR failed"
|
||||
|
||||
#: src/ftp-retr.c:259
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr "Riprovando...Tentativo %d fra %d secondi"
|
||||
|
||||
#: src/ftp-retr.c:271 src/http-retr.c:284
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr "Errore durante il tentativo di processare il file da scaricare"
|
||||
|
||||
#: src/ftp-retr.c:302 src/http-retr.c:311
|
||||
msgid "Seccessfully got download"
|
||||
msgstr "Download effettuato con successo"
|
||||
|
||||
#: src/ftp-retr.c:308
|
||||
msgid "Error occured in connection..."
|
||||
msgstr "C'<27> stato un errore nella connessione..."
|
||||
|
||||
#: src/getopt.c:741
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: l'opzione `%s' <20> ambigua\n"
|
||||
|
||||
#: src/getopt.c:769
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: opzione `--%s' non autorizza un argomento\n"
|
||||
|
||||
#: src/getopt.c:776
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: opzione `%c%s' non autorizza un argomento\n"
|
||||
|
||||
#: src/getopt.c:792 src/getopt.c:995
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: opzione `%s' richiede un argomento\n"
|
||||
|
||||
#.
|
||||
#. * --option
|
||||
#.
|
||||
#: src/getopt.c:825
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: opzione non riconosciuta `--%s'\n"
|
||||
|
||||
#.
|
||||
#. * +option or -option
|
||||
#.
|
||||
#: src/getopt.c:831
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: opzione non riconosciuta `%c%s'\n"
|
||||
|
||||
#.
|
||||
#. * 1003.2 specifies the format of this message.
|
||||
#.
|
||||
#: src/getopt.c:863
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%: opzione illegale -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: opzione non valida -- %c\n"
|
||||
|
||||
#: src/getopt.c:902 src/getopt.c:1051
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: l'opzione richiede un argomento -- %c\n"
|
||||
|
||||
#: src/getopt.c:961
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: l'opzione `-W %s' <20> ambigua\n"
|
||||
|
||||
#: src/getopt.c:981
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'opzione `-W %s' non autorizza un argomento\n"
|
||||
|
||||
#: src/getopt.c:1118
|
||||
msgid "digits occur in two different argv-elements.\n"
|
||||
msgstr "si trovano cifre in due differenti argomenti-argv.\n"
|
||||
|
||||
#: src/getopt.c:1124
|
||||
msgid "option a\n"
|
||||
msgstr "opzione a\n"
|
||||
|
||||
#: src/getopt.c:1128
|
||||
msgid "option b\n"
|
||||
msgstr "opzione b\n"
|
||||
|
||||
#: src/getopt.c:1132
|
||||
#, c-format
|
||||
msgid "option c with value `%s'\n"
|
||||
msgstr "opzione c con valore `%s'\n"
|
||||
|
||||
#: src/getopt.c:1139
|
||||
#, c-format
|
||||
msgid "?? getopt returned character code 0%o ??\n"
|
||||
msgstr "?? getopt ha replicato character code 0%o ??\n"
|
||||
|
||||
#: src/getopt.c:1145
|
||||
msgid "non-option ARGV-elements: "
|
||||
msgstr "non-option ARGV-elements: "
|
||||
|
||||
#: src/http.c:376
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr "Fallita la scrittura della richiesta HTTP"
|
||||
|
||||
#: src/http.c:397
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr "Header = %s"
|
||||
|
||||
#: src/http.c:401
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr "End of file durante l'analisi degli headers"
|
||||
|
||||
#: src/http.c:412
|
||||
msgid "Read error in headers"
|
||||
msgstr "Errore di lettura negli headers"
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:438
|
||||
msgid "UNKNOWN"
|
||||
msgstr "SCONOSCIUTO"
|
||||
|
||||
#: src/http.c:440
|
||||
msgid "(no description)"
|
||||
msgstr "(senza descrizione)"
|
||||
|
||||
#: src/http-retr.c:77 src/http-retr.c:91 src/http-retr.c:394 src/http.c:571
|
||||
#: src/http.c:583 src/http.c:801
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr "Errore durante la connessione a %s"
|
||||
|
||||
#: src/http-retr.c:119 src/http-retr.c:421 src/http.c:611 src/http.c:828
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr "Autenticando come utente %s con password %s"
|
||||
|
||||
#: src/http-retr.c:120 src/http-retr.c:422 src/http.c:612 src/http.c:829
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr "Stringa di autenticazione=%s"
|
||||
|
||||
#: src/http-retr.c:198 src/http-retr.c:477 src/http.c:682
|
||||
msgid "Sending HTTP request"
|
||||
msgstr "Inviando la richiesta HTTP"
|
||||
|
||||
#: src/http-retr.c:272 src/http.c:717
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr "Riprovando...Tentativo %d fra %d secondi"
|
||||
|
||||
#: src/http-retr.c:304
|
||||
msgid "Will be hanled in main "
|
||||
msgstr "Will be hanled in main "
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr "Errore durante l'apertura del file %s in scrittura: %s"
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:93 src/logfile.c:104
|
||||
#: src/logfile.c:115
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr "Errore di scrittura sul file %s: %s"
|
||||
|
||||
#: src/logfile.c:168
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr "Il logfile non esiste!"
|
||||
|
||||
#: src/logfile.c:198
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr "Errore durante l'apertura del file %s in lettura: %s"
|
||||
|
||||
#: src/logfile.c:232 src/logfile.c:244 src/logfile.c:256
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr "Errore di lettura dal file %s: %s"
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr "Fallito il malloc() di %lu bytes"
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr "Fallito il realloc() di %lu bytes."
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr "Memoria insufficiente per continuare: strduo() fallito."
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr "Attenzione: Impossibile ritardare"
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr "Impossibile trovare il nome dell'host"
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr "Impossibile creare il socket"
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr "Errore durante la connessione"
|
||||
|
||||
#: src/misc.c:332
|
||||
msgid "The cconnection attempt was refused"
|
||||
msgstr "Il tentativo di connessione <20> stato rifiutato"
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr "Errore mentre la connessione veniva accettata"
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr "Errore mentre il socket veniva assicurato"
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr "Errore durante l'ascolto"
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr "La connessione <20> stata resettata/chiusa dal peer"
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr "Il protocollo URL era sconosciuto"
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr "La porta specificata nell'URL non <20> valida!"
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr "L'Hostname specificato nell'URL non <20> valido!"
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr "La struttura dell'URL non sembra valida!"
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr "End of file raggiunta nella connessione HTTP"
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr "Errore durante la trasmissione di dati HTTP"
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr "Autenticazione richiesta per accedere a questa risorsa"
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr "Fallita l'autenticazione con l'host!"
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr "L'URL non <20> stato trovato sull'host!"
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr "L'host non ha autorizzato il tentativo di login"
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr "La richiesta PORT <20> stata rifiutata dal server"
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr "Il file/dir obiettivo non <20> stato trovato sull'host!"
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr "Il TYPE specificato non <20> conosciuto dal server FTP!"
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr "Il comando <20> sconosciuto al server FTP!"
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr "Comando SIZE fallito"
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr "Errore durante il trasferimento di dati FTP"
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr "Comando REST fallito"
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr "Il peer non autorizza l'accesso"
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr "L'host ha rifiutato la password"
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr "La PASV (passive mode) non <20> supportata dall'host"
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr "L'host non supporta i trasferimenti PASV (passive mode)"
|
||||
|
||||
#: src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr "Il tentativo di connessione <20> stato rifiutato"
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr "Fallito il cambiamento (CWD) di directory"
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr "L'host ha detto che il servizio richiesto non <20> disponibile e ha chiuso la connessione di controllo"
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr "Fallito il getsockname"
|
||||
|
||||
#: src/misc.c:399
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
"Il server, mentre agiva da gateway o proxy, ha ricevuto un responso non valido dall'upstrem server"
|
||||
"a cui era accesso nel tentativo di completare la richiesta"
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
"Il server attualmente non pu<70> processare la richiesta a causa di un temporaneo "
|
||||
"sovraccarico o mantenimento del server."
|
||||
|
||||
#: src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request."
|
||||
msgstr ""
|
||||
"Il server, mentre agiva da gateway o proxy, ha ricevuto un responso non valido dall'upstrem server"
|
||||
"a cui era accesso nel tentativo di completare la richiesta"
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr "Il server ha incontrato una condizione inaspettata che gli ha impedito di portare a termine la richiesta."
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr "Il server non supporta la funzionalit<69> richiesta per completare la richiesta."
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr "Errore durante l'apertura del file"
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr "Errore durante la scrittura sul file"
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr "Il download <20> stato abortito"
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "The Download encountered a local fatal error"
|
||||
msgstr "Il Download ha incontrato un errore fatale locale"
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr "Errore: Effettuare il Resume sulla connessione <20> impossibile"
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr "Errore durante la lettura dei dati dal socket"
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr "Errore durante la scrittura di dati sul socket"
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "Error while Proxying"
|
||||
msgstr "Errore durante l'attivit<69> di proxy"
|
||||
|
||||
#: src/misc.c:439
|
||||
msgid "The location is a directory"
|
||||
msgstr "L'indirizzo <20> una directory"
|
||||
|
||||
#: src/misc.c:442
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr "Codice errore Sconosciuto/Non Supportato"
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr "%s:%d: attenzione: trovato \"%s\" prima di qualunque nome host\n"
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr "%s:%d: attenzione: token sconosciuto \"%s\"\n"
|
||||
|
||||
750
libprozilla/po/libprozilla.pot
Normal file
750
libprozilla/po/libprozilla.pot
Normal file
@@ -0,0 +1,750 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-01-28 10:34-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/connection.c:177 src/connection.c:274
|
||||
msgid "write failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:180 src/connection.c:277
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:201 src/connection.c:258
|
||||
msgid "connection timed out"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:212 src/connection.c:296
|
||||
#, c-format
|
||||
msgid "download for this connection completed%s : %ld received"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:249
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:340
|
||||
msgid "Idle"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:343
|
||||
msgid "Connecting"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:346
|
||||
msgid "Logging in"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:349
|
||||
msgid "Downloading"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:352
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:355
|
||||
msgid "Login Denied"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:358
|
||||
msgid "Connect Refused"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:361
|
||||
msgid "Remote Fatal"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:364
|
||||
msgid "Local Fatal"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:367
|
||||
msgid "Timed Out"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:369
|
||||
msgid "Max attempts reached"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:372
|
||||
msgid "Unkown Status!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:463 src/misc.c:471
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:487
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/connection.c:496
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/debug.c:60 src/download.c:798 src/download.c:1075
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:135 src/download.c:153 src/download.c:2093
|
||||
#: src/download.c:2111
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:287
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:306 src/download.c:317 src/download.c:457 src/download.c:479
|
||||
#: src/download.c:511 src/download.c:554 src/download.c:575 src/download.c:600
|
||||
#: src/download.c:642 src/download.c:663 src/download.c:1387
|
||||
#: src/download.c:1432 src/download.c:1515 src/download.c:1562
|
||||
#: src/download.c:1639 src/download.c:1678 src/download.c:1724
|
||||
#: src/download.c:1776 src/download.c:1801 src/download.c:1826
|
||||
#: src/download.c:1872 src/download.c:1923 src/download.c:1948
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:321
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:325
|
||||
msgid "All threads created"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:445 src/download.c:1321
|
||||
msgid "The file was not found in all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:451 src/download.c:473 src/download.c:550 src/download.c:571
|
||||
#: src/download.c:638 src/download.c:659 src/download.c:1772
|
||||
#: src/download.c:1797 src/download.c:1919 src/download.c:1944
|
||||
msgid "Relaunching download"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:467 src/download.c:1448
|
||||
msgid "Failed to change to the working directory on all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:489 src/download.c:1656
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:504 src/download.c:1671
|
||||
msgid "All logins rejected! Retrying connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:593 src/download.c:1819
|
||||
msgid "All connections attempts have been rejected! Retrying connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1359 src/download.c:1487
|
||||
msgid "Trying additional paths available on this server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1414 src/download.c:1543
|
||||
msgid ""
|
||||
"No additional paths on this server available, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1578
|
||||
msgid "The server(s) do not support REST on all the connections!"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1621
|
||||
msgid ""
|
||||
"This server does not support resuming downloads, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1706
|
||||
msgid ""
|
||||
"This server has rejected the login attempt, so will switch to another server"
|
||||
msgstr ""
|
||||
|
||||
#: src/download.c:1854
|
||||
msgid ""
|
||||
"This server has rejected the connection attempt, so will switch to another "
|
||||
"server"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:106
|
||||
#, c-format
|
||||
msgid "Message = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:126
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:143
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:167
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:172
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:213
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:344
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr ""
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:759
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:811 src/ftp.c:831 src/http.c:562 src/http.c:577
|
||||
#: src/http-retr.c:69 src/http-retr.c:84
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:822 src/ftp.c:840
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:844
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:872 src/ftp.c:881
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:895
|
||||
msgid "Logged in successfully"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:915
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:924
|
||||
msgid "CWD not needed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:931
|
||||
msgid "REST failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:936
|
||||
msgid "REST ok"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1016
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1021
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1039
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"kalum@delrom.ro "
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1066
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1142
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1161 src/http.c:734
|
||||
msgid "Successfully got info"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1169 src/http.c:746
|
||||
msgid "File not found!"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp.c:1188 src/ftp-retr.c:319 src/http.c:765 src/http-retr.c:331
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid ""
|
||||
"I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:259
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:271 src/http-retr.c:284
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:302 src/http-retr.c:311
|
||||
msgid "Successfully got download"
|
||||
msgstr ""
|
||||
|
||||
#: src/ftp-retr.c:308
|
||||
msgid "Error occured in connection..."
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:741
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:769
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:776
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:792 src/getopt.c:995
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#.
|
||||
#. * --option
|
||||
#.
|
||||
#: src/getopt.c:825
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#.
|
||||
#. * +option or -option
|
||||
#.
|
||||
#: src/getopt.c:831
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#.
|
||||
#. * 1003.2 specifies the format of this message.
|
||||
#.
|
||||
#: src/getopt.c:863
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:902 src/getopt.c:1051
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:961
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:981
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:1118
|
||||
msgid "digits occur in two different argv-elements.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:1124
|
||||
msgid "option a\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:1128
|
||||
msgid "option b\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:1132
|
||||
#, c-format
|
||||
msgid "option c with value `%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:1139
|
||||
#, c-format
|
||||
msgid "?? getopt returned character code 0%o ??\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/getopt.c:1145
|
||||
msgid "non-option ARGV-elements: "
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:376
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:397
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:401
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:412
|
||||
msgid "Read error in headers"
|
||||
msgstr ""
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:438
|
||||
msgid "UNKNOWN"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:440
|
||||
msgid "(no description)"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:571 src/http.c:583 src/http.c:801 src/http-retr.c:77
|
||||
#: src/http-retr.c:91 src/http-retr.c:394
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:611 src/http.c:828 src/http-retr.c:119 src/http-retr.c:421
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:612 src/http.c:829 src/http-retr.c:120 src/http-retr.c:422
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:682 src/http-retr.c:198 src/http-retr.c:477
|
||||
msgid "Sending HTTP request"
|
||||
msgstr ""
|
||||
|
||||
#: src/http.c:717 src/http-retr.c:272
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/http-retr.c:304
|
||||
msgid "Will be handled in main "
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:97 src/logfile.c:113
|
||||
#: src/logfile.c:129 src/logfile.c:146
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:199
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:232
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/logfile.c:270 src/logfile.c:285 src/logfile.c:301 src/logfile.c:316
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:332 src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:399 src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "The Download encountered a local fatal error"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "Error while Proxying"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:439
|
||||
msgid "The location is a directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/misc.c:442
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr ""
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr ""
|
||||
BIN
libprozilla/po/nl.gmo
Normal file
BIN
libprozilla/po/nl.gmo
Normal file
Binary file not shown.
771
libprozilla/po/nl.po
Normal file
771
libprozilla/po/nl.po
Normal file
@@ -0,0 +1,771 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2001-08-15 04:19+0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: ENCODING\n"
|
||||
|
||||
#: src/connection.c:157 src/connection.c:247
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr "Onmogelijk bestand te openen %s: %s!"
|
||||
|
||||
#: src/connection.c:179 src/connection.c:294
|
||||
msgid "write failed"
|
||||
msgstr "schrijven mislukt"
|
||||
|
||||
#: src/connection.c:182 src/connection.c:297
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr "Onmogelijk om te schrijven naar bestand %s: %s!"
|
||||
|
||||
#: src/connection.c:205 src/connection.c:278
|
||||
msgid "connection timed out"
|
||||
msgstr "verbindingstijd verlopen"
|
||||
|
||||
#: src/connection.c:216 src/connection.c:317
|
||||
#, c-format
|
||||
msgid "download for this connection completed%s : %ld received"
|
||||
msgstr "download voor deze verbinding voltooid%s: %ld ontvangen"
|
||||
|
||||
#: src/connection.c:269
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr "Server sloot verbinding van tevoren!"
|
||||
|
||||
#: src/connection.c:375
|
||||
#, c-format
|
||||
msgid "orig start pos= %d\n"
|
||||
msgstr "originele start pos= %d\n"
|
||||
|
||||
#: src/connection.c:406
|
||||
msgid "Idle"
|
||||
msgstr "Ongebruikt"
|
||||
|
||||
#: src/connection.c:409
|
||||
msgid "Connecting"
|
||||
msgstr "Verbinding"
|
||||
|
||||
#: src/connection.c:412
|
||||
msgid "Logging in"
|
||||
msgstr "Bezig met aanmelden"
|
||||
|
||||
#: src/connection.c:415
|
||||
msgid "Downloading"
|
||||
msgstr "Aan het downloaden"
|
||||
|
||||
#: src/connection.c:418
|
||||
msgid "Completed"
|
||||
msgstr "Voltooid"
|
||||
|
||||
#: src/connection.c:421
|
||||
msgid "Login Denied"
|
||||
msgstr "Aanmelding geweigerd"
|
||||
|
||||
#: src/connection.c:424
|
||||
msgid "Connect Refused"
|
||||
msgstr "Verbinding geweigerd"
|
||||
|
||||
#: src/connection.c:427
|
||||
msgid "Remote Fatal"
|
||||
msgstr "Fatale fout andere zijde"
|
||||
|
||||
#: src/connection.c:430
|
||||
msgid "Local Fatal"
|
||||
msgstr "Locale fatale fout"
|
||||
|
||||
#: src/connection.c:433
|
||||
msgid "Timed Out"
|
||||
msgstr "Tijd verlopen"
|
||||
|
||||
#: src/connection.c:435
|
||||
msgid "Max attempts reached"
|
||||
msgstr "Max pogingen bereikt"
|
||||
|
||||
#: src/connection.c:438
|
||||
msgid "Unkown Status!"
|
||||
msgstr "Onbekende status!"
|
||||
|
||||
#: src/connection.c:520 src/misc.c:469
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr "Fout: niet ondersteund protocol"
|
||||
|
||||
#: src/connection.c:542
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr "De server meld dat de lokatie verkeerd is: %s!"
|
||||
|
||||
#: src/connection.c:549
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/debug.c:60 src/download.c:633 src/download.c:1021
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr "Unmogelijk bestand te wissen %s. Reden-: %s"
|
||||
|
||||
#: src/download.c:171
|
||||
#, c-format
|
||||
msgid "Error while processing prior download of connection number %d"
|
||||
msgstr "Fout bij het verwerken voorafgaande download van connectie nummer %d"
|
||||
|
||||
#: src/download.c:200
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr "Waarschuwing! Onmogelijk om logfile te maken!"
|
||||
|
||||
#: src/download.c:225 src/download.c:236 src/download.c:338 src/download.c:377
|
||||
#: src/download.c:396 src/download.c:418 src/download.c:457 src/download.c:476
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr "Fout: Niet genoeg systeem bronnen"
|
||||
|
||||
#: src/download.c:240
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr "Fout: Niet ondersteund protocol is ingesteld"
|
||||
|
||||
#: src/download.c:244
|
||||
msgid "All threads created"
|
||||
msgstr "Alle draden gecreerd"
|
||||
|
||||
#: src/download.c:318
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr "Connectie %d, heeft een locale fatale fout: %s . Download gestopt. "
|
||||
|
||||
#: src/download.c:334
|
||||
msgid "All logins rejected!.Retrying connection"
|
||||
msgstr "Alle aanmeldingen verworpen!. Bezig opnieuw verbinding te maken"
|
||||
|
||||
#: src/download.c:373 src/download.c:392 src/download.c:453 src/download.c:472
|
||||
msgid "Relaunching download"
|
||||
msgstr "Download herstarten"
|
||||
|
||||
#: src/download.c:414
|
||||
msgid "All connections attempts have been rejected!.Retrying connection"
|
||||
msgstr "Alle verbindingen zijn verworpen!. Bezig opnieuw verbinding te maken"
|
||||
|
||||
#: src/download.c:695
|
||||
#, c-format
|
||||
msgid "Unable to allocate %d bytes to recreate files"
|
||||
msgstr "Onmogelijk om %d bytes te lokaliseren om bestanden te cre<72>ren"
|
||||
|
||||
#: src/download.c:713
|
||||
#, c-format
|
||||
msgid "Error: unable to open the file %s for writing-: %s\n"
|
||||
msgstr "Fout: onmogelijk om bestand %s te openen om te schrijven-: %s\n"
|
||||
|
||||
#: src/download.c:732
|
||||
#, c-format
|
||||
msgid "Error: Unable to open the file %s for reading-: %s\n"
|
||||
msgstr "Fout: onmogelijk om bestand %s te openen om te lezen-: %s\n"
|
||||
|
||||
#: src/download.c:770
|
||||
#, c-format
|
||||
msgid "Unable to delete the file %s before exiting. Reason-: %s"
|
||||
msgstr "Onmogelijk om bestand %s te wissen voor het sluiten. Reden-: %s"
|
||||
|
||||
#: src/download.c:777
|
||||
#, c-format
|
||||
msgid "Error:A write error occured while writing to %s -: %s\n"
|
||||
msgstr "Foute: Een schrijffout is ontstaan bij het schrijven naar %s -: %s\n"
|
||||
|
||||
#: src/download.c:792
|
||||
#, c-format
|
||||
msgid "Successfully Wrote %s \n"
|
||||
msgstr "Successvol geschreven %s \n"
|
||||
|
||||
#: src/ftp.c:106
|
||||
#, c-format
|
||||
msgid "Message = %s"
|
||||
msgstr "Bericht = %s"
|
||||
|
||||
#: src/ftp.c:126
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr "Fout bij het controleren van FTP data: %s"
|
||||
|
||||
#: src/ftp.c:143
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr "Foute bij het onvangen van FTP data: %s"
|
||||
|
||||
#: src/ftp.c:167
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr "Verzenden: %s"
|
||||
|
||||
#: src/ftp.c:172
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr "Foute bij het zenden van FTP data: %s"
|
||||
|
||||
#: src/ftp.c:213
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr "Ontvangen: %s"
|
||||
|
||||
#: src/ftp.c:344
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr "FTP PASV Beginkop= %s"
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:759
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr "Onbekende code %d ontstaan bij het FTP aanmelden"
|
||||
|
||||
#: src/ftp.c:811 src/ftp.c:831 src/http-retr.c:69 src/http-retr.c:84
|
||||
#: src/http.c:562 src/http.c:577
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Verbinden met $s"
|
||||
|
||||
#: src/ftp.c:822 src/ftp.c:840
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr "Fout bij het verbinden met %s"
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:844
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr "Verbonden met %s"
|
||||
|
||||
#: src/ftp.c:870
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr "Aanmelden als gebruiker %s met wachtwoord %s"
|
||||
|
||||
#: src/ftp.c:882
|
||||
msgid "Logged in successfully"
|
||||
msgstr "Aanmelden succesvol"
|
||||
|
||||
#: src/ftp.c:902
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr "CWD directory veranderen mislukt '%s'"
|
||||
|
||||
#: src/ftp.c:911
|
||||
msgid "CWD not needed"
|
||||
msgstr "CWD niet nodig"
|
||||
|
||||
#: src/ftp.c:918
|
||||
msgid "REST failed"
|
||||
msgstr "REST mislukt"
|
||||
|
||||
#: src/ftp.c:923
|
||||
msgid "REST ok"
|
||||
msgstr "REST ok"
|
||||
|
||||
#: src/ftp.c:1003
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr "Fout bij het ontvangen van FTP overdracht data: %s"
|
||||
|
||||
#: src/ftp.c:1008
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr "Lijn ontvangen na het LIST commando = %s"
|
||||
|
||||
#: src/ftp.c:1026
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"kalum@delrom.ro "
|
||||
msgstr ""
|
||||
"Onmogelijk om de inkomende lijn van de FTP server te vertalen: rapporteer URL naar "
|
||||
"kalum@delrom.ro "
|
||||
|
||||
#: src/ftp.c:1053
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr "De server ondersteund geen PASV"
|
||||
|
||||
#: src/ftp.c:1129
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr "Nogmaals een poging %d in %d seconden"
|
||||
|
||||
#: src/ftp.c:1148 src/http.c:734
|
||||
msgid "Seccessfully got info"
|
||||
msgstr "Successvol info verkregen"
|
||||
|
||||
#: src/ftp.c:1156 src/http.c:746
|
||||
msgid "File not found!"
|
||||
msgstr "Bestand niet gevonden!"
|
||||
|
||||
#: src/ftp-retr.c:321 src/ftp.c:1175 src/http-retr.c:333 src/http.c:765
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr "Ik heb %d poging(en) geprobeerd en deze zijn mislukt, gestopt"
|
||||
|
||||
#: src/ftpparse.c:194
|
||||
#, c-format
|
||||
msgid "MULTINET Size: %d\n"
|
||||
msgstr "MULTINET grootte: %d\n"
|
||||
|
||||
#: src/ftpparse.c:235
|
||||
#, c-format
|
||||
msgid "BINLS size: %d\n"
|
||||
msgstr "BINLS grootte: %d\n"
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr "Bezig in te loggen als gebruiker %s met wachtwoord %s"
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr "CWD directory veranderen mislukt '%s'"
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr "CWD ok"
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr "CWD niet nodig."
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid ""
|
||||
"I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr "Ik heb een fout in mijn code!!, controleer remote_starpos en resume_support's waarden"
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr "RETR mislukt"
|
||||
|
||||
#: src/ftp-retr.c:261
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr "Opnieuw proberen... poging %d in %d seconden"
|
||||
|
||||
#: src/ftp-retr.c:273 src/http-retr.c:286
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr "Fout bij het verwerken van het download bestand"
|
||||
|
||||
#: src/ftp-retr.c:304 src/http-retr.c:313
|
||||
msgid "Seccessfully got download"
|
||||
msgstr "Succesvol gedownload"
|
||||
|
||||
#: src/ftp-retr.c:310
|
||||
msgid "Error occured in connection..."
|
||||
msgstr "Fout opgetreden in verbinding..."
|
||||
|
||||
#: src/getopt.c:741
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: optie '%s' is dubbelzinnig\n"
|
||||
|
||||
#: src/getopt.c:769
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie '--%s' staat dit argument niet toe\n"
|
||||
|
||||
#: src/getopt.c:776
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie '%c%s' staat dit argument niet toe\n"
|
||||
|
||||
#: src/getopt.c:792 src/getopt.c:995
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: optie '%s' is een argument benodigd\n"
|
||||
|
||||
#.
|
||||
#. * --option
|
||||
#.
|
||||
#: src/getopt.c:825
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: onbekende optie '--%s'\n"
|
||||
|
||||
#.
|
||||
#. * +option or -option
|
||||
#.
|
||||
#: src/getopt.c:831
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: onbekende optie '%c%s'\n"
|
||||
|
||||
#.
|
||||
#. * 1003.2 specifies the format of this message.
|
||||
#.
|
||||
#: src/getopt.c:863
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: foutieve optie -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: foutieve optie -- %c\n"
|
||||
|
||||
#: src/getopt.c:902 src/getopt.c:1051
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: optie is een argument nodig -- %c\n"
|
||||
|
||||
#: src/getopt.c:961
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: optie '-W %s' is tegenstrijdig\n"
|
||||
|
||||
#: src/getopt.c:981
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie '-W %s' staat geen argument toe\n"
|
||||
|
||||
#: src/getopt.c:1118
|
||||
msgid "digits occur in two different argv-elements.\n"
|
||||
msgstr "cijfers ontstaan in twee verschillende ergv-elementen.\n"
|
||||
|
||||
#: src/getopt.c:1124
|
||||
msgid "option a\n"
|
||||
msgstr "optie a\n"
|
||||
|
||||
#: src/getopt.c:1128
|
||||
msgid "option b\n"
|
||||
msgstr "optie b\n"
|
||||
|
||||
#: src/getopt.c:1132
|
||||
#, c-format
|
||||
msgid "option c with value `%s'\n"
|
||||
msgstr "optie c met waarde '%s'\n"
|
||||
|
||||
#: src/getopt.c:1139
|
||||
#, c-format
|
||||
msgid "?? getopt returned character code 0%o ??\n"
|
||||
msgstr "?? getopt terugkerende karakter code )%o ??\n"
|
||||
|
||||
#: src/getopt.c:1145
|
||||
msgid "non-option ARGV-elements: "
|
||||
msgstr "geen-optie ARGV-elementen: "
|
||||
|
||||
#: src/http.c:376
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr "HTTP aanvraag mislukt"
|
||||
|
||||
#: src/http.c:397
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr "Begin = %s"
|
||||
|
||||
#: src/http.c:401
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr "Einde van bestand tijdens het verwerken van het begin"
|
||||
|
||||
#: src/http.c:412
|
||||
msgid "Read error in headers"
|
||||
msgstr "Lees fout in het begin"
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:438
|
||||
msgid "UNKNOWN"
|
||||
msgstr "ONBEKEND"
|
||||
|
||||
#: src/http.c:440
|
||||
msgid "(no description)"
|
||||
msgstr "(geen omschrijving)"
|
||||
|
||||
#: src/http-retr.c:77 src/http-retr.c:91 src/http-retr.c:395 src/http.c:571
|
||||
#: src/http.c:583 src/http.c:801
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr "Fout bij het verbinden met %s"
|
||||
|
||||
#: src/http-retr.c:119 src/http-retr.c:422 src/http.c:611 src/http.c:828
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr "Authenticatie als gebruiker %s wachtwoord %s"
|
||||
|
||||
#: src/http-retr.c:120 src/http-retr.c:423 src/http.c:612 src/http.c:829
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr "Authenticatie tekenreeks=%s"
|
||||
|
||||
#: src/http-retr.c:198 src/http-retr.c:478 src/http.c:682
|
||||
msgid "Sending HTTP request"
|
||||
msgstr "Verzenden van HTTP aanvraag"
|
||||
|
||||
#: src/http-retr.c:274 src/http.c:717
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr "Opnieuw proberen... poging %d in %d seconden"
|
||||
|
||||
#: src/http-retr.c:306
|
||||
msgid "Will be hanled in main "
|
||||
msgstr "Zal in het hoofddeel worden afgehandeld"
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr "Fout bij openen van bestand %s om te schrijven: %s"
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:93 src/logfile.c:104
|
||||
#: src/logfile.c:115
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr "Fout bij het schrijven naar %s: %s"
|
||||
|
||||
#: src/logfile.c:168
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr "logbestand bestaat niet"
|
||||
|
||||
#: src/logfile.c:198
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr "Fout bij het openen van bestand %s om te lezen: %s"
|
||||
|
||||
#: src/logfile.c:232 src/logfile.c:244 src/logfile.c:256
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr "Fout bij het lezen van bestand %s: %s"
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr "Fout bij malloc() %lu bytes."
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr "Fout bij realloc() %lu bytes."
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr "Niet genoeg geheugen om verder te gaan: strdup() mislukt."
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr "Waarschuwing: ommogelijk om te vertragen"
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr "Onmogelijk hostnaam te vinden"
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr "Onmogelijk socket te cre<72>ren"
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr "Fout bij het verbinden"
|
||||
|
||||
#: src/misc.c:332
|
||||
msgid "The cconnection attempt was refused"
|
||||
msgstr "De verbindingspoging is geweigerd"
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr "Fout bij het accepteren van de verbinding"
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr "Fout bij het verbinden met de socket"
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr "Fout bij het luisteren"
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr "De verbinding was teruggezet/verbroken door andere zijde"
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr "Het URL protocol is niet bekend"
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr "De poort opgegeven in de URL is niet geldig!"
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr "De hostnaam opgegeven in de URL is niet geldig!"
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr "Het patroon opgegeven in de URL ziet er niet geldig uit!"
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr "Einde van bestand bereikt in HTTP verbinding"
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr "Fout in HTTP data verkeer"
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr "Authenticatie is vereist om toegang te krijgen tot deze bron"
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr "Fout bij authenticatie met host!"
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr "De URL is niet gevonden op de host!"
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr "De host heeft de aanmeldpoging niet toegestaan"
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr "De poort die werdt gevraagd is afgewezen door de server"
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr "Het object bestand/map is niet gevonden op de host!"
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr "Het TYPE is niet bekend bij de FTP server!"
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr "Het commando is niet bekend bij de FTP server!"
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr "Het SIZE commando mislukte"
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr "Fout opgetreden in FTP data verkeer"
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr "Het REST commando mislukte"
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr "De andere zijde stond geen toegang toe"
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr "De host wees het wachtwoord af"
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr "De PASV (passieve modus) is niet ondersteund door de host"
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr "Deze host onderteund geen PASV (passieve modus) overdracht"
|
||||
|
||||
#: src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr "De verbindingspoging is geweigerd"
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr "Mislukt om (CWD) directory te veranderen"
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr ""
|
||||
"De host zei dat de gevraagde service niet aanwezig was en verbrook de controle "
|
||||
"verbinding"
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr "getsockname mislukt!"
|
||||
|
||||
#: src/misc.c:399
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
"De server, die zich voordeed als gateway of proxy, ontving een foute reactie"
|
||||
"van de upstream server bij de toegang om aan de aanvraag te voldoen."
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
"De server is tijdelijk niet in staat de aanvraag te verwerken doordat hij "
|
||||
"overbelast is of in onderhoud is."
|
||||
|
||||
#: src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request."
|
||||
msgstr ""
|
||||
"De server, die zich voordeed als gateway of proxy, ontving een foute reactie"
|
||||
"van de upstream server bij de toegang om aan de aanvraag te voldoen."
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr ""
|
||||
"De server onderging een onverwachte conditie waardoor hij "
|
||||
"aan de aanvraag niet kan voldoen."
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr ""
|
||||
"De server heeft geen functionaliteit om de aanvraag te"
|
||||
"voltooien."
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr "Fout bij openen van het bestand"
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr "Fout bij het schrijven naar het bestand"
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr "De download is afgebroken"
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr "Fout: Hervatten van deze verbinding is niet mogelijk"
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr "Fout: bij het lezen van data van de socket"
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr "Fout: bij het schrijven van data naar de socket"
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while Proxying"
|
||||
msgstr "Fout bij het proxy-en"
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "The location is a directory"
|
||||
msgstr "De lokatie en map"
|
||||
|
||||
#: src/misc.c:440
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr "Onbekende/Niet ondersteunde fout code"
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr "%s:%d: waarschuwing: gevonden \"%s\" voor alle hostnamen\n"
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr "%s:%d: waarschuwing: token onbekend \"%s\"\n"
|
||||
BIN
libprozilla/po/pt_BR.gmo
Normal file
BIN
libprozilla/po/pt_BR.gmo
Normal file
Binary file not shown.
776
libprozilla/po/pt_BR.po
Normal file
776
libprozilla/po/pt_BR.po
Normal file
@@ -0,0 +1,776 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||
# Gustavo Noronha Silva <kov@debian.org>, 2001.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libprozilla 0.0.1\n"
|
||||
"POT-Creation-Date: 2001-08-31 06:56+0600\n"
|
||||
"PO-Revision-Date: 2001-06-03 21:28-0300\n"
|
||||
"Last-Translator: Gustavo Noronha Silva <kov@debian.org>\n"
|
||||
"Language-Team: Debian-BR <debian-br@listas.cipsga.org.br>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/connection.c:160 src/connection.c:250
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr "Erro: N<>o foi poss<73>vel abrir arquivo %s-: %s!"
|
||||
|
||||
#: src/connection.c:182 src/connection.c:297
|
||||
msgid "write failed"
|
||||
msgstr "escrita falhou"
|
||||
|
||||
#: src/connection.c:185 src/connection.c:300
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr "Erro ao escrever arquivo %s: %s!"
|
||||
|
||||
#: src/connection.c:208 src/connection.c:281
|
||||
msgid "connection timed out"
|
||||
msgstr "tempo limite de conex<65>o excedido"
|
||||
|
||||
#: src/connection.c:219 src/connection.c:320
|
||||
#, c-format
|
||||
msgid "download for this connection completed%s : %ld received"
|
||||
msgstr "download para essa conex<65>o completado%s : %ld recebido"
|
||||
|
||||
#: src/connection.c:272
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr "O Servidor Fechou Conex<65>o Prematuramente!"
|
||||
|
||||
#: src/connection.c:378
|
||||
#, c-format
|
||||
msgid "orig start pos= %d\n"
|
||||
msgstr "pos inic de orig= 5d\n"
|
||||
|
||||
#: src/connection.c:409
|
||||
msgid "Idle"
|
||||
msgstr "Parado"
|
||||
|
||||
#: src/connection.c:412
|
||||
msgid "Connecting"
|
||||
msgstr "Conectando"
|
||||
|
||||
#: src/connection.c:415
|
||||
msgid "Logging in"
|
||||
msgstr "Logando"
|
||||
|
||||
#: src/connection.c:418
|
||||
msgid "Downloading"
|
||||
msgstr "Baixando"
|
||||
|
||||
#: src/connection.c:421
|
||||
msgid "Completed"
|
||||
msgstr "Completado"
|
||||
|
||||
#: src/connection.c:424
|
||||
msgid "Login Denied"
|
||||
msgstr "Login Negado"
|
||||
|
||||
#: src/connection.c:427
|
||||
msgid "Connect Refused"
|
||||
msgstr "Conex<65>o Recusada"
|
||||
|
||||
#: src/connection.c:430
|
||||
msgid "Remote Fatal"
|
||||
msgstr "Erro Remoto Fatal"
|
||||
|
||||
#: src/connection.c:433
|
||||
msgid "Local Fatal"
|
||||
msgstr "Erro Local Fatal"
|
||||
|
||||
#: src/connection.c:436
|
||||
msgid "Timed Out"
|
||||
msgstr "Tempo Limite Excedido"
|
||||
|
||||
#: src/connection.c:438
|
||||
msgid "Max attempts reached"
|
||||
msgstr "M<>ximo n<>mero de tentativas"
|
||||
|
||||
#: src/connection.c:441
|
||||
msgid "Unkown Status!"
|
||||
msgstr "Estado desconhecido!"
|
||||
|
||||
#: src/connection.c:523 src/misc.c:471
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr "Erro: protocolo n<>o suportado!"
|
||||
|
||||
#: src/connection.c:545
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr "A localiza<7A><61>o retornada pelo servidor est<73> errada: %s!"
|
||||
|
||||
#: src/connection.c:553
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr "Redirecionado para => %s"
|
||||
|
||||
#: src/debug.c:60 src/download.c:635 src/download.c:1024
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr "N<>o foi poss<73>vel deletar o arquivo %s. Raz<61>o-: %s"
|
||||
|
||||
#: src/download.c:171
|
||||
#, c-format
|
||||
msgid "Error while processing prior download of connection number %d"
|
||||
msgstr "Erro ao processar download inicial da conex<65>o n<>mero %d"
|
||||
|
||||
#: src/download.c:200
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr "Aviso! N<>o foi poss<73>vel criar arquivo de log!"
|
||||
|
||||
#: src/download.c:225 src/download.c:236 src/download.c:340 src/download.c:379
|
||||
#: src/download.c:398 src/download.c:420 src/download.c:459 src/download.c:478
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr "Erro: N<>o h<> recursos de sistema o bastante"
|
||||
|
||||
#: src/download.c:240
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr "Erro: foi especificado um protocolo n<>o suportado"
|
||||
|
||||
#: src/download.c:244
|
||||
msgid "All threads created"
|
||||
msgstr "Todas as threads foram criadas"
|
||||
|
||||
#: src/download.c:321
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr "Conex<65>o %d teve um erro local fatal: %s. Abortando download. "
|
||||
|
||||
#: src/download.c:336
|
||||
msgid "All logins rejected!.Retrying connection"
|
||||
msgstr "Todos os logins foram rejeitados! Tentando novamente"
|
||||
|
||||
#: src/download.c:375 src/download.c:394 src/download.c:455 src/download.c:474
|
||||
msgid "Relaunching download"
|
||||
msgstr "Reiniciando download"
|
||||
|
||||
#: src/download.c:416
|
||||
msgid "All connections attempts have been rejected!.Retrying connection"
|
||||
msgstr "Todas as tentativas de conex<65>o foram rejeitadas! Tentando novamente"
|
||||
|
||||
#: src/download.c:698
|
||||
#, c-format
|
||||
msgid "Unable to allocate %ld bytes to recreate files"
|
||||
msgstr "N<>o foi poss<73>vel alocar %ld bytes para recriar os arquivos"
|
||||
|
||||
#: src/download.c:716
|
||||
#, c-format
|
||||
msgid "Error: unable to open the file %s for writing-: %s\n"
|
||||
msgstr "Erro: n<>o foi poss<73>vel abrir o arquivo %s para escrita-: %s\n"
|
||||
|
||||
#: src/download.c:735
|
||||
#, c-format
|
||||
msgid "Error: Unable to open the file %s for reading-: %s\n"
|
||||
msgstr "Erro: n<>o foi poss<73>vel abrir o arquivo %s para leitura-: %s\n"
|
||||
|
||||
#: src/download.c:773
|
||||
#, c-format
|
||||
msgid "Unable to delete the file %s before exiting. Reason-: %s"
|
||||
msgstr "N<>o foi poss<73>vel deletar o arquivo %s antes de sair. Raz<61>o-: %s"
|
||||
|
||||
#: src/download.c:780
|
||||
#, c-format
|
||||
msgid "Error:A write error occured while writing to %s -: %s\n"
|
||||
msgstr "Erro: um erro de escrita ocorreu ao escrever em %s -: %s\n"
|
||||
|
||||
#: src/download.c:795
|
||||
#, c-format
|
||||
msgid "Successfully Wrote %s \n"
|
||||
msgstr "Escrevi com sucesso %s\n"
|
||||
|
||||
#: src/ftp.c:106
|
||||
#, c-format
|
||||
msgid "Message = %s"
|
||||
msgstr "Mensagem = "
|
||||
|
||||
#: src/ftp.c:126
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr "Erro procurando dados FTP: %s"
|
||||
|
||||
#: src/ftp.c:143
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr "Erro recebendo dados FTP: %s"
|
||||
|
||||
#: src/ftp.c:167
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr "Enviando: %s"
|
||||
|
||||
#: src/ftp.c:172
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr "Erro enviando dados FTP: %s"
|
||||
|
||||
#: src/ftp.c:213
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr "Recebi: %s"
|
||||
|
||||
#: src/ftp.c:344
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr "Header FTP PASV = %s"
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:759
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr "C<>digo desconhecido %d retornado durante login FTP"
|
||||
|
||||
#: src/ftp.c:811 src/ftp.c:831 src/http-retr.c:69 src/http-retr.c:84
|
||||
#: src/http.c:562 src/http.c:577
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Conectando a %s"
|
||||
|
||||
#: src/ftp.c:822 src/ftp.c:840
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr "Erro ao conectar a %s"
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:844
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr "Conectado a %s"
|
||||
|
||||
#: src/ftp.c:872 src/ftp.c:881
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr "Logando como usu<73>rio %s com senha %s"
|
||||
|
||||
#: src/ftp.c:895
|
||||
msgid "Logged in successfully"
|
||||
msgstr "Logado com sucesso"
|
||||
|
||||
#: src/ftp.c:915
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr "CWD falhou ao tentar mudar para diret<65>rio '%s'"
|
||||
|
||||
#: src/ftp.c:924
|
||||
msgid "CWD not needed"
|
||||
msgstr "CWD n<>o necess<73>rio"
|
||||
|
||||
#: src/ftp.c:931
|
||||
msgid "REST failed"
|
||||
msgstr "REST falhou"
|
||||
|
||||
#: src/ftp.c:936
|
||||
msgid "REST ok"
|
||||
msgstr "REST ok"
|
||||
|
||||
#: src/ftp.c:1016
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr "Erro recebendo dados de transfer<65>ncia de FTP: %s"
|
||||
|
||||
#: src/ftp.c:1021
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr "String recebida depois do comando LIST = %s"
|
||||
|
||||
#: src/ftp.c:1039
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"kalum@delrom.ro "
|
||||
msgstr ""
|
||||
"Incapaz de analizar a linha que o servidor de FTP retornou: por favor relate "
|
||||
"a URL para kalum@delrom.ro"
|
||||
|
||||
#: src/ftp.c:1066
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr "O Servidor parece n<>o suportar PASVOB"
|
||||
|
||||
#: src/ftp.c:1142
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr "Tentativa %d iniciando em %d segundos"
|
||||
|
||||
#: src/ftp.c:1161 src/http.c:734
|
||||
msgid "Seccessfully got info"
|
||||
msgstr "Informa<6D><61>es conseguidas com sucesso"
|
||||
|
||||
#: src/ftp.c:1169 src/http.c:746
|
||||
msgid "File not found!"
|
||||
msgstr "Arquivo n<>o encontrado!"
|
||||
|
||||
#: src/ftp-retr.c:321 src/ftp.c:1188 src/http-retr.c:333 src/http.c:765
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr "Tentei %d vezes e todas falharam, abortando"
|
||||
|
||||
#: src/ftpparse.c:194
|
||||
#, c-format
|
||||
msgid "MULTINET Size: %d\n"
|
||||
msgstr "Tamanho do MULTINET: %d\n"
|
||||
|
||||
#: src/ftpparse.c:235
|
||||
#, c-format
|
||||
msgid "BINLS size: %d\n"
|
||||
msgstr "Tamanho do BINLS: %d\n"
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr "Logando como usu<73>rio %s com senha %s."
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr "CWD falhou ao tentar mudar para diret<65>rio '%s'."
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr "CWD ok."
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr "CWD n<>o necess<73>rio."
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid ""
|
||||
"I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr ""
|
||||
"H<> um bug em meu c<>digo!!, confira os valores de remote_starpos e "
|
||||
"resume_support"
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr "RETR falhou"
|
||||
|
||||
#: src/ftp-retr.c:261
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr "Tentando novamente... Tentativa %d em %d segundos"
|
||||
|
||||
#: src/ftp-retr.c:273 src/http-retr.c:286
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr "Erro ao tentar processar o arquivo de download"
|
||||
|
||||
#: src/ftp-retr.c:304 src/http-retr.c:313
|
||||
msgid "Seccessfully got download"
|
||||
msgstr "Arquivo baixado com sucesso"
|
||||
|
||||
#: src/ftp-retr.c:310
|
||||
msgid "Error occured in connection..."
|
||||
msgstr "Houve um erro na conex<65>o..."
|
||||
|
||||
#: src/getopt.c:741
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: a op<6F><70>o `%s' <20> amb<6D>gua\n"
|
||||
|
||||
#: src/getopt.c:769
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: a op<6F><70>o `--%s' n<>o permite argumentos\n"
|
||||
|
||||
#: src/getopt.c:776
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: a op<6F><70>o `%c%s' n<>o permite argumentos\n"
|
||||
|
||||
#: src/getopt.c:792 src/getopt.c:995
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: a op<6F><70>o `%s' requer um argumento\n"
|
||||
|
||||
#.
|
||||
#. * --option
|
||||
#.
|
||||
#: src/getopt.c:825
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: op<6F><70>o n<>o reconhecida `--%s'\n"
|
||||
|
||||
#.
|
||||
#. * +option or -option
|
||||
#.
|
||||
#: src/getopt.c:831
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: op<6F><70>o n<>o reconhecida `%c%s'\n"
|
||||
|
||||
#.
|
||||
#. * 1003.2 specifies the format of this message.
|
||||
#.
|
||||
#: src/getopt.c:863
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: op<6F><70>o ilegal -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: op<6F><70>o inv<6E>lida -- %c\n"
|
||||
|
||||
#: src/getopt.c:902 src/getopt.c:1051
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: a op<6F><70>o requer um argumento -- %c\n"
|
||||
|
||||
#: src/getopt.c:961
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: a op<6F><70>o `-W %s' <20> amb<6D>gua\n"
|
||||
|
||||
#: src/getopt.c:981
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: a op<6F><70>o `-W %s' n<>o permite argumentos\n"
|
||||
|
||||
#: src/getopt.c:1118
|
||||
msgid "digits occur in two different argv-elements.\n"
|
||||
msgstr "d<>gitos ocorrem em dois elementos da argv diferentes\n"
|
||||
|
||||
#: src/getopt.c:1124
|
||||
msgid "option a\n"
|
||||
msgstr "op<6F><70>o a\n"
|
||||
|
||||
#: src/getopt.c:1128
|
||||
msgid "option b\n"
|
||||
msgstr "op<6F><70>o b\n"
|
||||
|
||||
#: src/getopt.c:1132
|
||||
#, c-format
|
||||
msgid "option c with value `%s'\n"
|
||||
msgstr "op<6F><70>o c com valor `%s'\n"
|
||||
|
||||
#: src/getopt.c:1139
|
||||
#, c-format
|
||||
msgid "?? getopt returned character code 0%o ??\n"
|
||||
msgstr "?? getopt retornou o c<>digo de caracter 0%o ??\n"
|
||||
|
||||
#: src/getopt.c:1145
|
||||
msgid "non-option ARGV-elements: "
|
||||
msgstr "argumentos do ARGV que n<>o s<>o op<6F><70>es: "
|
||||
|
||||
#: src/http.c:376
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr "Falha ao escrever requesi<73><69>o HTTP"
|
||||
|
||||
#: src/http.c:397
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr "Header = %s"
|
||||
|
||||
#: src/http.c:401
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr "Fim de arquivo ao analizar cabe<62>alhos"
|
||||
|
||||
#: src/http.c:412
|
||||
msgid "Read error in headers"
|
||||
msgstr "Erro na leitura dos headers"
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:438
|
||||
msgid "UNKNOWN"
|
||||
msgstr "DESCONHECIDO"
|
||||
|
||||
#: src/http.c:440
|
||||
msgid "(no description)"
|
||||
msgstr "(sem descri<72><69>o)"
|
||||
|
||||
#: src/http-retr.c:77 src/http-retr.c:91 src/http-retr.c:395 src/http.c:571
|
||||
#: src/http.c:583 src/http.c:801
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr "Erro ao conectar em %s"
|
||||
|
||||
#: src/http-retr.c:119 src/http-retr.c:422 src/http.c:611 src/http.c:828
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr "Autenticando como usu<73>rio %s senha %s"
|
||||
|
||||
#: src/http-retr.c:120 src/http-retr.c:423 src/http.c:612 src/http.c:829
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr "String de autentica<63><61>o=%s"
|
||||
|
||||
#: src/http-retr.c:198 src/http-retr.c:478 src/http.c:682
|
||||
msgid "Sending HTTP request"
|
||||
msgstr "Enviando requisi<73><69>o HTTP"
|
||||
|
||||
#: src/http-retr.c:274 src/http.c:717
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr "Tentativa %d em %d segundos"
|
||||
|
||||
#: src/http-retr.c:306
|
||||
msgid "Will be hanled in main "
|
||||
msgstr "Ser<65> manejado na main"
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr "Erro abrindo arquivo %s para escrita: %s"
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:93 src/logfile.c:104
|
||||
#: src/logfile.c:115
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr "Erro ao escrever arquivo %s: %s"
|
||||
|
||||
#: src/logfile.c:168
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr "logfile n<>o existe"
|
||||
|
||||
#: src/logfile.c:198
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr "Erro ao abrir arquivo %s para leitura: %s"
|
||||
|
||||
#: src/logfile.c:232 src/logfile.c:244 src/logfile.c:256
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr "Erro ao ler arquivo %s: %s"
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr "Falha ao fazer malloc() de %lu bytes."
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr "Falha ao fazer realloc() de %lu bytes."
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr "N<>o h<> mem<65>ria suficiente para continuar: strdup() falhou."
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr "Aviso: n<>o foi poss<73>vel atrasar"
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr "Imposs<73>vel achar hostname"
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr "N<>o foi poss<73>vel criar um socket"
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr "Houve um erro na conex<65>o..."
|
||||
|
||||
#: src/misc.c:332
|
||||
msgid "The cconnection attempt was refused"
|
||||
msgstr "A tentativa de conex<65>o foi recusada"
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr "Erro enquanto aceitava a conex<65>o"
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr "Erro ao conectar o socket"
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr "Erro ao escutar"
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr "A conex<65>o foi reiniciada/fechada pelo servidor"
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr "O Protocolo da URL n<>o foi conhecido"
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr "A porta especificada na URL n<>o <20> v<>lida!"
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr "O Hostname especificado na URL n<>o <20> v<>lida!"
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr "O Padr<64>o espec<65>ficado na URL n<>o parece v<>lido!"
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr "Fim de Arquivo na conex<65>o HTTP"
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr "Erro na transfer<65>ncia de dados HTTP"
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr "Autentica<63><61>o necess<73>ria para acessar este recurso"
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr "Falha ao autenticar com o servidor!"
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr "A URL n<>o foi encontrada no servidor!"
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr "O servidor n<>o permitiu a tentativa de login"
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr "A requisi<73><69>o PORT foi rejeitada pelo servidor"
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr "O arquivo/diret<65>rio n<>o foi encontrado no servidor!"
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr "O TIPO especificado n<>o <20> conhecido pelo servidor FTP!"
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr "O comando n<>o <20> conhecido pelo servidor FTP!"
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr "O comando SIZE falhou"
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr "Erro na transfer<65>ncia de dados FTP"
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr "O comando REST falhou"
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr "O servidor n<>o permitiu o acesso"
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr "O servidor rejeitou a senha"
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr "O PASV (modo passivo) n<>o <20> suportado pelo servidor"
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr "O servidor n<>o suporta transfer<65>ncias PASV (modo passivo)"
|
||||
|
||||
#: src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr "A tentativa de conex<65>o foi recusada"
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr "Falha ao (CWD)mudar de diret<65>rio"
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr ""
|
||||
"O servidor disse que o servi<76>o requisitado est<73> indispon<6F>vel e fechou a "
|
||||
"conex<65>o"
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr "getsockname falhou!"
|
||||
|
||||
#: src/misc.c:399
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
"O servidor, agindo como gateway ou proxy, recebeu uma resposta inv<6E>lida do "
|
||||
"servidor acima dele ao tentar responder <20> requisi<73><69>o"
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
"O servidor est<73> no momento incapaz de lidar com a requisi<73><69>o por causa de "
|
||||
"uma sobrecarga temporaria ou por motivos de manuten<65><6E>o do servidor."
|
||||
|
||||
#: src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request."
|
||||
msgstr ""
|
||||
"O servidor, agindo como gateway ou proxy, recebeu uma resposta inv<6E>lida do "
|
||||
"servidor acima dele ao tentar responder <20> requisi<73><69>o"
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr ""
|
||||
"O servidor encontrou uma condi<64><69>o inesperada que o previne de responder <20> "
|
||||
"requisi<73><69>o."
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr ""
|
||||
"O servidor n<>o suporta a funcionalidade necess<73>ria para responder <20> "
|
||||
"requisi<73><69>o."
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr "Erro ao abrir arquivo"
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr "Erro ao escrever arquivo"
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr "O Download foi abortado"
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "The Download encountered a local fatal error"
|
||||
msgstr "O Download encontou um erro local fatal"
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr "Erro: continuar essa conex<65>o n<>o <20> poss<73>vel"
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr "Erro ao ler dados do socket"
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr "Erro ao escrever dados para o socket"
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "Error while Proxying"
|
||||
msgstr "Erro ao conectar a %s"
|
||||
|
||||
#: src/misc.c:439
|
||||
msgid "The location is a directory"
|
||||
msgstr "A localiza<7A><61>o <20> um diret<65>rio"
|
||||
|
||||
#: src/misc.c:442
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr "C<>digo de erro Desconhecido/N<>o suportado"
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr "%s:%d: aviso: \"%s\" encontrado antes de quaisquer nomes de hosts\n"
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr "%s:%d: aviso: token desconhecido \"%s\"\n"
|
||||
BIN
libprozilla/po/ro.gmo
Normal file
BIN
libprozilla/po/ro.gmo
Normal file
Binary file not shown.
775
libprozilla/po/ro.po
Normal file
775
libprozilla/po/ro.po
Normal file
@@ -0,0 +1,775 @@
|
||||
# Romanian messages for libprozilla.
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
# Flower <flower_os@yahoo.com>, 2001.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libprozilla 0.0.1\n"
|
||||
"POT-Creation-Date: 2001-08-18 04:26+0300\n"
|
||||
"PO-Revision-Date: 2001-08-19 13:11+0300\n"
|
||||
"Last-Translator: Flower <flowetr_os@yahoo.com>\n"
|
||||
"Language-Team: RTFS <rtfs-project@lists.sourceforge.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-2\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/connection.c:157 src/connection.c:247
|
||||
#, c-format
|
||||
msgid "Unable to open file %s: %s!"
|
||||
msgstr "Nu pot deschide fi<66>ierul %s: %s!"
|
||||
|
||||
#: src/connection.c:179 src/connection.c:294
|
||||
msgid "write failed"
|
||||
msgstr "scriere e<>uat<61>"
|
||||
|
||||
#: src/connection.c:182 src/connection.c:297
|
||||
#, c-format
|
||||
msgid "Unable to write to file %s: %s!"
|
||||
msgstr "Nu pot scrie <20>n fi<66>ierul %s: %s!"
|
||||
|
||||
#: src/connection.c:205 src/connection.c:278
|
||||
msgid "connection timed out"
|
||||
msgstr "timpul conexiunii a expirat"
|
||||
|
||||
#: src/connection.c:216 src/connection.c:317
|
||||
#, c-format
|
||||
msgid "download for this connection completed %s : %ld received"
|
||||
msgstr "desc<73>rcarea pentru aceast<73> conexiune s-a <20>ncheiat %s : %ld receptiona<6E>i"
|
||||
|
||||
#: src/connection.c:269
|
||||
msgid "Server Closed Connection Prematurely!"
|
||||
msgstr "Serverul a <20>nchis prematur conexiunea!"
|
||||
|
||||
#: src/connection.c:375
|
||||
#, c-format
|
||||
msgid "orig start pos= %d\n"
|
||||
msgstr "poz orig de pornire= %d\n"
|
||||
|
||||
#: src/connection.c:406
|
||||
msgid "Idle"
|
||||
msgstr "liber"
|
||||
|
||||
#: src/connection.c:409
|
||||
msgid "Connecting"
|
||||
msgstr "Conectare"
|
||||
|
||||
#: src/connection.c:412
|
||||
msgid "Logging in"
|
||||
msgstr "Autentificare"
|
||||
|
||||
#: src/connection.c:415
|
||||
msgid "Downloading"
|
||||
msgstr "Desc<73>rcare"
|
||||
|
||||
#: src/connection.c:418
|
||||
msgid "Completed"
|
||||
msgstr "Terminat"
|
||||
|
||||
#: src/connection.c:421
|
||||
msgid "Login Denied"
|
||||
msgstr "Login refuzat"
|
||||
|
||||
#: src/connection.c:424
|
||||
msgid "Connect Refused"
|
||||
msgstr "Conexiune refuzat<61>"
|
||||
|
||||
#: src/connection.c:427
|
||||
msgid "Remote Fatal"
|
||||
msgstr "Eroare fatal<61> la server"
|
||||
|
||||
#: src/connection.c:430
|
||||
msgid "Local Fatal"
|
||||
msgstr "Eroare local<61> fatal<61>"
|
||||
|
||||
#: src/connection.c:433
|
||||
msgid "Timed Out"
|
||||
msgstr "Timp expirat"
|
||||
|
||||
#: src/connection.c:435
|
||||
msgid "Max attempts reached"
|
||||
msgstr "Num<75>rul maxim de <20>ncerc<72>ri a fost atins"
|
||||
|
||||
#: src/connection.c:438
|
||||
msgid "Unkown Status!"
|
||||
msgstr "Stare necunoscut<75>"
|
||||
|
||||
#: src/connection.c:520 src/misc.c:471
|
||||
msgid "Error: unsupported protocol"
|
||||
msgstr "Eroare: protocol nesuportat"
|
||||
|
||||
#: src/connection.c:542
|
||||
#, c-format
|
||||
msgid "The server returned location is wrong: %s!"
|
||||
msgstr "Loca<63>ia returnat<61> de server e gre<72>it<69>: %s!"
|
||||
|
||||
#: src/connection.c:550
|
||||
#, c-format
|
||||
msgid "Redirected to => %s"
|
||||
msgstr "Redirectat la => %s"
|
||||
|
||||
#: src/debug.c:60 src/download.c:636 src/download.c:1024
|
||||
#, c-format
|
||||
msgid "unable to delete the file %s. Reason-: %s"
|
||||
msgstr "nu pot <20>terge fi<66>ierul %s. Motivul-: %s"
|
||||
|
||||
#: src/download.c:171
|
||||
#, c-format
|
||||
msgid "Error while processing prior download of connection number %d"
|
||||
msgstr "Eroare la procesarea dinaintea desc<73>rc<72>rii la conexiunea numarul %d"
|
||||
|
||||
#: src/download.c:200
|
||||
msgid "Warning! Unable to create logfile!"
|
||||
msgstr "Aten<65>ie! Nu pot crea fi<66>ierul de log!"
|
||||
|
||||
#: src/download.c:225 src/download.c:236 src/download.c:341 src/download.c:380
|
||||
#: src/download.c:399 src/download.c:421 src/download.c:460 src/download.c:479
|
||||
msgid "Error: Not enough system resources"
|
||||
msgstr "Eroare: Nu sunt destule resurse sistem"
|
||||
|
||||
#: src/download.c:240
|
||||
msgid "Error: Unsupported Protocol was specified"
|
||||
msgstr "Eroare: A fost specificat un protocol nesuportat"
|
||||
|
||||
#: src/download.c:244
|
||||
msgid "All threads created"
|
||||
msgstr "Toate firele au fost create"
|
||||
|
||||
#: src/download.c:321
|
||||
#, c-format
|
||||
msgid "Connection %d, had a local fatal error: %s .Aborting download. "
|
||||
msgstr "<22>n conexiunea %d, a ap<61>rut o eroare local<61> fatal<61>: %s. Desc<73>rcarea abandonat<61>. "
|
||||
|
||||
#: src/download.c:337
|
||||
msgid "All logins rejected!.Retrying connection"
|
||||
msgstr "Toate login-urile refuzate! Re<52>ncerc conectarea"
|
||||
|
||||
#: src/download.c:376 src/download.c:395 src/download.c:456 src/download.c:475
|
||||
msgid "Relaunching download"
|
||||
msgstr "Relansez desc<73>rcarea"
|
||||
|
||||
#: src/download.c:417
|
||||
msgid "All connections attempts have been rejected!.Retrying connection"
|
||||
msgstr "Toate <20>ncerc<72>rile de conectare au fost refuzate! Re<52>ncerc conectarea"
|
||||
|
||||
#: src/download.c:698
|
||||
#, c-format
|
||||
msgid "Unable to allocate %d bytes to recreate files"
|
||||
msgstr "Nu pot aloca %d bytes pentru a recrea fi<66>ierul"
|
||||
|
||||
#: src/download.c:716
|
||||
#, c-format
|
||||
msgid "Error: unable to open the file %s for writing-: %s\n"
|
||||
msgstr "Eroare: nu pot deschide fi<66>ierul %s pentru scriere-: %s\n"
|
||||
|
||||
#: src/download.c:735
|
||||
#, c-format
|
||||
msgid "Error: Unable to open the file %s for reading-: %s\n"
|
||||
msgstr "Eroare: Nu pot deschide fi<66>ierul %s pentru citire-: %s\n"
|
||||
|
||||
#: src/download.c:773
|
||||
#, c-format
|
||||
msgid "Unable to delete the file %s before exiting. Reason-: %s"
|
||||
msgstr "Nu pot <20>terge fi<66>ierul %s <20>nainte de ie<69>ire. Motiv-: %s"
|
||||
|
||||
#: src/download.c:780
|
||||
#, c-format
|
||||
msgid "Error:A write error occured while writing to %s -: %s\n"
|
||||
msgstr "Eroare: O eroare de scriere a ap<61>rut <20>n timp ce scriam <20>n %s-: %s\n"
|
||||
|
||||
#: src/download.c:795
|
||||
#, c-format
|
||||
msgid "Successfully Wrote %s \n"
|
||||
msgstr "Am scris %s\n"
|
||||
|
||||
#: src/ftp.c:106
|
||||
#, c-format
|
||||
msgid "Message = %s"
|
||||
msgstr "Mesaj = %s"
|
||||
|
||||
#: src/ftp.c:126
|
||||
#, c-format
|
||||
msgid "Error checking for FTP data: %s"
|
||||
msgstr "Eroare la verificarea datelor FTP: %s"
|
||||
|
||||
#: src/ftp.c:143
|
||||
#, c-format
|
||||
msgid "Error receiving FTP data: %s"
|
||||
msgstr "Eroare la recep<65>ionarea datelor FTP: %s"
|
||||
|
||||
#: src/ftp.c:167
|
||||
#, c-format
|
||||
msgid "Sending: %s"
|
||||
msgstr "Trimit: %s"
|
||||
|
||||
#: src/ftp.c:172
|
||||
#, c-format
|
||||
msgid "Error sending FTP data: %s"
|
||||
msgstr "Eroare la trimiterea datelor FTP: %s"
|
||||
|
||||
#: src/ftp.c:213
|
||||
#, c-format
|
||||
msgid "Received: %s"
|
||||
msgstr "Am primit: %s"
|
||||
|
||||
#: src/ftp.c:344
|
||||
#, c-format
|
||||
msgid "FTP PASV Header = %s"
|
||||
msgstr "Headerul FTP PASV = %s"
|
||||
|
||||
#. Unknown error code.
|
||||
#: src/ftp.c:759
|
||||
#, c-format
|
||||
msgid "Unknown code %d retuned during FTP login"
|
||||
msgstr "Cod necunoscut %d primit <20>n timpul autentific<69>rii FTP"
|
||||
|
||||
#: src/ftp.c:811 src/ftp.c:831 src/http-retr.c:69 src/http-retr.c:84
|
||||
#: src/http.c:562 src/http.c:577
|
||||
#, c-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Conectare la %s"
|
||||
|
||||
#: src/ftp.c:822 src/ftp.c:840
|
||||
#, c-format
|
||||
msgid "Error while connecting to %s"
|
||||
msgstr "Eroare <20>n timpul conect<63>rii la"
|
||||
|
||||
#: src/ftp.c:827 src/ftp.c:844
|
||||
#, c-format
|
||||
msgid "Connected to %s"
|
||||
msgstr "Conectat la %s"
|
||||
|
||||
#: src/ftp.c:870
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s"
|
||||
msgstr "Autentificare ca utilizator %s cu parola %s"
|
||||
|
||||
#: src/ftp.c:882
|
||||
msgid "Logged in successfully"
|
||||
msgstr "Autentificare reu<65>it<69>"
|
||||
|
||||
#: src/ftp.c:902
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'"
|
||||
msgstr "CWD a e<>uat s<> schimbe directorul '%s'"
|
||||
|
||||
#: src/ftp.c:911
|
||||
msgid "CWD not needed"
|
||||
msgstr "Nu e nevoie de CWD"
|
||||
|
||||
#: src/ftp.c:918
|
||||
msgid "REST failed"
|
||||
msgstr "REST e<>uat"
|
||||
|
||||
#: src/ftp.c:923
|
||||
msgid "REST ok"
|
||||
msgstr "REST ok"
|
||||
|
||||
#: src/ftp.c:1003
|
||||
#, c-format
|
||||
msgid "Error receiving FTP transfer data: %s"
|
||||
msgstr "Eroare la recep<65>ionarea datelor de transfer FTP: %s"
|
||||
|
||||
#: src/ftp.c:1008
|
||||
#, c-format
|
||||
msgid "String received after the LIST command = %s"
|
||||
msgstr "String recep<65>ionat dup<75> comanda LIST = %s"
|
||||
|
||||
#: src/ftp.c:1026
|
||||
msgid ""
|
||||
"Unable to parse the line the FTP server returned:please report URL to "
|
||||
"kalum@delrom.ro "
|
||||
msgstr "Nu pot parsa linia pe care a returnat-o serverul FTP: v<> rug<75>m "
|
||||
"raporta<74>i URL-ul la prozilla-users@delrom.ro"
|
||||
|
||||
#: src/ftp.c:1053
|
||||
msgid "Server doesn't seem to support PASV"
|
||||
msgstr "Serverul nu pare s<> suporte PASV"
|
||||
|
||||
#: src/ftp.c:1129
|
||||
#, c-format
|
||||
msgid "Retrying attempt %d in %d seconds"
|
||||
msgstr "Re<52>ncercarea numarul %d <20>n %d secunde"
|
||||
|
||||
#: src/ftp.c:1148 src/http.c:734
|
||||
msgid "Seccessfully got info"
|
||||
msgstr "Informa<6D>iile au fost ob<6F>inute"
|
||||
|
||||
#: src/ftp.c:1156 src/http.c:746
|
||||
msgid "File not found!"
|
||||
msgstr "Fi<46>ier neg<65>sit!"
|
||||
|
||||
#: src/ftp-retr.c:321 src/ftp.c:1175 src/http-retr.c:333 src/http.c:765
|
||||
#, c-format
|
||||
msgid "I have tried %d attempt(s) and have failed, aborting"
|
||||
msgstr "Am f<>cut %d <20>ncerc<72>ri <20>i am e<>uat, abandonez"
|
||||
|
||||
#: src/ftpparse.c:194
|
||||
#, c-format
|
||||
msgid "MULTINET Size: %d\n"
|
||||
msgstr "M<>rimea MULTINET: %d\n"
|
||||
|
||||
#: src/ftpparse.c:235
|
||||
#, c-format
|
||||
msgid "BINLS size: %d\n"
|
||||
msgstr "M<>rimea BINLS: %d\n"
|
||||
|
||||
#: src/ftp-retr.c:125
|
||||
#, c-format
|
||||
msgid "Logging in as user %s with password %s."
|
||||
msgstr "Autentificare ca utilizator %s cu parola %s."
|
||||
|
||||
#: src/ftp-retr.c:165
|
||||
#, c-format
|
||||
msgid "CWD failed to change to directory '%s'."
|
||||
msgstr "CWD a e<>uat s<> schimbe directorul '%s'."
|
||||
|
||||
#: src/ftp-retr.c:171
|
||||
msgid "CWD ok."
|
||||
msgstr "CWD ok"
|
||||
|
||||
#: src/ftp-retr.c:175
|
||||
msgid "CWD not needed."
|
||||
msgstr "Nu e nevoie de CWD."
|
||||
|
||||
#: src/ftp-retr.c:196
|
||||
msgid ""
|
||||
"I have a bug in my code!!, check remote_starpos and resume_support values"
|
||||
msgstr ""
|
||||
"Am o eroare <20>n cod!!, verifica<63>i valorile pentru remote_starpos <20>i resume_support"
|
||||
|
||||
#: src/ftp-retr.c:206
|
||||
msgid "RETR failed"
|
||||
msgstr "RETR e<>uat"
|
||||
|
||||
#: src/ftp-retr.c:261
|
||||
#, c-format
|
||||
msgid "Retrying..Attempt %d in %d seconds"
|
||||
msgstr "Re<52>ncerc... <20>ncercarea %d <20>n %d secunde"
|
||||
|
||||
#: src/ftp-retr.c:273 src/http-retr.c:286
|
||||
msgid "Error while attemting to process download file "
|
||||
msgstr "Eroare la <20>ncercarea de a procesa fi<66>ierul desc<73>rcat "
|
||||
|
||||
#: src/ftp-retr.c:304 src/http-retr.c:313
|
||||
msgid "Seccessfully got download"
|
||||
msgstr "Desc<73>rcare reu<65>it<69>"
|
||||
|
||||
#: src/ftp-retr.c:310
|
||||
msgid "Error occured in connection..."
|
||||
msgstr "A ap<61>rut o eroare <20>n conexiune..."
|
||||
|
||||
#: src/getopt.c:741
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: op<6F>iunea `%s' e ambigu<67>\n"
|
||||
|
||||
#: src/getopt.c:769
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: op<6F>iunea `--%s' nu permite argument\n"
|
||||
|
||||
#: src/getopt.c:776
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: op<6F>iunea `%s%s' nu permite argument\n"
|
||||
|
||||
#: src/getopt.c:792 src/getopt.c:995
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: op<6F>iunea `%s' necesit<69> argument\n"
|
||||
|
||||
#.
|
||||
#. * --option
|
||||
#.
|
||||
#: src/getopt.c:825
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: op<6F>iune nerecunoscut<75> `--%s'\n"
|
||||
|
||||
#.
|
||||
#. * +option or -option
|
||||
#.
|
||||
#: src/getopt.c:831
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: op<6F>iune nerecunoscut<75> `%c%s'\n"
|
||||
|
||||
#.
|
||||
#. * 1003.2 specifies the format of this message.
|
||||
#.
|
||||
#: src/getopt.c:863
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: op<6F>iune ilegal<61> -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: op<6F>iune eronat<61> -- %c\n"
|
||||
|
||||
#: src/getopt.c:902 src/getopt.c:1051
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: op<6F>iunea necesit<69> argument -- %c\n"
|
||||
|
||||
#: src/getopt.c:961
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: op<6F>iunea `-W %s' e ambigu<67>\n"
|
||||
|
||||
#: src/getopt.c:981
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: op<6F>iunea `-W %s' nu permite argument\n"
|
||||
|
||||
#: src/getopt.c:1118
|
||||
msgid "digits occur in two different argv-elements.\n"
|
||||
msgstr "apar cifre <20>n dou<6F> elemente argv diferite.\n"
|
||||
|
||||
#: src/getopt.c:1124
|
||||
msgid "option a\n"
|
||||
msgstr "op<6F>iunea a\n"
|
||||
|
||||
#: src/getopt.c:1128
|
||||
msgid "option b\n"
|
||||
msgstr "op<6F>iunea b\n"
|
||||
|
||||
#: src/getopt.c:1132
|
||||
#, c-format
|
||||
msgid "option c with value `%s'\n"
|
||||
msgstr "op<6F>iunea c cu valoarea `'%s'\n"
|
||||
|
||||
#: src/getopt.c:1139
|
||||
#, c-format
|
||||
msgid "?? getopt returned character code 0%o ??\n"
|
||||
msgstr "?? getopt a <20>ntors cudul caracter 0%o ??\n"
|
||||
|
||||
#: src/getopt.c:1145
|
||||
msgid "non-option ARGV-elements: "
|
||||
msgstr "elemente ARGV care nu<6E>s op<6F>iuni: "
|
||||
|
||||
#: src/http.c:376
|
||||
msgid "Failed writing HTTP request"
|
||||
msgstr "Scrierea cererii HTTP a e<>uat"
|
||||
|
||||
#: src/http.c:397
|
||||
#, c-format
|
||||
msgid "Header = %s"
|
||||
msgstr "Header = %s"
|
||||
|
||||
#: src/http.c:401
|
||||
msgid "End of file while parsing headers"
|
||||
msgstr "Sf<53>r<EFBFBD>itul fi<66>ierul la parsarea headerului"
|
||||
|
||||
#: src/http.c:412
|
||||
msgid "Read error in headers"
|
||||
msgstr "Eroare de citire <20>n headere"
|
||||
|
||||
#. Store the descriptive response.
|
||||
#. Malformed request.
|
||||
#: src/http.c:438
|
||||
msgid "UNKNOWN"
|
||||
msgstr "NECUNOSCUT"
|
||||
|
||||
#: src/http.c:440
|
||||
msgid "(no description)"
|
||||
msgstr "(f<>r<EFBFBD> descriere)"
|
||||
|
||||
#: src/http-retr.c:77 src/http-retr.c:91 src/http-retr.c:395 src/http.c:571
|
||||
#: src/http.c:583 src/http.c:801
|
||||
#, c-format
|
||||
msgid "Error connecting to %s"
|
||||
msgstr "Eroare de conectare la %s"
|
||||
|
||||
#: src/http-retr.c:119 src/http-retr.c:422 src/http.c:611 src/http.c:828
|
||||
#, c-format
|
||||
msgid "Authenticating as user %s password %s"
|
||||
msgstr "Autentificare ca utilizator %s cu parola %s"
|
||||
|
||||
#: src/http-retr.c:120 src/http-retr.c:423 src/http.c:612 src/http.c:829
|
||||
#, c-format
|
||||
msgid "Authentification string=%s"
|
||||
msgstr "Stringul de autentificare=%s"
|
||||
|
||||
#: src/http-retr.c:198 src/http-retr.c:478 src/http.c:682
|
||||
msgid "Sending HTTP request"
|
||||
msgstr "Trimit cererea HTTP"
|
||||
|
||||
#: src/http-retr.c:274 src/http.c:717
|
||||
#, c-format
|
||||
msgid "Retrying...Attempt %d in %d seconds"
|
||||
msgstr "Re<52>ncerc... <20>ncercarea a %s-a <20>n %d secunde"
|
||||
|
||||
#: src/http-retr.c:306
|
||||
msgid "Will be hanled in main "
|
||||
msgstr "Va fi tratat <20>n main "
|
||||
|
||||
#: src/logfile.c:49
|
||||
#, c-format
|
||||
msgid "Error opening file %s for writing: %s"
|
||||
msgstr "Eroare la deschiderea fi<66>ierului %s pentru scriere: %s"
|
||||
|
||||
#: src/logfile.c:65 src/logfile.c:75 src/logfile.c:93 src/logfile.c:104
|
||||
#: src/logfile.c:115
|
||||
#, c-format
|
||||
msgid "Error writing to file %s: %s"
|
||||
msgstr "Eroare la scrierea <20>n fi<66>ierul %s: %s"
|
||||
|
||||
#: src/logfile.c:168
|
||||
msgid "logfile doesn't exist"
|
||||
msgstr "Fi<46>ierul de log nu exist<73>"
|
||||
|
||||
#: src/logfile.c:198
|
||||
#, c-format
|
||||
msgid "Error opening file %s for reading: %s"
|
||||
msgstr "Eroare la deschiderea pentru citire a fi<66>ierului %s : %s"
|
||||
|
||||
#: src/logfile.c:232 src/logfile.c:244 src/logfile.c:256
|
||||
#, c-format
|
||||
msgid "Error reading from file %s: %s"
|
||||
msgstr "Eroare la citirea din fi<66>ierul %s: %s"
|
||||
|
||||
#: src/misc.c:48
|
||||
#, c-format
|
||||
msgid "Failed to malloc() %lu bytes."
|
||||
msgstr "malloc() pentru %lu bytes a e<>uat."
|
||||
|
||||
#: src/misc.c:63
|
||||
#, c-format
|
||||
msgid "Failed to realloc() %lu bytes."
|
||||
msgstr "realloc() pentru %lu bytes a e<>uat."
|
||||
|
||||
#: src/misc.c:85
|
||||
msgid "Not enough memory to continue: strdup() failed."
|
||||
msgstr "Nu este destul<75> memorie pentru a continua: strdup() a e<>uat."
|
||||
|
||||
#: src/misc.c:304
|
||||
msgid "Warning: Unable to delay"
|
||||
msgstr "Aten<65>ie: a<>teptarea nu e posibil<69>"
|
||||
|
||||
#: src/misc.c:326
|
||||
msgid "Unable to lookup hostname"
|
||||
msgstr "Nu se poate rezolva numele"
|
||||
|
||||
#: src/misc.c:328
|
||||
msgid "Unable to create socket"
|
||||
msgstr "Nu pot crea socket-ul"
|
||||
|
||||
#: src/misc.c:330
|
||||
msgid "Error occured while connecting"
|
||||
msgstr "A ap<61>rut o eroare la conectare"
|
||||
|
||||
#: src/misc.c:332
|
||||
msgid "The cconnection attempt was refused"
|
||||
msgstr "<22>ncercarea de conectare a fost refuzat<61>"
|
||||
|
||||
#: src/misc.c:334
|
||||
msgid "Error while accepting the connection"
|
||||
msgstr "Eroare la acceptarea conexiunii"
|
||||
|
||||
#: src/misc.c:336
|
||||
msgid "Error while Binding socket"
|
||||
msgstr "Eroare la conectarea socket-ului"
|
||||
|
||||
#: src/misc.c:338
|
||||
msgid "Error while listening"
|
||||
msgstr "Eroare la ascultare"
|
||||
|
||||
#: src/misc.c:340
|
||||
msgid "The connection was reset/closed by the peer"
|
||||
msgstr "Conexiunea a fost resetat<61>/<2F>nchis<69> de partener"
|
||||
|
||||
#: src/misc.c:342
|
||||
msgid "The URL Protocol was unknown"
|
||||
msgstr "Protocolul URL a fost necunoscut"
|
||||
|
||||
#: src/misc.c:344
|
||||
msgid "The port specified in the URL is not valid!"
|
||||
msgstr "Portul specificat in URL nu este valid!"
|
||||
|
||||
#: src/misc.c:346
|
||||
msgid "The Hostname specified in the URL is not valid!"
|
||||
msgstr "Numele de host specificat in URL nu este valid!"
|
||||
|
||||
#: src/misc.c:348
|
||||
msgid "The Pattern specified in the URL does not look valid!"
|
||||
msgstr "Paternul specificat <20>n URL nu pare valid!"
|
||||
|
||||
#: src/misc.c:350
|
||||
msgid "End of file reached in HTTP connection"
|
||||
msgstr "Sf<53>r<EFBFBD>it de fi<66>ier <20>n conexiunea HTTP"
|
||||
|
||||
#: src/misc.c:352
|
||||
msgid "Error occured in HTTP data transfer"
|
||||
msgstr "Eroare la transferul datelor HTTP"
|
||||
|
||||
#: src/misc.c:354
|
||||
msgid "Authentification is required to access this resource"
|
||||
msgstr "Este nevoie de autentificare pentru accesarea acestei resurse"
|
||||
|
||||
#: src/misc.c:356
|
||||
msgid "Failed to Authenticate with host!"
|
||||
msgstr "A e<>uat autentificarea la server!"
|
||||
|
||||
#: src/misc.c:358
|
||||
msgid "The URL was not found on the host!"
|
||||
msgstr "URL-ul nu a fost g<>sit <20>n host!"
|
||||
|
||||
#: src/misc.c:360
|
||||
msgid "The host disallowed the login attempt"
|
||||
msgstr "Gazda nu a permis <20>ncercarea de logare"
|
||||
|
||||
#: src/misc.c:362
|
||||
msgid "The PORT request was rejected by the server"
|
||||
msgstr "Cererea de PORT a fost respins<6E> de server"
|
||||
|
||||
#: src/misc.c:364
|
||||
msgid "The object file/dir was not found on the host!"
|
||||
msgstr "Obiectul fi<66>ier/director nu a fost g<>sit pe server!"
|
||||
|
||||
#: src/misc.c:366
|
||||
msgid "The TYPE specified in not known by the FTP server!"
|
||||
msgstr "Tipul specificat de TYPE nu e cunoscut de serverul de FTP!"
|
||||
|
||||
#: src/misc.c:368
|
||||
msgid "The command is not known by the FTP server!"
|
||||
msgstr "Comanda nu este cunoscut<75> de serverul de FTP!"
|
||||
|
||||
#: src/misc.c:370
|
||||
msgid "The SIZE command failed"
|
||||
msgstr "Comanda SIZE a e<>uat"
|
||||
|
||||
#: src/misc.c:372
|
||||
msgid "Error occured in FTP data transfer"
|
||||
msgstr "A ap<61>rut o eroare la transferul datelor FTP"
|
||||
|
||||
#: src/misc.c:374
|
||||
msgid "The REST command failed"
|
||||
msgstr "Comanda REST a e<>uat"
|
||||
|
||||
#: src/misc.c:376
|
||||
msgid "The peer did not allow access"
|
||||
msgstr "Partenerul nu permite accesul"
|
||||
|
||||
#: src/misc.c:378 src/misc.c:380
|
||||
msgid "The host rejected the password"
|
||||
msgstr "Serverul nu accept<70> parola"
|
||||
|
||||
#: src/misc.c:382
|
||||
msgid "The PASV (passive mode) was not supported the host"
|
||||
msgstr "PASV (mod pasiv) nu este suportat de server"
|
||||
|
||||
#: src/misc.c:384
|
||||
msgid "The host does not support PASV (passive mode) transfers"
|
||||
msgstr "Serverul nu suport<72> transferuri PASV (mod pasiv)"
|
||||
|
||||
#: src/misc.c:386
|
||||
msgid "The connection attempt was refused"
|
||||
msgstr "<22>ncercarea de conectare a fost refuzat<61>"
|
||||
|
||||
#: src/misc.c:388
|
||||
msgid "Failed to (CWD)change to the directory"
|
||||
msgstr "A e<>uat (CWD) schimbarea directorului"
|
||||
|
||||
#: src/misc.c:392
|
||||
msgid ""
|
||||
"The host said the requested service was unavailable and closed the control "
|
||||
"connection"
|
||||
msgstr ""
|
||||
"Serverul a spus c<> serviciul solocitat nu este disponibil <20>i a <20>nchis"
|
||||
"conexiunea de control"
|
||||
|
||||
#: src/misc.c:394
|
||||
msgid "getsockname failed!"
|
||||
msgstr "getsockname a e<>uat!"
|
||||
|
||||
#: src/misc.c:399
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request"
|
||||
msgstr ""
|
||||
"Serverul, lucr<63>nd ca gateway sau ca proxy, a primit un r<>spuns invalid "
|
||||
"de la serverul de legatur<75> pe care l<>a accesat ca s<> <20>ndeplineasc<73> cererea"
|
||||
|
||||
#: src/misc.c:404
|
||||
msgid ""
|
||||
"The server is currently unable to handle the request due to a temporary "
|
||||
"overloading or maintenance of the server."
|
||||
msgstr ""
|
||||
"Serverul nu poate s<> rezolve cererea acum datorit<69> unei supra<72>ncarc<72>ri "
|
||||
"temporare sau a unor activit<69><74>i de <20>ntre<72>inere."
|
||||
|
||||
#: src/misc.c:409
|
||||
msgid ""
|
||||
"The server, while acting as a gateway or proxy, received an invalid response "
|
||||
"from the upstream server it accessed in attempting to fulfill the request."
|
||||
msgstr ""
|
||||
"Serverul, lucr<63>nd ca gateway sau ca proxy, a primit un r<>spuns invalid "
|
||||
"de la serverul de leg<65>tur<75> pe care l<>a accesat ca s<> <20>ndeplineasc<73> cererea."
|
||||
|
||||
#: src/misc.c:414
|
||||
msgid ""
|
||||
"The server encountered an unexpected condition which prevented it from "
|
||||
"fulfilling the request."
|
||||
msgstr ""
|
||||
"Serverul a <20>nt<6E>lnit o stare necunoscut<75> care l<>a <20>mpiedicat s<> "
|
||||
"<22>ndeplineasc<73> cererea."
|
||||
|
||||
#: src/misc.c:419
|
||||
msgid ""
|
||||
"The server does not support the functionality required to fulfill the "
|
||||
"request."
|
||||
msgstr ""
|
||||
"Serverul nu suport<72> func<6E>ionalitatea cerut<75> pentru a <20>ndeplini "
|
||||
"cererea."
|
||||
|
||||
#: src/misc.c:422
|
||||
msgid "Error while opening file"
|
||||
msgstr "Eroare la deschiderea fi<66>ierului"
|
||||
|
||||
#: src/misc.c:424
|
||||
msgid "Error while writing to file"
|
||||
msgstr "Eroare la scrierea <20>n fi<66>ier"
|
||||
|
||||
#: src/misc.c:427
|
||||
msgid "The Download was aborted"
|
||||
msgstr "Desc<73>rcarea a fost abandonat<61>"
|
||||
|
||||
#: src/misc.c:429
|
||||
msgid "The Download encountered a local fatal error"
|
||||
msgstr "Desc<73>rcarea a <20>nt<6E>lnit o eroare local<61> fatal<61>"
|
||||
|
||||
#: src/misc.c:431
|
||||
msgid "Error: Resuming this connection is not possible"
|
||||
msgstr "Eroare: Continuarea acestei conexiuni nu e posibil<69>"
|
||||
|
||||
#: src/misc.c:433
|
||||
msgid "Error while reading data from socket"
|
||||
msgstr "Eroare la citirea datelor din socket"
|
||||
|
||||
#: src/misc.c:435
|
||||
msgid "Error while writing data to socket"
|
||||
msgstr "Eroare la scrierea datelor <20>n socket"
|
||||
|
||||
#: src/misc.c:437
|
||||
msgid "Error while Proxying"
|
||||
msgstr "Eroare de proxy"
|
||||
|
||||
#: src/misc.c:439
|
||||
msgid "The location is a directory"
|
||||
msgstr "Loca<63>ia este un director"
|
||||
|
||||
#: src/misc.c:442
|
||||
msgid "Unknown/Unsupported error code"
|
||||
msgstr "Cor de eroare necunoscut/nesuportat"
|
||||
|
||||
#: src/netrc.c:215
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: found \"%s\" before any host names\n"
|
||||
msgstr "%s:%d: aten<65>ie: am g<>sit \"%s\" <20>nainte de orice nume de host\n"
|
||||
|
||||
#: src/netrc.c:243
|
||||
#, c-format
|
||||
msgid "%s:%d: warning: unknown token \"%s\"\n"
|
||||
msgstr "%s:%d: aten<65>ie: element necunoscut \"%s\"\n"
|
||||
1
libprozilla/po/stamp-cat-id
Normal file
1
libprozilla/po/stamp-cat-id
Normal file
@@ -0,0 +1 @@
|
||||
timestamp
|
||||
46
libprozilla/src/Makefile.am
Normal file
46
libprozilla/src/Makefile.am
Normal file
@@ -0,0 +1,46 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lib_LTLIBRARIES = libprozilla.la
|
||||
|
||||
libprozilla_la_SOURCES = \
|
||||
common.h \
|
||||
connect.c connect.h \
|
||||
connection.c connection.h \
|
||||
debug.c debug.h \
|
||||
download.c download.h \
|
||||
ftp.c ftp.h \
|
||||
ftpparse.c ftpparse.h \
|
||||
##getopt.c getopt.h \
|
||||
main.c \
|
||||
misc.c misc.h \
|
||||
netrc.c netrc.h \
|
||||
prozilla.h \
|
||||
url.c url.h\
|
||||
http.c http.h\
|
||||
http-retr.c http-retr.h\
|
||||
ftp-retr.c ftp-retr.h\
|
||||
logfile.c logfile.h\
|
||||
ftpsearch.c ftpsearch.h\
|
||||
ping.c ping.h
|
||||
|
||||
# 0:0:0
|
||||
# 0 -> interface version, changes whenever you change the API
|
||||
# 0 -> changes whenever you make a revision of an interface no
|
||||
# API changes...
|
||||
# 0 -> changes whenever you change the API but keep it backwards
|
||||
# compatible (have not removed a function from the API, for
|
||||
# example...)
|
||||
libprozilla_la_LDFLAGS = -version-info 1:0:1
|
||||
includedir= $(prefix)/include/prozilla
|
||||
include_HEADERS = prozilla.h common.h netrc.h
|
||||
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
INCLUDES = -I../intl -I@includedir@
|
||||
#AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
||||
LIBS = @LIBS@ $(THREAD_LIBS)
|
||||
AM_CFLAGS = @CFLAGS@ -D_REENTRANT -W -Wall -O2 -ggdb
|
||||
#bin_PROGRAMS = testproz
|
||||
#testproz_SOURCES = test.c
|
||||
#testproz_LDADD = libprozilla.la
|
||||
|
||||
406
libprozilla/src/Makefile.in
Normal file
406
libprozilla/src/Makefile.in
Normal file
@@ -0,0 +1,406 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
|
||||
lib_LTLIBRARIES = libprozilla.la
|
||||
|
||||
libprozilla_la_SOURCES = common.h connect.c connect.h connection.c connection.h debug.c debug.h download.c download.h ftp.c ftp.h ftpparse.c ftpparse.h main.c misc.c misc.h netrc.c netrc.h prozilla.h url.c url.h http.c http.h http-retr.c http-retr.h ftp-retr.c ftp-retr.h logfile.c logfile.h ftpsearch.c ftpsearch.h ping.c ping.h
|
||||
|
||||
|
||||
# 0:0:0
|
||||
# 0 -> interface version, changes whenever you change the API
|
||||
# 0 -> changes whenever you make a revision of an interface no
|
||||
# API changes...
|
||||
# 0 -> changes whenever you change the API but keep it backwards
|
||||
# compatible (have not removed a function from the API, for
|
||||
# example...)
|
||||
libprozilla_la_LDFLAGS = -version-info 1:0:1
|
||||
includedir = $(prefix)/include/prozilla
|
||||
include_HEADERS = prozilla.h common.h netrc.h
|
||||
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
INCLUDES = -I../intl -I@includedir@
|
||||
#AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
||||
LIBS = @LIBS@ $(THREAD_LIBS)
|
||||
AM_CFLAGS = @CFLAGS@ -D_REENTRANT -W -Wall -O2 -ggdb
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
LDFLAGS = @LDFLAGS@
|
||||
libprozilla_la_LIBADD =
|
||||
libprozilla_la_OBJECTS = connect.lo connection.lo debug.lo download.lo \
|
||||
ftp.lo ftpparse.lo main.lo misc.lo netrc.lo url.lo http.lo http-retr.lo \
|
||||
ftp-retr.lo logfile.lo ftpsearch.lo ping.lo
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(include_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/connect.P .deps/connection.P .deps/debug.P \
|
||||
.deps/download.P .deps/ftp-retr.P .deps/ftp.P .deps/ftpparse.P \
|
||||
.deps/ftpsearch.P .deps/http-retr.P .deps/http.P .deps/logfile.P \
|
||||
.deps/main.P .deps/misc.P .deps/netrc.P .deps/ping.P .deps/url.P
|
||||
SOURCES = $(libprozilla_la_SOURCES)
|
||||
OBJECTS = $(libprozilla_la_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libprozilla.la: $(libprozilla_la_OBJECTS) $(libprozilla_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libprozilla_la_LDFLAGS) $(libprozilla_la_OBJECTS) $(libprozilla_la_LIBADD) $(LIBS)
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(include_HEADERS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(includedir)/$$p; \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = src
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool uninstall-includeHEADERS \
|
||||
install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
|
||||
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
|
||||
clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
#bin_PROGRAMS = testproz
|
||||
#testproz_SOURCES = test.c
|
||||
#testproz_LDADD = libprozilla.la
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
181
libprozilla/src/common.h
Normal file
181
libprozilla/src/common.h
Normal file
@@ -0,0 +1,181 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Common #includes and #defines. */
|
||||
|
||||
/* $Id: common.h,v 1.7 2001/10/27 23:20:24 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDIO_H
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS
|
||||
# if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#else
|
||||
# if HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_CTYPE_H
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#include <netinet/in_systm.h>
|
||||
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#else
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ASSERT_H
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_PWD_H
|
||||
# include <pwd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_PTHREAD_H
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
/* If we don't have vsnprintf() try to use __vsnprintf(). */
|
||||
#if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
|
||||
# undef vsnprintf
|
||||
# define vsnprintf __vsnprintf
|
||||
# define HAVE_VSNPRINTF
|
||||
#endif
|
||||
|
||||
/* If we don't have snprintf() try to use __snprintf(). */
|
||||
#if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF)
|
||||
# undef snprintf
|
||||
# define snprintf __snprintf
|
||||
# define HAVE_SNPRINTF
|
||||
#endif
|
||||
|
||||
|
||||
typedef int boolean;
|
||||
|
||||
|
||||
#ifndef FALSE
|
||||
# define FALSE (0)
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#ifndef NO
|
||||
# define NO FALSE
|
||||
#endif
|
||||
|
||||
#ifndef YES
|
||||
# define YES TRUE
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
/* Gettext */
|
||||
#include <libintl.h>
|
||||
#define _(String) dgettext (PACKAGE, String)
|
||||
#define gettext_noop(String) (String)
|
||||
#ifndef HAVE_GNOME
|
||||
#define N_(String) gettext_noop (String)
|
||||
#endif
|
||||
/* Gettext */
|
||||
|
||||
|
||||
#endif /* COMMON_H */
|
||||
306
libprozilla/src/connect.c
Normal file
306
libprozilla/src/connect.c
Normal file
@@ -0,0 +1,306 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Connection routines. */
|
||||
|
||||
/* $Id: connect.c,v 1.24 2005/07/29 16:28:47 kalum Exp $ */
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "misc.h"
|
||||
#include "debug.h"
|
||||
#include "connect.h"
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Connect to the specified server.
|
||||
******************************************************************************/
|
||||
uerr_t connect_to_server(int *sock, const char *name, int port,
|
||||
struct timeval *tout)
|
||||
{
|
||||
int status, noblock, flags;
|
||||
char szPort[10];
|
||||
extern int h_errno;
|
||||
int opt;
|
||||
struct timeval timeout;
|
||||
struct addrinfo hints, *res=NULL;
|
||||
int error;
|
||||
|
||||
|
||||
assert(name != NULL);
|
||||
memcpy(&timeout, tout, sizeof(timeout));
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
memset(szPort, 0, sizeof(szPort));
|
||||
snprintf(szPort, sizeof(szPort), "%d", port);
|
||||
hints.ai_family = AF_INET;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
error = getaddrinfo(name, szPort, &hints, &res);
|
||||
if (error) {
|
||||
freeaddrinfo(res);
|
||||
return HOSTERR;
|
||||
}
|
||||
|
||||
|
||||
/* Create a socket. */
|
||||
if ((*sock = socket(res->ai_family, res->ai_socktype, IPPROTO_TCP)) < 1)
|
||||
{
|
||||
free(res);
|
||||
return CONSOCKERR;
|
||||
}
|
||||
|
||||
/* Experimental. */
|
||||
flags = fcntl(*sock, F_GETFL, 0);
|
||||
if (flags != -1)
|
||||
noblock = fcntl(*sock, F_SETFL, flags | O_NONBLOCK);
|
||||
else
|
||||
noblock = -1;
|
||||
|
||||
status = connect(*sock, res->ai_addr, res->ai_addrlen);
|
||||
|
||||
|
||||
if ((status == -1) && (noblock != -1) && (errno == EINPROGRESS))
|
||||
{
|
||||
fd_set writefd;
|
||||
|
||||
FD_ZERO(&writefd);
|
||||
FD_SET(*sock, &writefd);
|
||||
|
||||
status = select((*sock + 1), NULL, &writefd, NULL, &timeout);
|
||||
|
||||
/* Do we need to retry if the err is EINTR? */
|
||||
|
||||
if (status > 0)
|
||||
{
|
||||
socklen_t arglen = sizeof(int);
|
||||
|
||||
if (getsockopt(*sock, SOL_SOCKET, SO_ERROR, &status, &arglen) < 0)
|
||||
status = errno;
|
||||
|
||||
if (status != 0)
|
||||
errno = status, status = -1;
|
||||
|
||||
if (errno == EINPROGRESS)
|
||||
errno = ETIMEDOUT;
|
||||
} else if (status == 0)
|
||||
errno = ETIMEDOUT, status = -1;
|
||||
}
|
||||
|
||||
if (status < 0)
|
||||
{
|
||||
close(*sock);
|
||||
|
||||
if (errno == ECONNREFUSED)
|
||||
{
|
||||
free(res);
|
||||
return CONREFUSED;
|
||||
} else
|
||||
{
|
||||
free(res);
|
||||
return CONERROR;
|
||||
}
|
||||
} else
|
||||
{
|
||||
flags = fcntl(*sock, F_GETFL, 0);
|
||||
|
||||
if (flags != -1)
|
||||
fcntl(*sock, F_SETFL, flags & ~O_NONBLOCK);
|
||||
}
|
||||
|
||||
|
||||
/* Enable KEEPALIVE, so dead connections could be closed
|
||||
* earlier. Useful in conjuction with TCP kernel tuning
|
||||
* in /proc/sys/net/ipv4/tcp_* files. */
|
||||
opt = 1;
|
||||
setsockopt(*sock, SOL_SOCKET, SO_KEEPALIVE,
|
||||
(char *) &opt, (int) sizeof(opt));
|
||||
|
||||
free(res);
|
||||
|
||||
return NOCONERROR;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
uerr_t bind_socket(int *sockfd)
|
||||
{
|
||||
struct sockaddr_in serv_addr;
|
||||
|
||||
/* Open a TCP socket (an Internet stream socket). */
|
||||
if ((*sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
|
||||
return CONSOCKERR;
|
||||
|
||||
/* Fill in the structure fields for binding. */
|
||||
memset((void *) &serv_addr, 0, sizeof(serv_addr));
|
||||
serv_addr.sin_family = AF_INET;
|
||||
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
serv_addr.sin_port = htons(0); /* Let the system choose. */
|
||||
|
||||
/* Bind the address to the socket. */
|
||||
if (bind(*sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
|
||||
{
|
||||
perror("bind");
|
||||
close(*sockfd);
|
||||
return BINDERR;
|
||||
}
|
||||
|
||||
/* Allow only one server. */
|
||||
if (listen(*sockfd, 1) < 0)
|
||||
{
|
||||
perror("listen");
|
||||
close(*sockfd);
|
||||
return LISTENERR;
|
||||
}
|
||||
|
||||
return BINDOK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
int select_fd(int fd, struct timeval *timeout, int writep)
|
||||
{
|
||||
fd_set fds, exceptfds;
|
||||
struct timeval to;
|
||||
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
FD_ZERO(&exceptfds);
|
||||
FD_SET(fd, &exceptfds);
|
||||
memcpy(&to, timeout, sizeof(struct timeval));
|
||||
|
||||
return (select(fd + 1, writep ? NULL : &fds, writep ? &fds : NULL,
|
||||
&exceptfds, &to));
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Receive size bytes from sock with a time delay.
|
||||
******************************************************************************/
|
||||
int krecv(int sock, char *buffer, int size, int flags,
|
||||
struct timeval *timeout)
|
||||
{
|
||||
int ret, arglen;
|
||||
|
||||
arglen = sizeof(int);
|
||||
|
||||
assert(size >= 0);
|
||||
|
||||
do
|
||||
{
|
||||
if (timeout)
|
||||
{
|
||||
do
|
||||
{
|
||||
ret = select_fd(sock, timeout, 0);
|
||||
}
|
||||
while ((ret == -1) && (errno == EINTR));
|
||||
|
||||
|
||||
if (ret <= 0)
|
||||
{
|
||||
/* proz_debug("Error after select res=%d errno=%d.", ret, errno); */
|
||||
|
||||
/* Set errno to ETIMEDOUT on timeout. */
|
||||
if (ret == 0)
|
||||
errno = ETIMEDOUT;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ret = recv(sock, buffer, size, flags);
|
||||
}
|
||||
while ((ret == -1) && (errno == EINTR));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Send size bytes to sock with a time delay.
|
||||
******************************************************************************/
|
||||
int ksend(int sock, char *buffer, int size, int flags,
|
||||
struct timeval *timeout)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
/* write() may write less than size bytes, thus the outward loop
|
||||
keeps trying it until all was written, or an error occurred. The
|
||||
inner loop is reserved for the usual EINTR f*kage, and the
|
||||
innermost loop deals with the same during select(). */
|
||||
|
||||
while (size != 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (timeout)
|
||||
{
|
||||
do
|
||||
{
|
||||
ret = select_fd(sock, timeout, 1);
|
||||
}
|
||||
while ((ret == -1) && (errno == EINTR));
|
||||
|
||||
if (ret <= 0)
|
||||
{
|
||||
/* Set errno to ETIMEDOUT on timeout. */
|
||||
if (ret == 0)
|
||||
errno = ETIMEDOUT;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
ret = send(sock, buffer, size, flags);
|
||||
}
|
||||
while ((ret == -1) && (errno == EINTR));
|
||||
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
buffer += ret;
|
||||
size -= ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Accept a connection.
|
||||
******************************************************************************/
|
||||
uerr_t accept_connection(int listen_sock, int *data_sock)
|
||||
{
|
||||
struct sockaddr_in cli_addr;
|
||||
socklen_t clilen = sizeof(cli_addr);
|
||||
int sockfd;
|
||||
|
||||
sockfd = accept(listen_sock, (struct sockaddr *) &cli_addr, &clilen);
|
||||
if (sockfd < 0)
|
||||
{
|
||||
perror("accept");
|
||||
return ACCEPTERR;
|
||||
}
|
||||
|
||||
*data_sock = sockfd;
|
||||
|
||||
/* Now we can free the listen socket since it is not needed...
|
||||
accept() returned the new socket... */
|
||||
close(listen_sock);
|
||||
|
||||
return ACCEPTOK;
|
||||
}
|
||||
53
libprozilla/src/connect.h
Normal file
53
libprozilla/src/connect.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Connection routines. */
|
||||
|
||||
/* $Id: connect.h,v 1.17 2001/05/09 22:58:00 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef CONNECT_H
|
||||
#define CONNECT_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
uerr_t connect_to_server(int *sock, const char *name, int port,
|
||||
struct timeval *timeout);
|
||||
|
||||
uerr_t bind_socket(int *sockfd);
|
||||
|
||||
int select_fd(int fd, struct timeval *timeout, int writep);
|
||||
|
||||
int krecv(int sock, char *buffer, int size, int flags,
|
||||
struct timeval *timeout);
|
||||
int ksend(int sock, char *buffer, int size, int flags,
|
||||
struct timeval *timeout);
|
||||
uerr_t accept_connection(int listen_sock, int *data_sock);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* CONNECT_H */
|
||||
730
libprozilla/src/connection.c
Normal file
730
libprozilla/src/connection.c
Normal file
@@ -0,0 +1,730 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Several connection-related routines. */
|
||||
|
||||
/* $Id: connection.c,v 1.48 2005/09/19 16:18:02 kalum Exp $ */
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "prozilla.h"
|
||||
#include "connection.h"
|
||||
#include "misc.h"
|
||||
#include "connect.h"
|
||||
#include "ftp.h"
|
||||
#include "http.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
void init_response(connection_t * connection)
|
||||
{
|
||||
connection->serv_ret_lines = 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
This will free up the serv_ret_lines array if necessary, in order to prepare
|
||||
it for the storage of the servers response.
|
||||
******************************************************************************/
|
||||
void done_with_response(connection_t * connection)
|
||||
{
|
||||
response_line *p, *p1;
|
||||
|
||||
/* Return if the array is not allocated. */
|
||||
if (connection->serv_ret_lines == 0)
|
||||
return;
|
||||
|
||||
p1 = connection->serv_ret_lines;
|
||||
|
||||
do
|
||||
{
|
||||
p = p1;
|
||||
p1 = p->next;
|
||||
kfree(p);
|
||||
}
|
||||
while (p1 != 0);
|
||||
|
||||
connection->serv_ret_lines = 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Initialises the connection and sets it with values from the runtime struct.
|
||||
******************************************************************************/
|
||||
|
||||
connection_t * proz_connection_init(urlinfo *url,pthread_mutex_t * mutex)
|
||||
{
|
||||
|
||||
connection_t * connection=kmalloc(sizeof(connection_t));
|
||||
memset(connection, 0, sizeof(connection_t));
|
||||
|
||||
/* memcpy(&connection->u, url, sizeof(urlinfo));*/
|
||||
if(url)
|
||||
memcpy(&connection->u,
|
||||
proz_copy_url(url),
|
||||
sizeof(urlinfo));
|
||||
|
||||
/* Copy the proxy structs. */
|
||||
if (libprozrtinfo.ftp_proxy)
|
||||
{
|
||||
connection->ftp_proxy = kmalloc(sizeof(proxy_info));
|
||||
memcpy(connection->ftp_proxy, libprozrtinfo.ftp_proxy,
|
||||
sizeof(proxy_info));
|
||||
/*
|
||||
connection->use_ftp_proxy = libprozrtinfo.use_ftp_proxy;
|
||||
*/
|
||||
}
|
||||
|
||||
if (libprozrtinfo.http_proxy)
|
||||
{
|
||||
connection->http_proxy = kmalloc(sizeof(proxy_info));
|
||||
memcpy(connection->http_proxy, libprozrtinfo.http_proxy,
|
||||
sizeof(proxy_info));
|
||||
/*
|
||||
connection->use_http_proxy = libprozrtinfo.use_http_proxy;
|
||||
*/
|
||||
}
|
||||
|
||||
connection->use_netrc = libprozrtinfo.use_netrc;
|
||||
|
||||
connection->retry = TRUE;
|
||||
connection->ftp_use_pasv = libprozrtinfo.ftp_use_pasv;
|
||||
connection->http_no_cache = libprozrtinfo.http_no_cache;
|
||||
|
||||
connection->user_agent = strdup(DEFAULT_USER_AGENT);
|
||||
connection->file_mode = strdup("wb");
|
||||
/*NOTE: default of unlimited attempts */
|
||||
connection->max_attempts = 0;
|
||||
connection->attempts = 0;
|
||||
/* Initialise all with default timeouts */
|
||||
memcpy(&connection->xfer_timeout, &libprozrtinfo.conn_timeout,
|
||||
sizeof(connection->xfer_timeout));
|
||||
memcpy(&connection->ctrl_timeout, &libprozrtinfo.conn_timeout,
|
||||
sizeof(connection->ctrl_timeout));
|
||||
memcpy(&connection->conn_timeout, &libprozrtinfo.conn_timeout,
|
||||
sizeof(connection->conn_timeout));
|
||||
memcpy(&connection->retry_delay, &libprozrtinfo.conn_retry_delay,
|
||||
sizeof(&connection->retry_delay));
|
||||
connection->max_attempts = libprozrtinfo.max_attempts;
|
||||
|
||||
connection->rate_bps = 0;
|
||||
/* Unlimited bandwith (0) */
|
||||
connection->max_allowed_bps = 0;
|
||||
pthread_cond_init(&connection->connecting_cond, NULL);
|
||||
connection->status_change_mutex = mutex;
|
||||
if (connection->status_change_mutex != 0)
|
||||
{
|
||||
pthread_mutex_init(connection->status_change_mutex, NULL);
|
||||
}
|
||||
pthread_mutex_init(&connection->access_mutex, NULL);
|
||||
|
||||
return connection;
|
||||
}
|
||||
|
||||
/* Locks the connections mutex befoer chaging state. */
|
||||
void connection_change_status(connection_t * connection, dl_status status)
|
||||
{
|
||||
if (connection->status_change_mutex != 0)
|
||||
{
|
||||
pthread_mutex_lock(connection->status_change_mutex);
|
||||
connection->status = status;
|
||||
pthread_mutex_unlock(connection->status_change_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* this will open connection->localfile and read from connection->data_sock
|
||||
(which should be already setup) till a EOF is reached or
|
||||
the server closes the connection, in which case there is no way to know
|
||||
whether we got the complete file.
|
||||
*/
|
||||
|
||||
uerr_t connection_retr_fsize_not_known(connection_t * connection,
|
||||
char *read_buffer,
|
||||
int read_buffer_size)
|
||||
{
|
||||
off_t bytes_read;
|
||||
|
||||
connection_change_status(connection, DOWNLOADING);
|
||||
gettimeofday(&connection->time_begin, NULL);
|
||||
|
||||
do
|
||||
{
|
||||
bytes_read =
|
||||
krecv(connection->data_sock, read_buffer, read_buffer_size, 0,
|
||||
&connection->xfer_timeout);
|
||||
if (bytes_read > 0)
|
||||
{
|
||||
if (write_data_with_lock(connection, read_buffer, sizeof(char), bytes_read) < bytes_read)
|
||||
{
|
||||
proz_debug(_("write failed"));
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("Unable to write to file %s: %s!"),
|
||||
connection->localfile, strerror(errno));
|
||||
connection_change_status(connection, LOCALFATAL);
|
||||
return FWRITEERR;
|
||||
}
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->remote_bytes_received += bytes_read;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
|
||||
/*TODO: caclculate and throttle connections speed here */
|
||||
/*DONE: */
|
||||
connection_calc_ratebps(connection);
|
||||
connection_throttle_bps(connection);
|
||||
}
|
||||
}
|
||||
while (bytes_read > 0);
|
||||
|
||||
if (bytes_read == -1)
|
||||
{
|
||||
if (errno == ETIMEDOUT)
|
||||
{
|
||||
proz_debug(_("connection timed out"));
|
||||
connection_change_status(connection, TIMEDOUT);
|
||||
return READERR;
|
||||
}
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return READERR;
|
||||
}
|
||||
|
||||
connection_change_status(connection, COMPLETED);
|
||||
|
||||
connection_show_message(connection,
|
||||
_("download for this connection completed"
|
||||
"%s : %ld received"), connection->localfile,
|
||||
connection->remote_bytes_received);
|
||||
return FILEGETOK;
|
||||
}
|
||||
|
||||
|
||||
/* This will open connection->localfile and read from connection->data_sock
|
||||
(which should be already setup) till the requested number of bytes are read.
|
||||
Now since we explicitly know how much bytes to get we can do so, and is the server
|
||||
closes the connection prematurely we know that has hapenned (because it hasn't supplied
|
||||
the required number of bytes) and return a READERR.
|
||||
*/
|
||||
uerr_t connection_retr_fsize_known(connection_t * connection,
|
||||
char *read_buffer, int read_buffer_size)
|
||||
{
|
||||
off_t bytes_read;
|
||||
off_t bytes_to_get;
|
||||
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
bytes_to_get = connection->remote_endpos - connection->remote_startpos;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
|
||||
connection_change_status(connection, DOWNLOADING);
|
||||
gettimeofday(&connection->time_begin, NULL);
|
||||
|
||||
while (bytes_to_get > 0)
|
||||
{
|
||||
bytes_read =
|
||||
krecv(connection->data_sock, read_buffer,
|
||||
bytes_to_get >
|
||||
read_buffer_size ? read_buffer_size : bytes_to_get, 0,
|
||||
&connection->xfer_timeout);
|
||||
|
||||
if (bytes_read == 0 && bytes_to_get > 0)
|
||||
{
|
||||
connection_show_message(connection,
|
||||
_("Server Closed Connection Prematurely!"));
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return READERR;
|
||||
}
|
||||
|
||||
if (bytes_read == -1)
|
||||
{
|
||||
if (errno == ETIMEDOUT)
|
||||
{
|
||||
proz_debug(_("connection timed out"));
|
||||
connection_change_status(connection, TIMEDOUT);
|
||||
return READERR;
|
||||
}
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return READERR;
|
||||
}
|
||||
|
||||
bytes_to_get -= bytes_read;
|
||||
|
||||
if (bytes_read > 0)
|
||||
{
|
||||
|
||||
if (write_data_with_lock(connection, read_buffer, sizeof(char), bytes_read) < bytes_read)
|
||||
{
|
||||
|
||||
proz_debug(_("write failed"));
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("Unable to write to file %s: %s!"),
|
||||
connection->localfile, strerror(errno));
|
||||
connection_change_status(connection, LOCALFATAL);
|
||||
return FWRITEERR;
|
||||
}
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->remote_bytes_received += bytes_read;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
|
||||
/*TODO: caclculate and throttle connections speed here */
|
||||
/*DONE: */
|
||||
connection_calc_ratebps(connection);
|
||||
connection_throttle_bps(connection);
|
||||
}
|
||||
}
|
||||
|
||||
connection_change_status(connection, COMPLETED);
|
||||
|
||||
connection_show_message(connection,
|
||||
_("download for this connection completed"
|
||||
"%s : %ld received"), connection->localfile,
|
||||
connection->remote_bytes_received);
|
||||
return FILEGETOK;
|
||||
}
|
||||
|
||||
|
||||
/* This function modifies a single connections download start and
|
||||
end info it returns 1 on sucess and -1 on error.
|
||||
*/
|
||||
|
||||
|
||||
int connection_load_resume_info(connection_t * connection)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if(connection->remote_startpos-connection->orig_remote_startpos!=connection->remote_bytes_received)
|
||||
{
|
||||
proz_debug("connection->remote start pos before loading %ld", connection->remote_startpos);
|
||||
//connection->remote_startpos +=connection->remote_bytes_received;
|
||||
connection->remote_startpos +=(connection->remote_bytes_received-(connection->remote_startpos-connection->orig_remote_startpos));
|
||||
|
||||
proz_debug("connection->remote start pos after loading %ld", connection->remote_startpos);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
dl_status proz_connection_get_status(connection_t * connection)
|
||||
{
|
||||
dl_status status;
|
||||
pthread_mutex_lock(connection->status_change_mutex);
|
||||
status = connection->status;
|
||||
pthread_mutex_unlock(connection->status_change_mutex);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/*This will return a textual representation of the status of a conenction. */
|
||||
char *proz_connection_get_status_string(connection_t * connection)
|
||||
{
|
||||
dl_status status;
|
||||
pthread_mutex_lock(connection->status_change_mutex);
|
||||
status = connection->status;
|
||||
pthread_mutex_unlock(connection->status_change_mutex);
|
||||
|
||||
switch (connection->status)
|
||||
{
|
||||
|
||||
case IDLE:
|
||||
return (_("Idle"));
|
||||
|
||||
case CONNECTING:
|
||||
return (_("Connecting"));
|
||||
|
||||
case LOGGININ:
|
||||
return (_("Logging in"));
|
||||
|
||||
case DOWNLOADING:
|
||||
return (_("Downloading"));
|
||||
break;
|
||||
case COMPLETED:
|
||||
return (_("Completed"));
|
||||
|
||||
case LOGINFAIL:
|
||||
return (_("Login Denied"));
|
||||
|
||||
case CONREJECT:
|
||||
return (_("Connect Refused"));
|
||||
|
||||
case REMOTEFATAL:
|
||||
return (_("Remote Fatal"));
|
||||
|
||||
case LOCALFATAL:
|
||||
return (_("Local Fatal"));
|
||||
|
||||
case TIMEDOUT:
|
||||
return (_("Timed Out"));
|
||||
case MAXTRYS:
|
||||
return (_("Max attempts reached"));
|
||||
|
||||
default:
|
||||
return (_("Unkown Status!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pthread_mutex_t connection_msg_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/*calls the msg_proc function if not null */
|
||||
void connection_show_message(connection_t * connection, const char *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
char message[MAX_MSG_SIZE + 1];
|
||||
|
||||
pthread_mutex_lock(&connection_msg_mutex);
|
||||
va_start(args, format);
|
||||
vsnprintf(message, MAX_MSG_SIZE, format, args);
|
||||
va_end(args);
|
||||
if (connection->msg_proc)
|
||||
connection->msg_proc(message, connection->cb_data);
|
||||
|
||||
/*FIXME: Remove this later */
|
||||
// printf("%s\n", message);
|
||||
pthread_mutex_unlock(&connection_msg_mutex);
|
||||
}
|
||||
|
||||
|
||||
/* Returns the total number of bytes that have been saved to the file*/
|
||||
off_t proz_connection_get_total_bytes_got(connection_t * connection)
|
||||
{
|
||||
off_t ret;
|
||||
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
ret = connection->remote_bytes_received;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Returns the total number of bytes that has being got from the server
|
||||
by this connection.
|
||||
******************************************************************************/
|
||||
off_t proz_connection_get_total_remote_bytes_got(connection_t * connection)
|
||||
{
|
||||
off_t ret;
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
ret = (connection->remote_bytes_received
|
||||
- (connection->remote_startpos-connection->orig_remote_startpos));
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
//proz_debug("CONNECTION TOTAL REMOTE BYTES GOT =%lld", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void proz_get_url_info_loop(connection_t * connection, pthread_t *thread)
|
||||
{
|
||||
assert(connection);
|
||||
assert(thread);
|
||||
connection->running = TRUE;
|
||||
pthread_create(thread, NULL,
|
||||
(void *(*)(void *)) get_url_info_loop,
|
||||
(void *) connection);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
This Fucntion will retreive info about the given url in the connection,
|
||||
handling conditions like redirection from http to ftp etc
|
||||
|
||||
*************************************************************************/
|
||||
void get_url_info_loop(connection_t * connection)
|
||||
{
|
||||
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
/*TODO Should we try to make it broadcast a condition to the other threads? */
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->running = TRUE;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
|
||||
do
|
||||
{
|
||||
switch (connection->u.proto)
|
||||
{
|
||||
case URLHTTP:
|
||||
connection->err = http_get_url_info_loop(connection);
|
||||
break;
|
||||
case URLFTP:
|
||||
connection->err = ftp_get_url_info_loop(connection);
|
||||
break;
|
||||
default:
|
||||
proz_die(_("Error: unsupported protocol"));
|
||||
}
|
||||
|
||||
if (connection->err == NEWLOCATION)
|
||||
{
|
||||
char *constructed_newloc;
|
||||
char *referer;
|
||||
referer=kstrdup(connection->u.url);
|
||||
/*DONE : handle relative urls too */
|
||||
constructed_newloc =
|
||||
uri_merge(connection->u.url, connection->hs.newloc);
|
||||
|
||||
proz_debug("Redirected to %s, merged URL = %s",
|
||||
connection->hs.newloc, constructed_newloc);
|
||||
|
||||
proz_free_url(&connection->u, 0);
|
||||
connection->err =
|
||||
proz_parse_url(constructed_newloc, &connection->u, 0);
|
||||
|
||||
|
||||
if (connection->err != URLOK)
|
||||
{
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("The server returned location is wrong: %s!"),
|
||||
constructed_newloc);
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->running = FALSE;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
kfree(constructed_newloc);
|
||||
connection->err = HERR;
|
||||
return;
|
||||
} else
|
||||
connection_show_message(connection, _("Redirected to => %s"),
|
||||
constructed_newloc);
|
||||
connection->u.referer=referer;
|
||||
kfree(constructed_newloc);
|
||||
connection->err = NEWLOCATION;
|
||||
}
|
||||
|
||||
}
|
||||
while (connection->err == NEWLOCATION);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void proz_connection_set_msg_proc(connection_t * connection,
|
||||
message_proc msg_proc, void *cb_data)
|
||||
{
|
||||
assert(connection != NULL);
|
||||
|
||||
|
||||
connection->msg_proc = msg_proc;
|
||||
connection->cb_data = cb_data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void connection_calc_ratebps(connection_t * connection)
|
||||
{
|
||||
struct timeval tv_cur;
|
||||
struct timeval tv_diff;
|
||||
float diff_us;
|
||||
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
|
||||
if (connection->time_begin.tv_sec == 0
|
||||
&& connection->time_begin.tv_usec == 0)
|
||||
{
|
||||
|
||||
connection->rate_bps = 0;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return;
|
||||
} else
|
||||
{
|
||||
gettimeofday(&tv_cur, NULL);
|
||||
proz_timeval_subtract(&tv_diff, &tv_cur, &(connection->time_begin));
|
||||
diff_us = ((float) tv_diff.tv_sec * 10e5) + tv_diff.tv_usec;
|
||||
|
||||
/* if (diff_us == 0) */
|
||||
/* { */
|
||||
/* pthread_mutex_unlock(&connection->access_mutex); */
|
||||
/* return; */
|
||||
/* } */
|
||||
/* connection->rate_bps = */
|
||||
/* ((float) (connection->remote_bytes_received */
|
||||
/* - (connection->remote_startpos-connection->orig_remote_startpos)) * 10e5 / diff_us); */
|
||||
/* } */
|
||||
|
||||
if (diff_us <100000)
|
||||
{
|
||||
connection->rate_bps = 0;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return;
|
||||
}
|
||||
else
|
||||
connection->rate_bps =
|
||||
((float) (connection->remote_bytes_received
|
||||
- (connection->remote_startpos-connection->orig_remote_startpos)) * 10e5 / diff_us);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void connection_throttle_bps(connection_t * connection)
|
||||
{
|
||||
|
||||
struct timeval tv_cur;
|
||||
struct timeval tv_diff;
|
||||
float diff_us;
|
||||
float wtime;
|
||||
struct timeval tv_delay;
|
||||
float con_timeout_usecs;
|
||||
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
|
||||
con_timeout_usecs =
|
||||
(connection->conn_timeout.tv_sec * 10e5) +
|
||||
connection->conn_timeout.tv_usec;
|
||||
|
||||
if (connection->rate_bps == 0 || connection->max_allowed_bps == 0)
|
||||
{
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (connection->time_begin.tv_sec == 0
|
||||
&& connection->time_begin.tv_usec == 0)
|
||||
{
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
gettimeofday(&tv_cur, NULL);
|
||||
proz_timeval_subtract(&tv_diff, &tv_cur, &(connection->time_begin));
|
||||
diff_us = ((float) tv_diff.tv_sec * 10e5) + tv_diff.tv_usec;
|
||||
|
||||
if (diff_us == 0)
|
||||
{
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
wtime =
|
||||
10e5 * (connection->remote_bytes_received
|
||||
- (connection->remote_startpos-connection->orig_remote_startpos)) /
|
||||
connection->max_allowed_bps;
|
||||
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
|
||||
memset(&tv_delay, 0, sizeof(tv_delay));
|
||||
|
||||
if (wtime > diff_us)
|
||||
{
|
||||
/*too fast have to delay */
|
||||
// proz_debug("wtime %f, diff_us %f", wtime, diff_us);
|
||||
if ((wtime - diff_us) > con_timeout_usecs) /* problem here */
|
||||
{
|
||||
/*If we were to delay for wtime-diff_us we would cause a connection
|
||||
timeout, so rather than doing that shall we delay for a bit lesser
|
||||
than the time for the timeout, like say 1 second less
|
||||
*/
|
||||
const int limit_time_us = 2 * 10e5;
|
||||
|
||||
/* Will the connection timeout - limit_time_us be less or equal to 0?
|
||||
If so no point in delaing beacuse the connection wold timeout
|
||||
*/
|
||||
|
||||
if ((con_timeout_usecs - limit_time_us) <= 0)
|
||||
{
|
||||
proz_debug
|
||||
("Cant throttle: Connection would timeout if done so, please try increasing the timeout value");
|
||||
return;
|
||||
}
|
||||
|
||||
tv_delay.tv_usec = con_timeout_usecs - limit_time_us;
|
||||
/* message
|
||||
("Cant throttle fully : Connection would timeout if done so, please try increasing the timeout value"); */
|
||||
|
||||
proz_debug("delaymaxlimit %ld sec\n", tv_delay.tv_usec);
|
||||
} else
|
||||
{
|
||||
tv_delay.tv_usec = (wtime - diff_us);
|
||||
//#warning "comment out the following line before releasing the code base"
|
||||
proz_debug("sleeping %f secs\n", (wtime - diff_us) / 10e5);
|
||||
}
|
||||
|
||||
tv_delay.tv_sec = tv_delay.tv_usec / 1000000;
|
||||
tv_delay.tv_usec = tv_delay.tv_usec % 1000000;
|
||||
|
||||
if (select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &tv_delay) < 0)
|
||||
{
|
||||
proz_debug("Unable to throttle Bandwith\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
boolean proz_connection_running(connection_t * connection)
|
||||
{
|
||||
boolean running;
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
running = connection->running;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return running;
|
||||
}
|
||||
|
||||
void proz_connection_set_url(connection_t * connection, urlinfo *url)
|
||||
{
|
||||
assert(url);
|
||||
memcpy(&connection->u,
|
||||
proz_copy_url(url),
|
||||
sizeof(urlinfo));
|
||||
}
|
||||
|
||||
void proz_connection_free_connection(connection_t * connection,
|
||||
boolean complete)
|
||||
{
|
||||
assert(connection);
|
||||
/*TODO what about szBuffer..also have to free the URL u */
|
||||
|
||||
if (connection->localfile)
|
||||
kfree(connection->localfile);
|
||||
if (connection->file_mode)
|
||||
kfree(connection->file_mode);
|
||||
if (connection->http_proxy)
|
||||
kfree(connection->http_proxy);
|
||||
if (connection->ftp_proxy)
|
||||
kfree(connection->ftp_proxy);
|
||||
|
||||
if (connection->user_agent)
|
||||
kfree(connection->user_agent);
|
||||
|
||||
/* free the serv_ret_lines array */
|
||||
if (connection->serv_ret_lines != 0)
|
||||
{
|
||||
done_with_response(connection);
|
||||
}
|
||||
|
||||
if (complete == TRUE)
|
||||
kfree(connection);
|
||||
}
|
||||
|
||||
|
||||
size_t write_data_with_lock(connection_t * connection, const void *ptr, size_t size, size_t nmemb)
|
||||
{
|
||||
size_t ret;
|
||||
flockfile(connection->fp);
|
||||
/*Seek appropriately......*/
|
||||
|
||||
ret=fseeko(connection->fp, connection->local_startpos+connection->remote_bytes_received, SEEK_SET);
|
||||
ret=fwrite( ptr, size, nmemb, connection->fp);
|
||||
|
||||
funlockfile(connection->fp);
|
||||
return ret;
|
||||
}
|
||||
63
libprozilla/src/connection.h
Normal file
63
libprozilla/src/connection.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Several connection-related routines. */
|
||||
|
||||
/* $Id: connection.h,v 1.34 2005/01/11 01:49:11 sean Exp $ */
|
||||
|
||||
|
||||
#ifndef CONNECTION_H
|
||||
#define CONNECTION_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "url.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void init_response(connection_t * connection);
|
||||
void done_with_response(connection_t * connection);
|
||||
void connection_change_status(connection_t * connection,
|
||||
dl_status status);
|
||||
|
||||
|
||||
uerr_t connection_retr_fsize_not_known(connection_t * connection,
|
||||
char *read_buffer,
|
||||
int read_buffer_size);
|
||||
|
||||
uerr_t connection_retr_fsize_known(connection_t * connection,
|
||||
char *read_buffer,
|
||||
int read_buffer_size);
|
||||
int connection_load_resume_info(connection_t * connection);
|
||||
|
||||
void connection_show_message(connection_t * connection,
|
||||
const char *format, ...);
|
||||
void connection_calc_ratebps(connection_t * connection);
|
||||
void connection_throttle_bps(connection_t * connection);
|
||||
void get_url_info_loop(connection_t * connection);
|
||||
size_t write_data_with_lock(connection_t *connection, const void *ptr, size_t size, size_t nmemb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* CONNECTION_H */
|
||||
113
libprozilla/src/debug.c
Normal file
113
libprozilla/src/debug.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Debugging routines. */
|
||||
|
||||
/* $Id: debug.c,v 1.20 2001/08/17 21:53:39 kalum Exp $ */
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "misc.h"
|
||||
#include "prozilla.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Initialises the debug system, deletes any prior debug.log file if present
|
||||
******************************************************************************/
|
||||
void debug_init()
|
||||
{
|
||||
proz_debug_delete_log();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void proz_debug_delete_log()
|
||||
{
|
||||
|
||||
char logfile_name[PATH_MAX];
|
||||
snprintf(logfile_name, PATH_MAX, "%s/debug.log", libprozrtinfo.log_dir);
|
||||
|
||||
|
||||
if (unlink(logfile_name) == -1)
|
||||
{
|
||||
/*
|
||||
* if the file is not present the continue silently
|
||||
*/
|
||||
if (errno == ENOENT)
|
||||
return;
|
||||
else
|
||||
{
|
||||
proz_debug(_("unable to delete the file %s. Reason-: %s"),
|
||||
strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Write a message to the debug-file.
|
||||
******************************************************************************/
|
||||
void proz_debug(const char *format, ...)
|
||||
{
|
||||
FILE *fp;
|
||||
va_list args;
|
||||
char message[MAX_MSG_SIZE + 1 + 1];
|
||||
|
||||
char logfile_name[PATH_MAX];
|
||||
snprintf(logfile_name, PATH_MAX, "%s/debug.log", libprozrtinfo.log_dir);
|
||||
|
||||
|
||||
pthread_mutex_lock(&debug_mutex);
|
||||
|
||||
if (libprozrtinfo.debug_mode == TRUE)
|
||||
{
|
||||
va_start(args, format);
|
||||
vsnprintf((char *) &message, MAX_MSG_SIZE, format, args);
|
||||
va_end(args);
|
||||
|
||||
/* Remove all newlines from the end of the string. */
|
||||
while ((message[strlen(message) - 1] == '\r')
|
||||
|| (message[strlen(message) - 1] == '\n'))
|
||||
message[strlen(message) - 1] = '\0';
|
||||
|
||||
/* Append a newline. */
|
||||
message[strlen(message) + 1] = '\0';
|
||||
message[strlen(message)] = '\n';
|
||||
|
||||
if (!(fp = fopen(logfile_name, "at")))
|
||||
{
|
||||
pthread_mutex_unlock(&debug_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (fwrite(message, 1, strlen(message), fp) != strlen(message))
|
||||
{
|
||||
pthread_mutex_unlock(&debug_mutex);
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&debug_mutex);
|
||||
}
|
||||
33
libprozilla/src/debug.h
Normal file
33
libprozilla/src/debug.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Debugging routines. */
|
||||
|
||||
/* $Id: debug.h,v 1.14 2001/07/11 23:19:41 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
|
||||
void debug_init();
|
||||
|
||||
#endif /* DEBUG_H */
|
||||
2169
libprozilla/src/download.c
Normal file
2169
libprozilla/src/download.c
Normal file
File diff suppressed because it is too large
Load Diff
51
libprozilla/src/download.h
Normal file
51
libprozilla/src/download.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* Download routines. */
|
||||
|
||||
/* $Id: download.h,v 1.25 2001/09/30 23:13:50 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef DOWNLOAD_H
|
||||
#define DOWNLOAD_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "connection.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void download_show_message(download_t * download, const char *format,
|
||||
...);
|
||||
int download_query_conns_status_count(download_t * download,
|
||||
dl_status status, char *server);
|
||||
|
||||
void download_join_downloads(download_t * download);
|
||||
void join_downloads(download_t * download);
|
||||
void download_calc_throttle_factor(download_t * download);
|
||||
uerr_t download_handle_threads_ftpsearch(download_t * download);
|
||||
uerr_t download_handle_threads_no_ftpsearch(download_t * download);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* DOWNLOAD_H */
|
||||
338
libprozilla/src/ftp-retr.c
Normal file
338
libprozilla/src/ftp-retr.c
Normal file
@@ -0,0 +1,338 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* $Id: ftp-retr.c,v 1.18 2005/01/11 01:49:11 sean Exp $ */
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "connect.h"
|
||||
#include "misc.h"
|
||||
#include "url.h"
|
||||
#include "netrc.h"
|
||||
#include "debug.h"
|
||||
#include "ftp.h"
|
||||
#include "ftp-retr.h"
|
||||
|
||||
|
||||
/* Will download a portion of/or the full file from the connection->url.
|
||||
*/
|
||||
|
||||
uerr_t proz_ftp_get_file(connection_t * connection)
|
||||
{
|
||||
uerr_t err;
|
||||
char *user, *passwd;
|
||||
netrc_entry *netrc_ent;
|
||||
boolean passive_mode;
|
||||
char buffer[HTTP_BUFFER_SIZE];
|
||||
|
||||
|
||||
/* we want it to terminate immediately */
|
||||
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
assert(connection->localfile != NULL);
|
||||
assert(connection->file_mode != NULL);
|
||||
|
||||
/*clear the socks */
|
||||
connection->ctrl_sock = 0;
|
||||
connection->data_sock = 0;
|
||||
connection->listen_sock = 0;
|
||||
|
||||
/* if there is nothing to download then return */
|
||||
if (connection->status == COMPLETED)
|
||||
{
|
||||
gettimeofday(&connection->time_begin, NULL);
|
||||
return FTPOK;
|
||||
}
|
||||
|
||||
init_response(connection);
|
||||
|
||||
pthread_mutex_lock(connection->status_change_mutex);
|
||||
connection->status = CONNECTING;
|
||||
/* connection_change_status(connection, CONNECTING); */
|
||||
pthread_cond_broadcast(&connection->connecting_cond);
|
||||
pthread_mutex_unlock(connection->status_change_mutex);
|
||||
|
||||
/* if we have to use a HTTP proxy call the routine which is defined in http-retr.c and just return.
|
||||
*/
|
||||
if (ftp_use_proxy(connection)
|
||||
&& connection->ftp_proxy->type == HTTPPROXY)
|
||||
{
|
||||
err = ftp_get_file_from_http_proxy(connection);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (ftp_use_proxy(connection))
|
||||
{
|
||||
/* Connect to the proxy server here. */
|
||||
err = ftp_connect_to_server(connection,
|
||||
connection->ftp_proxy->proxy_url.host,
|
||||
connection->ftp_proxy->proxy_url.port);
|
||||
} else
|
||||
{
|
||||
err = ftp_connect_to_server(connection, connection->u.host,
|
||||
connection->u.port);
|
||||
}
|
||||
|
||||
if (err == FTPCONREFUSED)
|
||||
{
|
||||
connection_change_status(connection, CONREJECT);
|
||||
close_sock(&connection->ctrl_sock);
|
||||
return err;
|
||||
}
|
||||
if (err != FTPOK)
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return err;
|
||||
}
|
||||
|
||||
done_with_response(connection);
|
||||
|
||||
user = connection->u.user;
|
||||
passwd = connection->u.passwd;
|
||||
|
||||
/* Use .netrc if asked to do so. */
|
||||
if (connection->use_netrc == TRUE)
|
||||
{
|
||||
netrc_ent = search_netrc(libprozrtinfo.netrc_list, connection->u.host);
|
||||
|
||||
if (netrc_ent != NULL)
|
||||
{
|
||||
user = netrc_ent->account;
|
||||
passwd = netrc_ent->password;
|
||||
}
|
||||
}
|
||||
|
||||
user = user ? user : libprozrtinfo.ftp_default_user;
|
||||
passwd = passwd ? passwd : libprozrtinfo.ftp_default_passwd;
|
||||
proz_debug(_("Logging in as user %s with password %s."), user, passwd);
|
||||
|
||||
connection_change_status(connection, LOGGININ);
|
||||
|
||||
init_response(connection);
|
||||
err = ftp_login(connection, user, passwd);
|
||||
if (err != FTPOK)
|
||||
{
|
||||
if (err == FTPLOGREFUSED)
|
||||
{
|
||||
connection_change_status(connection, LOGINFAIL);
|
||||
} else
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
}
|
||||
close_sock(&connection->ctrl_sock);
|
||||
return err;
|
||||
}
|
||||
done_with_response(connection);
|
||||
|
||||
|
||||
init_response(connection);
|
||||
err = ftp_binary(connection);
|
||||
if (err != FTPOK)
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
close_sock(&connection->ctrl_sock);
|
||||
return err;
|
||||
}
|
||||
done_with_response(connection);
|
||||
|
||||
/* Do we need to CWD? */
|
||||
if (*connection->u.dir)
|
||||
{
|
||||
init_response(connection);
|
||||
|
||||
err = ftp_cwd(connection, connection->u.dir);
|
||||
if (err != FTPOK)
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
proz_debug(_("CWD failed to change to directory '%s'."),
|
||||
connection->u.dir);
|
||||
close_sock(&connection->ctrl_sock);
|
||||
return err;
|
||||
} else
|
||||
{
|
||||
proz_debug(_("CWD ok."));
|
||||
done_with_response(connection);
|
||||
}
|
||||
} else
|
||||
proz_debug(_("CWD not needed."));
|
||||
|
||||
err = ftp_setup_data_sock_1(connection, &passive_mode);
|
||||
if (err != FTPOK)
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
close_sock(&connection->ctrl_sock);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* do we need to REST */
|
||||
if (connection->remote_startpos > 0
|
||||
&& connection->resume_support == TRUE)
|
||||
{
|
||||
err = ftp_rest(connection, connection->remote_startpos);
|
||||
}
|
||||
if (err != FTPOK)
|
||||
{
|
||||
if (err == FTPRESTFAIL)
|
||||
proz_debug
|
||||
(_
|
||||
("I have a bug in my code!!, check remote_starpos and resume_support values"));
|
||||
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
close_sock(&connection->ctrl_sock);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = ftp_retr(connection, connection->u.file);
|
||||
if (err != FTPOK)
|
||||
{
|
||||
proz_debug(_("RETR failed"));
|
||||
close_sock(&connection->ctrl_sock);
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = ftp_setup_data_sock_2(connection, &passive_mode);
|
||||
if (err != FTPOK)
|
||||
{
|
||||
return err;
|
||||
}
|
||||
|
||||
/* which routine to call */
|
||||
if (connection->main_file_size == -1)
|
||||
err =
|
||||
connection_retr_fsize_not_known(connection, buffer,
|
||||
sizeof(buffer));
|
||||
else
|
||||
err = connection_retr_fsize_known(connection, buffer, sizeof(buffer));
|
||||
|
||||
close_sock(&connection->data_sock);
|
||||
close_sock(&connection->ctrl_sock);
|
||||
if (err == FILEGETOK)
|
||||
return FTPOK;
|
||||
|
||||
else
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
/* A genuine loop ;) It willed be called by the main thread, and
|
||||
this will handle all possible errors itself, retrying until the number
|
||||
of maximum tries for the connection is realised or a error occurs which
|
||||
needs to be passed upwards for handling, such as LOGINFAIL
|
||||
*/
|
||||
|
||||
uerr_t ftp_loop(connection_t * connection)
|
||||
{
|
||||
boolean retrying_from_loop = FALSE;
|
||||
|
||||
assert(connection->max_attempts >= 0);
|
||||
assert(connection->attempts >= 0);
|
||||
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
do
|
||||
{
|
||||
if (connection->attempts > 0)
|
||||
{
|
||||
|
||||
if (retrying_from_loop == TRUE)
|
||||
{
|
||||
connection_show_message(connection,
|
||||
_("Retrying..Attempt %d in %d seconds"),
|
||||
connection->attempts,
|
||||
connection->retry_delay.tv_sec);
|
||||
delay_ms(connection->retry_delay.tv_sec * 1000);
|
||||
}
|
||||
|
||||
if (connection->resume_support == TRUE)
|
||||
{
|
||||
if (connection_load_resume_info(connection) == -1)
|
||||
{
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("Error while attemting to process download file "));
|
||||
}
|
||||
} else
|
||||
{
|
||||
/*If we cant resume then reset the connections bytesreceived to 0 */
|
||||
connection->remote_bytes_received = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*Push the handler which will cleanup any sockets that are left open */
|
||||
pthread_cleanup_push(cleanup_socks, (void *) connection);
|
||||
|
||||
|
||||
connection->err = proz_ftp_get_file(connection);
|
||||
/*pop the handler */
|
||||
pthread_cleanup_pop(0);
|
||||
|
||||
connection->attempts++;
|
||||
|
||||
/*Should the error be handled at this level ? */
|
||||
if (!ftp_loop_handle_error(connection->err))
|
||||
{
|
||||
return connection->err; /*If not return and the main thread will handle it */
|
||||
}
|
||||
|
||||
|
||||
|
||||
switch (connection->err)
|
||||
{
|
||||
case FTPOK:
|
||||
connection_show_message(connection, _("Successfully got download"));
|
||||
return connection->err;
|
||||
break;
|
||||
|
||||
default:
|
||||
connection_show_message(connection,
|
||||
_("Error occured in connection..."));
|
||||
break;
|
||||
}
|
||||
retrying_from_loop = TRUE;
|
||||
}
|
||||
while ((connection->attempts < connection->max_attempts)
|
||||
|| connection->max_attempts == 0);
|
||||
|
||||
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("I have tried %d attempt(s) and have failed, aborting"),
|
||||
connection->attempts);
|
||||
return connection->err;
|
||||
}
|
||||
|
||||
/*Return true if it is a error which can be handled within the ftp_loop,
|
||||
or false if it should be passed upwards so that the main download thread can
|
||||
restart it when necessary after processing other threads status too */
|
||||
boolean ftp_loop_handle_error(uerr_t err)
|
||||
{
|
||||
|
||||
proz_debug("Error encountered in ftp_loop is %d", err);
|
||||
if (err == FTPNSFOD || err == FTPLOGREFUSED || err == FTPCONREFUSED
|
||||
|| err == FWRITEERR || err == FOPENERR || err == FTPCWDFAIL
|
||||
|| err == FTPRESTFAIL)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
40
libprozilla/src/ftp-retr.h
Normal file
40
libprozilla/src/ftp-retr.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* $Id: ftp-retr.h,v 1.6 2001/06/25 12:30:55 kalum Exp $ */
|
||||
|
||||
#ifndef FTP_RETR_H
|
||||
#define FTP_RETR_H
|
||||
|
||||
#include "common.h"
|
||||
#include "connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
uerr_t proz_ftp_get_file(connection_t * connection);
|
||||
uerr_t ftp_loop(connection_t * connection);
|
||||
boolean ftp_loop_handle_error(uerr_t err);
|
||||
uerr_t ftp_get_file_from_http_proxy(connection_t * connection);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* FTP_RETR_H */
|
||||
1257
libprozilla/src/ftp.c
Normal file
1257
libprozilla/src/ftp.c
Normal file
File diff suppressed because it is too large
Load Diff
77
libprozilla/src/ftp.h
Normal file
77
libprozilla/src/ftp.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* FTP support. */
|
||||
|
||||
/* $Id: ftp.h,v 1.35 2005/09/04 00:06:50 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef FTP_H
|
||||
#define FTP_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "url.h"
|
||||
#include "connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int ftp_check_msg(connection_t * connection, int len);
|
||||
int ftp_read_msg(connection_t * connection, int len);
|
||||
uerr_t ftp_send_msg(connection_t * connection, const char *format, ...);
|
||||
|
||||
uerr_t ftp_get_line(connection_t * connection, char *line);
|
||||
|
||||
uerr_t ftp_ascii(connection_t * connection);
|
||||
uerr_t ftp_binary(connection_t * connection);
|
||||
uerr_t ftp_port(connection_t * connection, const char *command);
|
||||
uerr_t ftp_list(connection_t * connection, const char *file);
|
||||
uerr_t ftp_retr(connection_t * connection, const char *file);
|
||||
uerr_t ftp_pasv(connection_t * connection, unsigned char *addr);
|
||||
uerr_t ftp_rest(connection_t * connection, off_t bytes);
|
||||
uerr_t ftp_cwd(connection_t * connection, const char *dir);
|
||||
uerr_t ftp_pwd(connection_t * connection, char *dir);
|
||||
uerr_t ftp_size(connection_t * connection, const char *file, off_t *size);
|
||||
|
||||
uerr_t ftp_connect_to_server(connection_t * connection, const char *name,
|
||||
int port);
|
||||
|
||||
uerr_t ftp_get_listen_socket(connection_t * connection,
|
||||
int *listen_sock);
|
||||
|
||||
uerr_t ftp_login(connection_t * connection, const char *username,
|
||||
const char *passwd);
|
||||
|
||||
boolean ftp_use_proxy(connection_t * connection);
|
||||
|
||||
uerr_t proz_ftp_get_url_info(connection_t * connection);
|
||||
|
||||
uerr_t ftp_setup_data_sock_1(connection_t * connection,
|
||||
boolean * passive_mode);
|
||||
uerr_t ftp_setup_data_sock_2(connection_t * connection,
|
||||
boolean * passive_mode);
|
||||
uerr_t ftp_get_url_info_loop(connection_t * connection);
|
||||
|
||||
uerr_t ftp_get_url_info_from_http_proxy(connection_t * connection);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* FTP_H */
|
||||
225
libprozilla/src/ftpparse.c
Normal file
225
libprozilla/src/ftpparse.c
Normal file
@@ -0,0 +1,225 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
//Rewrite of the ftp parsing code as we needed to extract the date of
|
||||
//the file to save it when the downloading is complete.
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "ftpparse.h"
|
||||
#include "prozilla.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/* MultiNet (some spaces removed from examples) */
|
||||
/* "00README.TXT;1 2 30-DEC-1996 17:44 [SYSTEM] (RWED,RWED,RE,RE)" */
|
||||
/* "CORE.DIR;1 1 8-SEP-1996 16:09 [SYSTEM] (RWE,RWE,RE,RE)" */
|
||||
/* and non-MutliNet VMS: */
|
||||
/* "CII-MANUAL.TEX;1 213/216 29-JAN-1996 03:33:12 [ANONYMOU,ANONYMOUS] (RWED,RWED,,)" */
|
||||
|
||||
/* MSDOS format */
|
||||
/* 04-27-00 09:09PM <DIR> licensed */
|
||||
/* 07-18-00 10:16AM <DIR> pub */
|
||||
/* 04-14-00 03:47PM 589 readme.htm */
|
||||
|
||||
|
||||
|
||||
long getlong(char *buf,int len)
|
||||
{
|
||||
long u = 0;
|
||||
while (len-- > 0)
|
||||
u = u * 10 + (*buf++ - '0');
|
||||
return u;
|
||||
}
|
||||
|
||||
|
||||
/* Find next Field
|
||||
** ---------------
|
||||
** Finds the next RFC822 token in a string
|
||||
** On entry,
|
||||
** *pstr points to a string containing a word separated
|
||||
** by white white space "," ";" or "=". The word
|
||||
** can optionally be quoted using <"> or "<" ">"
|
||||
** Comments surrrounded by '(' ')' are filtered out
|
||||
**
|
||||
** On exit,
|
||||
** *pstr has been moved to the first delimiter past the
|
||||
** field
|
||||
** THE STRING HAS BEEN MUTILATED by a 0 terminator
|
||||
**
|
||||
** Returns a pointer to the first word or NULL on error
|
||||
*/
|
||||
char * get_nextfield (char ** pstr)
|
||||
{
|
||||
char * p = *pstr;
|
||||
|
||||
char * start = NULL;
|
||||
if (!pstr || !*pstr) return NULL;
|
||||
while (1) {
|
||||
/* Strip white space and other delimiters */
|
||||
while (*p && (isspace((int) *p) || *p==',' || *p==';' || *p=='=')) p++;
|
||||
if (!*p) {
|
||||
*pstr = p;
|
||||
return NULL; /* No field */
|
||||
}
|
||||
|
||||
if (*p == '"') { /* quoted field */
|
||||
start = ++p;
|
||||
for(;*p && *p!='"'; p++)
|
||||
if (*p == '\\' && *(p+1)) p++; /* Skip escaped chars */
|
||||
break; /* kr95-10-9: needs to stop here */
|
||||
} else if (*p == '<') { /* quoted field */
|
||||
start = ++p;
|
||||
for(;*p && *p!='>'; p++)
|
||||
if (*p == '\\' && *(p+1)) p++; /* Skip escaped chars */
|
||||
break; /* kr95-10-9: needs to stop here */
|
||||
} else if (*p == '(') { /* Comment */
|
||||
for(;*p && *p!=')'; p++)
|
||||
if (*p == '\\' && *(p+1)) p++; /* Skip escaped chars */
|
||||
p++;
|
||||
} else { /* Spool field */
|
||||
start = p;
|
||||
while(*p && !isspace((int) *p) && *p!=',' && *p!=';' && *p!='=')
|
||||
p++;
|
||||
break; /* Got it */
|
||||
}
|
||||
}
|
||||
if (*p) *p++ = '\0';
|
||||
*pstr = p;
|
||||
return start;
|
||||
}
|
||||
|
||||
|
||||
|
||||
uerr_t ftp_parse(ftpparse *fp,char *buf,int len)
|
||||
{
|
||||
|
||||
char *cp;
|
||||
char *token;
|
||||
char *ptr;
|
||||
char *date;
|
||||
int i;
|
||||
fp->filename = 0;
|
||||
fp->namelen = 0;
|
||||
// fp->flagtrycwd = 0;
|
||||
// fp->flagtryretr = 0;
|
||||
//fp->sizetype = FTPPARSE_SIZE_UNKNOWN;
|
||||
fp->filesize = 0;
|
||||
// fp->mtimetype = FTPPARSE_MTIME_UNKNOWN;
|
||||
fp->mtime = 0;
|
||||
// fp->idtype = FTPPARSE_ID_UNKNOWN;
|
||||
fp->id = 0;
|
||||
// fp->idlen = 0;
|
||||
|
||||
proz_debug("FTP LIST to be parsed is %s", cp=strdup(buf));
|
||||
free(cp);
|
||||
|
||||
if (len < 2) /* an empty name in EPLF, with no info, could be 2 chars */
|
||||
return FTPPARSENOTEXIST;
|
||||
|
||||
switch(*buf) {
|
||||
case 'b':
|
||||
case 'c':
|
||||
case 'd':
|
||||
case 'l':
|
||||
case 'p':
|
||||
case 's':
|
||||
case '-':
|
||||
/* UNIX-style listing, without inum and without blocks */
|
||||
/* "-rw-r--r-- 1 root other 531 Jan 29 03:26 README" */
|
||||
/* "dr-xr-xr-x 2 root other 512 Apr 8 1994 etc" */
|
||||
/* "dr-xr-xr-x 2 root 512 Apr 8 1994 etc" */
|
||||
/* "lrwxrwxrwx 1 root other 7 Jan 25 00:17 bin -> usr/bin" */
|
||||
/* Also produced by Microsoft's FTP servers for Windows: */
|
||||
/* "---------- 1 owner group 1803128 Jul 10 10:18 ls-lR.Z" */
|
||||
/* "d--------- 1 owner group 0 May 9 19:45 Softlib" */
|
||||
/* Also WFTPD for MSDOS: */
|
||||
/* "-rwxrwxrwx 1 noone nogroup 322 Aug 19 1996 message.ftp" */
|
||||
/* Also NetWare: */
|
||||
/* "d [R----F--] supervisor 512 Jan 16 18:53 login" */
|
||||
/* "- [R----F--] rhesus 214059 Oct 20 15:27 cx.exe" */
|
||||
/* Also NetPresenz for the Mac: */
|
||||
/* "-------r-- 326 1391972 1392298 Nov 22 1995 MegaPhone.sit" */
|
||||
/* "drwxrwxr-x folder 2 May 10 1996 network"
|
||||
*/
|
||||
|
||||
if (*buf == 'd') fp->filetype = DIRECTORY;
|
||||
if (*buf == '-') fp->filetype = DIRECTORY;
|
||||
if (*buf == 'l') fp->filetype = SYMBOLIC_LINK;
|
||||
ptr=cp=strdup(buf);
|
||||
|
||||
for (i=0;i<4;i++)
|
||||
{
|
||||
//add checking
|
||||
token= get_nextfield(&cp);
|
||||
if(token == NULL) //failed to parse
|
||||
return FTPPARSEFAIL;
|
||||
}
|
||||
/*
|
||||
** This field can either be group or size. We find out by looking at the
|
||||
** next field. If this is a non-digit then this field is the size.
|
||||
*/
|
||||
while (*cp && isspace((int) *cp)) cp++;
|
||||
if (isdigit((int) *cp)) {
|
||||
token = get_nextfield(&cp);
|
||||
while (*cp && isspace((int) *cp)) cp++;
|
||||
}
|
||||
//if it is a filename
|
||||
fp->filesize=strtol(token,NULL,10);
|
||||
proz_debug("FTP file size is %ld", fp->filesize);
|
||||
|
||||
|
||||
while (*cp && isspace((int) *cp)) cp++;
|
||||
assert(cp+12<ptr+len);
|
||||
date = cp;
|
||||
cp += 12;
|
||||
*cp++ = '\0';
|
||||
fp->date_str = strdup(date);
|
||||
|
||||
proz_debug("LIST date is %s", fp->date_str);
|
||||
|
||||
return FTPPARSEOK;
|
||||
default:
|
||||
return FTPPARSEFAIL;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
time_t parse_time(const char * str)
|
||||
{
|
||||
|
||||
char * p;
|
||||
struct tm tm;
|
||||
time_t t;
|
||||
|
||||
if (!str) return 0;
|
||||
|
||||
if ((p = strchr(str, ',')))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
53
libprozilla/src/ftpparse.h
Normal file
53
libprozilla/src/ftpparse.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* FTP LIST command parsing code. */
|
||||
|
||||
/* $Id: ftpparse.h,v 1.15 2005/08/06 17:07:35 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef FTPPARSE_H
|
||||
#define FTPPARSE_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct ftpparse {
|
||||
char *filename;
|
||||
int namelen;
|
||||
off_t filesize; /* number of octets */
|
||||
// int mtimetype;
|
||||
time_t mtime; /* modification time */
|
||||
file_type_t filetype;
|
||||
char *id; /* not necessarily 0-terminated */
|
||||
char *date_str;
|
||||
}ftpparse ;
|
||||
|
||||
|
||||
uerr_t ftp_parse(ftpparse *fp,char *buf,int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* FTPPARSE_H */
|
||||
1112
libprozilla/src/ftpsearch.c
Normal file
1112
libprozilla/src/ftpsearch.c
Normal file
File diff suppressed because it is too large
Load Diff
29
libprozilla/src/ftpsearch.h
Normal file
29
libprozilla/src/ftpsearch.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#ifndef FTPSEARCH_H
|
||||
#define FTPSEARCH_H
|
||||
|
||||
|
||||
int ftpsearch_get_server_position(ftps_request_t * request, char *server);
|
||||
int ftpsearch_get_path_position(ftps_request_t * request, char *server,
|
||||
char *path);
|
||||
|
||||
#endif
|
||||
530
libprozilla/src/http-retr.c
Normal file
530
libprozilla/src/http-retr.c
Normal file
@@ -0,0 +1,530 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* $Id: http-retr.c,v 1.20 2005/03/31 20:10:57 sean Exp $ */
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "connect.h"
|
||||
#include "misc.h"
|
||||
#include "url.h"
|
||||
#include "netrc.h"
|
||||
#include "debug.h"
|
||||
#include "http.h"
|
||||
#include "http-retr.h"
|
||||
|
||||
/* Will download a portion of/or the full file from the connection->url.
|
||||
*/
|
||||
uerr_t proz_http_get_file(connection_t * connection)
|
||||
{
|
||||
uerr_t err;
|
||||
int remote_port_len;
|
||||
char *user, *passwd, *www_auth = NULL, *proxy_auth = NULL, *range =
|
||||
NULL, *location = NULL, *referer = NULL, *pragma_no_cache = NULL;
|
||||
char *request, *remote_port;
|
||||
netrc_entry *netrc_ent;
|
||||
char buffer[HTTP_BUFFER_SIZE];
|
||||
/*The http stats that were returned after the call with GET */
|
||||
http_stat_t hs_after_get;
|
||||
|
||||
/* we want it to terminate immediately */
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
assert(connection->localfile != NULL);
|
||||
assert(connection->file_mode != NULL);
|
||||
|
||||
/*clear the socks */
|
||||
connection->data_sock = 0;
|
||||
memset(&hs_after_get, 0, sizeof(hs_after_get));
|
||||
|
||||
/* if there is nothing to download then return */
|
||||
if (connection->status == COMPLETED)
|
||||
{
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
gettimeofday(&connection->time_begin, NULL);
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return HOK;
|
||||
}
|
||||
|
||||
connection_change_status(connection, CONNECTING);
|
||||
|
||||
if (http_use_proxy(connection))
|
||||
{
|
||||
connection_show_message(connection, _("Connecting to %s"),
|
||||
connection->http_proxy->proxy_url.host);
|
||||
err = connect_to_server(&connection->data_sock,
|
||||
connection->http_proxy->proxy_url.host,
|
||||
connection->http_proxy->proxy_url.port,
|
||||
&connection->xfer_timeout);
|
||||
if (err != NOCONERROR)
|
||||
{
|
||||
proz_debug(_("Error connecting to %s"),
|
||||
connection->http_proxy->proxy_url.host);
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return err;
|
||||
}
|
||||
} else
|
||||
{
|
||||
connection_show_message(connection, _("Connecting to %s"),
|
||||
connection->u.host);
|
||||
|
||||
err = connect_to_server(&connection->data_sock, connection->u.host,
|
||||
connection->u.port, &connection->xfer_timeout);
|
||||
if (err != NOCONERROR)
|
||||
{
|
||||
proz_debug(_("Error connecting to %s"), connection->u.host);
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
user = connection->u.user;
|
||||
passwd = connection->u.passwd;
|
||||
|
||||
/* Use .netrc if asked to do so. */
|
||||
if (connection->use_netrc == TRUE)
|
||||
{
|
||||
netrc_ent = search_netrc(libprozrtinfo.netrc_list, connection->u.host);
|
||||
|
||||
if (netrc_ent != NULL)
|
||||
{
|
||||
user = netrc_ent->account;
|
||||
passwd = netrc_ent->password;
|
||||
}
|
||||
}
|
||||
|
||||
user = user ? user : "";
|
||||
passwd = passwd ? passwd : "";
|
||||
|
||||
if (strlen(user) || strlen(passwd))
|
||||
{
|
||||
/* Construct the necessary header. */
|
||||
www_auth = get_basic_auth_str(user, passwd, "Authorization");
|
||||
proz_debug(_("Authenticating as user %s password %s"), user, passwd);
|
||||
proz_debug(_("Authentification string=%s"), www_auth);
|
||||
} else
|
||||
www_auth = 0;
|
||||
|
||||
if (http_use_proxy(connection))
|
||||
{
|
||||
if (strlen(connection->http_proxy->username)
|
||||
|| strlen(connection->http_proxy->passwd))
|
||||
proxy_auth =
|
||||
get_basic_auth_str(connection->http_proxy->username,
|
||||
connection->http_proxy->passwd,
|
||||
"Proxy-Authorization");
|
||||
}
|
||||
|
||||
if (connection->u.port == 80)
|
||||
{
|
||||
remote_port = NULL;
|
||||
remote_port_len = 0;
|
||||
} else
|
||||
{
|
||||
remote_port = (char *) alloca(64);
|
||||
remote_port_len = sprintf(remote_port, ":%d", connection->u.port);
|
||||
}
|
||||
|
||||
if (connection->hs.accept_ranges == 1)
|
||||
{
|
||||
range = (char *) alloca(18 + 64);
|
||||
sprintf(range, "Range: bytes=%lld-\r\n", connection->remote_startpos);
|
||||
proz_debug("Range = %lld Range = %s",connection->remote_startpos, range);
|
||||
}
|
||||
|
||||
if (connection->u.referer)
|
||||
{
|
||||
referer = (char *) alloca(13 + strlen(connection->u.referer));
|
||||
sprintf(referer, "Referer: %s\r\n", connection->u.referer);
|
||||
}
|
||||
|
||||
/* If we go through a proxy the request for the URL is different */
|
||||
if (http_use_proxy(connection))
|
||||
{
|
||||
location = (char *) alloca(strlen(connection->u.url) + 1);
|
||||
strcpy(location, connection->u.url);
|
||||
} else
|
||||
{
|
||||
location = (char *) alloca(strlen(connection->u.path) + 1);
|
||||
strcpy(location, connection->u.path);
|
||||
}
|
||||
|
||||
/*Use no-cache directive for proxy servers? */
|
||||
if (http_use_proxy(connection)
|
||||
&& (connection->http_no_cache || connection->attempts > 0))
|
||||
{
|
||||
pragma_no_cache = (char *) alloca(21);
|
||||
sprintf(pragma_no_cache, "Pragma: no-cache\r\n");
|
||||
}
|
||||
|
||||
request = (char *) alloca(strlen(location)
|
||||
+ strlen(connection->user_agent)
|
||||
+ strlen(connection->u.host) + remote_port_len
|
||||
+ (range ? strlen(range) : 0)
|
||||
+ (referer ? strlen(referer) : 0)
|
||||
+ (www_auth ? strlen(www_auth) : 0)
|
||||
+ (proxy_auth ? strlen(proxy_auth) : 0)
|
||||
+ 64
|
||||
+
|
||||
(pragma_no_cache ? strlen(pragma_no_cache) :
|
||||
0));
|
||||
|
||||
/* TODO Add referrer tag. */
|
||||
sprintf(request,
|
||||
"GET %s HTTP/1.0\r\nUser-Agent: %s\r\nHost: %s%s\r\nAccept: */*\r\n%s%s%s%s%s\r\n",
|
||||
location, connection->user_agent, connection->u.host,
|
||||
remote_port ? remote_port : "", range ? range : "",
|
||||
referer ? referer : "",
|
||||
www_auth ? www_auth : "", proxy_auth ? proxy_auth : "",
|
||||
pragma_no_cache ? pragma_no_cache : "");
|
||||
|
||||
proz_debug("2 HTTP request = %s", request);
|
||||
|
||||
connection_show_message(connection, _("Sending HTTP request"));
|
||||
err = http_fetch_headers(connection, &hs_after_get, request);
|
||||
|
||||
/* What hapenned ? */
|
||||
if (err != HOK)
|
||||
{
|
||||
proz_debug("2 http_fetch_headers err != HOK %d", err);
|
||||
/*Check if we authenticated using any user or password and if we
|
||||
were kicked out, if so return HAUTHFAIL */
|
||||
if (err == HAUTHREQ && (strlen(user) || strlen(passwd)))
|
||||
err = HAUTHFAIL;
|
||||
/*
|
||||
* a error occured druing the process
|
||||
*/
|
||||
close_sock(&connection->data_sock);
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return err;
|
||||
}
|
||||
|
||||
/*Check for the server lying about it being able to handle ranges */
|
||||
if (hs_after_get.contlen != -1)
|
||||
{
|
||||
if (connection->resume_support == TRUE)
|
||||
{
|
||||
if (hs_after_get.contlen !=
|
||||
connection->main_file_size - connection->remote_startpos)
|
||||
{
|
||||
proz_debug("Error contlen does not match the requested range!");
|
||||
close_sock(&connection->data_sock);
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return CANTRESUME;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* which routine to call */
|
||||
if (connection->main_file_size == -1)
|
||||
err =
|
||||
connection_retr_fsize_not_known(connection, buffer,
|
||||
sizeof(buffer));
|
||||
else
|
||||
err = connection_retr_fsize_known(connection, buffer, sizeof(buffer));
|
||||
|
||||
close_sock(&connection->data_sock);
|
||||
|
||||
if (err == FILEGETOK)
|
||||
return HOK;
|
||||
else
|
||||
{
|
||||
proz_debug("err != FILEGETOK %d", err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* A genuine loop ;) It willed be called by the main thread, and
|
||||
this will handle all possible errors itself, retrying until the number
|
||||
of maximum tries for the connection is realised
|
||||
*/
|
||||
|
||||
uerr_t http_loop(connection_t * connection)
|
||||
{
|
||||
boolean retrying_from_loop = FALSE;
|
||||
assert(connection->max_attempts >= 0);
|
||||
assert(connection->attempts >= 0);
|
||||
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
do
|
||||
{
|
||||
if (connection->attempts > 0)
|
||||
{
|
||||
|
||||
if (retrying_from_loop == TRUE)
|
||||
{
|
||||
connection_show_message(connection,
|
||||
_("Retrying...Attempt %d in %d seconds"),
|
||||
connection->attempts,
|
||||
connection->retry_delay.tv_sec);
|
||||
delay_ms(connection->retry_delay.tv_sec * 1000);
|
||||
}
|
||||
|
||||
if (connection->resume_support == TRUE)
|
||||
{
|
||||
if (connection_load_resume_info(connection) == -1)
|
||||
{
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("Error while attemting to process download file "));
|
||||
}
|
||||
} else
|
||||
{
|
||||
/*If we cant resume then reset the connections bytesreceived to 0 */
|
||||
connection->remote_bytes_received = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*Push the handler which will cleanup any sockets that are left open */
|
||||
pthread_cleanup_push(cleanup_socks, (void *) connection);
|
||||
connection->err = proz_http_get_file(connection);
|
||||
/*pop the handler */
|
||||
pthread_cleanup_pop(0);
|
||||
|
||||
connection->attempts++;
|
||||
|
||||
/*Should the error be handled at this level ? */
|
||||
if (!http_loop_handle_error(connection->err))
|
||||
{
|
||||
connection_show_message(connection, _("Will be handled in main "));
|
||||
return connection->err; /*If not return and the main thread will handle it */
|
||||
}
|
||||
|
||||
switch (connection->err)
|
||||
{
|
||||
case HOK:
|
||||
connection_show_message(connection, _("Successfully got download"));
|
||||
return connection->err;
|
||||
break;
|
||||
|
||||
/*TODO : What should we do if the file is not found, well pass it up to the main routine */
|
||||
|
||||
default:
|
||||
connection_show_message(connection, proz_strerror(connection->err));
|
||||
break;
|
||||
}
|
||||
|
||||
retrying_from_loop = TRUE;
|
||||
|
||||
}
|
||||
while ((connection->attempts < connection->max_attempts)
|
||||
|| connection->max_attempts == 0);
|
||||
|
||||
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("I have tried %d attempt(s) and have failed, aborting"),
|
||||
connection->attempts);
|
||||
|
||||
return connection->err;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*Return true if it is a error which can be handled within the htp_loop,
|
||||
or false if it should be passed upwards so that the main download thread can
|
||||
restart it when necessary after processing other threads status too */
|
||||
boolean http_loop_handle_error(uerr_t err)
|
||||
{
|
||||
proz_debug("Error encountered in http_loop is %d", err);
|
||||
if (err == HTTPNSFOD || err == FWRITEERR || err == FOPENERR
|
||||
|| err == CANTRESUME)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
I am writing a seperate function to handle FTP proxying through HTTP, I
|
||||
MHO whoever thought of using HTTP to proxy FTP is a shithead,
|
||||
its such a PITA ;)
|
||||
*/
|
||||
uerr_t ftp_get_file_from_http_proxy(connection_t * connection)
|
||||
{
|
||||
|
||||
uerr_t err;
|
||||
int remote_port_len;
|
||||
char *user, *passwd, *www_auth = NULL, *proxy_auth = NULL, *range =
|
||||
NULL, *pragma_no_cache = NULL;
|
||||
|
||||
char *request, *remote_port;
|
||||
netrc_entry *netrc_ent;
|
||||
char buffer[HTTP_BUFFER_SIZE];
|
||||
/*The http stats that were returned after the call with GET */
|
||||
http_stat_t hs_after_get;
|
||||
|
||||
/* we want it to terminate immediately */
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
memset(&connection->hs, 0, sizeof(connection->hs));
|
||||
memset(&hs_after_get, 0, sizeof(hs_after_get));
|
||||
|
||||
/* if there is nothing to download then return */
|
||||
if (connection->status == COMPLETED)
|
||||
{
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
gettimeofday(&connection->time_begin, NULL);
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return FTPOK;
|
||||
}
|
||||
|
||||
err = connect_to_server(&connection->data_sock,
|
||||
connection->ftp_proxy->proxy_url.host,
|
||||
connection->ftp_proxy->proxy_url.port,
|
||||
&connection->xfer_timeout);
|
||||
|
||||
if (err != NOCONERROR)
|
||||
{
|
||||
connection_show_message(connection, _("Error connecting to %s"),
|
||||
connection->ftp_proxy->proxy_url.host);
|
||||
return err;
|
||||
}
|
||||
|
||||
user = connection->u.user;
|
||||
passwd = connection->u.passwd;
|
||||
|
||||
/* Use .netrc if asked to do so. */
|
||||
if (connection->use_netrc == TRUE)
|
||||
{
|
||||
netrc_ent = search_netrc(libprozrtinfo.netrc_list, connection->u.host);
|
||||
|
||||
if (netrc_ent != NULL)
|
||||
{
|
||||
user = netrc_ent->account;
|
||||
passwd = netrc_ent->password;
|
||||
}
|
||||
}
|
||||
|
||||
user = user ? user : "";
|
||||
passwd = passwd ? passwd : "";
|
||||
|
||||
if (strlen(user) || strlen(passwd))
|
||||
{
|
||||
/* Construct the necessary header. */
|
||||
www_auth = get_basic_auth_str(user, passwd, "Authorization");
|
||||
proz_debug(_("Authenticating as user %s password %s"), user, passwd);
|
||||
proz_debug(_("Authentification string=%s"), www_auth);
|
||||
} else
|
||||
www_auth = 0;
|
||||
|
||||
if (strlen(connection->ftp_proxy->username)
|
||||
|| strlen(connection->ftp_proxy->passwd))
|
||||
proxy_auth =
|
||||
get_basic_auth_str(connection->ftp_proxy->username,
|
||||
connection->ftp_proxy->passwd,
|
||||
"Proxy-Authorization");
|
||||
|
||||
remote_port = (char *) alloca(64);
|
||||
remote_port_len = sprintf(remote_port, ":%d", connection->u.port);
|
||||
|
||||
if (connection->hs.accept_ranges == 1)
|
||||
{
|
||||
range = (char *) alloca(18 + 64);
|
||||
sprintf(range, "Range: bytes=%lld-\r\n", connection->remote_startpos);
|
||||
}
|
||||
|
||||
|
||||
/*Use no-cache directive for proxy servers? */
|
||||
if (http_use_proxy(connection)
|
||||
&& (connection->http_no_cache || connection->attempts > 0))
|
||||
{
|
||||
pragma_no_cache = (char *) alloca(21);
|
||||
sprintf(pragma_no_cache, "Pragma: no-cache\r\n");
|
||||
}
|
||||
|
||||
|
||||
/*Referrer TAG should not be needed in FTP through HTTP proxy..right */
|
||||
|
||||
|
||||
request = (char *) alloca(strlen(connection->u.url)
|
||||
+ strlen(connection->user_agent)
|
||||
+ strlen(connection->u.host) + remote_port_len
|
||||
+ (range ? strlen(range) : 0)
|
||||
+ (www_auth ? strlen(www_auth) : 0)
|
||||
+ (proxy_auth ? strlen(proxy_auth) : 0)
|
||||
+ 64
|
||||
+
|
||||
(pragma_no_cache ? strlen(pragma_no_cache) :
|
||||
0));
|
||||
|
||||
|
||||
/* TODO Add referrer tag. */
|
||||
sprintf(request,
|
||||
"GET %s HTTP/1.0\r\nUser-Agent: %s\r\nHost: %s%s\r\nAccept: */*\r\n%s%s%s%s\r\n",
|
||||
connection->u.url, connection->user_agent, connection->u.host,
|
||||
remote_port ? remote_port : "", range ? range : "",
|
||||
www_auth ? www_auth : "", proxy_auth ? proxy_auth : "",
|
||||
pragma_no_cache ? pragma_no_cache : "");
|
||||
|
||||
proz_debug("HTTP request = %s", request);
|
||||
|
||||
connection_show_message(connection, _("Sending HTTP request"));
|
||||
err = http_fetch_headers(connection, &hs_after_get, request);
|
||||
|
||||
|
||||
|
||||
if (err == HAUTHREQ)
|
||||
{
|
||||
connection_change_status(connection, LOGINFAIL);
|
||||
return FTPLOGREFUSED;
|
||||
} else if (err == HTTPNSFOD)
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return FTPNSFOD;
|
||||
} else if (err != HOK)
|
||||
{
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return FTPERR;
|
||||
}
|
||||
|
||||
/*Check for the server lying about it being able to handle ranges */
|
||||
if (hs_after_get.contlen != -1)
|
||||
{
|
||||
if (connection->resume_support == TRUE)
|
||||
{
|
||||
if (hs_after_get.contlen !=
|
||||
connection->main_file_size - connection->remote_startpos)
|
||||
{
|
||||
proz_debug("Error contlen does not match the requested range!");
|
||||
connection_change_status(connection, REMOTEFATAL);
|
||||
return CANTRESUME;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* which routine to call */
|
||||
if (connection->main_file_size == -1)
|
||||
err =
|
||||
connection_retr_fsize_not_known(connection, buffer,
|
||||
sizeof(buffer));
|
||||
else
|
||||
err = connection_retr_fsize_known(connection, buffer, sizeof(buffer));
|
||||
|
||||
close_sock(&connection->data_sock);
|
||||
|
||||
if (err == FILEGETOK)
|
||||
return FTPOK;
|
||||
else
|
||||
return err;
|
||||
|
||||
}
|
||||
39
libprozilla/src/http-retr.h
Normal file
39
libprozilla/src/http-retr.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* $Id: http-retr.h,v 1.5 2001/06/25 12:30:56 kalum Exp $ */
|
||||
|
||||
|
||||
#ifndef HTTP_RETR_H
|
||||
#define HTTP_RETR_H
|
||||
|
||||
#include "common.h"
|
||||
#include "connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
uerr_t proz_http_get_file(connection_t * connection);
|
||||
uerr_t http_loop(connection_t * connection);
|
||||
boolean http_loop_handle_error(uerr_t err);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* FTP_RETR_H */
|
||||
901
libprozilla/src/http.c
Normal file
901
libprozilla/src/http.c
Normal file
@@ -0,0 +1,901 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* HTTP support. */
|
||||
|
||||
/* $Id: http.c,v 1.22 2005/03/31 20:10:57 sean Exp $ */
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "misc.h"
|
||||
#include "connect.h"
|
||||
#include "debug.h"
|
||||
#include "http.h"
|
||||
|
||||
|
||||
/* Some status code validation macros: */
|
||||
#define H_20X(x) (((x) >= 200) && ((x) < 300))
|
||||
#define H_PARTIAL(x) ((x) == HTTP_PARTIAL_CONTENTS)
|
||||
#define H_REDIRECTED(x) (((x) == HTTP_MOVED_PERMANENTLY) || ((x) == HTTP_MOVED_TEMPORARILY))
|
||||
|
||||
|
||||
/* HTTP/1.0 status codes from RFC1945, given for reference. */
|
||||
|
||||
/* Successful 2xx. */
|
||||
#define HTTP_OK 200
|
||||
#define HTTP_CREATED 201
|
||||
#define HTTP_ACCEPTED 202
|
||||
#define HTTP_NO_CONTENT 204
|
||||
#define HTTP_PARTIAL_CONTENTS 206
|
||||
|
||||
/* Redirection 3xx. */
|
||||
#define HTTP_MULTIPLE_CHOICES 300
|
||||
#define HTTP_MOVED_PERMANENTLY 301
|
||||
#define HTTP_MOVED_TEMPORARILY 302
|
||||
#define HTTP_NOT_MODIFIED 304
|
||||
|
||||
/* Client error 4xx. */
|
||||
#define HTTP_BAD_REQUEST 400
|
||||
#define HTTP_UNAUTHORIZED 401
|
||||
#define HTTP_FORBIDDEN 403
|
||||
#define HTTP_NOT_FOUND 404
|
||||
|
||||
/* Server errors 5xx. */
|
||||
#define HTTP_INTERNAL 500
|
||||
#define HTTP_NOT_IMPLEMENTED 501
|
||||
#define HTTP_BAD_GATEWAY 502
|
||||
#define HTTP_UNAVAILABLE 503
|
||||
#define HTTP_GATEWAY_TIMEOUT 504
|
||||
|
||||
#define DYNAMIC_LINE_BUFFER 40
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
int buf_readchar(int fd, char *ret, struct timeval *timeout)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = krecv(fd, ret, 1, 0, timeout);
|
||||
|
||||
if (res <= 0)
|
||||
return res;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
This is similar to buf_readchar(), only it doesn't move the buffer position.
|
||||
******************************************************************************/
|
||||
int buf_peek(int fd, char *ret, struct timeval *timeout)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = krecv(fd, ret, 1, MSG_PEEK, timeout);
|
||||
|
||||
if (res <= 0)
|
||||
return res;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Function to fetch a header from socket/file descriptor fd. The header may be
|
||||
of arbitrary length, since the function allocates as much memory as necessary
|
||||
for the header to fit. Most errors are handled.
|
||||
|
||||
The header may be terminated by LF or CRLF. If the character after LF is SP
|
||||
or HT (horizontal tab), the header spans to another line (continuation
|
||||
header), as per RFC2068.
|
||||
|
||||
The trailing CRLF or LF are stripped from the header, and it is
|
||||
zero-terminated.
|
||||
******************************************************************************/
|
||||
uerr_t fetch_next_header(int fd, char **hdr, struct timeval * timeout)
|
||||
{
|
||||
int i, bufsize, res;
|
||||
char next;
|
||||
|
||||
bufsize = DYNAMIC_LINE_BUFFER;
|
||||
*hdr = kmalloc(bufsize);
|
||||
|
||||
for (i = 0; 1; i++)
|
||||
{
|
||||
if (i > bufsize - 1)
|
||||
*hdr = krealloc(*hdr, (bufsize <<= 1));
|
||||
|
||||
res = buf_readchar(fd, *hdr + i, timeout);
|
||||
|
||||
if (res == 1)
|
||||
{
|
||||
if ((*hdr)[i] == '\n')
|
||||
{
|
||||
if (!(i == 0 || (i == 1 && (*hdr)[0] == '\r')))
|
||||
{
|
||||
/* If the header is non-empty, we need to check if it continues on
|
||||
to the other line. We do that by getting the next character
|
||||
without actually downloading it (i.e. peeking it). */
|
||||
res = buf_peek(fd, &next, timeout);
|
||||
|
||||
if (res == 0)
|
||||
return HEOF;
|
||||
else if (res == -1)
|
||||
return HERR;
|
||||
|
||||
/* If the next character is SP or HT, just continue. */
|
||||
if (next == '\t' || next == ' ')
|
||||
continue;
|
||||
}
|
||||
|
||||
/* The header ends. */
|
||||
(*hdr)[i] = '\0';
|
||||
|
||||
/* Get rid of '\r'. */
|
||||
if (i > 0 && (*hdr)[i - 1] == '\r')
|
||||
(*hdr)[i - 1] = '\0';
|
||||
|
||||
break;
|
||||
}
|
||||
} else if (res == 0)
|
||||
return HEOF;
|
||||
else
|
||||
return HERR;
|
||||
}
|
||||
|
||||
return HOK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
int hparsestatline(const char *hdr, const char **rp)
|
||||
{
|
||||
int mjr, mnr; /* HTTP major and minor version. */
|
||||
int statcode; /* HTTP status code. */
|
||||
const char *p;
|
||||
|
||||
*rp = NULL;
|
||||
/* The standard format of HTTP-Version is: HTTP/x.y, where x is major
|
||||
version, and y is minor version. */
|
||||
if (strncmp(hdr, "HTTP/", 5) != 0)
|
||||
return -1;
|
||||
|
||||
hdr += 5;
|
||||
p = hdr;
|
||||
|
||||
for (mjr = 0; isdigit(*hdr); hdr++)
|
||||
mjr = 10 * mjr + (*hdr - '0');
|
||||
|
||||
if (*hdr != '.' || p == hdr)
|
||||
return -1;
|
||||
|
||||
++hdr;
|
||||
p = hdr;
|
||||
|
||||
for (mnr = 0; isdigit(*hdr); hdr++)
|
||||
mnr = 10 * mnr + (*hdr - '0');
|
||||
|
||||
if (*hdr != ' ' || p == hdr)
|
||||
return -1;
|
||||
|
||||
/* Wget will accept only 1.0 and higher HTTP-versions. The value of minor
|
||||
version can be safely ignored. */
|
||||
if (mjr < 1)
|
||||
return -1;
|
||||
|
||||
/* Skip the space. */
|
||||
++hdr;
|
||||
if (!(isdigit(*hdr) && isdigit(hdr[1]) && isdigit(hdr[2])))
|
||||
return -1;
|
||||
|
||||
statcode = 100 * (*hdr - '0') + 10 * (hdr[1] - '0') + (hdr[2] - '0');
|
||||
/* RFC2068 requires a SPC here, even if there is no reason-phrase. As some
|
||||
servers/CGI are (incorrectly) setup to drop the SPC, we'll be liberal
|
||||
and allow the status line to end here. */
|
||||
if (hdr[3] != ' ')
|
||||
{
|
||||
if (!hdr[3])
|
||||
*rp = hdr + 3;
|
||||
else
|
||||
return -1;
|
||||
} else
|
||||
*rp = hdr + 4;
|
||||
|
||||
return statcode;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Skip LWS (linear white space), if present. Returns number of characters to
|
||||
skip.
|
||||
******************************************************************************/
|
||||
int hskip_lws(const char *hdr)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0;
|
||||
*hdr == ' ' || *hdr == '\t' || *hdr == '\r' || *hdr == '\n'; ++hdr)
|
||||
++i;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Return the content length of the document body, if this is Content-length
|
||||
header, -1 otherwise.
|
||||
******************************************************************************/
|
||||
off_t hgetlen(const char *hdr)
|
||||
{
|
||||
const int l = 15; /* strlen("content-length:"). */
|
||||
off_t len;
|
||||
|
||||
if (strncasecmp(hdr, "content-length:", l))
|
||||
return -1;
|
||||
|
||||
hdr += (l + hskip_lws(hdr + l));
|
||||
if (!*hdr)
|
||||
return -1;
|
||||
|
||||
if (!isdigit(*hdr))
|
||||
return -1;
|
||||
|
||||
for (len = 0; isdigit(*hdr); hdr++)
|
||||
len = 10 * len + (*hdr - '0');
|
||||
|
||||
proz_debug("contenlen %s contentlen %lld",*hdr,len);
|
||||
return len;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Return the content-range in bytes, as returned by the server, if this is
|
||||
Content-range header, -1 otherwise.
|
||||
******************************************************************************/
|
||||
off_t hgetrange(const char *hdr)
|
||||
{
|
||||
const int l = 14; /* strlen("content-range:"). */
|
||||
off_t len;
|
||||
|
||||
if (strncasecmp(hdr, "content-range:", l))
|
||||
return -1;
|
||||
|
||||
hdr += (l + hskip_lws(hdr + l));
|
||||
if (!*hdr)
|
||||
return -1;
|
||||
|
||||
/* Nutscape proxy server sends content-length without "bytes" specifier,
|
||||
which is a breach of HTTP/1.1 draft. But heck, I must support it... */
|
||||
if (!strncasecmp(hdr, "bytes", 5))
|
||||
{
|
||||
hdr += 5;
|
||||
hdr += hskip_lws(hdr);
|
||||
if (!*hdr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!isdigit(*hdr))
|
||||
return -1;
|
||||
|
||||
for (len = 0; isdigit(*hdr); hdr++)
|
||||
len = 10 * len + (*hdr - '0');
|
||||
|
||||
proz_debug("range %s range %lld",*hdr,len);
|
||||
return len;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Returns a malloc-ed copy of the location of the document, if the string hdr
|
||||
begins with LOCATION_H, or NULL.
|
||||
******************************************************************************/
|
||||
char *hgetlocation(const char *hdr)
|
||||
{
|
||||
const int l = 9; /* strlen("location:"). */
|
||||
|
||||
if (strncasecmp(hdr, "location:", l))
|
||||
return NULL;
|
||||
|
||||
hdr += (l + hskip_lws(hdr + l));
|
||||
|
||||
return kstrdup(hdr);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Returns a malloc-ed copy of the last-modified date of the document, if the
|
||||
hdr begins with LASTMODIFIED_H.
|
||||
******************************************************************************/
|
||||
char *hgetmodified(const char *hdr)
|
||||
{
|
||||
const int l = 14; /* strlen("last-modified:"). */
|
||||
|
||||
if (strncasecmp(hdr, "last-modified:", l))
|
||||
return NULL;
|
||||
|
||||
hdr += (l + hskip_lws(hdr + l));
|
||||
|
||||
return kstrdup(hdr);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
Returns 0 if the header is accept-ranges, and it contains the word "none",
|
||||
-1 if there is no accept ranges, 1 is there is accept-ranges and it is not
|
||||
none.
|
||||
******************************************************************************/
|
||||
int hgetaccept_ranges(const char *hdr)
|
||||
{
|
||||
const int l = 14; /* strlen("accept-ranges:"). */
|
||||
|
||||
if (strncasecmp(hdr, "accept-ranges:", l))
|
||||
return -1;
|
||||
|
||||
hdr += (l + hskip_lws(hdr + l));
|
||||
|
||||
if (strstr(hdr, "none"))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
uerr_t http_fetch_headers(connection_t * connection, http_stat_t * hs,
|
||||
char *command)
|
||||
{
|
||||
uerr_t err;
|
||||
int num_written, hcount, statcode, all_length;
|
||||
off_t contlen, contrange;
|
||||
char *hdr, *type, *all_headers;
|
||||
const char *error;
|
||||
|
||||
hs->len = 0L;
|
||||
hs->contlen = -1;
|
||||
hs->accept_ranges = -1;
|
||||
hs->res = -1;
|
||||
hs->newloc = NULL;
|
||||
hs->remote_time = NULL;
|
||||
hs->error = NULL;
|
||||
|
||||
num_written = ksend(connection->data_sock, command, strlen(command), 0,
|
||||
&connection->xfer_timeout);
|
||||
if (num_written != strlen(command))
|
||||
{
|
||||
proz_debug(_("Failed writing HTTP request"));
|
||||
return WRITEERR;
|
||||
}
|
||||
|
||||
all_headers = NULL;
|
||||
all_length = 0;
|
||||
contlen = contrange = -1;
|
||||
statcode = -1;
|
||||
type = NULL;
|
||||
|
||||
/* Header-fetching loop. */
|
||||
hcount = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
++hcount;
|
||||
|
||||
/* Get the header. */
|
||||
err = fetch_next_header(connection->data_sock, &hdr,
|
||||
&connection->xfer_timeout);
|
||||
|
||||
proz_debug(_("Header = %s"), hdr);
|
||||
|
||||
if (err == HEOF)
|
||||
{
|
||||
proz_debug(_("End of file while parsing headers"));
|
||||
|
||||
kfree(hdr);
|
||||
if (type)
|
||||
kfree(type);
|
||||
if (all_headers)
|
||||
kfree(all_headers);
|
||||
|
||||
return HEOF;
|
||||
} else if (err == HERR)
|
||||
{
|
||||
proz_debug(_("Read error in headers"));
|
||||
|
||||
kfree(hdr);
|
||||
if (type)
|
||||
kfree(type);
|
||||
if (all_headers)
|
||||
kfree(all_headers);
|
||||
|
||||
return HERR;
|
||||
}
|
||||
|
||||
/* Exit on empty header. */
|
||||
if (!*hdr)
|
||||
{
|
||||
kfree(hdr);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check for errors documented in the first header. */
|
||||
if (hcount == 1)
|
||||
{
|
||||
statcode = hparsestatline(hdr, &error);
|
||||
hs->statcode = statcode;
|
||||
|
||||
/* Store the descriptive response. */
|
||||
if (statcode == -1) /* Malformed request. */
|
||||
hs->error = kstrdup(_("UNKNOWN"));
|
||||
else if (!*error)
|
||||
hs->error = kstrdup(_("(no description)"));
|
||||
else
|
||||
hs->error = kstrdup(error);
|
||||
}
|
||||
|
||||
if (contlen == -1)
|
||||
{
|
||||
contlen = hgetlen(hdr);
|
||||
hs->contlen = contlen;
|
||||
}
|
||||
|
||||
/* If the server specified a new location then lets store it. */
|
||||
|
||||
if (!hs->newloc)
|
||||
hs->newloc = hgetlocation(hdr);
|
||||
|
||||
if (!hs->remote_time)
|
||||
hs->remote_time = hgetmodified(hdr);
|
||||
|
||||
if (hs->accept_ranges == -1)
|
||||
hs->accept_ranges = hgetaccept_ranges(hdr);
|
||||
|
||||
if (!hs->newloc)
|
||||
hs->newloc = hgetlocation(hdr);
|
||||
|
||||
kfree(hdr);
|
||||
}
|
||||
|
||||
if (H_20X(statcode))
|
||||
return HOK;
|
||||
|
||||
if (H_REDIRECTED(statcode) || statcode == HTTP_MULTIPLE_CHOICES)
|
||||
{
|
||||
/* RFC2068 says that in case of the 300 (multiple choices) response, the
|
||||
server can output a preferred URL through `Location' header; otherwise,
|
||||
the request should be treated like GET. So, if the location is set, it
|
||||
will be a redirection; otherwise, just proceed normally. */
|
||||
if (statcode == HTTP_MULTIPLE_CHOICES && !hs->newloc)
|
||||
return HOK;
|
||||
else
|
||||
{
|
||||
if (all_headers)
|
||||
kfree(all_headers);
|
||||
if (type)
|
||||
kfree(type);
|
||||
return NEWLOCATION;
|
||||
}
|
||||
}
|
||||
|
||||
if (statcode == HTTP_UNAUTHORIZED)
|
||||
return HAUTHREQ;
|
||||
|
||||
if (statcode == HTTP_NOT_FOUND)
|
||||
return HTTPNSFOD;
|
||||
|
||||
if (statcode == HTTP_INTERNAL)
|
||||
return INTERNALSERVERR;
|
||||
|
||||
if (statcode == HTTP_NOT_IMPLEMENTED)
|
||||
return UNKNOWNREQ;
|
||||
|
||||
if (statcode == HTTP_BAD_GATEWAY)
|
||||
return BADGATEWAY;
|
||||
|
||||
if (statcode == HTTP_UNAVAILABLE)
|
||||
return SERVICEUNAVAIL;
|
||||
|
||||
if (statcode == HTTP_GATEWAY_TIMEOUT)
|
||||
return GATEWAYTIMEOUT;
|
||||
|
||||
return HERR;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
char *get_basic_auth_str(char *user, char *passwd, char *auth_header)
|
||||
{
|
||||
char *p1, *p2, *ret;
|
||||
int len = strlen(user) + strlen(passwd) + 1;
|
||||
int b64len = 4 * ((len + 2) / 3);
|
||||
|
||||
p1 = kmalloc(len + 1);
|
||||
sprintf(p1, "%s:%s", user, passwd);
|
||||
p2 = kmalloc(b64len + 1);
|
||||
|
||||
/* Encode username:passwd to base64. */
|
||||
base64_encode(p1, p2, len);
|
||||
ret = kmalloc(strlen(auth_header) + b64len + 11);
|
||||
sprintf(ret, "%s: Basic %s\r\n", auth_header, p2);
|
||||
|
||||
kfree(p1);
|
||||
kfree(p2);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
boolean http_use_proxy(connection_t * connection)
|
||||
{
|
||||
return (connection->http_proxy && connection->http_proxy->use_proxy
|
||||
&& connection->http_proxy->proxy_url.url) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
...
|
||||
******************************************************************************/
|
||||
uerr_t proz_http_get_url_info(connection_t * connection)
|
||||
{
|
||||
uerr_t err;
|
||||
int remote_port_len;
|
||||
char *user, *passwd, *www_auth = NULL, *proxy_auth = NULL,
|
||||
*referer = NULL, *location = NULL, *pragma_no_cache = NULL;
|
||||
char *request, *remote_port;
|
||||
netrc_entry *netrc_ent;
|
||||
|
||||
memset(&connection->hs, 0, sizeof(connection->hs));
|
||||
|
||||
if (http_use_proxy(connection))
|
||||
{
|
||||
connection_show_message(connection, _("Connecting to %s"),
|
||||
connection->http_proxy->proxy_url.host);
|
||||
|
||||
err = connect_to_server(&connection->data_sock,
|
||||
connection->http_proxy->proxy_url.host,
|
||||
connection->http_proxy->proxy_url.port,
|
||||
&connection->xfer_timeout);
|
||||
if (err != NOCONERROR)
|
||||
{
|
||||
connection_show_message(connection, _("Error connecting to %s"),
|
||||
connection->http_proxy->proxy_url.host);
|
||||
return err;
|
||||
}
|
||||
} else
|
||||
{
|
||||
connection_show_message(connection, _("Connecting to %s"),
|
||||
connection->u.host);
|
||||
err = connect_to_server(&connection->data_sock, connection->u.host,
|
||||
connection->u.port, &connection->xfer_timeout);
|
||||
if (err != NOCONERROR)
|
||||
{
|
||||
connection_show_message(connection, _("Error connecting to %s"),
|
||||
connection->u.host);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
user = connection->u.user;
|
||||
passwd = connection->u.passwd;
|
||||
|
||||
/* Use .netrc if asked to do so. */
|
||||
if (connection->use_netrc == TRUE)
|
||||
{
|
||||
netrc_ent = search_netrc(libprozrtinfo.netrc_list, connection->u.host);
|
||||
|
||||
if (netrc_ent != NULL)
|
||||
{
|
||||
user = netrc_ent->account;
|
||||
passwd = netrc_ent->password;
|
||||
}
|
||||
}
|
||||
|
||||
user = user ? user : "";
|
||||
passwd = passwd ? passwd : "";
|
||||
|
||||
if (strlen(user) || strlen(passwd))
|
||||
{
|
||||
/* Construct the necessary header. */
|
||||
www_auth = get_basic_auth_str(user, passwd, "Authorization");
|
||||
proz_debug(_("Authenticating as user %s password %s"), user, passwd);
|
||||
proz_debug(_("Authentification string=%s"), www_auth);
|
||||
} else
|
||||
www_auth = 0;
|
||||
|
||||
if (http_use_proxy(connection))
|
||||
{
|
||||
if (strlen(connection->http_proxy->username)
|
||||
|| strlen(connection->http_proxy->passwd))
|
||||
proxy_auth =
|
||||
get_basic_auth_str(connection->http_proxy->username,
|
||||
connection->http_proxy->passwd,
|
||||
"Proxy-Authorization");
|
||||
}
|
||||
|
||||
if (connection->u.port == 80)
|
||||
{
|
||||
remote_port = NULL;
|
||||
remote_port_len = 0;
|
||||
} else
|
||||
{
|
||||
remote_port = (char *) alloca(64);
|
||||
remote_port_len = sprintf(remote_port, ":%d", connection->u.port);
|
||||
}
|
||||
|
||||
|
||||
if (connection->u.referer)
|
||||
{
|
||||
referer = (char *) alloca(13 + strlen(connection->u.referer));
|
||||
sprintf(referer, "Referer: %s\r\n", connection->u.referer);
|
||||
}
|
||||
|
||||
/* If we go through a proxy the request for the URL is different */
|
||||
if (http_use_proxy(connection))
|
||||
{
|
||||
location = (char *) alloca(strlen(connection->u.url) + 1);
|
||||
strcpy(location, connection->u.url);
|
||||
} else
|
||||
{
|
||||
location = (char *) alloca(strlen(connection->u.path) + 1);
|
||||
strcpy(location, connection->u.path);
|
||||
}
|
||||
|
||||
/*Use no-cache directive for proxy servers? */
|
||||
if (http_use_proxy(connection)
|
||||
&& (connection->http_no_cache || connection->attempts > 0))
|
||||
{
|
||||
pragma_no_cache = (char *) alloca(21);
|
||||
sprintf(pragma_no_cache, "Pragma: no-cache\r\n");
|
||||
}
|
||||
|
||||
request = (char *) alloca(strlen(location)
|
||||
+ strlen(connection->user_agent)
|
||||
+ strlen(connection->u.host) + remote_port_len
|
||||
+ (referer ? strlen(referer) : 0)
|
||||
+ (www_auth ? strlen(www_auth) : 0)
|
||||
+ (proxy_auth ? strlen(proxy_auth) : 0) + 64
|
||||
+
|
||||
(pragma_no_cache ? strlen(pragma_no_cache) :
|
||||
0));
|
||||
|
||||
sprintf(request,
|
||||
"GET %s HTTP/1.0\r\nUser-Agent: %s\r\nHost: %s%s\r\nAccept: */*\r\n%s%s%s%s\r\n",
|
||||
location, connection->user_agent, connection->u.host,
|
||||
remote_port ? remote_port : "",
|
||||
referer ? referer : "",
|
||||
www_auth ? www_auth : "", proxy_auth ? proxy_auth : "",
|
||||
pragma_no_cache ? pragma_no_cache : "");
|
||||
|
||||
proz_debug("HTTP request = %s", request);
|
||||
|
||||
connection_show_message(connection, _("Sending HTTP request"));
|
||||
err = http_fetch_headers(connection, &connection->hs, request);
|
||||
|
||||
close_sock(&connection->data_sock);
|
||||
|
||||
if (err == HOK)
|
||||
{
|
||||
connection->main_file_size = connection->hs.contlen;
|
||||
if (connection->hs.accept_ranges == 1)
|
||||
connection->resume_support = TRUE;
|
||||
else if (connection->hs.accept_ranges == -1)
|
||||
connection->resume_support = FALSE;
|
||||
}
|
||||
|
||||
|
||||
connection->file_type = REGULAR_FILE;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*Loops for connection->attempts */
|
||||
uerr_t http_get_url_info_loop(connection_t * connection)
|
||||
{
|
||||
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->running = TRUE;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
assert(connection->attempts >= 0);
|
||||
|
||||
do
|
||||
{
|
||||
if (connection->attempts > 0 && connection->err != NEWLOCATION)
|
||||
{
|
||||
|
||||
connection_show_message(connection,
|
||||
_("Retrying...Attempt %d in %d seconds"),
|
||||
connection->attempts,
|
||||
connection->retry_delay.tv_sec);
|
||||
delay_ms(connection->retry_delay.tv_sec * 1000);
|
||||
}
|
||||
|
||||
/*Push the handler which will cleanup any sockets that are left open */
|
||||
pthread_cleanup_push(cleanup_socks, (void *) connection);
|
||||
connection->err = proz_http_get_url_info(connection);
|
||||
/*pop the handler */
|
||||
pthread_cleanup_pop(0);
|
||||
|
||||
connection->attempts++;
|
||||
|
||||
switch (connection->err)
|
||||
{
|
||||
case HOK:
|
||||
connection_show_message(connection, _("Successfully got info"));
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->running = FALSE;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return connection->err;
|
||||
break;
|
||||
|
||||
case NEWLOCATION:
|
||||
return connection->err;
|
||||
break;
|
||||
|
||||
case HTTPNSFOD:
|
||||
connection_show_message(connection, _("File not found!"));
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->running = FALSE;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return connection->err;
|
||||
break;
|
||||
|
||||
default:
|
||||
connection_show_message(connection, proz_strerror(connection->err));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
while ((connection->attempts < connection->max_attempts)
|
||||
|| connection->max_attempts == 0);
|
||||
|
||||
|
||||
connection_show_message(connection,
|
||||
_
|
||||
("I have tried %d attempt(s) and have failed, aborting"),
|
||||
connection->attempts);
|
||||
pthread_mutex_lock(&connection->access_mutex);
|
||||
connection->running = FALSE;
|
||||
pthread_mutex_unlock(&connection->access_mutex);
|
||||
return connection->err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
I am writing a seperate function to handle FTP proxying through HTTP, I
|
||||
MHO whoever thought of using HTTP to proxy FTP is a shithead,
|
||||
its such a PITA ;)
|
||||
*/
|
||||
|
||||
uerr_t ftp_get_url_info_from_http_proxy(connection_t * connection)
|
||||
{
|
||||
|
||||
uerr_t err;
|
||||
int remote_port_len;
|
||||
char *user, *passwd, *www_auth = NULL, *proxy_auth =
|
||||
NULL, *pragma_no_cache = NULL;
|
||||
|
||||
char *request, *remote_port;
|
||||
netrc_entry *netrc_ent;
|
||||
|
||||
memset(&connection->hs, 0, sizeof(connection->hs));
|
||||
|
||||
err = connect_to_server(&connection->data_sock,
|
||||
connection->ftp_proxy->proxy_url.host,
|
||||
connection->ftp_proxy->proxy_url.port,
|
||||
&connection->xfer_timeout);
|
||||
|
||||
if (err != NOCONERROR)
|
||||
{
|
||||
connection_show_message(connection, _("Error connecting to %s"),
|
||||
connection->ftp_proxy->proxy_url.host);
|
||||
return err;
|
||||
}
|
||||
|
||||
user = connection->u.user;
|
||||
passwd = connection->u.passwd;
|
||||
|
||||
/* Use .netrc if asked to do so. */
|
||||
if (connection->use_netrc == TRUE)
|
||||
{
|
||||
netrc_ent = search_netrc(libprozrtinfo.netrc_list, connection->u.host);
|
||||
|
||||
if (netrc_ent != NULL)
|
||||
{
|
||||
user = netrc_ent->account;
|
||||
passwd = netrc_ent->password;
|
||||
}
|
||||
}
|
||||
|
||||
user = user ? user : "";
|
||||
passwd = passwd ? passwd : "";
|
||||
|
||||
if (strlen(user) || strlen(passwd))
|
||||
{
|
||||
/* Construct the necessary header. */
|
||||
www_auth = get_basic_auth_str(user, passwd, "Authorization");
|
||||
proz_debug(_("Authenticating as user %s password %s"), user, passwd);
|
||||
proz_debug(_("Authentification string=%s"), www_auth);
|
||||
} else
|
||||
www_auth = 0;
|
||||
|
||||
if (strlen(connection->ftp_proxy->username)
|
||||
|| strlen(connection->ftp_proxy->passwd))
|
||||
proxy_auth =
|
||||
get_basic_auth_str(connection->ftp_proxy->username,
|
||||
connection->ftp_proxy->passwd,
|
||||
"Proxy-Authorization");
|
||||
|
||||
remote_port = (char *) alloca(64);
|
||||
remote_port_len = sprintf(remote_port, ":%d", connection->u.port);
|
||||
|
||||
if (http_use_proxy(connection)
|
||||
&& (connection->http_no_cache || connection->attempts > 0))
|
||||
{
|
||||
pragma_no_cache = (char *) alloca(21);
|
||||
sprintf(pragma_no_cache, "Pragma: no-cache\r\n");
|
||||
}
|
||||
|
||||
/*Referrer TAG should not be needed in FTP through HTTP proxy..right */
|
||||
|
||||
|
||||
request = (char *) alloca(strlen(connection->u.url)
|
||||
+ strlen(connection->user_agent)
|
||||
+ strlen(connection->u.host) + remote_port_len
|
||||
+ (www_auth ? strlen(www_auth) : 0)
|
||||
+ (proxy_auth ? strlen(proxy_auth) : 0)
|
||||
+ 64
|
||||
+
|
||||
(pragma_no_cache ? strlen(pragma_no_cache) :
|
||||
0));
|
||||
|
||||
sprintf(request,
|
||||
"GET %s HTTP/1.0\r\nUser-Agent: %s\r\nHost: %s%s\r\nAccept: */*\r\n%s%s%s\r\n",
|
||||
connection->u.url, connection->user_agent, connection->u.host,
|
||||
remote_port,
|
||||
www_auth ? www_auth : "", proxy_auth ? proxy_auth : "",
|
||||
pragma_no_cache ? pragma_no_cache : "");
|
||||
|
||||
proz_debug("HTTP request = %s", request);
|
||||
|
||||
|
||||
err = http_fetch_headers(connection, &connection->hs, request);
|
||||
|
||||
close_sock(&connection->data_sock);
|
||||
|
||||
/*Convert the error code to the equivalent FTP one if possible */
|
||||
|
||||
if (err == HOK)
|
||||
{
|
||||
connection->main_file_size = connection->hs.contlen;
|
||||
if (connection->hs.accept_ranges == 1)
|
||||
connection->resume_support = TRUE;
|
||||
else if (connection->hs.accept_ranges == -1)
|
||||
connection->resume_support = FALSE;
|
||||
return FTPOK;
|
||||
}
|
||||
|
||||
|
||||
if (err == HAUTHREQ)
|
||||
return FTPLOGREFUSED;
|
||||
else if (err == HTTPNSFOD)
|
||||
return FTPNSFOD;
|
||||
|
||||
|
||||
/* connection->file_type = REGULAR_FILE; */
|
||||
return FTPERR;
|
||||
|
||||
}
|
||||
60
libprozilla/src/http.h
Normal file
60
libprozilla/src/http.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
/* HTTP support. */
|
||||
|
||||
/* $Id: http.h,v 1.12 2005/03/31 20:10:57 sean Exp $ */
|
||||
|
||||
|
||||
#ifndef HTTP_H
|
||||
#define HTTP_H
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "url.h"
|
||||
#include "connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int buf_readchar(int fd, char *ret, struct timeval *timeout);
|
||||
int buf_peek(int fd, char *ret, struct timeval *timeout);
|
||||
uerr_t fetch_next_header(int fd, char **hdr, struct timeval *timeout);
|
||||
|
||||
int hparsestatline(const char *hdr, const char **rp);
|
||||
int hskip_lws(const char *hdr);
|
||||
off_t hgetlen(const char *hdr);
|
||||
off_t hgetrange(const char *hdr);
|
||||
char *hgetlocation(const char *hdr);
|
||||
char *hgetmodified(const char *hdr);
|
||||
int hgetaccept_ranges(const char *hdr);
|
||||
|
||||
uerr_t http_fetch_headers(connection_t * connection, http_stat_t * hs,
|
||||
char *command);
|
||||
|
||||
char *get_basic_auth_str(char *user, char *passwd, char *auth_header);
|
||||
|
||||
boolean http_use_proxy(connection_t * connection);
|
||||
uerr_t proz_http_get_url_info(connection_t * connection);
|
||||
uerr_t http_get_url_info_loop(connection_t * connection);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* HTTP_H */
|
||||
320
libprozilla/src/logfile.c
Normal file
320
libprozilla/src/logfile.c
Normal file
@@ -0,0 +1,320 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "misc.h"
|
||||
#include "logfile.h"
|
||||
|
||||
/*creates the log file and stores the info */
|
||||
/*If download is not NULL will store info about the downloads connection allocations to it too.*/
|
||||
|
||||
int log_create_logfile(int num_connections, int file_size, char *url,
|
||||
download_t * download)
|
||||
{
|
||||
char buffer[PATH_MAX];
|
||||
FILE *fp = NULL;
|
||||
int i;
|
||||
logfile lf;
|
||||
|
||||
memset(&lf, 0, sizeof(lf));
|
||||
/*
|
||||
* Compute the name of the logfile
|
||||
*/
|
||||
snprintf(buffer, PATH_MAX, "%s/%s%s.log", download->log_dir,
|
||||
download->u.file, DEFAULT_FILE_EXT);
|
||||
if (!(fp = fopen(buffer, "wb")))
|
||||
{
|
||||
|
||||
/*
|
||||
* fixme add the error displaing to the main function
|
||||
*/
|
||||
download_show_message(download,
|
||||
_("Error opening file %s for writing: %s"),
|
||||
buffer, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
lf.num_connections = num_connections;
|
||||
lf.version = 1000;
|
||||
lf.got_info = download == NULL ? 1 : 0;
|
||||
lf.file_size = file_size;
|
||||
lf.url_len = strlen(url);
|
||||
|
||||
/*Write the logfile header */
|
||||
|
||||
/* No of connections */
|
||||
if (fwrite(&lf, 1, sizeof(lf), fp) != sizeof(lf))
|
||||
{
|
||||
download_show_message(download, _("Error writing to file %s: %s"),
|
||||
buffer, strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Now we write the url to it */
|
||||
|
||||
if (fwrite(url, 1, strlen(url), fp) != strlen(url))
|
||||
{
|
||||
download_show_message(download, _("Error writing to file %s: %s"),
|
||||
buffer, strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*Now we write each of the connections start and end positions to the file if download is not null */
|
||||
|
||||
if (download != NULL)
|
||||
{
|
||||
for (i = 0; i < download->num_connections; i++)
|
||||
{
|
||||
|
||||
pthread_mutex_lock(&download->pconnections[i]->access_mutex);
|
||||
|
||||
if (fwrite
|
||||
(&download->pconnections[i]->local_startpos, 1,
|
||||
sizeof(download->pconnections[i]->local_startpos),
|
||||
fp) != sizeof(download->pconnections[i]->local_startpos))
|
||||
{
|
||||
|
||||
pthread_mutex_unlock(&download->pconnections[i]->access_mutex);
|
||||
download_show_message(download, _("Error writing to file %s: %s"),
|
||||
buffer, strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fwrite
|
||||
(&download->pconnections[i]->orig_remote_startpos, 1,
|
||||
sizeof(download->pconnections[i]->orig_remote_startpos),
|
||||
fp) != sizeof(download->pconnections[i]->orig_remote_startpos))
|
||||
{
|
||||
|
||||
pthread_mutex_unlock(&download->pconnections[i]->access_mutex);
|
||||
download_show_message(download, _("Error writing to file %s: %s"),
|
||||
buffer, strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fwrite
|
||||
(&download->pconnections[i]->remote_endpos, 1,
|
||||
sizeof(download->pconnections[i]->remote_endpos),
|
||||
fp) != sizeof(download->pconnections[i]->remote_endpos))
|
||||
{
|
||||
pthread_mutex_unlock(&download->pconnections[i]->access_mutex);
|
||||
download_show_message(download, _("Error writing to file %s: %s"),
|
||||
buffer, strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fwrite
|
||||
(&download->pconnections[i]->remote_bytes_received, 1,
|
||||
sizeof(download->pconnections[i]->remote_bytes_received),
|
||||
fp) != sizeof(download->pconnections[i]->remote_bytes_received))
|
||||
{
|
||||
|
||||
pthread_mutex_unlock(&download->pconnections[i]->access_mutex);
|
||||
download_show_message(download, _("Error writing to file %s: %s"),
|
||||
buffer, strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
pthread_mutex_unlock(&download->pconnections[i]->access_mutex);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* returns 1 if the logfile exists, 0 if it doesn't and -1 on error*/
|
||||
int proz_log_logfile_exists(download_t * download)
|
||||
{
|
||||
char buffer[PATH_MAX];
|
||||
int ret;
|
||||
struct stat st_buf;
|
||||
|
||||
/*
|
||||
* Compute the name of the logfile
|
||||
*/
|
||||
snprintf(buffer, PATH_MAX, "%s/%s%s.log", download->log_dir,
|
||||
download->u.file, DEFAULT_FILE_EXT);
|
||||
|
||||
ret = stat(buffer, &st_buf);
|
||||
if (ret == -1)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
} else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* delete the log file */
|
||||
int proz_log_delete_logfile(download_t * download)
|
||||
{
|
||||
char buffer[PATH_MAX];
|
||||
int ret;
|
||||
|
||||
snprintf(buffer, PATH_MAX, "%s/%s%s.log", download->log_dir,
|
||||
download->u.file, DEFAULT_FILE_EXT);
|
||||
|
||||
ret = unlink(buffer);
|
||||
if (ret == -1)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
{
|
||||
download_show_message(download, _("logfile doesn't exist"));
|
||||
return 1;
|
||||
} else
|
||||
{
|
||||
download_show_message(download, "Error: Unable to delete the logfile: %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Read the logfile into the logfile structure */
|
||||
|
||||
int proz_log_read_logfile(logfile * lf, download_t * download,
|
||||
boolean load_con_info)
|
||||
{
|
||||
char buffer[PATH_MAX];
|
||||
FILE *fp = NULL;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Compute the name of the logfile
|
||||
*/
|
||||
snprintf(buffer, PATH_MAX, "%s/%s%s.log", download->log_dir,
|
||||
download->u.file, DEFAULT_FILE_EXT);
|
||||
|
||||
if (!(fp = fopen(buffer, "rb")))
|
||||
{
|
||||
/*
|
||||
* fixme add the error displaing to the main function
|
||||
*/
|
||||
download_show_message(download,
|
||||
_("Error opening file %s for reading: %s"),
|
||||
buffer, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (fread(lf, 1, sizeof(logfile), fp) != sizeof(logfile))
|
||||
{
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
lf->url = kmalloc(lf->url_len + 1);
|
||||
|
||||
if (fread(lf->url, 1, lf->url_len, fp) != lf->url_len)
|
||||
{
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
lf->url[lf->url_len] = 0;
|
||||
|
||||
|
||||
if (load_con_info == TRUE)
|
||||
{
|
||||
for (i = 0; i < lf->num_connections; i++)
|
||||
{
|
||||
|
||||
|
||||
|
||||
proz_debug("value before= %d", download->pconnections[i]->local_startpos);
|
||||
|
||||
if (fread
|
||||
(&download->pconnections[i]->local_startpos, 1,
|
||||
sizeof(download->pconnections[i]->local_startpos),
|
||||
fp) != sizeof(download->pconnections[i]->local_startpos))
|
||||
{
|
||||
download_show_message(download,
|
||||
_("Error reading from file %s: %s"), buffer,
|
||||
strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
proz_debug("value after= %d", download->pconnections[i]->local_startpos);
|
||||
|
||||
proz_debug("orig_remote_startpos before= %d", download->pconnections[i]->orig_remote_startpos);
|
||||
if (fread
|
||||
(&download->pconnections[i]->orig_remote_startpos, 1,
|
||||
sizeof(download->pconnections[i]->orig_remote_startpos),
|
||||
fp) != sizeof(download->pconnections[i]->orig_remote_startpos))
|
||||
{
|
||||
download_show_message(download,
|
||||
_("Error reading from file %s: %s"), buffer,
|
||||
strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
proz_debug("orig_remote_startpos after= %d", download->pconnections[i]->orig_remote_startpos);
|
||||
|
||||
|
||||
proz_debug("remote_edndpos before= %d", download->pconnections[i]->remote_endpos);
|
||||
if (fread
|
||||
(&download->pconnections[i]->remote_endpos, 1,
|
||||
sizeof(download->pconnections[i]->remote_endpos),
|
||||
fp) != sizeof(download->pconnections[i]->remote_endpos))
|
||||
{
|
||||
download_show_message(download,
|
||||
_("Error reading from file %s: %s"), buffer,
|
||||
strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
proz_debug("remote_endpos after= %d", download->pconnections[i]->remote_endpos);
|
||||
proz_debug("remote_bytes_received before= %d", download->pconnections[i]->remote_bytes_received);
|
||||
if (fread
|
||||
(&download->pconnections[i]->remote_bytes_received, 1,
|
||||
sizeof(download->pconnections[i]->remote_bytes_received),
|
||||
fp) != sizeof(download->pconnections[i]->remote_bytes_received))
|
||||
{
|
||||
download_show_message(download,
|
||||
_("Error reading from file %s: %s"), buffer,
|
||||
strerror(errno));
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
proz_debug("remote_bytes_received after= %d", download->pconnections[i]->remote_bytes_received);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
fclose(fp);
|
||||
return 1;
|
||||
}
|
||||
41
libprozilla/src/logfile.h
Normal file
41
libprozilla/src/logfile.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
libprozilla - a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef LOGFILE_H
|
||||
#define LOGFILE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "prozilla.h"
|
||||
#include "download.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
int log_create_logfile(int num_connections, int file_size, char *url,
|
||||
download_t * download);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user