Compare commits
339 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b4ead9cb8 | ||
|
|
a7a78decb6 | ||
|
|
593a0678b8 | ||
|
|
9658c4cd82 | ||
|
|
e0516f330f | ||
|
|
33ac7b9181 | ||
|
|
1aa8541c5c | ||
|
|
fc71eb5f72 | ||
|
|
07e2000094 | ||
|
|
3d3325129c | ||
|
|
7ba3279073 | ||
|
|
f717f98d07 | ||
|
|
d3c8f09d17 | ||
|
|
1debce2865 | ||
|
|
5acbc8bb0d | ||
|
|
aebfac8567 | ||
|
|
fee360a06f | ||
|
|
4f989faa6e | ||
|
|
2e39c1c283 | ||
|
|
65f075d3a1 | ||
|
|
bcc8688a3b | ||
|
|
d0845df735 | ||
|
|
fe1d0722d4 | ||
|
|
a0449d92a0 | ||
|
|
7641708cb6 | ||
|
|
e9b5c6fe90 | ||
|
|
d127c71ab3 | ||
|
|
b2cd248d1c | ||
|
|
428f620370 | ||
|
|
fdcb9e92d6 | ||
|
|
a4a9d1759f | ||
|
|
d16f9f66a1 | ||
|
|
65f998e429 | ||
|
|
f16ca28efb | ||
|
|
4640fe3f57 | ||
|
|
a90d0cf214 | ||
|
|
f8f2d586dc | ||
|
|
3a78406d56 | ||
|
|
2ddd75e705 | ||
|
|
e61be2dd6d | ||
|
|
992a25a69c | ||
|
|
a66a8f72a4 | ||
|
|
ab5fec61a8 | ||
|
|
97e10b5d0d | ||
|
|
588df68a8c | ||
|
|
bfc8b2ac4d | ||
|
|
bcaeeb4411 | ||
|
|
3cdf6ff1de | ||
|
|
17ec14b9a5 | ||
|
|
a3daf3a256 | ||
|
|
d6e84363d7 | ||
|
|
3083ff908c | ||
|
|
201f1d976a | ||
|
|
5ec68628ce | ||
|
|
5ea694ebd1 | ||
|
|
a577d5a8b8 | ||
|
|
cddbfd0988 | ||
|
|
5c8c276622 | ||
|
|
7dace110b0 | ||
|
|
d89eb91e77 | ||
|
|
c45335782a | ||
|
|
434d686ee4 | ||
|
|
0eab236580 | ||
|
|
dbfc56cb8e | ||
|
|
a0d89977b7 | ||
|
|
cff6e6f60f | ||
|
|
ce452fb880 | ||
|
|
5c63f27721 | ||
|
|
f80a59c7cc | ||
|
|
858d9d90cb | ||
|
|
2a7b8b24bb | ||
|
|
5d71514f21 | ||
|
|
e92a7bcb78 | ||
|
|
db28e96f2c | ||
|
|
d26ab913f1 | ||
|
|
416896efcd | ||
|
|
b698c35f4b | ||
|
|
a340766790 | ||
|
|
47fcfe5d78 | ||
|
|
8a85aa0baa | ||
|
|
64fc78c0f1 | ||
|
|
63d0b48d5b | ||
|
|
77e726d518 | ||
|
|
fa1588608e | ||
|
|
9090f2e44b | ||
|
|
1939c3590b | ||
|
|
1a128afdb2 | ||
|
|
54c1f7932c | ||
|
|
149781d827 | ||
|
|
beca0eb699 | ||
|
|
0e86e60653 | ||
|
|
f22e8bf775 | ||
|
|
3bbc416a73 | ||
|
|
d66349963c | ||
|
|
36fec72f6a | ||
|
|
3d459ad83d | ||
|
|
73a7e7f450 | ||
|
|
eeb500428d | ||
|
|
8495c71dd0 | ||
|
|
f89d698293 | ||
|
|
f426c9edbf | ||
|
|
d46f544758 | ||
|
|
5af5889448 | ||
|
|
b32ccd9257 | ||
|
|
327abdab4a | ||
|
|
d6c8d1a06d | ||
|
|
e6600379c9 | ||
|
|
f9ab3f79e5 | ||
|
|
3f8a63cadb | ||
|
|
d957f5903e | ||
|
|
f3de8b552e | ||
|
|
09fc4300ec | ||
|
|
2ad0f6c0ad | ||
|
|
2d5fc3adac | ||
|
|
d757e25817 | ||
|
|
9b0d18d284 | ||
|
|
b9475525d8 | ||
|
|
73dcc43267 | ||
|
|
a0e829cd8c | ||
|
|
7fc0ddfe38 | ||
|
|
38c563d1e0 | ||
|
|
631ee1faa6 | ||
|
|
48053784e2 | ||
|
|
cb850cee36 | ||
|
|
908f770f7d | ||
|
|
0e7a3f5e2d | ||
|
|
688c8eb112 | ||
|
|
ca7113afee | ||
|
|
497b5040a7 | ||
|
|
54380cf56b | ||
|
|
9fa5fbd3af | ||
|
|
7662c86dbf | ||
|
|
3f1b6851cb | ||
|
|
ed4fb2cf0f | ||
|
|
54abd94d48 | ||
|
|
8031f83422 | ||
|
|
6cd143db7a | ||
|
|
37d594c1bd | ||
|
|
916a8ec69c | ||
|
|
15c28f8b86 | ||
|
|
a65ba51b9e | ||
|
|
63287926cb | ||
|
|
5beed509a6 | ||
|
|
95e0cf584c | ||
|
|
5a9e25ae33 | ||
|
|
9b13ff31bb | ||
|
|
334a94049f | ||
|
|
3e5ad6397c | ||
|
|
bfd2f5613d | ||
|
|
35908f829c | ||
|
|
1d8fa1fa90 | ||
|
|
2a7a9a242f | ||
|
|
848f5be64f | ||
|
|
5ad92ac4f8 | ||
|
|
fd1cf80da1 | ||
|
|
af7a09ddec | ||
|
|
2e938bf6db | ||
|
|
9e050ad51a | ||
|
|
99519ae375 | ||
|
|
0084eaa9e0 | ||
|
|
749def4e1a | ||
|
|
9e2de25eb1 | ||
|
|
76d1ffd673 | ||
|
|
d42abe4484 | ||
|
|
5e4b8cfebb | ||
|
|
dc60b72e96 | ||
|
|
e8ad5ed2f4 | ||
|
|
2257893ac2 | ||
|
|
2a15c584f1 | ||
|
|
d45c5992d3 | ||
|
|
573b61f2af | ||
|
|
1536d4bb0b | ||
|
|
2ab03f6896 | ||
|
|
e42df73644 | ||
|
|
492f8e62f0 | ||
|
|
1dd0bc98a2 | ||
|
|
1801c176d9 | ||
|
|
f4420f8842 | ||
|
|
dc54e12d94 | ||
|
|
4da47eab9e | ||
|
|
dab0299d88 | ||
|
|
1fc9da6597 | ||
|
|
0b761fa277 | ||
|
|
ec6388e255 | ||
|
|
71fb1f5bd1 | ||
|
|
6866f6fb7d | ||
|
|
136a38af2f | ||
|
|
3a24c12a92 | ||
|
|
e3ebfead53 | ||
|
|
1f28b8f400 | ||
|
|
7c4222ca90 | ||
|
|
4300092919 | ||
|
|
81dea02ca7 | ||
|
|
079b5495c8 | ||
|
|
0ae5c722bd | ||
|
|
67ca2aa874 | ||
|
|
de852623ee | ||
|
|
3f9c3bf10b | ||
|
|
515ba32513 | ||
|
|
e21adfa181 | ||
|
|
605165e292 | ||
|
|
947c037212 | ||
|
|
56ae5a096c | ||
|
|
bf89768c70 | ||
|
|
ad40fdba59 | ||
|
|
f7c6811e36 | ||
|
|
768e8f0810 | ||
|
|
79cdfdc204 | ||
|
|
82559b3ab0 | ||
|
|
1f1022faaa | ||
|
|
0341b58c05 | ||
|
|
64f49c7a99 | ||
|
|
3c2a7de9b6 | ||
|
|
7b01a0ff1c | ||
|
|
5f8905ee69 | ||
|
|
7a06bcc8c3 | ||
|
|
085f087743 | ||
|
|
d865da108f | ||
|
|
d793cc186f | ||
|
|
9a3c260315 | ||
|
|
e5d06c08c6 | ||
|
|
25daa05bf6 | ||
|
|
dd19573388 | ||
|
|
cb7c8d8172 | ||
|
|
52069c6bb2 | ||
|
|
720a9e0f8a | ||
|
|
3ec22383e9 | ||
|
|
70bb886849 | ||
|
|
7d5f3077ea | ||
|
|
dffa207320 | ||
|
|
c46337b9c7 | ||
|
|
1c5c338f95 | ||
|
|
87104114bd | ||
|
|
c4e3d9ed01 | ||
|
|
cf287c87cd | ||
|
|
6df90f5787 | ||
|
|
cf2f6563ca | ||
|
|
20eb232922 | ||
|
|
2641d00c52 | ||
|
|
8bf8f890c3 | ||
|
|
7d401345c2 | ||
|
|
d9797bddc2 | ||
|
|
5db0cdc4c9 | ||
|
|
fbc7920654 | ||
|
|
c5967551f6 | ||
|
|
834913c8b1 | ||
|
|
f21cd10a3f | ||
|
|
790d362f41 | ||
|
|
bd338658be | ||
|
|
75d057238a | ||
|
|
3ac937a023 | ||
|
|
5c6379d64f | ||
|
|
6fe98d7d76 | ||
|
|
539e27f166 | ||
|
|
1f22687cd8 | ||
|
|
8b75a78f6f | ||
|
|
193d77527b | ||
|
|
a5e889b7cf | ||
|
|
5e76fe9997 | ||
|
|
3674c1da71 | ||
|
|
6232d6659f | ||
|
|
403f8dc0a3 | ||
|
|
4dc03d5733 | ||
|
|
7c27be42d0 | ||
|
|
ca76fa9b39 | ||
|
|
9dccc48a64 | ||
|
|
21c433dca6 | ||
|
|
09900ff808 | ||
|
|
9189c1f258 | ||
|
|
b6c5dc29ef | ||
|
|
42c6405572 | ||
|
|
934b76b0ed | ||
|
|
dab017e786 | ||
|
|
b275175bef | ||
|
|
0547eb36c4 | ||
|
|
2542274250 | ||
|
|
0417a7b7f2 | ||
|
|
0e9b7aa16d | ||
|
|
7f80e6639f | ||
|
|
d301e10372 | ||
|
|
b18bc69b88 | ||
|
|
f2387fbdf7 | ||
|
|
70feb4f8e5 | ||
|
|
108ff58956 | ||
|
|
7162e3d686 | ||
|
|
66f373f3e7 | ||
|
|
8349c92e09 | ||
|
|
0ab011f54a | ||
|
|
8902ebad43 | ||
|
|
32b4c960ac | ||
|
|
4ceb30cfe7 | ||
|
|
ec8c1bc79d | ||
|
|
06d62372dc | ||
|
|
78f0fc61ff | ||
|
|
77777d4c0d | ||
|
|
9b4055c4da | ||
|
|
6ca01b1cd8 | ||
|
|
8e207bf03f | ||
|
|
f3a07b2d7e | ||
|
|
e373909037 | ||
|
|
465a0ffa15 | ||
|
|
2598c66d81 | ||
|
|
7afc6d9468 | ||
|
|
d1c2c1ca76 | ||
|
|
f6cba64376 | ||
|
|
bb88ece93c | ||
|
|
f21f3fcc1e | ||
|
|
9c20ab0d5e | ||
|
|
373bc2fa48 | ||
|
|
3533a348fc | ||
|
|
b23d14460e | ||
|
|
cf1d812ccb | ||
|
|
52c5a6ea48 | ||
|
|
7fa082dc90 | ||
|
|
dce44abec7 | ||
|
|
b83e61aea0 | ||
|
|
286ee1faff | ||
|
|
057c3c4aba | ||
|
|
6e6a7ac493 | ||
|
|
5477e1028a | ||
|
|
558b5d8774 | ||
|
|
45329a127a | ||
|
|
d1ec7b0287 | ||
|
|
b479c89594 | ||
|
|
1f8394d4bc | ||
|
|
f7277b8176 | ||
|
|
3fc5d5722c | ||
|
|
4e803aa59b | ||
|
|
97e6fe6331 | ||
|
|
4951c66adc | ||
|
|
5902f9672d | ||
|
|
e8e10347a9 | ||
|
|
1596d38698 | ||
|
|
79dcc475a7 | ||
|
|
564535a6f7 | ||
|
|
40ecbad296 | ||
|
|
ee91f71a66 | ||
|
|
bef1297c6d | ||
|
|
26d59eae5f |
@@ -1,6 +1,10 @@
|
||||
ABOUT-NLS
|
||||
COPYING
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
confdefs.h
|
||||
config.cache
|
||||
config.h
|
||||
@@ -16,5 +20,8 @@ missing
|
||||
mkinstalldirs
|
||||
nano
|
||||
nano.info
|
||||
nano.spec
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
texinfo.tex
|
||||
|
||||
324
ABOUT-NLS
324
ABOUT-NLS
@@ -1,324 +0,0 @@
|
||||
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.
|
||||
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
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, message inheritance, automatic
|
||||
charset conversion or plural form handling) 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 already
|
||||
provides the GNU `gettext' functions. If not, 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 --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, 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.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
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
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
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. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
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 September
|
||||
2001. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | |
|
||||
fileutils | [] [] [] [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
freetype | |
|
||||
gas | |
|
||||
gawk | [] [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gprof | |
|
||||
grep | [] [] [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | [] |
|
||||
kbd | |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] [] [] [] |
|
||||
lilypond | [] |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] [] [] [] |
|
||||
make | [] [] [] [] [] [] |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] |
|
||||
opcodes | |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] [] [] |
|
||||
sketch | |
|
||||
soundtracker | [] [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] [] [] |
|
||||
util-linux | [] [] |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] [] |
|
||||
+----------------------------------------------------+
|
||||
bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
|
||||
|
||||
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] | 6
|
||||
bash | | 4
|
||||
bfd | | 0
|
||||
binutils | | 1
|
||||
bison | [] | 6
|
||||
clisp | [] | 5
|
||||
cpio | [] [] [] [] [] | 10
|
||||
diffutils | [] [] [] [] | 11
|
||||
enscript | [] [] [] | 5
|
||||
error | [] [] | 4
|
||||
fetchmail | | 0
|
||||
fileutils | [] [] [] [] [] [] [] [] [] | 17
|
||||
findutils | [] [] [] [] [] [] [] [] | 16
|
||||
flex | [] [] [] | 6
|
||||
freetype | | 0
|
||||
gas | | 0
|
||||
gawk | [] | 3
|
||||
gcal | | 0
|
||||
gcc | | 0
|
||||
gettext | [] [] [] [] [] [] [] [] | 18
|
||||
gnupg | [] [] [] | 10
|
||||
gprof | | 0
|
||||
grep | [] [] [] [] | 12
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
|
||||
id-utils | [] [] [] | 6
|
||||
indent | [] [] [] [] [] [] [] | 12
|
||||
jpilot | | 1
|
||||
kbd | [] | 1
|
||||
ld | | 1
|
||||
libc | [] [] [] [] [] [] [] [] | 16
|
||||
lilypond | [] [] | 3
|
||||
lynx | [] [] [] [] | 8
|
||||
m4 | [] [] [] [] | 12
|
||||
make | [] [] [] [] [] [] | 12
|
||||
mysecretdiary | | 1
|
||||
nano | [] | 4
|
||||
opcodes | [] | 1
|
||||
parted | [] [] | 5
|
||||
ptx | [] [] [] [] [] [] [] [] | 15
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] [] | 19
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
|
||||
sharutils | [] [] [] | 11
|
||||
sketch | | 0
|
||||
soundtracker | | 3
|
||||
sp | | 0
|
||||
tar | [] [] [] [] [] [] [] | 15
|
||||
texinfo | [] | 7
|
||||
textutils | [] [] [] [] [] [] [] [] | 16
|
||||
util-linux | [] [] | 4
|
||||
wdiff | [] [] [] [] | 7
|
||||
wget | [] [] [] [] [] [] [] | 17
|
||||
+----------------------------------------------------+
|
||||
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
|
||||
|
||||
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 September 2001 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites. The most
|
||||
up-to-date matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
to use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
||||
6
AUTHORS
6
AUTHORS
@@ -8,7 +8,7 @@ Chris Allegretta <chrisa@asty.org>
|
||||
|
||||
Jordi Mallach <jordi@sindominio.net>
|
||||
* Debian package maintainer, fellow bug squasher.
|
||||
* Internationalization support head, es.po maintainer.
|
||||
* Internationalization support head, ca.po maintainer.
|
||||
|
||||
Adam Rogoyski <rogoyski@cs.utexas.edu>
|
||||
* New write_file() function, read_file() optimization, mouse
|
||||
@@ -29,3 +29,7 @@ David Lawrence Ramsey <pooka_regent@sluggy.net>
|
||||
* Multiple buffer support, operating dir (-o) option, bug fixes
|
||||
for display routines, wrapping code, spelling fixes, const
|
||||
mode and various other fixes.
|
||||
|
||||
David Benbennick <dbenbenn@math.cornell.edu>
|
||||
* Wrap and justify bugfixes/enhancements, new color syntax
|
||||
code, memleak fixes and other miscellaneous fixes.
|
||||
|
||||
9
BUGS
9
BUGS
@@ -1,3 +1,6 @@
|
||||
** Open BUGS **
|
||||
|
||||
** Fixed BUGS **
|
||||
- Marked cutting sometimes leaves a newline in the file unintelligently,
|
||||
such as when all of a line is selected but the mark doesn't proceed to
|
||||
the new line. (8) [FIXED/IRRELEVANT]
|
||||
@@ -71,7 +74,7 @@
|
||||
[FIXED]
|
||||
- Alt-Z is currently broken to toggle suspend. I guess I still don't know
|
||||
signals very well =-) (41) [FIXED].
|
||||
- Unable to cut the entire file using the marker (discovered by Kev Tyler)
|
||||
- Unable to cut the entire file using the marker (discovered by Ken Tyler)
|
||||
(42). [FIXED]
|
||||
- The keypad does not work when nano runs in the Gnome terminal (43). [FIXED]
|
||||
- When reading in a file, if the file is a directory, the contents of the
|
||||
@@ -102,7 +105,7 @@
|
||||
higuita@cadernoverde.com) (54) [FIXED].
|
||||
- When using autoindent (-i), wrapped text does not get autoindented
|
||||
(55, discovered by Mark Senior) [FIXED].
|
||||
- When using -R (regex) and -p (pico mode), subsequent searches after
|
||||
- When using -R (regex) and -p (Pico mode), subsequent searches after
|
||||
the first fail if no string is entered (56) [FIXED].
|
||||
- Page down on a file of editwinrows fails (again). Reported by Ryan
|
||||
Krebs (57) [FIXED].
|
||||
@@ -131,6 +134,6 @@
|
||||
Trevor Cordes) (68) [FIXED].
|
||||
- Home and End control keys (^A, ^E) do not always work in filename
|
||||
prompt (bug found by Ian Turner) (69) [1.0 series only] [FIXED].
|
||||
** Open BUGS **
|
||||
- Trying to insert a file of 0 bytes will hang nano (70) [FIXED].
|
||||
|
||||
$Id$
|
||||
|
||||
340
COPYING
340
COPYING
@@ -1,340 +0,0 @@
|
||||
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) 19yy <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) 19yy 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.
|
||||
184
INSTALL
184
INSTALL
@@ -1,184 +0,0 @@
|
||||
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.
|
||||
|
||||
$Id$
|
||||
13
Makefile.am
13
Makefile.am
@@ -17,17 +17,20 @@ nano_SOURCES = color.c \
|
||||
utils.c \
|
||||
winio.c
|
||||
|
||||
man_MANS = nano.1
|
||||
nano_LDADD = @GLIB_LIBS@ @INTLLIBS@
|
||||
man_MANS = nano.1 nanorc.5
|
||||
nano_LDADD = @GLIB_LIBS@ @LIBINTL@
|
||||
|
||||
info_TEXINFOS = nano.texi
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
|
||||
README THANKS TODO install-sh missing mkinstalldirs \
|
||||
nano.1 nano.1.html faq.html nanorc.sample
|
||||
README THANKS TODO UPGRADE config.rpath install-sh missing \
|
||||
mkinstalldirs nano.1.html nanorc.5.html faq.html \
|
||||
nanorc.sample nano.spec $(man_MANS)
|
||||
|
||||
SUBDIRS = po intl m4
|
||||
SUBDIRS = po m4
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
158
NEWS
158
NEWS
@@ -1,3 +1,145 @@
|
||||
2003.02.19 - GNU nano 1.2.0 is released. Few changes from pre3, just
|
||||
some doc and translation updates, and bugfixes for
|
||||
justify and file conversion. For those of you who
|
||||
haven't kept up with the 1.1 unstable series, v1.2
|
||||
brings nanorc support, color syntax highlighting,
|
||||
multiple file buffers, search/replace history and much
|
||||
much more. Please reade the UPGRADE file for details,
|
||||
and enjoy GNU nano 1.2.0.
|
||||
|
||||
2003.02.13 - GNU nano 1.1.99pre3 "The last testing version, no
|
||||
really!" is released. This release includes fixes for
|
||||
wrapping (again), resizing, color syntax highlighting,
|
||||
rcfile parsing, the mouse code, more memory leaks, and
|
||||
some reversion of the code to get the user's home
|
||||
directory (nano will now again rely on $HOME). There
|
||||
are also translation updates, a new manual page for the
|
||||
nanorc file, and an UPGRADE file detailing the changes
|
||||
since version 1.0. Please submit reports for any bugs
|
||||
you might find to the development team
|
||||
(nano-devel@gnu.org), and enjoy nano almost-1.2.0 ;-)
|
||||
|
||||
2003.02.03 - GNU nano 1.1.99pre2 "bugs in my pockets, bugs in my
|
||||
shoes" is released. There are, not suprisingly,
|
||||
only bugfixes in this release as we move toward the
|
||||
stable 1.2.0 release. Fixes are included for
|
||||
translable string format, subexpression replacement,
|
||||
constant cursor position, invalid search regexes,
|
||||
justify, screen state on SIGHUP and SIGTERM, cutting
|
||||
to end cuts with long lines, many file browser and
|
||||
operating directory bugs, memory and file descriptor
|
||||
leaks, marker code, spell checker, the mouse code
|
||||
with long lines, multiple buffers and non-file
|
||||
open errors, replacement string length, and a
|
||||
silly but serious history message crash. There is
|
||||
also a drastic improvement in CPU utliization for
|
||||
the color regex code.
|
||||
Depending on the number of bugs found in this
|
||||
release, there may be a 1.1.99pre3 or RC1, or just
|
||||
a 1.2.0 release. Most of the major bugs seem to have
|
||||
been worked out, so if you are waiting for a good time
|
||||
to test nano before the official 1.2.0 release, this
|
||||
would be the one to use. Happy bug hunting!
|
||||
|
||||
2003.01.17 - GNU nano 1.1.99pre1 "enough already" has been released.
|
||||
This release is, barring bug fixes and documentation
|
||||
updates, what version 1.2.0 has looked like, feature
|
||||
wise. There will very likely be bugs, just due the
|
||||
volume of changes made in this release. Search
|
||||
and replace string history has been added, including an
|
||||
option to log history to ~/.nano_history (-H,
|
||||
--historylog). Because of this, the pico incompatible
|
||||
search/replace string behavior that used to be the
|
||||
default has been deleted. The old "pico" flag (-p)
|
||||
is now compatible with Pico's "preserve" mode for
|
||||
allowing flow control characters; by default this
|
||||
version ignores both ^Q and ^S. The
|
||||
--disable-wrapping-as-root configure option has been
|
||||
forward ported from version 1.0.x, and a new flag to
|
||||
enable all extra options (--enable-all) has been added.
|
||||
The internal spell checker has been improved, meaning
|
||||
you will now be prompted only once for each unique
|
||||
capitalization of a given word.
|
||||
There have also been lots of bug fixes,
|
||||
including the "trying to insert a directory name in
|
||||
multibuffer mode bug", the ugly spell checker scrolling,
|
||||
the color code, cutting text crashes, justification,
|
||||
deleting the "magic line" via replace, and cursor
|
||||
positioning on the statusbar. There have also been
|
||||
the usual helping of translation and documentation
|
||||
updates.
|
||||
Please send all new feedback on this release
|
||||
direct to the development list (nano-devel@gnu.org).
|
||||
|
||||
10/24/2002 - GNU nano 1.1.12 "Make Jordi happy" is released. This
|
||||
release demonstrated that nano is starting to freeze for
|
||||
version 1.2. New features include a Meta-Y toggle
|
||||
for syntax highlighting, pluralized i18n, and a handler
|
||||
for SIGTERM. Nano now ignores XOFF (^S) to stop
|
||||
accidental lock-ups, and no longer references malloc.h.
|
||||
Also included are fixes for zero-length regex
|
||||
matches, segfaults with --disable-mouse, justification,
|
||||
memory corruption with the browser, version and help
|
||||
cmdline output, and translation updates. Aside from
|
||||
the (currently up in the air) search history behavior,
|
||||
the next version of nano should be 1.1.99pre1. Have
|
||||
fun!
|
||||
|
||||
10/01/2002 - GNU nano 1.1.11 "Oddball" is released. This release
|
||||
features a new version of gettext, a new and improved syntax
|
||||
highlighting engine, and some updates for the nanorc.sample
|
||||
file. The toggles for case sensitivity (Meta-C) and regular
|
||||
expressions (Meta-R) have changed in the search and replace
|
||||
prompts, multibuffer status is now displayed and can be
|
||||
toggled from the insert file menu, and some wrapping behavior
|
||||
that changed in 1.1.10 has reverted. The --enable-color
|
||||
warning was also made less severe, as the color syntax code
|
||||
has improved, and nano now uses extended regexes in the
|
||||
.nanorc file.
|
||||
Also included are fixes for various memory leaks,
|
||||
the operating directory option, username tab completion,
|
||||
the page_up and down arrow, go to previous word and next
|
||||
word, nanorc parser and line wrapping code. Have fun!
|
||||
|
||||
|
||||
07/25/2002 - At long last! GNU nano 1.1.10 "What didn't we break?" is
|
||||
released. This version of GNU nano features version
|
||||
0.11.2 of gettext, building with automake 1.6, some new
|
||||
code for displaying control characters, browser
|
||||
improvements, a new backup file option (-B, --backup),
|
||||
a new option to ignore rc files (-I,--ignorercfiles),
|
||||
compatibility with -pedantic, handling null characters
|
||||
before EOF, a slightly sportier nanorc.sample and more.
|
||||
Fixes are included included for justification, the
|
||||
reading and writing file routines, resizing and fill
|
||||
length, millions of memory leaks, the usage screen was
|
||||
updated, and the the --quotestr and --regexp really work
|
||||
now ;-) Enjoy :)
|
||||
|
||||
05/12/2002 - GNU nano 1.1.9 is released, happy Mother's Day! This release
|
||||
includes many new features, including a prepend mode
|
||||
(^O,M-P), a new "syntax" command in the .nanorc to allow
|
||||
multiple syntax highlighting types, and a new -Y, --syntax
|
||||
flag to set a specific one if there's no filename regex to
|
||||
match it against (i.e. w/mutt). The ^space and M-space keys
|
||||
will now show up in the help menu, which itself has been
|
||||
tweaked a bit, and many more configure options should now
|
||||
cooperate (like the odd pairing of --enable-tiny and
|
||||
--enable-multibuffer). The marker should now work
|
||||
when using multiple buffers, and the huge memory leak in
|
||||
color syntax highlighting has been fixed. A lot of
|
||||
new stuff for everyone's favorite text editor ;) Have fun!
|
||||
|
||||
03/30/2002 - GNU nano 1.1.8 is released. New features include an
|
||||
"Insert Output of External Command", ^R^X, and a .spec
|
||||
file is now included in the distribution. There are
|
||||
cleanups in the usage code, fixes for regex parsing,
|
||||
the file browser, the NO_CONVERT auto-detect, indented
|
||||
justification, the internal spell checker, and a serious
|
||||
bug where reading a file of 0 lines would hang nano.
|
||||
Also, the "show position" code now shows the starting
|
||||
column as 1 instead of 0. Have fun!
|
||||
|
||||
03/05/2002 - GNU nano 1.1.7 "lets change everything and see what breaks"
|
||||
is released. New features include new flags
|
||||
-N,--noconvert to stop any file format conversion and
|
||||
@@ -44,9 +186,9 @@
|
||||
release. Other changes include more Hurd fixes, fixes
|
||||
parsing the .nanorc, display fixes for the color syntax
|
||||
highlighting, gettext stabilization and many translation
|
||||
updates. This is amost like a stable release, much like
|
||||
updates. This is almost like a stable release, much like
|
||||
in the 0.9.x series when every other release was the
|
||||
mosts stable one :) Have fun!
|
||||
most stable one :) Have fun!
|
||||
|
||||
12/11/2001 - GNU nano 1.1.4 is released. This release contains
|
||||
rudimentary color syntax support (but it's still
|
||||
@@ -75,7 +217,7 @@
|
||||
that nano was distributed under version 1 of the GPL when
|
||||
the accompanying license was the GPLv2.
|
||||
If you're using nano-1.1, it is highly
|
||||
recommeneded you upgrade to this release. If using 1.0,
|
||||
recommended you upgrade to this release. If using 1.0,
|
||||
wait for version 1.0.6 which should be available early
|
||||
next week. Enjoy!
|
||||
|
||||
@@ -95,7 +237,7 @@
|
||||
|
||||
07/28/2001 - GNU nano 1.1.1 is released. Our second 1.1 unstable release
|
||||
features many bugfixes from the initial release, in
|
||||
particular fixs for the multibuffer code, and various
|
||||
particular fixes for the multibuffer code, and various
|
||||
compiler macro fixes. The shortcut lists for
|
||||
the search and replace prompts are a little more logical
|
||||
(with cancel the last option again), and the included
|
||||
@@ -197,7 +339,7 @@
|
||||
The --nofollow option also works again for those who
|
||||
are real security nuts. There are also some display and
|
||||
search fixes, and the --disable-spell function was renamed
|
||||
to --disable-speller to be in line with nano and pico's
|
||||
to --disable-speller to be in line with nano and Pico's
|
||||
"speller" term.
|
||||
|
||||
12/02/2000 - Nano 0.9.22 is released, with many more changes and
|
||||
@@ -291,7 +433,7 @@
|
||||
-k option from Pico (cut to end of line). The majority
|
||||
of changes in this release are bugfixes, however, including
|
||||
the usual display fixes and fixes for writing to symbolic
|
||||
links and un-writeable files. Barring any other major
|
||||
links and un-writable files. Barring any other major
|
||||
changes, this should be the feature set for nano 1.0,
|
||||
whenever it might be released =-)
|
||||
|
||||
@@ -392,13 +534,13 @@
|
||||
04/15/2000 - Nano 0.9.2 just fixes the serious segfault problem if
|
||||
nano is invoked any way other than using the absolute
|
||||
path. The bug was in the new code for checking whether
|
||||
nano is invoked as pico.
|
||||
nano is invoked as 'pico'.
|
||||
|
||||
04/14/2000 - 0.9.1 has some more Pico compatibility built-in. The
|
||||
option to switch to/from Search and Search/Replace
|
||||
(^T) is now available, and nano now displays the
|
||||
more Pico-like shortcut list when invoked as 'pico'
|
||||
(i.e. if pico is a symlink to nano). There is an
|
||||
(i.e. if 'pico' is a symlink to nano). There is an
|
||||
important change to the handling of symbolic links
|
||||
as well. Now, nano does the "correct" thing and
|
||||
automatically writes to the object of the symlink,
|
||||
|
||||
16
README.CVS
16
README.CVS
@@ -4,15 +4,15 @@ INSTRUCTIONS TO COMPILE AND INSTALL NANO CVS VERSIONS
|
||||
GNU nano is available from CVS, but building this needs a bit
|
||||
more care than the official stable and unstable tarballs.
|
||||
|
||||
To succesfully compile GNU nano from CVS, you'll need the
|
||||
To successfully compile GNU nano from CVS, you'll need the
|
||||
following packages:
|
||||
|
||||
- autoconf (version >= 2.52)
|
||||
- automake (version 1.4-pl5 recommended)
|
||||
- autoheader
|
||||
- gettext (version 0.10.40)
|
||||
- automake (version >= 1.6, 1.7.x recommended)
|
||||
- gettext (version >= 0.11.5)
|
||||
- texinfo
|
||||
- cvs
|
||||
- glib (if your system doesn't have snprintf() and/or vsnprintf())
|
||||
- make, gcc and the normal development libraries (ncurses, etc)
|
||||
These should be available on your GNU mirror.
|
||||
|
||||
@@ -26,13 +26,13 @@ and the nano tree will download.
|
||||
If you want to checkout the stable CVS branch, append -r nano_1_0_branch:
|
||||
$ cvs -z3 -d:pserver:anonymous@subversions.gnu.org:/cvsroot/nano checkout -r nano_1_0_branch nano
|
||||
|
||||
One you have the sources in the "nano" directory, cd into it, and execute
|
||||
the "autogen.sh" script in the top dir. This will setup a configure script
|
||||
and Makefile.in, and you will be ready to compile with
|
||||
Once you have the sources in the "nano" directory, cd into it, and
|
||||
execute the "autogen.sh" script in the top dir. This will setup a
|
||||
configure script and Makefile.in, and you will be ready to compile with
|
||||
$ ./configure [--add-options-here] && make
|
||||
Once it's done compiling,
|
||||
$ make install
|
||||
should put the required files in their respective directories.
|
||||
(as root) should put the required files in their respective directories.
|
||||
|
||||
|
||||
Please submit any bugs in the CVS branch to nano-devel@gnu.org.
|
||||
|
||||
74
THANKS
74
THANKS
@@ -1,45 +1,53 @@
|
||||
The following people have helped GNU nano in some way or another.
|
||||
If we missed you here, let us now!
|
||||
If we missed you here, let us know!
|
||||
|
||||
Marco Colombo <magicdice@inwind.it> Italian Translator
|
||||
Karl Eichwalder <keichwa@gmx.net> German Translator
|
||||
Sharuzzaman Ahmat Raslan <sharuzzaman@excite.com>
|
||||
Bahasa Melayu translator
|
||||
Ricardo Cárdenes Medina <ricardo@conisys.com> Spanish translator
|
||||
Marco Colombo <magicdice@inwind.it> Italian translator
|
||||
Karl Eichwalder <keichwa@gmx.net> German translator
|
||||
Doruk Fisek <dfisek@fisek.com.tr> Turkish translator
|
||||
Jean-Philippe Guérard <jean-philippe.guerard@laposte.net>
|
||||
French Translator
|
||||
Tedi Heriyanto <tedi_h@gmx.net> Indonesian Translator
|
||||
Václav Haisman <V.Haisman@sh.cvut.cz> Czech Translator
|
||||
French translator
|
||||
Tedi Heriyanto <tedi_h@gmx.net> Indonesian translator
|
||||
Václav Haisman <V.Haisman@sh.cvut.cz> Czech translator
|
||||
Szabolcs Horvath <horvaths@janus.gimsz.sulinet.hu>
|
||||
Hungarian Translator
|
||||
Eivind Kjørstad <ekj@vestdata.no> Norwegian nynorsk Translator
|
||||
Florian König <floki@bigfoot.com> German Translator
|
||||
Wojciech Kotwica <wkotwica@post.pl> Polish Translator
|
||||
Clement Laforet <clem_laf@wanadoo.fr> French Translator
|
||||
Gergely Nagy <algernon@debian.org> Hungarian Translator
|
||||
Michael Piefel <piefel@informatik.hu-berlin.de> German Translator
|
||||
Sergey A. Ribalchenko <fisher@obu.ck.ua> Russian, Ukrainian Translator
|
||||
Michel Robitaille <robitail@IRO.UMontreal.CA> French Translator
|
||||
Christian Rose <menthos@menthos.com> Swedish Translator
|
||||
Stig E Sandoe <stig@ii.uib.no> Norwegian bokmål Translator
|
||||
Keld Simonsen <keld@dkuug.dk> Danish Translator
|
||||
Guus Sliepen <guus@nl.linux.org> Dutch Translator
|
||||
Cezary Sliwa <sliwa@cft.edu.pl> Polish Translator
|
||||
Pierre Tane <tanep@bigfoot.com> French Translator
|
||||
Jacobo Tarrío <jtarrio@trasno.net> Galician Translator
|
||||
Kjetil Torgrim Homme <kjetilho@linpro.no> Norwegian nynorsk Translator
|
||||
Miquel Vidal <miquel@sindominio.net> Catalan Translator
|
||||
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish Translator
|
||||
Hungarian translator
|
||||
Kalle Kivimaa <kalle.kivimaa@iki.fi> Finnish Translator
|
||||
Eivind Kjørstad <ekj@vestdata.no> Norwegian nynorsk translator
|
||||
Florian König <floki@bigfoot.com> German translator
|
||||
Wojciech Kotwica <wkotwica@post.pl> Polish translator
|
||||
Clement Laforet <clem_laf@wanadoo.fr> French translator
|
||||
Gergely Nagy <algernon@debian.org> Hungarian translator
|
||||
Kalle Olavi Niemitalo <kon@iki.fi> Finnish Translator
|
||||
Claudio Neves <cneves@nextis.com> Brazilian Portuguese translator
|
||||
Michael Piefel <piefel@informatik.hu-berlin.de> German translator
|
||||
Sergey A. Ribalchenko <fisher@obu.ck.ua> Russian, Ukrainian translator
|
||||
Michel Robitaille <robitail@IRO.UMontreal.CA> French translator
|
||||
Christian Rose <menthos@menthos.com> Swedish translator
|
||||
Stig E Sandoe <stig@ii.uib.no> Norwegian bokmål translator
|
||||
Keld Simonsen <keld@dkuug.dk> Danish translator
|
||||
Guus Sliepen <guus@nl.linux.org> Dutch translator
|
||||
Cezary Sliwa <sliwa@cft.edu.pl> Polish translator
|
||||
Pierre Tane <tanep@bigfoot.com> French translator
|
||||
Jacobo Tarrío <jtarrio@trasno.net> Galician translator
|
||||
Kjetil Torgrim Homme <kjetilho@linpro.no> Norwegian nynorsk translator
|
||||
Miquel Vidal <miquel@sindominio.net> Catalan translator
|
||||
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish translator
|
||||
Peio Ziarsolo <peio@sindominio.net> Basque translator
|
||||
|
||||
Jim Knoble <jmknoble@pobox.com> Pico compat for browser
|
||||
Thomas Dickey <dickey@herndon4.his.com> Curses help and advice
|
||||
Ryan Krebs <fluffy@highwire.stanford.edu> Many bug fixes and testing
|
||||
Ken Tyler <kent@werple.net.au> Super bug tester and advice
|
||||
Bill Soudan <wes0472@rit.edu> Regex code, etc
|
||||
Ben Armstrong <synrg@sanctuary.nslug.ns.ca> Negative -r value idea, code
|
||||
Jeremy Robichaud <robicj@yahoo.com> Beta tester
|
||||
Roy Lanek <lanek@ranahminang.net> Advice and advocacy
|
||||
Thomas Dickey <dickey@herndon4.his.com> Curses help and advice
|
||||
Sven Guckes <guckes@math.fu-berlin.de> Advice and Advocacy
|
||||
Neil Parks <nparks@acsmail.com> Bug reports n fixes
|
||||
Jim Knoble <jmknoble@pobox.com> Pico compat for browser
|
||||
Ryan Krebs <fluffy@highwire.stanford.edu> Many bug fixes and testing
|
||||
Roy Lanek <lanek@ranahminang.net> Advice and advocacy
|
||||
Chuck Mead <csm@MoonGroup.com> Feedback and RPM stuff
|
||||
Mike Melanson <melanson@pcisys.net> Bugs
|
||||
Neil Parks <nparks@acsmail.com> Bug reports and fixes
|
||||
Jeremy Robichaud <robicj@yahoo.com> Beta tester
|
||||
Bill Soudan <wes0472@rit.edu> Regex code, etc
|
||||
Ken Tyler <kent@werple.net.au> Search fixes and more
|
||||
|
||||
|
||||
$Id$
|
||||
|
||||
46
TODO
46
TODO
@@ -1,7 +1,35 @@
|
||||
TODO file (? means the feature may be implemented, but not definitely)
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Current Version:
|
||||
For version 1.2:
|
||||
- Single line scroll up/down? [DONE]
|
||||
- Color syntax highlighting? (certainly seems like there's a demand for it.)
|
||||
- .nanorc [DONE]
|
||||
- Backup making (filename~)? [DONE]
|
||||
- Search (etc.) string history [DONE]
|
||||
- Implement Pico's -j and -g flags, as they are pretty easy to do. [DONE]
|
||||
- Make mouse support work with clicking on the shortcuts (-m). Must
|
||||
make global variable pointing to current shortcut list to determine what
|
||||
keystroke to ungetch(). [DONE].
|
||||
- Implement -o (chroot of sorts) [DONE]
|
||||
- Allow -r to take a negative argument, meaning right margin instead of
|
||||
left (allows resizing that way), formerly -W arg. [DONE]
|
||||
|
||||
For version 1.4:
|
||||
- UTF-8 support.
|
||||
- Support for Pico's paragraph searching ability.
|
||||
- Undo/Redo key?
|
||||
- Remindable keys?
|
||||
- Keystroke to implement "Add next sequence as raw" like vi's ^V.
|
||||
- Spell check selected text only.
|
||||
- Make "To line" (^W^T) and "Read from Command" (^R^X) re-enter their
|
||||
parent menu when their keystroke is entered a second time (^W^T^T and
|
||||
(^R^X^X)(requires figuring out when to keep cursor pos and when not to).
|
||||
- Fix resetstatuspos global which we shouldn't have.
|
||||
|
||||
Old requests:
|
||||
|
||||
For version 1.0:
|
||||
- Implement Spelling [DONE]
|
||||
- Implement Help [DONE]
|
||||
- Internationalization [In progress, translators welcome!]
|
||||
@@ -18,20 +46,4 @@ Current Version:
|
||||
- Unjustify command (^U after ^J) [DONE =-].
|
||||
- Username completion (~user) [DONE =-].
|
||||
|
||||
For Next Version:
|
||||
- Undo/Redo key?
|
||||
- Single line scroll up/down? [DONE]
|
||||
- Color syntax highlighting? (certainly seems like there's a demand for it.)
|
||||
- .nanorc [DONE]
|
||||
- Backup making (filename~)?
|
||||
- Search (etc) string history [1.1]
|
||||
- Implement Pico's -j and -g flags, as they are pretty easy to do. [DONE]
|
||||
- Make mouse support work with clicking on the shortcuts (-m). Must
|
||||
make global variable pointing to current shortcut list to determine what
|
||||
keystroke to ungetch(). [DONE].
|
||||
- Implement -o (chroot of sorts) [DONE]
|
||||
- Allow -r to take a negative argument, meaning right margin instead of
|
||||
left (allows resizing that way), formerly -W arg. [DONE]
|
||||
- UTF-8 support.
|
||||
|
||||
$Id$
|
||||
|
||||
28
UPGRADE
Normal file
28
UPGRADE
Normal file
@@ -0,0 +1,28 @@
|
||||
GNU nano upgrading information
|
||||
==============================
|
||||
|
||||
Visible changes since 1.0
|
||||
-------------------------
|
||||
* Editor Features
|
||||
- Complete Pico compatibility (--pico has been removed, and -p means
|
||||
something else, see below).
|
||||
- nanorc support.
|
||||
- Smooth scrolling (-S).
|
||||
- Searching of matching brace/bracket/etc.
|
||||
- Help for all editor features.
|
||||
- Color syntax highlighting support.
|
||||
- Quote string support, useful for mail agents, etc (-Q).
|
||||
- Insertion of output of external commands.
|
||||
- Optional enabling of XON and XOFF control characters (-p).
|
||||
- Tons of bugfixes/enhancements for already existing features.
|
||||
|
||||
* File Handling
|
||||
- Overwriting and appending or prepending to files.
|
||||
- Writing marked text to separate files.
|
||||
- Multiple file buffers (-F).
|
||||
- Converting from and to DOS/Mac file format (-D/-M, -N to disable).
|
||||
- Better control character handling.
|
||||
- Creation of backup files (-B).
|
||||
- Search/replace history (-H).
|
||||
|
||||
See the GNU nano manual for detailed information on each feature.
|
||||
73
acconfig.h
73
acconfig.h
@@ -1,73 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Define this if you have the wresize function in your ncurses-type library */
|
||||
#undef HAVE_WRESIZE
|
||||
|
||||
/* Define this if you have the resizeterm function in your ncurses-type library */
|
||||
#undef HAVE_RESIZETERM
|
||||
|
||||
/* Define this if your curses lib has the _use_keypad flag */
|
||||
#undef HAVE_USEKEYPAD
|
||||
|
||||
/* Define this if you have NLS */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define this is you have the catgets command */
|
||||
#undef HAVE_CATGETS
|
||||
|
||||
/* Define this is you have GNU gettext */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define this for HAVE_LC_MESSAGES */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define this if you have the stpcpy function (cool) */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define this to make the nano executable as small as possible */
|
||||
#undef NANO_SMALL
|
||||
|
||||
/* Define to use the slang wrappers for curses instead of native curses */
|
||||
#undef USE_SLANG
|
||||
|
||||
/* Define this to enable the extra stuff */
|
||||
#undef NANO_EXTRA
|
||||
|
||||
/* Define to disable the tab completion code Chris worked so hard on! */
|
||||
#undef DISABLE_TABCOMP
|
||||
|
||||
/* Define this to disable the justify routine */
|
||||
#undef DISABLE_JUSTIFY
|
||||
|
||||
/* Define this to disable the use(full|less) spelling functions */
|
||||
#undef DISABLE_SPELLER
|
||||
|
||||
/* Define this to disable the ^G help menu */
|
||||
#undef DISABLE_HELP
|
||||
|
||||
/* Define this to disable the built-in (crappy) file browser */
|
||||
#undef DISABLE_BROWSER
|
||||
|
||||
/* Define this to disable any and all text wrapping */
|
||||
#undef DISABLE_WRAPPING
|
||||
|
||||
/* Define this to disable the mouse functions */
|
||||
#undef DISABLE_MOUSE
|
||||
|
||||
/* Define this to disable setting of the operating directory (chroot of sorts) */
|
||||
#undef DISABLE_OPERATINGDIR
|
||||
|
||||
/* Define this to enable multiple file buffers; this is disabled if NANO_SMALL is defined */
|
||||
#undef ENABLE_MULTIBUFFER
|
||||
|
||||
/* Define this to use the .nanorc file */
|
||||
#undef ENABLE_NANORC
|
||||
|
||||
/* Define this if your curses library has the use_default_colors command */
|
||||
#undef HAVE_USE_DEFAULT_COLORS
|
||||
|
||||
/* Define this to have syntax hilighting, requires ENABLE_NANORC too! */
|
||||
#undef ENABLE_COLOR
|
||||
|
||||
/* Define this to enable undoing....something */
|
||||
#undef ENABLE_UNDO
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Generate configure & friends for CVS users.
|
||||
|
||||
aclocal -I ./m4
|
||||
autoheader
|
||||
automake --add-missing
|
||||
autoconf
|
||||
autoreconf -f -i -s
|
||||
|
||||
202
color.c
202
color.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* color.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* 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) *
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -33,149 +31,101 @@
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
/* For each syntax list entry, we go through the list of colors and
|
||||
* assign color pairs. */
|
||||
void set_colorpairs(void)
|
||||
{
|
||||
const syntaxtype *this_syntax = syntaxes;
|
||||
|
||||
for(; this_syntax != NULL; this_syntax = this_syntax->next) {
|
||||
colortype *this_color = this_syntax->color;
|
||||
int color_pair = 1;
|
||||
|
||||
for(; this_color != NULL; this_color = this_color->next) {
|
||||
const colortype *beforenow = this_syntax->color;
|
||||
|
||||
for(; beforenow != NULL && beforenow != this_color &&
|
||||
(beforenow->fg != this_color->fg ||
|
||||
beforenow->bg != this_color->bg ||
|
||||
beforenow->bright != this_color->bright);
|
||||
beforenow = beforenow->next)
|
||||
;
|
||||
|
||||
if (beforenow != NULL && beforenow != this_color)
|
||||
this_color->pairnum = beforenow->pairnum;
|
||||
else {
|
||||
this_color->pairnum = color_pair;
|
||||
color_pair++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void do_colorinit(void)
|
||||
{
|
||||
if (has_colors()) {
|
||||
const colortype *tmpcolor = NULL;
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
int defok;
|
||||
#endif
|
||||
|
||||
void color_on(WINDOW *win, int whatever)
|
||||
{
|
||||
/* Temporary fallback, if the color value hasn't been set,
|
||||
turn on hilighting */
|
||||
if (!colors[whatever - FIRST_COLORNUM].set) {
|
||||
wattron(win, A_REVERSE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (colors[whatever - FIRST_COLORNUM].bold)
|
||||
wattron(win, A_BOLD);
|
||||
|
||||
/* If the foreground color is black, we've switched fg and bg (see
|
||||
the comment in colorinit_one() about this) so turn on reverse so
|
||||
it looks like it's supposed to */
|
||||
if (colors[whatever - FIRST_COLORNUM].fg == COLOR_BLACK)
|
||||
wattron(win, A_REVERSE);
|
||||
|
||||
wattron(win, COLOR_PAIR(whatever));
|
||||
|
||||
}
|
||||
|
||||
void color_off(WINDOW *win, int whatever)
|
||||
{
|
||||
if (!colors[whatever - FIRST_COLORNUM].set) {
|
||||
wattroff(win, A_REVERSE);
|
||||
return;
|
||||
}
|
||||
|
||||
wattroff(win, COLOR_PAIR(whatever));
|
||||
|
||||
if (colors[whatever - FIRST_COLORNUM].fg == COLOR_BLACK)
|
||||
wattroff(win, A_REVERSE);
|
||||
|
||||
if (colors[whatever - FIRST_COLORNUM].bold)
|
||||
wattroff(win, A_BOLD);
|
||||
}
|
||||
|
||||
|
||||
void colorinit_one(int colortoset, short fg, short bg, int bold)
|
||||
{
|
||||
colors[colortoset - FIRST_COLORNUM].fg = fg;
|
||||
colors[colortoset - FIRST_COLORNUM].bg = bg;
|
||||
colors[colortoset - FIRST_COLORNUM].bold = bold;
|
||||
colors[colortoset - FIRST_COLORNUM].set = 1;
|
||||
|
||||
/* Okay, so if they want a black foreground, do a switch on the fg
|
||||
and bg, because specifying black as the foreground color gives
|
||||
this ugly grey color. Then in color_on we will turn A_REVERSE
|
||||
which is probably what they want it to look like... */
|
||||
if (fg == COLOR_BLACK)
|
||||
init_pair(colortoset, bg, fg);
|
||||
else
|
||||
init_pair(colortoset, fg, bg);
|
||||
}
|
||||
|
||||
int do_colorinit(void)
|
||||
{
|
||||
int i;
|
||||
colortype *tmpcolor = NULL, *beforenow = NULL;
|
||||
int defok = 0;
|
||||
|
||||
if (has_colors()) {
|
||||
start_color();
|
||||
/* Add in colors, if available */
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
if (use_default_colors() != ERR)
|
||||
defok = 1;
|
||||
defok = use_default_colors() != ERR;
|
||||
#endif
|
||||
|
||||
i = 1;
|
||||
for (tmpcolor = colorstrings; tmpcolor != NULL;
|
||||
for (tmpcolor = colorstrings; tmpcolor != NULL;
|
||||
tmpcolor = tmpcolor->next) {
|
||||
short background = tmpcolor->bg;
|
||||
|
||||
for (beforenow = colorstrings; beforenow != NULL
|
||||
&& beforenow != tmpcolor &&
|
||||
(beforenow->fg != tmpcolor->fg || beforenow->bg != tmpcolor->bg
|
||||
|| beforenow->bright != tmpcolor->bright);
|
||||
beforenow = beforenow->next)
|
||||
;
|
||||
if (background == -1)
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
if (!defok)
|
||||
#endif
|
||||
background = COLOR_BLACK;
|
||||
|
||||
if (beforenow != NULL && beforenow != tmpcolor) {
|
||||
tmpcolor->pairnum = beforenow->pairnum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (defok && tmpcolor->bg == -1)
|
||||
init_pair(i, tmpcolor->fg, -1);
|
||||
else if (tmpcolor->bg == -1)
|
||||
init_pair(i, tmpcolor->fg, COLOR_BLACK);
|
||||
else /* They picked a fg and bg color */
|
||||
init_pair(i, tmpcolor->fg, tmpcolor->bg);
|
||||
init_pair(tmpcolor->pairnum, tmpcolor->fg, background);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Running init_pair with fg = %d and bg = %d\n", tmpcolor->fg, tmpcolor->bg);
|
||||
fprintf(stderr, _("Running %s with fg = %d and bg = %d\n"),
|
||||
"init_pair()", tmpcolor->fg, tmpcolor->bg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tmpcolor->pairnum = i;
|
||||
i++;
|
||||
/* Update the color information based on the current filename. */
|
||||
void update_color(void)
|
||||
{
|
||||
const syntaxtype *tmpsyntax;
|
||||
|
||||
colorstrings = NULL;
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) {
|
||||
const exttype *e;
|
||||
|
||||
for (e = tmpsyntax->extensions; e != NULL; e = e->next) {
|
||||
/* Set colorstrings if we matched the extension regex */
|
||||
if (!regexec(&e->val, filename, 0, NULL, 0))
|
||||
colorstrings = tmpsyntax->color;
|
||||
|
||||
if (colorstrings != NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (use_default_colors() != ERR) {
|
||||
init_pair(COLOR_BLACK, -1, -1);
|
||||
init_pair(COLOR_GREEN, COLOR_GREEN, -1);
|
||||
init_pair(COLOR_WHITE, COLOR_WHITE, -1);
|
||||
init_pair(COLOR_RED, COLOR_RED, -1);
|
||||
init_pair(COLOR_CYAN, COLOR_CYAN, -1);
|
||||
init_pair(COLOR_MAGENTA, COLOR_MAGENTA, -1);
|
||||
init_pair(COLOR_BLUE, COLOR_BLUE, -1);
|
||||
init_pair(COLOR_YELLOW, COLOR_YELLOW, -1);
|
||||
|
||||
} else {
|
||||
init_pair(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK);
|
||||
init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK);
|
||||
init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK);
|
||||
init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK);
|
||||
init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
|
||||
init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK);
|
||||
init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK);
|
||||
/* if we haven't found a match, use the override string */
|
||||
if (colorstrings == NULL && syntaxstr != NULL) {
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
if (!strcasecmp(tmpsyntax->desc, syntaxstr))
|
||||
colorstrings = tmpsyntax->color;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Okay I'll be nice and comment these out for the commit =)
|
||||
colorinit_one(COLOR_TITLEBAR, COLOR_GREEN, COLOR_BLUE, 1);
|
||||
colorinit_one(COLOR_BOTTOMBARS, COLOR_GREEN, COLOR_BLUE, 1);
|
||||
colorinit_one(COLOR_STATUSBAR, COLOR_BLACK, COLOR_CYAN, 0);
|
||||
colorinit_one(COLOR_TEXT, COLOR_WHITE, COLOR_BLACK, 0);
|
||||
colorinit_one(COLOR_MARKER, COLOR_BLACK, COLOR_CYAN, 0);
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
do_colorinit();
|
||||
}
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
|
||||
513
config.rpath
Executable file
513
config.rpath
Executable file
@@ -0,0 +1,513 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2002 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shlibext=
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
linux*)
|
||||
echo '__INTEL_COMPILER' > conftest.$ac_ext
|
||||
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
# Intel icc
|
||||
wl='-Qoption,ld,'
|
||||
fi
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
if test "x$host_vendor" = xsni; then
|
||||
wl='-LD'
|
||||
else
|
||||
wl='-Wl,'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
if test "x$host_vendor" = xsno; then
|
||||
hardcode_direct=yes # is this really true???
|
||||
else
|
||||
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
|
||||
fi
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5uw7* | unixware7*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
libname_spec='lib$name'
|
||||
sys_lib_dlsearch_path_spec="/lib /usr/lib"
|
||||
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
shlibext=so
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
shlibext=so
|
||||
;;
|
||||
amigaos*)
|
||||
shlibext=ixlibrary
|
||||
;;
|
||||
beos*)
|
||||
shlibext=so
|
||||
;;
|
||||
bsdi4*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
||||
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
case $GCC,$host_os in
|
||||
yes,cygwin*)
|
||||
shlibext=dll.a
|
||||
;;
|
||||
yes,mingw*)
|
||||
shlibext=dll
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
|
||||
;;
|
||||
yes,pw32*)
|
||||
shlibext=dll
|
||||
;;
|
||||
*)
|
||||
shlibext=dll
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shlibext=dylib
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
shlibext=sl
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
shlibext=so
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
|
||||
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
|
||||
;;
|
||||
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
|
||||
;;
|
||||
linux-gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
netbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
newsos6)
|
||||
shlibext=so
|
||||
;;
|
||||
openbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shlibext=dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
;;
|
||||
sco3.2v5*)
|
||||
shlibext=so
|
||||
;;
|
||||
solaris*)
|
||||
shlibext=so
|
||||
;;
|
||||
sunos4*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
shlibext=so
|
||||
case "$host_vendor" in
|
||||
motorola)
|
||||
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
uts4*)
|
||||
shlibext=so
|
||||
;;
|
||||
dgux*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
shlibext=so
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
# Compile-time system search path for libraries
|
||||
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
|
||||
|
||||
# Run-time system search path for libraries
|
||||
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
|
||||
|
||||
EOF
|
||||
237
configure.ac
237
configure.ac
@@ -1,125 +1,173 @@
|
||||
# Configuration for GNU nano - a small and user-friendly text editor
|
||||
#
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
#
|
||||
# GNU Nano 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.
|
||||
#
|
||||
# GNU Nano 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 GNU Nano; if not, write to the Free Software
|
||||
# Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT
|
||||
|
||||
AC_INIT([GNU Nano], [1.2.0], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([nano.c])
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER([config.h:config.h.in])
|
||||
|
||||
AC_PREREQ(2.52)
|
||||
AM_INIT_AUTOMAKE(nano, 1.1.7)
|
||||
AM_CONFIG_HEADER(config.h:config.h.in)
|
||||
AM_ACLOCAL_INCLUDE(m4)
|
||||
ALL_LINGUAS="es de fr it id fi hu ca cs gl uk ru sv nn nl da pl nb"
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Internationalization macros.
|
||||
AM_GNU_GETTEXT_VERSION(0.11.5)
|
||||
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h regex.h)
|
||||
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
|
||||
|
||||
dnl options
|
||||
AC_ARG_ENABLE(tiny,
|
||||
[ --enable-tiny Disable features for the sake of size
|
||||
(currently disables detailed help and i18n)],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_SMALL) tiny_support=yes
|
||||
AC_DEFINE(DISABLE_TABCOMP)
|
||||
AC_DEFINE(DISABLE_SPELLER)
|
||||
AC_DEFINE(DISABLE_HELP)
|
||||
AC_DEFINE(DISABLE_JUSTIFY)
|
||||
AC_DEFINE(DISABLE_BROWSER)
|
||||
AC_DEFINE(DISABLE_MOUSE)
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR)
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Enable debugging (disabled by default)],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(DEBUG, 1, [Define this to enable nano debug messages and assert warnings.])
|
||||
debug_support=yes
|
||||
fi])
|
||||
|
||||
if test "$debug_support" != "yes"; then
|
||||
AC_DEFINE(NDEBUG, 1, [Shut up the assert warnings :-)])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(extra,
|
||||
[ --enable-extra Enable extra (optional) functions, including easter eggs],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_EXTRA) extra_support=yes
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER) multibuffer_support=yes
|
||||
AC_DEFINE(ENABLE_UNDO) undo_support=yes
|
||||
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable the extra stuff.]) extra_support=yes
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(undo,
|
||||
[ --enable-undo Enable undo support],
|
||||
[if test x$enableval = xyes && test x$tiny_support != xyes; then
|
||||
AC_DEFINE(ENABLE_UNDO) undo_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(multibuffer,
|
||||
[ --enable-multibuffer Enable multiple file buffers; this is disabled if --enable-tiny is used],
|
||||
[if test x$enableval = xyes && test x$tiny_support != xyes; then
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER) multibuffer_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(nanorc,
|
||||
[ --enable-nanorc Enable use of .nanorc file],
|
||||
AC_ARG_ENABLE(tiny,
|
||||
[ --enable-tiny Disable features for the sake of size],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC) nanorc_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --enable-color Enable color and syntax highlighting],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR) color_support=yes
|
||||
AC_MSG_WARN([
|
||||
|
||||
***********************************************************************
|
||||
*** WARNING: Color support is currently BROKEN. Don't expect it to ***
|
||||
*** work AT ALL until more is implemented. ***
|
||||
***********************************************************************
|
||||
])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
[ --disable-tabcomp Disable tab completion code for a smaller binary],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_TABCOMP)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(justify,
|
||||
[ --disable-justify Disable justify/unjustify function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
[ --disable-speller Disable spell checker function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_SPELLER)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(help,
|
||||
[ --disable-help Disable help function (^G)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_HELP)
|
||||
AC_DEFINE(NANO_SMALL, 1, [Define this to make the nano executable as small as possible.]) tiny_support=yes
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in (crappy) file browser.])
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the ^G help menu.])
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the use(full|less) spelling functions.])
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(browser,
|
||||
[ --disable-browser Disable mini file browser],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_BROWSER)
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in (crappy) file browser.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping,
|
||||
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
|
||||
AC_ARG_ENABLE(help,
|
||||
[ --disable-help Disable help function (^G)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_WRAPPING)
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the ^G help menu.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(justify,
|
||||
[ --disable-justify Disable justify/unjustify function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(mouse,
|
||||
[ --disable-mouse Disable mouse support (and -m flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_MOUSE)
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(operatingdir,
|
||||
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
|
||||
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR)
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
[ --disable-speller Disable spell checker function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the use(full|less) spelling functions.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
[ --disable-tabcomp Disable tab completion code for a smaller binary],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping,
|
||||
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable any and all text wrapping.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping-as-root,
|
||||
[ --disable-wrapping-as-root Disable wrapping of text as root by default],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_ROOTWRAP, 1, [Define this to disable wrapping as root by default.])
|
||||
fi])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --enable-color Enable color and syntax highlighting],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires ENABLE_NANORC too!]) color_support=yes
|
||||
AC_MSG_WARN([
|
||||
|
||||
***********************************************************************
|
||||
*** WARNING: Color support is far from perfect, but functional. ***
|
||||
*** Be careful with syntax in your .nanorc or nano may malfunction. ***
|
||||
***********************************************************************
|
||||
])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(multibuffer,
|
||||
[ --enable-multibuffer Enable multiple file buffers],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(nanorc,
|
||||
[ --enable-nanorc Enable use of .nanorc file],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(all,
|
||||
[ --enable-all Enable ALL extra nano functionality (kitchen sink option)],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires ENABLE_NANORC too!]) color_support=yes
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable the extra stuff.]) extra_support=yes
|
||||
AC_MSG_WARN([
|
||||
|
||||
***********************************************************************
|
||||
*** WARNING: Color support is far from perfect, but functional. ***
|
||||
*** Be careful with syntax in your .nanorc or nano may malfunction. ***
|
||||
***********************************************************************
|
||||
])
|
||||
fi])
|
||||
|
||||
AC_MSG_CHECKING([whether to use slang])
|
||||
CURSES_LIB_NAME=""
|
||||
AC_ARG_WITH(slang,
|
||||
@@ -146,7 +194,7 @@ AC_ARG_WITH(slang,
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
@@ -168,7 +216,7 @@ int main () { SLtt_initialize (NULL); return 0; }],
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
@@ -185,7 +233,7 @@ int main () { SLtt_initialize (NULL); return 0; }],
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
@@ -213,7 +261,7 @@ AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
||||
esac], [AC_MSG_RESULT(no)])
|
||||
|
||||
dnl Checks for functions
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf)
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf strcasecmp strncasecmp)
|
||||
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
|
||||
then
|
||||
AM_PATH_GLIB(1.2.4,,
|
||||
@@ -269,12 +317,12 @@ else
|
||||
fi
|
||||
|
||||
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, [AC_DEFINE(HAVE_USE_DEFAULT_COLORS)])
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors command.]))
|
||||
if test x$slang_support != xyes; then
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], wresize, [AC_DEFINE(HAVE_WRESIZE)])
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, [AC_DEFINE(HAVE_RESIZETERM)])
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], wresize, AC_DEFINE(HAVE_WRESIZE, 1, [Define this if you have the wresize function in your ncurses-type library.]))
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, AC_DEFINE(HAVE_RESIZETERM, 1, [Define this if you have the resizeterm function in your ncurses-type library.]))
|
||||
|
||||
# Taken from aumix (can't tell form the variable name?)
|
||||
# Taken from aumix (can't tell from the variable name?)
|
||||
AC_CACHE_CHECK([for private member _use_keypad in WINDOW],
|
||||
aumix_cv_struct_window_usekeypad,
|
||||
[AC_TRY_COMPILE([#ifdef HAVE_NCURSES_H
|
||||
@@ -285,7 +333,7 @@ if test x$slang_support != xyes; then
|
||||
aumix_cv_struct_window_usekeypad=yes, aumix_cv_struct_window_usekeypad=no)])
|
||||
|
||||
if test $aumix_cv_struct_window_usekeypad = yes; then
|
||||
AC_DEFINE(HAVE_USEKEYPAD)
|
||||
AC_DEFINE(HAVE_USEKEYPAD, 1, [Define this if your curses lib has the _use_keypad flag.])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -293,8 +341,6 @@ dnl Parse any configure options
|
||||
|
||||
LIBS="$LIBS $CURSES_LIB"
|
||||
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging (def disabled)],)
|
||||
|
||||
AC_SUBST(CURSES_LIB)
|
||||
|
||||
if test "x$glib_cflags" != "x"
|
||||
@@ -306,8 +352,5 @@ then
|
||||
LDFLAGS="$LDFLAGS $glib_libs"
|
||||
fi
|
||||
|
||||
dnl i18n stuff - pretty incomplete for now
|
||||
NANO_AM_GNU_GETTEXT
|
||||
|
||||
AC_CONFIG_FILES([Makefile intl/Makefile m4/Makefile po/Makefile.in])
|
||||
AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in nano.spec])
|
||||
AC_OUTPUT
|
||||
|
||||
481
cut.c
481
cut.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* cut.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* 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) *
|
||||
@@ -24,27 +24,26 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
static int marked_cut; /* Is the cutbuffer from a mark? */
|
||||
static filestruct *cutbottom = NULL;
|
||||
/* Pointer to end of cutbuffer */
|
||||
|
||||
static int marked_cut; /* Is the cutbuffer from a mark */
|
||||
static filestruct *cutbottom = NULL; /* Pointer to end of cutbuffer */
|
||||
filestruct *get_cutbottom(void)
|
||||
{
|
||||
return cutbottom;
|
||||
}
|
||||
|
||||
void add_to_cutbuffer(filestruct * inptr)
|
||||
void add_to_cutbuffer(filestruct *inptr)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("add_to_cutbuffer called with inptr->data = %s\n"),
|
||||
fprintf(stderr, _("add_to_cutbuffer() called with inptr->data = %s\n"),
|
||||
inptr->data);
|
||||
#endif
|
||||
|
||||
totsize -= strlen(inptr->data);
|
||||
if (cutbuffer == NULL) {
|
||||
cutbuffer = inptr;
|
||||
inptr->prev = NULL;
|
||||
@@ -58,186 +57,169 @@ void add_to_cutbuffer(filestruct * inptr)
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Cut a marked segment instead of a whole line. Only called from
|
||||
do_cut_text().
|
||||
destructive is whether to actually modify the file structure, if not then
|
||||
just copy the buffer into cutbuffer and don't pull it from the file */
|
||||
|
||||
void cut_marked_segment(filestruct * top, int top_x, filestruct * bot,
|
||||
int bot_x, int destructive)
|
||||
/* Cut a marked segment instead of a whole line.
|
||||
*
|
||||
* The first cut character is top->data[top_x]. Unless top == bot, the
|
||||
* last cut line has length bot_x. That is, if bot_x > 0 then we cut to
|
||||
* bot->data[bot_x - 1].
|
||||
*
|
||||
* destructive is whether to actually modify the file structure, if not
|
||||
* then just copy the buffer into cutbuffer and don't pull it from the
|
||||
* file.
|
||||
*
|
||||
* If destructive, then we maintain totsize, totlines, filebot, the
|
||||
* magic line, and line numbers. Also, we set current and current_x so
|
||||
* the cursor will be on the first character after what was cut. We do
|
||||
* not do any screen updates. */
|
||||
void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
|
||||
size_t bot_x, int destructive)
|
||||
{
|
||||
filestruct *tmp, *next, *botcopy;
|
||||
char *tmpstr;
|
||||
int newsize;
|
||||
filestruct *tmp, *next;
|
||||
size_t newsize;
|
||||
|
||||
if (top == bot && top_x == bot_x)
|
||||
return;
|
||||
assert(top != NULL && bot != NULL);
|
||||
|
||||
/* Make top be no later than bot. */
|
||||
if (top->lineno > bot->lineno) {
|
||||
filestruct *swap = top;
|
||||
int swap2 = top_x;
|
||||
|
||||
top = bot;
|
||||
bot = swap;
|
||||
|
||||
top_x = bot_x;
|
||||
bot_x = swap2;
|
||||
} else if (top == bot && top_x > bot_x) {
|
||||
/* And bot_x can't be an earlier character than top_x. */
|
||||
int swap = top_x;
|
||||
|
||||
top_x = bot_x;
|
||||
bot_x = swap;
|
||||
}
|
||||
|
||||
/* Make the first cut line manually. */
|
||||
tmp = copy_node(top);
|
||||
newsize = (top == bot ? bot_x - top_x : strlen(top->data + top_x));
|
||||
memmove(tmp->data, top->data + top_x, newsize);
|
||||
null_at(&tmp->data, newsize);
|
||||
add_to_cutbuffer(tmp);
|
||||
|
||||
/* And make the remainder line manually too. */
|
||||
if (destructive) {
|
||||
current_x = top_x;
|
||||
totsize -= newsize;
|
||||
totlines -= bot->lineno - top->lineno;
|
||||
|
||||
newsize = top_x + strlen(bot->data + bot_x) + 1;
|
||||
if (top == bot) {
|
||||
/* In this case, the remainder line is shorter, so we must
|
||||
move text from the end forward first. */
|
||||
memmove(top->data + top_x, bot->data + bot_x,
|
||||
newsize - top_x);
|
||||
top->data = (char *)nrealloc(top->data,
|
||||
sizeof(char) * newsize);
|
||||
} else {
|
||||
totsize -= bot_x + 1;
|
||||
|
||||
/* Here, the remainder line might get longer, so we
|
||||
realloc() it first. */
|
||||
top->data = (char *)nrealloc(top->data,
|
||||
sizeof(char) * newsize);
|
||||
memmove(top->data + top_x, bot->data + bot_x,
|
||||
newsize - top_x);
|
||||
}
|
||||
}
|
||||
|
||||
/* Special case for cutting part of one line */
|
||||
if (top == bot) {
|
||||
int swap;
|
||||
|
||||
tmp = copy_node(top);
|
||||
newsize = abs(bot_x - top_x) + 1;
|
||||
tmpstr = charalloc(newsize + 1);
|
||||
|
||||
/* Make top_x always be before bot_x */
|
||||
if (top_x > bot_x) {
|
||||
swap = top_x;
|
||||
top_x = bot_x;
|
||||
bot_x = swap;
|
||||
}
|
||||
|
||||
strncpy(tmpstr, &top->data[top_x], newsize);
|
||||
|
||||
if (destructive) {
|
||||
memmove(&top->data[top_x], &top->data[bot_x],
|
||||
strlen(&top->data[bot_x]) + 1);
|
||||
align(&top->data);
|
||||
current_x = top_x;
|
||||
update_cursor();
|
||||
}
|
||||
tmpstr[newsize - 1] = 0;
|
||||
tmp->data = tmpstr;
|
||||
add_to_cutbuffer(tmp);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set up the beginning of the cutbuffer */
|
||||
tmp = copy_node(top);
|
||||
tmpstr = charalloc(strlen(&top->data[top_x]) + 1);
|
||||
strcpy(tmpstr, &top->data[top_x]);
|
||||
free(tmp->data);
|
||||
tmp->data = tmpstr;
|
||||
|
||||
/* Chop off the end of the first line */
|
||||
tmpstr = charalloc(top_x + 1);
|
||||
strncpy(tmpstr, top->data, top_x);
|
||||
|
||||
if (destructive) {
|
||||
free(top->data);
|
||||
top->data = tmpstr;
|
||||
}
|
||||
|
||||
do {
|
||||
tmp = top->next;
|
||||
while (tmp != bot) {
|
||||
next = tmp->next;
|
||||
if (destructive)
|
||||
add_to_cutbuffer(tmp);
|
||||
else {
|
||||
filestruct *tmpcopy = NULL;
|
||||
|
||||
tmpcopy = copy_node(tmp);
|
||||
add_to_cutbuffer(tmpcopy);
|
||||
}
|
||||
totlines--;
|
||||
totsize--; /* newline (add_to_cutbuffer doesn't count newlines) */
|
||||
if (!destructive)
|
||||
tmp = copy_node(tmp);
|
||||
else
|
||||
totsize -= strlen(tmp->data) + 1;
|
||||
add_to_cutbuffer(tmp);
|
||||
tmp = next;
|
||||
}
|
||||
while (next != bot && next != NULL);
|
||||
|
||||
/* Make the last cut line manually. */
|
||||
tmp = copy_node(bot);
|
||||
null_at(&tmp->data, bot_x);
|
||||
add_to_cutbuffer(tmp);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
if (next == NULL)
|
||||
return;
|
||||
|
||||
/* Now, paste bot[bot_x] into top[top_x] */
|
||||
if (destructive) {
|
||||
|
||||
tmpstr = charalloc(top_x + strlen(&bot->data[bot_x]) + 1);
|
||||
strncpy(tmpstr, top->data, top_x);
|
||||
strcpy(&tmpstr[top_x], &bot->data[bot_x]);
|
||||
free(top->data);
|
||||
top->data = tmpstr;
|
||||
|
||||
/* We explicitly don't decrement totlines here because we don't snarf
|
||||
* up a newline when we're grabbing the last line of the mark. For
|
||||
* the same reason, we don't do an extra totsize decrement. */
|
||||
}
|
||||
|
||||
/* I honestly do not know why this is needed. After many hours of
|
||||
using gdb on an OpenBSD box, I can honestly say something is
|
||||
screwed somewhere. Not doing this causes update_line to annihilate
|
||||
the last line copied into the cutbuffer when the mark is set ?!?!? */
|
||||
botcopy = copy_node(bot);
|
||||
null_at(&botcopy->data, bot_x);
|
||||
next = botcopy->next;
|
||||
add_to_cutbuffer(botcopy);
|
||||
|
||||
#endif
|
||||
|
||||
if (destructive) {
|
||||
free(bot);
|
||||
|
||||
top->next = next;
|
||||
if (next != NULL)
|
||||
next->prev = top;
|
||||
|
||||
dump_buffer(cutbuffer);
|
||||
top->next = bot->next;
|
||||
if (top->next != NULL)
|
||||
top->next->prev = top;
|
||||
delete_node(bot);
|
||||
renumber(top);
|
||||
current = top;
|
||||
current_x = top_x;
|
||||
|
||||
/* If we're hitting the end of the buffer, we should clean that up. */
|
||||
if (bot == filebot) {
|
||||
if (next != NULL) {
|
||||
filebot = next;
|
||||
} else {
|
||||
filebot = top;
|
||||
if (top_x > 0)
|
||||
new_magicline();
|
||||
}
|
||||
filebot = top;
|
||||
assert(bot_x == 0);
|
||||
if (top_x > 0)
|
||||
new_magicline();
|
||||
}
|
||||
if (top->lineno < edittop->lineno)
|
||||
edit_update(top, CENTER);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_cut_text(void)
|
||||
{
|
||||
filestruct *tmp, *fileptr = current;
|
||||
filestruct *fileptr;
|
||||
#ifndef NANO_SMALL
|
||||
int dontupdate = 0;
|
||||
int cuttingtoend = 0;
|
||||
#endif
|
||||
|
||||
assert(current != NULL && current->data != NULL);
|
||||
|
||||
check_statblank();
|
||||
if (fileptr == NULL || fileptr->data == NULL)
|
||||
return 0;
|
||||
|
||||
tmp = fileptr->next;
|
||||
|
||||
if (!ISSET(KEEP_CUTBUFFER)) {
|
||||
free_filestruct(cutbuffer);
|
||||
cutbuffer = NULL;
|
||||
|
||||
marked_cut = 0;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("Blew away cutbuffer =)\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Must let cutbuffer get blown away first before we do this... */
|
||||
if (fileptr == filebot && !ISSET(MARK_ISSET))
|
||||
/* You can't cut the magic line except with the mark. But
|
||||
trying does clear the cutbuffer if KEEP_CUTBUFFER is not set. */
|
||||
if (current == filebot
|
||||
#ifndef NANO_SMALL
|
||||
&& !ISSET(MARK_ISSET)
|
||||
#endif
|
||||
)
|
||||
return 0;
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
||||
if (current_x == strlen(current->data)) {
|
||||
assert(current_x >= 0 && current_x <= strlen(current->data));
|
||||
|
||||
/* If the line is empty and we didn't just cut a non-blank
|
||||
line, create a dummy line and add it to the cutbuffer */
|
||||
if (current->data[current_x] == '\0') {
|
||||
/* If the line is empty and we didn't just cut a non-blank
|
||||
line, create a dummy line and add it to the cutbuffer */
|
||||
if (marked_cut != 1 && current->next != filebot) {
|
||||
filestruct *junk = make_new_node(current);
|
||||
|
||||
filestruct *junk;
|
||||
|
||||
junk = NULL;
|
||||
junk = make_new_node(current);
|
||||
junk->data = charalloc(1);
|
||||
junk->data[0] = 0;
|
||||
|
||||
junk->data[0] = '\0';
|
||||
add_to_cutbuffer(junk);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
do_delete();
|
||||
@@ -250,108 +232,68 @@ int do_cut_text(void)
|
||||
|
||||
mark_beginx = strlen(current->data);
|
||||
mark_beginbuf = current;
|
||||
cuttingtoend = 1;
|
||||
dontupdate = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ISSET(MARK_ISSET)) {
|
||||
if (current->lineno <= mark_beginbuf->lineno) {
|
||||
/* Don't do_update and move the screen position if the marked
|
||||
area lies entirely within the screen buffer */
|
||||
if (current->lineno == mark_beginbuf->lineno
|
||||
|| (current->lineno >= edittop->lineno
|
||||
&& mark_beginbuf->lineno <= editbot->lineno))
|
||||
dontupdate = 1;
|
||||
|
||||
cut_marked_segment(current, current_x, mark_beginbuf,
|
||||
mark_beginx, 1);
|
||||
}
|
||||
else {
|
||||
/* Same as above, easier logic since we know it's a multi-line
|
||||
cut and mark_beginbuf is before current */
|
||||
if (mark_beginbuf->lineno >= edittop->lineno
|
||||
&& current->lineno <= editbot->lineno)
|
||||
dontupdate = 1;
|
||||
|
||||
cut_marked_segment(mark_beginbuf, mark_beginx, current,
|
||||
current_x, 1);
|
||||
}
|
||||
|
||||
/* Don't do_update() and move the screen position if the marked
|
||||
area lies entirely within the screen buffer */
|
||||
dontupdate |= current->lineno >= edittop->lineno &&
|
||||
current->lineno <= editbot->lineno &&
|
||||
mark_beginbuf->lineno >= edittop->lineno &&
|
||||
mark_beginbuf->lineno <= editbot->lineno;
|
||||
cut_marked_segment(current, current_x, mark_beginbuf,
|
||||
mark_beginx, 1);
|
||||
|
||||
placewewant = xplustabs();
|
||||
UNSET(MARK_ISSET);
|
||||
|
||||
marked_cut = 1;
|
||||
set_modified();
|
||||
if (dontupdate || cuttingtoend) {
|
||||
fix_editbot();
|
||||
if (dontupdate)
|
||||
edit_refresh();
|
||||
} else
|
||||
else
|
||||
edit_update(current, CENTER);
|
||||
set_modified();
|
||||
|
||||
return 1;
|
||||
#else
|
||||
if (0) {
|
||||
#endif
|
||||
} else if (fileptr == fileage) {
|
||||
/* we're cutting the first line */
|
||||
if (fileptr->next != NULL) {
|
||||
fileptr = fileptr->next;
|
||||
tmp = fileptr;
|
||||
fileage = fileptr;
|
||||
add_to_cutbuffer(fileptr->prev);
|
||||
totsize--; /* get the newline */
|
||||
totlines--;
|
||||
fileptr->prev = NULL;
|
||||
current = fileptr;
|
||||
edit_update(fileage, CENTER);
|
||||
} else {
|
||||
add_to_cutbuffer(fileptr);
|
||||
fileage = make_new_node(NULL);
|
||||
fileage->data = charalloc(1);
|
||||
fileage->data[0] = '\0';
|
||||
current = fileage;
|
||||
}
|
||||
} else {
|
||||
if (fileptr->prev != NULL)
|
||||
fileptr->prev->next = fileptr->next;
|
||||
|
||||
if (fileptr->next != NULL) {
|
||||
(fileptr->next)->prev = fileptr->prev;
|
||||
current = fileptr->next;
|
||||
totlines--;
|
||||
totsize--; /* get the newline */
|
||||
}
|
||||
/* No longer an else here, because we never get here anymore...
|
||||
No need to cut the magic line, as it's empty */
|
||||
add_to_cutbuffer(fileptr);
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
totlines--;
|
||||
totsize -= strlen(current->data) + 1;
|
||||
fileptr = current;
|
||||
current = current->next;
|
||||
current->prev = fileptr->prev;
|
||||
add_to_cutbuffer(fileptr);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
|
||||
if (fileptr == fileage)
|
||||
fileage = current;
|
||||
else
|
||||
current->prev->next = current;
|
||||
|
||||
if (fileptr == edittop)
|
||||
edittop = current;
|
||||
|
||||
renumber(current);
|
||||
current_x = 0;
|
||||
edit_refresh();
|
||||
|
||||
dump_buffer(cutbuffer);
|
||||
reset_cursor();
|
||||
|
||||
set_modified();
|
||||
marked_cut = 0;
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
update_cursor();
|
||||
renumber(tmp);
|
||||
SET(KEEP_CUTBUFFER);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_uncut_text(void)
|
||||
{
|
||||
filestruct *tmp = current, *fileptr = current, *newbuf, *newend;
|
||||
#ifndef NANO_SMALL
|
||||
filestruct *tmp = current, *fileptr = current;
|
||||
filestruct *newbuf = NULL, *newend = NULL;
|
||||
char *tmpstr, *tmpstr2;
|
||||
filestruct *hold = current;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
wrap_reset();
|
||||
@@ -359,29 +301,47 @@ int do_uncut_text(void)
|
||||
if (cutbuffer == NULL || fileptr == NULL)
|
||||
return 0; /* AIEEEEEEEEEEEE */
|
||||
|
||||
newbuf = copy_filestruct(cutbuffer);
|
||||
for (newend = newbuf; newend->next != NULL && newend != NULL;
|
||||
newend = newend->next) {
|
||||
totlines++;
|
||||
/* If we're uncutting a previously non-marked block, uncut to end if
|
||||
we're not at the beginning of the line. If we are at the
|
||||
beginning of the line, set placewewant to 0. Pico does both of
|
||||
these. */
|
||||
if (marked_cut == 0) {
|
||||
if (current_x != 0)
|
||||
marked_cut = 2;
|
||||
else
|
||||
placewewant = 0;
|
||||
}
|
||||
|
||||
if (marked_cut == 0 || cutbuffer->next != NULL)
|
||||
{
|
||||
newbuf = copy_filestruct(cutbuffer);
|
||||
for (newend = newbuf; newend->next != NULL && newend != NULL;
|
||||
newend = newend->next)
|
||||
totlines++;
|
||||
}
|
||||
|
||||
/* Hook newbuf into fileptr */
|
||||
#ifndef NANO_SMALL
|
||||
if (marked_cut) {
|
||||
if (marked_cut != 0) {
|
||||
int recenter_me = 0;
|
||||
/* Should we eventually use edit_update(CENTER)? */
|
||||
|
||||
/* If there's only one line in the cutbuffer */
|
||||
if (cutbuffer->next == NULL) {
|
||||
tmpstr =
|
||||
charalloc(strlen(current->data) + strlen(cutbuffer->data) +
|
||||
1);
|
||||
strncpy(tmpstr, current->data, current_x);
|
||||
strcpy(&tmpstr[current_x], cutbuffer->data);
|
||||
strcat(tmpstr, ¤t->data[current_x]);
|
||||
free(current->data);
|
||||
current->data = tmpstr;
|
||||
current_x += strlen(cutbuffer->data);
|
||||
totsize += strlen(cutbuffer->data);
|
||||
if (strlen(cutbuffer->data) == 0)
|
||||
totlines++;
|
||||
size_t buf_len = strlen(cutbuffer->data);
|
||||
size_t cur_len = strlen(current->data);
|
||||
|
||||
current->data = nrealloc(current->data, cur_len + buf_len + 1);
|
||||
memmove(current->data + current_x + buf_len,
|
||||
current->data + current_x, cur_len - current_x + 1);
|
||||
strncpy(current->data + current_x, cutbuffer->data, buf_len);
|
||||
/* Use strncpy() to not copy the terminal '\0'. */
|
||||
|
||||
current_x += buf_len;
|
||||
totsize += buf_len;
|
||||
/* If we've uncut a line, make sure there's a magicline after
|
||||
it */
|
||||
if (current->next == NULL)
|
||||
new_magicline();
|
||||
|
||||
placewewant = xplustabs();
|
||||
update_cursor();
|
||||
@@ -413,8 +373,8 @@ int do_uncut_text(void)
|
||||
newend->next = tmp;
|
||||
|
||||
/* If tmp isn't null, we're in the middle: update the
|
||||
* prev pointer. If it IS null, we're at the end; update
|
||||
* the filebot pointer */
|
||||
prev pointer. If it IS null, we're at the end; update
|
||||
the filebot pointer */
|
||||
|
||||
if (tmp != NULL)
|
||||
tmp->prev = newend;
|
||||
@@ -430,26 +390,20 @@ int do_uncut_text(void)
|
||||
for (tmp = current->next; tmp != newend; tmp = tmp->next)
|
||||
totsize += strlen(tmp->data) + 1;
|
||||
|
||||
i = editbot->lineno;
|
||||
|
||||
current = newend;
|
||||
if (i < newend->lineno) {
|
||||
edit_update(current, CENTER);
|
||||
}
|
||||
else {
|
||||
edit_refresh();
|
||||
}
|
||||
if (editbot->lineno < newend->lineno)
|
||||
recenter_me = 1;
|
||||
}
|
||||
|
||||
/* If marked cut == 2, that means that we're doing a cut to end
|
||||
and we don't want anything else on the line, so we have to
|
||||
screw up all the work we just did and separate the line. There
|
||||
must be a better way to do this, but not at 1AM on a work night. */
|
||||
screw up all the work we just did and separate the line.
|
||||
There must be a better way to do this, but not at 1AM on a
|
||||
work night. */
|
||||
|
||||
if (marked_cut == 2) {
|
||||
tmp = make_new_node(current);
|
||||
tmp->data = charalloc(strlen(¤t->data[current_x]) + 1);
|
||||
strcpy(tmp->data, ¤t->data[current_x]);
|
||||
tmp->data = mallocstrcpy(NULL, current->data + current_x);
|
||||
splice_node(current, tmp, current->next);
|
||||
null_at(¤t->data, current_x);
|
||||
current = current->next;
|
||||
@@ -463,24 +417,26 @@ int do_uncut_text(void)
|
||||
/* Renumber from BEFORE where we pasted ;) */
|
||||
renumber(hold);
|
||||
|
||||
#ifdef DEBUG
|
||||
dump_buffer(fileage);
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
set_modified();
|
||||
edit_refresh();
|
||||
if (recenter_me)
|
||||
edit_update(current, CENTER);
|
||||
else
|
||||
edit_refresh();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
return 0;
|
||||
#else
|
||||
if (0) {
|
||||
#endif
|
||||
} else if (fileptr != fileage) {
|
||||
}
|
||||
|
||||
if (fileptr != fileage) {
|
||||
tmp = fileptr->prev;
|
||||
tmp->next = newbuf;
|
||||
newbuf->prev = tmp;
|
||||
totlines++; /* Unmarked uncuts don't split lines */
|
||||
} else {
|
||||
} else
|
||||
fileage = newbuf;
|
||||
totlines++; /* Unmarked uncuts don't split lines */
|
||||
}
|
||||
totlines++; /* Unmarked uncuts don't split lines */
|
||||
|
||||
/* This is so uncutting at the top of the buffer will work => */
|
||||
if (current_y == 0)
|
||||
@@ -490,23 +446,24 @@ int do_uncut_text(void)
|
||||
newend->next = fileptr;
|
||||
fileptr->prev = newend;
|
||||
|
||||
/* recalculate size *sigh* */
|
||||
/* Recalculate size *sigh* */
|
||||
for (tmp = newbuf; tmp != fileptr; tmp = tmp->next)
|
||||
totsize += strlen(tmp->data) + 1;
|
||||
|
||||
i = editbot->lineno;
|
||||
renumber(newbuf);
|
||||
if (i < newend->lineno) {
|
||||
/* Center the screen if we've moved beyond the line numbers of both
|
||||
the old and new editbots */
|
||||
if (i < newend->lineno && editbot->lineno < newend->lineno)
|
||||
edit_update(fileptr, CENTER);
|
||||
}
|
||||
else {
|
||||
else
|
||||
edit_refresh();
|
||||
}
|
||||
|
||||
dump_buffer_reverse(fileptr);
|
||||
#ifdef DEBUG
|
||||
dump_buffer_reverse();
|
||||
#endif
|
||||
|
||||
set_modified();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
edit_refresh();
|
||||
return 1;
|
||||
}
|
||||
|
||||
963
faq.html
963
faq.html
@@ -1,719 +1,262 @@
|
||||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<title>The GNU nano editor FAQ</title>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
|
||||
<title>The GNU nano editor FAQ</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
|
||||
|
||||
<h1>
|
||||
<font color="#CC0000">The nano FAQ</font></h1>
|
||||
<h2>
|
||||
<font color="#330000">Table of Contents</font></h2>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#1">1. General</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#1.1">1.1 About this FAQ.</a></font>
|
||||
<br><font color="#330000"><a href="#1.2">1.2. How do I contribute to it?</a></font>
|
||||
<br><font color="#330000"><a href="#1.3">1.3. What is GNU nano?</a></font>
|
||||
<br><font color="#330000"><a href="#1.4">1.4. What is the history behind
|
||||
nano?</a></font>
|
||||
<br><font color="#330000"><a href="#1.5">1.5. Why the name change from
|
||||
TIP?</a></font>
|
||||
<br><font color="#330000"><a href="#1.6">1.6. What is the current version
|
||||
of nano?</a></font>
|
||||
<br><font color="#330000"><a href="#1.7">1.7. I want to read the manpage
|
||||
without having to download the program!</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#2">2. Where to get GNU
|
||||
nano</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#2.1">2.1. FTP and WWW sites
|
||||
that carry nano.</a></font>
|
||||
<br><font color="#330000"><a href="#2.2">2.2. Redhat and derivatives (.rpm)
|
||||
packages.</a></font>
|
||||
<br><font color="#330000"><a href="#2.3">2.3. Debian (.deb) packages.</a></font>
|
||||
<br><font color="#330000"><a href="#2.4">2.4. By CVS (for the brave).</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#3">3. Installation and Configuration</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#3.1">3.1. How do install the
|
||||
RPM or DEB package?</a></font>
|
||||
<br><font color="#330000"><a href="#3.2">3.2. Compiling from source: WHAT
|
||||
THE HECK DO I DO NOW?</a></font>
|
||||
<br><font color="#330000"><a href="#3.3">3.3. Why does everything go into
|
||||
/usr/local?</a></font>
|
||||
<br><font color="#330000"><a href="#3.4">3.4. I get errors about 'bindtextdomain',
|
||||
'gettext' and/or 'gettextdomain'. What can I do about it?</a></font>
|
||||
<br><font color="#330000"><a href="#3.5">3.5. Nano should automatically
|
||||
run strip on the binary when installing it!</a></font>
|
||||
<br><font color="#330000"><a href="#3.6">3.6. How can I make the
|
||||
executable smaller? This is too bloated!</a></font>
|
||||
<br><font color="#330000"><a href="#3.7">3.7. Tell me more about this
|
||||
multibuffer stuff!</a></font>
|
||||
<br><font color="#330000"><a href="#3.8">3.8. How do I make a .nanorc file
|
||||
that nano will read when I start it?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#4">4. Running</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#4.1">4.1. Ack! My backspace/delete/enter/double
|
||||
bucky/meta key doesn't seem to work! What can I do?</a></font>
|
||||
<br><font color="#330000"><a href="#4.2">4.2. Nano crashes when I type
|
||||
<insert keystroke here>!</a></font>
|
||||
<br><font color="#330000"><a href="#4.3">4.3. Nano crashes when I resize
|
||||
my window. How can I fix that?</a></font>
|
||||
<br><font color="#330000"><a href="#4.4">4.4. Why does nano show ^\
|
||||
in the shortcut list instead of ^J?</a></font>
|
||||
<br><font color="#330000"><a href="#4.5">4.5. When I type in a
|
||||
search string, the string I last searched for is already in front of
|
||||
my cursor! What happened?!</a></font>
|
||||
<br><font color="#330000"><a href="#4.6">4.6. I get the message "NumLock
|
||||
glitch detected. Keypad will malfunction with NumLock off." What
|
||||
gives?</a></font>
|
||||
<br><font color="#330000"><a href="#4.7">4.7. How do I make nano my
|
||||
default editor (in Pine, mutt, etc.)?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#5">5. Internationalization</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#5.1">5.1. There's no translation
|
||||
for my language!</a></font>
|
||||
<br><font color="#330000"><a href="#5.2">5.2. I don't like the translation
|
||||
for <x> in my language. How can I fix it?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#6">6. Advocacy and Licensing</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#6.1">6.1. Why should I use
|
||||
nano instead of Pico?</a></font>
|
||||
<br><font color="#330000"><a href="#6.2">6.2. Why should I use Pico instead
|
||||
of nano?</a></font>
|
||||
<br><font color="#330000"><a href="#6.3">6.3. What is so bad about the
|
||||
Pine license?</a></font>
|
||||
<br><font color="#330000"><a href="#6.4">6.4. Okay, well what mail program
|
||||
should I use then?</a></font>
|
||||
<br><font color="#330000"><a href="#6.5">6.5. Why doesn't UW simply change
|
||||
their license?</a></font>
|
||||
<br><font color="#330000"><a href="#6.6">6.6. What if tomorrow UW changes
|
||||
the license to be truly Free Software?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#7">7. Miscellaneous</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#7.1">7.1. Nano related mailing
|
||||
lists.</a></font>
|
||||
<br><font color="#330000"><a href="#7.2">7.2. I want to send the development
|
||||
team a big load of cash (or just a thank you).</a></font>
|
||||
<br><font color="#330000"><a href="#7.3">7.3. How do I submit a patch?</a></font>
|
||||
<br><font color="#330000"><a href="#7.4">7.4. How do I join the development
|
||||
team?</a></font>
|
||||
<br><font color="#330000"><a href="#7.5">7.5. Can I have CVS write access?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a href="#8">8. ChangeLog</a></h2>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<br>
|
||||
<h1>
|
||||
<a NAME="1"></a><font color="#330000">1. General</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.1"></a><font color="#330000">1.1 About this FAQ.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">This FAQ was written and is maintained
|
||||
by Chris Allegretta <<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>>,
|
||||
who also happens to be the creator of nano. Maybe someone else
|
||||
will volunteer to maintain this FAQ someday, who knows...</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.2"></a><font color="#330000">1.2. How do I contribute to it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Your best bet is to send it to the nano
|
||||
email address, <a
|
||||
href="mailto:nano@nano-editor.org">nano@nano-editor.org</a> and if
|
||||
it is useful enough it will be included in future versions.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.3"></a><font color="#330000">1.3. What is GNU nano?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">GNU Nano is designed to be a free
|
||||
replacement for the Pico text editor, part of the Pine email suite from <a
|
||||
href="http://www.washington.edu/pine">The University of
|
||||
Washington</a>. It aims to "emulate Pico as closely as possible and
|
||||
perhaps include extra functionality.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.4"></a><font color="#330000">1.4. What is the history behind
|
||||
nano?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Funny you should ask!</font>
|
||||
<p><b><font color="#330000">In the beginning...</font></b>
|
||||
<p><font color="#330000">For years Pine was THE program used to read email
|
||||
on a Unix system. The Pico text editor is the portion of the program
|
||||
one would use to compose his or her mail messages. Many beginners
|
||||
to Unix flocked to Pico and Pine because of their well organized, easy
|
||||
to use interfaces. With the proliferation of GNU/Linux in the mid to
|
||||
late 90's, many University students became intimately familiar with the
|
||||
strengths (and weaknesses) of Pine and Pico.</font>
|
||||
<p><b><font color="#330000">Then came Debian...</font></b>
|
||||
<p><font color="#330000">The <a href="http://www.debian.org">Debian GNU/Linux</a>
|
||||
distribution, known for its strict standards in distributing truly "free"
|
||||
software (i.e. had no restrictions on redistribution), would not include
|
||||
a binary package for Pine or Pico. Many people had a serious dilemma:
|
||||
they loved these programs, but they were not truly free software in the
|
||||
<a href="http://www.gnu.org/philosophy/free-sw.html">GNU</a>
|
||||
sense of the word.</font>
|
||||
<p><b><font color="#330000">The event...</font></b>
|
||||
<p><font color="#330000">It was in late 1999 when Chris Allegretta (our
|
||||
hero) was yet again complaining to himself about the less-than-perfect
|
||||
license Pico was distributed under, the 1000 makefiles that came with
|
||||
it and how just a few small improvements could make it the Best Editor
|
||||
in the World (TM). Having been a convert from Slackware to Debian,
|
||||
he missed having a simple binary package that included Pine and Pico, and
|
||||
had grown tired of downloading them himself.</font>
|
||||
<p><font color="#330000">Finally something snapped inside and Chris coded
|
||||
and hacked like a madman for many hours straight one weekend to make a
|
||||
(barely usable) Pico clone, at the time called TIP (Tip Isn't Pico).
|
||||
The program could not be invoked without a filename, could not save files,
|
||||
had no help menu, spell checker, and so forth. But over time it improved,
|
||||
and with the help of a few great coders it matured to the (hopefully) stable
|
||||
state it is today.
|
||||
<p><font color="#330000">In February 2001, nano has been declared an
|
||||
official GNU program by Richard Stallman. Nano also reached it's first
|
||||
production release on March 22, 2001.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.5"></a><font color="#330000">1.5. Why the name change from TIP?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">On January 10, 2000, TIP was officially
|
||||
renamed to nano because of a namespace conflict with another program called
|
||||
'tip'. The original 'tip' program "establishes a full duplex terminal
|
||||
connection to a remote host", and was included with many older Unix systems
|
||||
(and newer ones like Solaris). The conflict was not noticed at first because
|
||||
there is no 'tip' utility included with most GNU/Linux distributions (where
|
||||
nano was developed).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.6"></a><font color="#330000">1.6 What is the current version
|
||||
of nano?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The current version of nano *should*
|
||||
be 1.1.7. Of course you should always check the nano homepage to
|
||||
see what the latest and greatest version is.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.7"></a><font color="#330000">1.7. I want to read the man page
|
||||
without having to download the program!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Jeez, demanding, aren't we?
|
||||
Okay, look <a href="http://www.nano-editor.org/dist/nano.1.html">here</a>.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="2"></a><font color="#330000">2. Where to get GNU nano</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.1"></a><font color="#330000">2.1. FTP and WWW sites that carry
|
||||
nano.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The nano distribution can be downloaded
|
||||
at the following fine web and ftp sites:</font>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.nano-editor.org/dist">http://www.nano-editor.org/dist</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.ewtoo.org/~astyanax/nano/dist">http://www.ewtoo.org/~astyanax/nano/dist</a></font></li>
|
||||
<li>
|
||||
<font color="#330000"><a href="ftp://ftp.gnu.org/pub/gnu/nano">ftp://ftp.gnu.org/pub/gnu/nano</a></font></li>
|
||||
|
||||
</ul>
|
||||
<body text="#330000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
|
||||
<h1>The nano FAQ</h1>
|
||||
<h2>Table of Contents</h2>
|
||||
<h2><a href="#1">1. General</a></h2>
|
||||
<blockquote><p><a href="#1.1">1.1 About this FAQ</a><br>
|
||||
<a href="#1.2">1.2. How do I contribute to it?</a><br>
|
||||
<a href="#1.3">1.3. What is GNU nano?</a><br>
|
||||
<a href="#1.4">1.4. What is the history behind nano?</a><br>
|
||||
<a href="#1.5">1.5. Why the name change from TIP?</a><br>
|
||||
<a href="#1.6">1.6. What is the current version of nano?</a><br>
|
||||
<a href="#1.7">1.7. I want to read the manpage without having to download the program!</a></p></blockquote>
|
||||
<h2><a href="#2">2. Where to get GNU nano.</a></h2>
|
||||
<blockquote><p><a href="#2.1">2.1. FTP and WWW sites that carry nano.</a><br>
|
||||
<a href="#2.2">2.2. RedHat and derivatives (.rpm) packages.</a><br>
|
||||
<a href="#2.3">2.3. Debian (.deb) packages.</a><br>
|
||||
<a href="#2.4">2.4. By CVS (for the brave).</a></p></blockquote>
|
||||
<h2><a href="#3">3. Installation and Configuration</a></h2>
|
||||
<blockquote><p><a href="#3.1">3.1. How do I install the RPM or DEB package?</a><br>
|
||||
<a href="#3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</a><br>
|
||||
<a href="#3.3">3.3. Why does everything go into /usr/local?</a><br>
|
||||
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext' and/or 'gettextdomain'. What can I do about it?</a><br>
|
||||
<a href="#3.5">3.5. Nano should automatically run strip on the binary when installing it!</a><br>
|
||||
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
|
||||
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
|
||||
<a href="#3.8">3.8. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
|
||||
<h2><a href="#4">4. Running</a></h2>
|
||||
<blockquote><p><a href="#4.1">4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</a><br>
|
||||
<a href="#4.2">4.2. Nano crashes when I type <insert keystroke here>!</a><br>
|
||||
<a href="#4.3">4.3. Nano crashes when I resize my window. How can I fix that?</a><br>
|
||||
<a href="#4.4">4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
|
||||
<a href="#4.5a">4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</a><br>
|
||||
<a href="#4.5b">4.5b. [version 1.2.0 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
|
||||
<a href="#4.6">4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?</a><br>
|
||||
<a href="#4.7">4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</a></p></blockquote>
|
||||
<h2><a href="#5">5. Internationalization</a></h2>
|
||||
<blockquote><p><a href="#5.1">5.1. There's no translation for my language!</a><br>
|
||||
<a href="#5.2">5.2. I don't like the translation for <x> in my language. How can I fix it?</a></p></blockquote>
|
||||
<h2><a href="#6">6. Advocacy and Licensing</a></h2>
|
||||
<blockquote><p><a href="#6.1">6.1. Why should I use nano instead of Pico?</a><br>
|
||||
<a href="#6.2">6.2. Why should I use Pico instead of nano?</a><br>
|
||||
<a href="#6.3">6.3. What is so bad about the Pine license?</a><br>
|
||||
<a href="#6.4">6.4. Okay, well what mail program should I use then?</a><br>
|
||||
<a href="#6.5">6.5. Why doesn't UW simply change their license?</a><br>
|
||||
<a href="#6.6">6.6. What if tomorrow UW changes the license to be truly Free Software?</a></p></blockquote>
|
||||
<h2><a href="#7">7. Miscellaneous</a></h2>
|
||||
<blockquote><p><a href="#7.1">7.1. Nano related mailing lists.</a><br>
|
||||
<a href="#7.2">7.2. I want to send the development team a big load of cash (or just a thank you).</a><br>
|
||||
<a href="#7.3">7.3. How do I submit a patch?</a><br>
|
||||
<a href="#7.4">7.4. How do I join the development team?</a><br>
|
||||
<a href="#7.5">7.5. Can I have CVS write access?</a></p></blockquote>
|
||||
<h2><a href="#8">8. ChangeLog</a></h2>
|
||||
<hr width="100%">
|
||||
<h1><a name="1"></a>1. General</h1>
|
||||
<h2><a name="1.1"></a>1.1 About this FAQ</h2>
|
||||
<blockquote><p>This FAQ was written and is maintained by Chris Allegretta <<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>>, who also happens to be the creator of nano. Maybe someone else will volunteer to maintain this FAQ someday, who knows...</p></blockquote>
|
||||
<h2><a name="1.2"></a>1.2. How do I contribute to it?</h2>
|
||||
<blockquote><p>Your best bet is to send it to the nano email address, <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a> and if it is useful enough it will be included in future versions.</p></blockquote>
|
||||
<h2><a name="1.3"></a>1.3. What is GNU nano?</h2>
|
||||
<blockquote><p>GNU nano is designed to be a free replacement for the Pico text editor, part of the Pine email suite from <a href="http://www.washington.edu/pine/">The University of Washington</a>. It aims to "emulate Pico as closely as possible and perhaps include extra functionality".</p></blockquote>
|
||||
<h2><a name="1.4"></a>1.4. What is the history behind nano?</h2>
|
||||
<blockquote><p>Funny you should ask!</p>
|
||||
<p><b>In the beginning...</b></p>
|
||||
<p>For years Pine was THE program used to read email on a Unix system. The Pico text editor is the portion of the program one would use to compose his or her mail messages. Many beginners to Unix flocked to Pico and Pine because of their well organized, easy to use interfaces. With the proliferation of GNU/Linux in the mid to late 90's, many University students became intimately familiar with the strengths (and weaknesses) of Pine and Pico.</p>
|
||||
<p><b>Then came Debian...</b></p>
|
||||
<p>The <a href="http://www.debian.org/">Debian GNU/Linux</a> distribution, known for its strict standards in distributing truly "free" software (i.e. software with no restrictions on redistribution), would not include a binary package for Pine or Pico. Many people had a serious dilemma: they loved these programs, but they were not truly free software in the <a href="http://www.gnu.org/philosophy/free-sw.html">GNU</a> sense of the word.</p>
|
||||
<p><b>The event...</b></p>
|
||||
<p>It was in late 1999 when Chris Allegretta (our hero) was yet again complaining to himself about the less-than-perfect license Pico was distributed under, the 1000 makefiles that came with it and how just a few small improvements could make it the Best Editor in the World (TM). Having been a convert from Slackware to Debian, he missed having a simple binary package that included Pine and Pico, and had grown tired of downloading them himself.</p>
|
||||
<p>Finally something snapped inside and Chris coded and hacked like a madman for many hours straight one weekend to make a (barely usable) Pico clone, at the time called TIP (Tip Isn't Pico). The program could not be invoked without a filename, could not save files, had no help menu, spell checker, and so forth. But over time it improved, and with the help of a few great coders it matured to the (hopefully) stable state it is today.</p>
|
||||
<p>In February 2001, nano was declared an official GNU program by Richard Stallman. Nano also reached its first production release on March 22, 2001.</p></blockquote>
|
||||
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
|
||||
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
|
||||
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
|
||||
<blockquote><p>The current version of nano *should* be 1.2.0. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<h2><a name="1.7"></a>1.7. I want to read the man page without having to download the program!</h2>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v1.2/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="2"></a>2. Where to get GNU nano.</h1>
|
||||
<h2><a name="2.1"></a>2.1. FTP and WWW sites that carry nano.</h2>
|
||||
<blockquote><p>The nano distribution can be downloaded at the following fine web and ftp sites:</p>
|
||||
<ul>
|
||||
<li><a href="http://www.nano-editor.org/dist/">http://www.nano-editor.org/dist/</a></li>
|
||||
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/">http://www.ewtoo.org/~astyanax/nano/dist/</a></li>
|
||||
<li><a href="ftp://ftp.gnu.org/pub/gnu/nano/">ftp://ftp.gnu.org/pub/gnu/nano/</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.2"></a><font color="#330000">2.2. Redhat and derivatives (.rpm)
|
||||
packages.</font></h2>
|
||||
|
||||
<h2><a name="2.2"></a>2.2. RedHat and derivatives (.rpm) packages.</h2>
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.nano-editor.org/dist/RPMS">http://www.nano-editor.org/dist/RPMS</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.ewtoo.org/~astyanax/nano/dist/RPMS">http://www.ewtoo.org/~astyanax/nano/dist/RPMS</a></font></li>
|
||||
|
||||
</ul>
|
||||
<font color="#330000">Additionally, check out the Redhat contribs section
|
||||
at:</font>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">http://metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">ftp://metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386</a></font></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="http://www.nano-editor.org/dist/v1.0/RPMS/">http://www.nano-editor.org/dist/v1.0/RPMS/</a></li>
|
||||
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/v1.0/RPMS/">http://www.ewtoo.org/~astyanax/nano/dist/v1.0/RPMS/</a></li>
|
||||
</ul>
|
||||
<p>Additionally, check out the RedHat contribs section at:</p>
|
||||
<ul>
|
||||
<li><a href="http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386/">http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386/</a></li>
|
||||
<li><a href="ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386/">ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386/</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.3"></a><font color="#330000">2.3. Debian (.deb) packages.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">For Debian users, you can check out the
|
||||
current nano packages for:</font>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.debian.org/Packages/stable/editors/nano.html">stable</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.debian.org/Packages/testing/editors/nano.html">testing</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.debian.org/Packages/unstable/editors/nano.html">unstable</a></font></li>
|
||||
</ul>
|
||||
<p><font color="#330000">You can also have a look at the</font>
|
||||
<font color="#330000"><a href="ftp://ftp.debian.org/debian/pool/main/n/nano/">Package Pool</a> to see all the available binary and source packages.</font></p>
|
||||
|
||||
<font color="#330000">Note that versions < 0.9.10 are probably not for
|
||||
those wanting to get serious work done, so if you are using Debian 2.2, check
|
||||
that you have updated to 2.2r3, which comes with nano 0.9.23. If you're
|
||||
tracking unstable, you probably have the newest version already.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.4"></a><font color="#330000">2.4. By CVS (for the brave).</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">For the 'bleeding edge' current version
|
||||
of nano, you can use CVS to download the current source code. <b>Note:</b>
|
||||
believe it or not, by downloading code that has not yet stabilized into
|
||||
an official release, there could quite possibly be bugs, in fact the code
|
||||
may not even compile! Anyway, see <a href="http://savannah.gnu.org/cvs/?group_id=1025">the
|
||||
nano CVS page</a> for info on anonymous CVS access to the nano source.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="3"></a><font color="#330000">3. Installation and Configuration</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.1"></a><font color="#330000">3.1. How do install the RPM or
|
||||
DEB package?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">It's simple really! As root, type
|
||||
<b>rpm
|
||||
-Uvh nano-x.y.z-1.i386.rpm</b> if you have a Redhat-ish system or
|
||||
<b>dpkg
|
||||
-i nano_x.y.z-1.deb</b> if you have a Debian-ish system, where
|
||||
<b>x.y.z</b>
|
||||
is the release of nano. There are other programs to install packages,
|
||||
and if you wish to use those, knock yourself out.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.2"></a><font color="#330000">3.2. Compiling from source: WHAT
|
||||
THE HECK DO I DO NOW?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Okay, take a deep breath, this really
|
||||
isn't hard. Unpack the nano source with a command like:</font>
|
||||
<p><b><font color="#330000">tar -zxvf nano-x.y.z.tar.gz</font></b>
|
||||
<p><font color="#330000">If you get error messages about the -z option,
|
||||
try this:</font>
|
||||
<p><b><font color="#330000">gzip -dc nano-x.y.z.tar.gz | tar xvf -</font></b>
|
||||
<p><font color="#330000">(again, where x.y.z is the version number in question).
|
||||
Then you need to run configure with any options you might want (if any).</font>
|
||||
<p><font color="#330000">The average case is this:</font>
|
||||
<p><b><font color="#330000">cd nano-x.y.z/</font></b>
|
||||
<br><b><font color="#330000">./configure</font></b>
|
||||
<br><b><font color="#330000">make</font></b>
|
||||
<br><font color="#330000"><b>make install </b>(as root, of course)</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.3"></a><font color="#330000">3.3. Why does everything go into
|
||||
/usr/local?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Well, that's what the <b>configure</b>
|
||||
script defaults to. If you wish to change this, simply do this:</font>
|
||||
<p><b><font color="#330000">./configure --prefix=/usr</font></b>
|
||||
<p><font color="#330000">to put nano into /usr/bin when you run <b>make
|
||||
install</b>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.4"></a><font color="#330000">3.4. I get errors about 'bindtextdomain',
|
||||
'gettext' and/or 'gettextdomain'. What can I do about it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Try doing a <b>./configure --with-included-gettext</b>
|
||||
and see if that solves your problem. You make need to do a <b>make
|
||||
clean ; make</b> to get it to work fully.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.5"></a><font color="#330000">3.5. Nano should automatically
|
||||
run strip on the binary when installing it!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Actually, it does, but you have to use
|
||||
<b>make install-strip</b>. The default make install does not, and will
|
||||
not, run strip automatically.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.6"></a><font color="#330000">
|
||||
3.6. How can I make the executable smaller? This is too
|
||||
bloated!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Actually, there are several parts of the
|
||||
editor that can be disabled. You can pass arguments to the
|
||||
<b>configure</b> script that disable certain features. Here's a brief
|
||||
list:
|
||||
<pre>
|
||||
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
|
||||
<b>--disable-justify</b> Disable justify/unjustify function
|
||||
<b>--disable-speller</b> Disables spell checker function
|
||||
<b>--disable-help</b> Disables help function (^G)
|
||||
<b>--disable-browser</b> Disables mini file browser
|
||||
<b>--disable-wrapping</b> Disables all wrapping of text (and -w flag)
|
||||
<b>--disable-mouse</b> Disables mouse support (and -m flag)
|
||||
<b>--disable-operatingdir</b> Disable setting of operating directory
|
||||
</pre><br>
|
||||
There's also the <b>--enable-tiny</b> option which disables everything
|
||||
above, as well as some larger chunks of the program (like the marker code
|
||||
that you use Control-^ to select with). Also, if you know you aren't
|
||||
going to be using other languages you can use <b>--disable-nls</b> to
|
||||
disable internationalization and save a few K to a few dozen K depending
|
||||
on if you have locale support on your system. And finally there's always
|
||||
good old <b>strip</b> to strip all debugging code and code that exists in
|
||||
libraries on your system.
|
||||
<p>If, in the other hand, you can't live without bells and whistles, you could
|
||||
try:
|
||||
<pre>
|
||||
<b>--enable-extra</b> Enable extra functions, including easter eggs
|
||||
<b>--enable-nanorc</b> Enable use of .nanorc file
|
||||
<b>--enable-color</b> Enables color and syntax highlighting
|
||||
<b>--enable-multibuffer</b> Enables having multiple file buffers open
|
||||
</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.7"></a><font color="#330000">
|
||||
3.7. Tell me more about this multibuffer stuff!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000"> To use multiple file buffers, you must
|
||||
be using nano 1.1.7 or newer, and you must have configured nano with
|
||||
<b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check).
|
||||
Then when you want to enable inserting a file into its own buffer instead of
|
||||
into the current file, just hit <b>Meta-F</b>, then insert the file as normal
|
||||
with <b>^R</b>. If you always want files to be loaded into their own buffers,
|
||||
use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. <P>
|
||||
|
||||
You can move between the buffers you have open with the <b>Meta-<</b> and
|
||||
<b>Meta-></b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b>
|
||||
(clear as mud, right? =-). When you have more than one file buffer open,
|
||||
the ^X shortcut will say "Close", instead of the normal "Exit" when only one
|
||||
buffer is open.
|
||||
</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.8"></a><font color="#330000">
|
||||
3.8. How do I make a .nanorc file that nano will read when I start it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000"> It's not hard at all! But, your version
|
||||
of nano must have beem compiled with <b>--enable-nanorc</b>, and again must
|
||||
be version 1.1.7 or newer (use nano -V to check your version and compiled
|
||||
features). Then simply copy the <b>nanorc.sample</b>
|
||||
that came with the nano source or your nano package (most likely in
|
||||
/usr/doc/nano) to .nanorc in your home directory. If you didn't get one,
|
||||
the syntax is simple. Flags are turned on and off by using the word
|
||||
<b>set</b> and the getopt_long flag for the feature, for example "set
|
||||
pico" or "set nowrap". </font></blockquote> <hr WIDTH="100%">
|
||||
|
||||
<h1><a NAME="4"></a><font color="#330000">4. Running</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.1"></a><font color="#330000">4.1. Ack! My backspace/delete/enter/double
|
||||
bucky/meta key doesn't seem to work! What can I do?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Try setting your $TERM variable to 'vt100'.
|
||||
Nano doesn't yet support every term entry under the sun.</font>
|
||||
<p><font color="#330000">Bourne shell users (like bash): <b>export TERM=vt100</b></font>
|
||||
<br><font color="#330000">C Shell users (tcsh and csh): <b>setenv TERM
|
||||
vt100</b></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.2"></a><font color="#330000">4.2. Nano crashes when I type <insert
|
||||
keystroke here>!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">If you aren't trying some bizarre keystroke
|
||||
combination with some bizarre $TERM entry, chances are you have found a
|
||||
bug. You are welcome to submit it to the
|
||||
<a href="mailto:nano-devel@gnu.org">nano-devel</a> list or
|
||||
to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.3"></a><font color="#330000">4.3. Nano crashes when I resize
|
||||
my window. How can I fix that?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Older versions of nano had this problem,
|
||||
please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12
|
||||
is recommended).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.4"></a><font color="#330000">4.4. Why does nano show ^\ in the
|
||||
shortcut list instead of ^J?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The help (^G) and justify (^J) function
|
||||
were among the last to be written. To show the improvements that
|
||||
nano had over Pico (goto line # and replace), ^_ and ^\ were put on the
|
||||
shortcut list. Later, ^G came back in place of ^_ as it proved
|
||||
to be very valuable for new UNIX users. If you use the <b>-p</b> option to
|
||||
nano (or hit Meta-P) you will get the same shortcuts at the bottom as
|
||||
Pico.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a name="4.5"><font color="#330000">4.5. When I type in a search
|
||||
string, the string I last searched for is already in front of my
|
||||
cursor! What happened?!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">In nano version 0.9.20, the default is
|
||||
to have a completely consistent user interface across all user input
|
||||
functions. This means that regardless of whether you're being asked for
|
||||
a filename to insert or write, or a string to search for, the
|
||||
previous value is already inserted before the cursor. If you prefer the
|
||||
old behavior, use the pico emulation mode (-p or --pico) or just hit
|
||||
Meta-P while in nano (see the ^G help text for more
|
||||
details).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.6"></a>I get the message "NumLock glitch detected. Keypad
|
||||
will malfunction with NumLock off." What gives?</h2>
|
||||
|
||||
<h2><a name="2.3"></a>2.3. Debian (.deb) packages.</h2>
|
||||
<blockquote><p>Debian users can check out the current nano packages for:</p>
|
||||
<ul>
|
||||
<li><a href="http://packages.debian.org/stable/editors/nano.html">stable</a></li>
|
||||
<li><a href="http://packages.debian.org/testing/editors/nano.html">testing</a></li>
|
||||
<li><a href="http://packages.debian.org/unstable/editors/nano.html">unstable</a></li>
|
||||
</ul>
|
||||
<p>You can also have a look at the <a href="ftp://ftp.debian.org/debian/pool/main/n/nano/">Package Pool</a> to see all the available binary and source packages.</p>
|
||||
<p>Note that versions < 0.9.10 are probably not for those wanting to get serious work done, so if you are using Debian 2.2, check that you have updated to 2.2r3, which comes with nano 0.9.23. If you're tracking unstable, you probably have the newest version already.</p></blockquote>
|
||||
<h2><a name="2.4"></a>2.4. By CVS (for the brave).</h2>
|
||||
<blockquote><p>For the 'bleeding edge' current version of nano, you can use CVS to download the current source code. <b>Note:</b> believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see <a href="http://savannah.gnu.org/cvs/?group_id=1025">the nano CVS page</a> for info on anonymous CVS access to the nano source.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="3"></a>3. Installation and Configuration</h1>
|
||||
<h2><a name="3.1"></a>3.1. How do install the RPM or DEB package?</h2>
|
||||
<blockquote><p>It's simple really! As root, type <b>rpm -Uvh nano-x.y.z-1.i386.rpm</b> if you have a RedHat-ish system or <b>dpkg -i nano_x.y.z-1.deb</b> if you have a Debian-ish system, where <b>x.y.z</b> is the release of nano. There are other programs to install packages, and if you wish to use those, knock yourself out.</p></blockquote>
|
||||
<h2><a name="3.2"></a>3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</h2>
|
||||
<blockquote><p>Okay, take a deep breath, this really isn't hard. Unpack the nano source with a command like:</p>
|
||||
<p><b>tar -zxvf nano-x.y.z.tar.gz</b></p>
|
||||
<p>If you get error messages about the -z option, try this:</p>
|
||||
<p><b>gzip -dc nano-x.y.z.tar.gz | tar xvf -</b></p>
|
||||
<p>(again, where x.y.z is the version number in question). Then you need to run configure with any options you might want (if any).</p>
|
||||
<p>The average case is this:</p>
|
||||
<p><b>cd nano-x.y.z/</b><br>
|
||||
<b>./configure</b><br>
|
||||
<b>make</b><br>
|
||||
<b>make install</b> (as root, of course)</p></blockquote>
|
||||
<h2><a name="3.3"></a>3.3. Why does everything go into /usr/local?</h2>
|
||||
<blockquote><p>Well, that's what the <b>configure</b> script defaults to. If you wish to change this, simply do this:</p>
|
||||
<p><b>./configure --prefix=/usr</b></p>
|
||||
<p>to put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
|
||||
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext' and/or 'gettextdomain'. What can I do about it?</h2>
|
||||
<blockquote><p>Try doing a <b>./configure --with-included-gettext</b> and see if that solves your problem. You may need to do a <b>make clean; make</b> to get it to work fully.</p></blockquote>
|
||||
<h2><a name="3.5"></a>3.5. Nano should automatically run strip on the binary when installing it!</h2>
|
||||
<blockquote><p>Actually, it does, but you have to use <b>make install-strip</b>. The default make install does not, and will not, run strip automatically.</p></blockquote>
|
||||
<h2><a name="3.6"></a>3.6. How can I make the executable smaller? This is too bloated!</h2>
|
||||
<blockquote><p>Actually, there are several parts of the editor that can be disabled. You can pass arguments to the <b>configure</b> script that disable certain features. Here's a brief list:</p>
|
||||
<pre>
|
||||
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
|
||||
<b>--disable-justify</b> Disable justify/unjustify function
|
||||
<b>--disable-speller</b> Disables spell checker function
|
||||
<b>--disable-help</b> Disables help function (^G)
|
||||
<b>--disable-browser</b> Disables mini file browser
|
||||
<b>--disable-wrapping</b> Disables all wrapping of text (and -w flag)
|
||||
<b>--disable-mouse</b> Disables mouse support (and -m flag)
|
||||
<b>--disable-operatingdir</b> Disable setting of operating directory</pre>
|
||||
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the marker code that you use Control-^ to select with). Also, if you know you aren't going to be using other languages you can use <b>--disable-nls</b> to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old <b>strip</b> to strip all debugging code and code that exists in libraries on your system.</p>
|
||||
<p>If, on the other hand, you can't live without bells and whistles, you could try:</p>
|
||||
<pre>
|
||||
<b>--enable-extra</b> Enable extra functions, including easter eggs
|
||||
<b>--enable-nanorc</b> Enable use of .nanorc file
|
||||
<b>--enable-color</b> Enables color and syntax highlighting
|
||||
<b>--enable-multibuffer</b> Enables having multiple file buffers open
|
||||
<b>--enable-all</b> Enables all of the above features</pre></blockquote>
|
||||
<h2><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h2>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.12 or newer, and you must have configured nano with <b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. </p>
|
||||
<p>You can move between the buffers you have open with the <b>Meta-<</b> and <b>Meta-></b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b> (clear as mud, right? =-). When you have more than one file buffer open, the ^X shortcut will say "Close", instead of the normal "Exit" when only one buffer is open.</p></blockquote>
|
||||
<h2><a name="3.8"></a>3.8. How do I make a .nanorc file that nano will read when I start it?</h2>
|
||||
<blockquote>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example "set pico" or "set nowrap".</blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="4"></a>4. Running</h1>
|
||||
<h2><a name="4.1"></a>4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</h2>
|
||||
<blockquote><p>Try setting your $TERM variable to 'vt100'. Nano doesn't yet support every term entry under the sun.</p>
|
||||
<p>Bourne shell users (like bash): <b>export TERM=vt100</b><br>
|
||||
C Shell users (tcsh and csh): <b>setenv TERM vt100</b></p></blockquote>
|
||||
<h2><a name="4.2"></a>4.2. Nano crashes when I type <insert keystroke here>!</h2>
|
||||
<blockquote><p>If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the <a href="mailto:nano-devel@gnu.org">nano-devel</a> list or to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
|
||||
<h2><a name="4.3"></a>4.3. Nano crashes when I resize my window. How can I fix that?</h2>
|
||||
<blockquote><p>Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12 is recommended).</p></blockquote>
|
||||
<h2><a name="4.4"></a>4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</h2>
|
||||
<blockquote><p>The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to line # and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users. If you use the <b>-p</b> option to nano (or hit Meta-P) you will get the same shortcuts at the bottom as Pico.</p></blockquote>
|
||||
<a name="4.5"></a>
|
||||
<h2><a name="4.5a"></a>4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</h2>
|
||||
<blockquote><p>In nano version 0.9.20, the default is to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor. If you prefer the old behavior, use the Pico emulation mode (-p or --pico) or just hit Meta-P while in nano (see the ^G help text for more details).</p></blockquote>
|
||||
<h2><a name="4.5b"></a>4.5b. [version 1.2.0 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
|
||||
<blockquote><p>It was decided that consistency was nice, but people are used to Pico's inconsistent behavior. Also, in version 1.1.99pre1, search and replace history was introduced. If you wish to edit your previous search/replace entry (or any previous entry), you can do so by hitting the up arrow to cycle through your history. This method allows the best of both worlds: You don't need to erase the previous string if you want to enter a new one, but you can with one keystroke recall previous entries for editing. Therefore there is now no "Pico mode", nano is and has always been a Pico <b>clone</b>, and clones by default should be compatible.</p></blockquote>
|
||||
<h2><a name="4.6"></a>4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?</h2>
|
||||
<blockquote><p>Nano (and actually almost all console editors) has issues when cycling the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When you switch NumLock from on to off, you put the terminal into an "application mode" that changes what sequences are sent by the keypad. These sequences vary sufficiently from terminal to terminal that it is nearly impossible to work around them from within nano.</p>
|
||||
<p>In a nutshell, if you want to be able to use the keypad with the arrow and page up/down functionality, you have to exit nano and reset your terminal (presumably with "reset" or "stty sane" or similar) and then run nano again with NumLock off. If you know an easier way to restore "normal mode", please mail <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
|
||||
<h2><a name="4.7"></a>4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
|
||||
<blockquote><p>You need to make nano your $EDITOR. If you want this to be saved, you should put a line like this in your <b>.bashrc</b> if you use bash (or <b>.zshrc</b> if you believe in zsh):</p>
|
||||
<p><b>export EDITOR=/usr/local/bin/nano</b></p>
|
||||
<p>or if you use tcsh put this in your <b>.cshrc</b> file:</p>
|
||||
<p><b>setenv EDITOR /usr/local/bin/nano</b></p>
|
||||
<p>Change /usr/local/bin/nano to wherever nano is installed on your system. Type "which nano" to find out. This will not take effect until the next time you login. So log out and back in again.</p>
|
||||
<p>Then on top that if you use Pine you must go into setup (type <b>S</b> at the main menu), then configure (type <b>C</b>). Hit enter on the lines that say:</p>
|
||||
<p><b>[ ] enable-alternate-editor-cmd</b><br>
|
||||
<b>[ ] enable-alternate-editor-implicitly</b></p>
|
||||
<p>Then exit (<b>E</b>) and select Yes (<b>Y</b>).</p>
|
||||
<p>Mutt users should see an effect immediately the next time you log in, no further configuration is needed. However, if you want to let people know you use nano to compose your email messages, you can put a line like this in your <b>.muttrc</b>:</p>
|
||||
<p><b>my_hdr X-Composer: nano x.y.z</b></p>
|
||||
<p>Again, replace x.y.z with the version of nano you use.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="5"></a>5. Internationalization</h1>
|
||||
<h2><a name="5.1"></a>5.1. There's no translation for my language!</h2>
|
||||
<blockquote><p>On June of 2001, GNU nano entered the <a href="http://www.iro.umontreal.ca/contrib/po/HTML/">Free Translation Project</a> and since then, translations should be managed from there.</p>
|
||||
<p>If there isn't a translation for your language, you could ask <a href="http://www.iro.umontreal.ca/contrib/po/HTML/teams.html">your language team</a> to translate nano, or better still, join your team and do it yourself. Joining a team is easy. You just need to ask the <a href="mailto:translation@iro.umontreal.ca">TP coordinator</a> to add you to your team, and send a <a href="http://www.iro.umontreal.ca/contrib/po/HTML/disclaim.html">translation disclaimer to the FSF</a> (this is necessary as nano is an official GNU package, but it does <b>not</b> mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).</p>
|
||||
<p>In any case, translating nano is very easy. Just grab the <b>nano.pot</b> file from the latest and greatest nano distribution (it's in the <b>po/</b> directory) and translate each line into your native language on the <b>msgstr</b> line. When you're done, you should send it to the TP's central po repository.</p></blockquote>
|
||||
<h2><a name="5.2"></a>5.2. I don't like the translation for <x> in my language. How can I fix it?</h2>
|
||||
<blockquote><p>The best way would probably be to e-mail the person listed in the <code>Last-Translator:</code> field in the <b><your_language>.po</b> file with your suggested corrections and they can make the changes reach the nano-devel list.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="6"></a>6. Advocacy and Licensing</h1>
|
||||
<h2><a name="6.1"></a>6.1. Why should I use nano instead of Pico?</h2>
|
||||
<blockquote><p>There are many reasons to use nano instead of Pico, a more complete list can be found at the <a href="http://www.nano-editor.org/">nano homepage</a>.</p></blockquote>
|
||||
<h2><a name="6.2"></a>6.2. Why should I use Pico instead of nano?</h2>
|
||||
<blockquote><p>Again, check out the <a href="http://www.nano-editor.org/">nano homepage</a> for a good summary of reasons. It really is a matter of personal preference as to which editor you should use. If you're the type of person who likes using the original version of a program, then Pico is the editor for you. If you're looking for a few more features and a 'better' license as far as adding your own changes (sacrificing mailer integration with Pine), nano is the way to go.</p></blockquote>
|
||||
<h2><a name="6.3"></a>6.3. What is so bad about the Pine license?</h2>
|
||||
<blockquote><p>The U of W license for Pine and Pico is not considered truly Free Software according to both the Free Software Foundation and the <a href="http://www.debian.org/social_contract#guidelines">Debian Free Software Guidelines</a>. The main problem regards the limitations on distributing derived works: according to UW, you can distribute their software, and you can modify it, but you can not do both, i.e. distribute modified binaries.</p></blockquote>
|
||||
<h2><a name="6.4"></a>6.4. Okay, well what mail program should I use then?</h2>
|
||||
<blockquote><p>If you are looking to use a Free Software program similar to Pine and emacs is not your thing, you should definitely take a look at <a href="http://www.mutt.org/">mutt</a>. It is a full-screen, console based mail program that actually has a lot more flexibility than Pine, but has a keymap included in the distribution that allows you to use the same keystrokes as Pine would to send and receive mail. It's also licensed under the GPL.</p></blockquote>
|
||||
<h2><a name="6.5"></a>6.5. Why doesn't UW simply change their license?</h2>
|
||||
<blockquote><p>You're really not asking the right person here. I (Chris) waited a long time to see if UW would change their license because of the amount of high quality software being released and developed under the GPL without being taken advantage of by malicious corporate entities or other baddies, but no such luck so far.</p></blockquote>
|
||||
<h2><a name="6.6"></a>6.6. What if tomorrow UW changes the license to be truly Free Software?</h2>
|
||||
<blockquote><p>Honestly nothing would make me happier than to see that happen. Nano would continue to be developed independently until such time as Pico had all the features nano did or the projects merged. That just does not seem very likely given that there has been no sign of any changes in the past few years in a positive direction.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="7"></a>7. Miscellaneous</h1>
|
||||
<h2><a name="7.1"></a>7.1. Nano related mailing lists.</h2>
|
||||
<blockquote><p>There are three mailing lists for nano hosted at <a href="http://savannah.gnu.org/">Savannah</a>, info-nano, help-nano and nano-devel. Info-nano is a very low traffic list where new versions of nano are announced (surprise!) Help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. Nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:</p>
|
||||
<p>info-nano - <a href="http://mail.gnu.org/mailman/listinfo/info-nano/">http://mail.gnu.org/mailman/listinfo/info-nano/</a><br>
|
||||
help-nano - <a href="http://mail.gnu.org/mailman/listinfo/help-nano/">http://mail.gnu.org/mailman/listinfo/help-nano/</a><br>
|
||||
nano-devel - <a href="http://mail.gnu.org/mailman/listinfo/nano-devel/">http://mail.gnu.org/mailman/listinfo/nano-devel/</a></p></blockquote>
|
||||
<h2><a name="7.2"></a>7.2. I want to send the development team a big load of cash (or just a thank you).</h2>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v1.2/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.2/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<h2><a name="7.3"></a>7.3. How do I submit a patch?</h2>
|
||||
<blockquote><p>See Section <a href="#7.2">7.2</a>.</p></blockquote>
|
||||
<h2><a name="7.4"></a>7.4. How do I join the development team?</h2>
|
||||
<blockquote><p>The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given CVS write access after awhile. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.</p></blockquote>
|
||||
<h2><a name="7.5"></a>7.5. Can I have CVS write access?</h2>
|
||||
<blockquote><p>Re-read Section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
|
||||
<h2><a name="8"></a>8. ChangeLog</h2>
|
||||
<blockquote>
|
||||
Nano (actually almost all console editors do) has issues when cycling
|
||||
the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When
|
||||
you switch NumLock on to off, you put the terminal into an "application
|
||||
mode" that changes what sequences are sent by the keypad. These sequences
|
||||
vary sufficiently from terminal to terminal that it is nearly impossible
|
||||
to work around them from within nano.
|
||||
<br><br>
|
||||
In a nutshell, if you want to be able to use the keypad with the arrow and
|
||||
page up/down functionality, you have to exit nano and reset your terminal
|
||||
(presumably with "reset" or "stty sane" or similar) and then run nano
|
||||
again with NumLock off. If you know an easier way to restore "normal
|
||||
mode", please mail <A href="mailto:nano@nano-editor.org">nano@nano-editor.org</A>.
|
||||
<br> </blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.7"></a>4.7. How do I make nano my default editor (in Pine,
|
||||
mutt, etc)?</h2>
|
||||
|
||||
<blockquote>You need to make nano your $EDITOR. If you want this
|
||||
to be saved, you should put a line like this in your <b>.bashrc</b> if
|
||||
you use bash (or <b>.zshrc</b> if you believe in zsh):
|
||||
<p><b>export EDITOR=/usr/local/bin/nano</b>
|
||||
<p>or if you use tcsh put this in your <b>.cshrc</b> file:
|
||||
<p><b>setenv EDITOR /usr/local/bin/nano</b>
|
||||
<p>Change /usr/local/bin/nano to wherever nano is installed in your system.
|
||||
Type which nano to find out. This will not take effect until the next time
|
||||
you login. So log out and back in again.
|
||||
<p>Then on top that if you use Pine you must go into setup (type <b>S</b>
|
||||
at the main menu), then configure (type <b>C</b>). Hit enter on the
|
||||
lines that say:
|
||||
<p><b>[ ] enable-alternate-editor-cmd</b>
|
||||
<br><b>[ ] enable-alternate-editor-implicitly</b>
|
||||
<p>Then exit (<b>E</b>) and select Yes (<b>Y</b>).
|
||||
<p>Mutt users should see an effect immediately the next time you log in,
|
||||
no further configuration is needed. However, if you want to let people
|
||||
know you use nano to compose your email messages, you can put a line like
|
||||
this in your <b>.muttrc</b>:
|
||||
<p><b>my_hdr X-Composer: nano x.y.z</b>
|
||||
<p>Again, replace x.y.z with the version of nano you use.
|
||||
<br> </blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="5"></a><font color="#330000">5. Internationalization</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="5.1"></a><font color="#330000">5.1. There's no translation for
|
||||
my language!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">On June of 2001, GNU nano entered the
|
||||
<a href="www.iro.umontreal.ca/contrib/po/HTML">Free Translation Project</a>
|
||||
and since then, translations should be managed from there.
|
||||
<p>If there isn't a translation for your language, you could ask
|
||||
<a href="http://www.iro.umontreal.ca/contrib/po/HTML/teams.html">your language
|
||||
team</a> to tranlate nano, or better still, join your team and do it yourself.
|
||||
Joining a team is easy. You just need to ask the
|
||||
<a href="mailto:translation@iro.umontreal.ca">TP coordinator</a> to add you
|
||||
to your team, and send a <a href="http://www.iro.umontreal.ca/contrib/po/HTML/disclaim.html">translation disclaimer to the FSF</a> (this is necessary as
|
||||
nano is an official GNU package, but it does <strong>not</strong> mean that
|
||||
you transfer the rights of your work to the FSF, it's just so the FSF can
|
||||
legaly manage them).</p>
|
||||
<p>In any case, translating nano is very easy. Just grab the
|
||||
<b>nano.pot</b> file from the latest and greatest nano distribution
|
||||
(it's in the <b>po/</b> directory) and translate each line into your native
|
||||
language on the <b>msgstr</b> line. When you're done, you should
|
||||
send it to the TP's central po repository.
|
||||
|
||||
<h2>
|
||||
<a NAME="5.2"></a><font color="#330000">5.2. I don't like the translation
|
||||
for <x> in my language. How can I fix it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The best way would probably be to e-mail
|
||||
the person listed in the <code>Last-Translator:</code> field in
|
||||
<b><your_language>.po</b> file with your suggested corrections and
|
||||
they can make the changes reach the nano devel list.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="6"></a><font color="#330000">6. Advocacy and Licensing</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.1"></a><font color="#330000">6.1. Why should I use nano instead
|
||||
of Pico?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">There are many reasons to use nano instead
|
||||
of Pico, a more complete list can be found at the <a href="http://www.nano-editor.org">nano
|
||||
homepage</a>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.2"></a><font color="#330000">6.2. Why should I use Pico instead
|
||||
of nano?</font></h2>
|
||||
|
||||
<blockquote>Again, check out the <a href="http://www.nano-editor.org">nano
|
||||
homepage</a> for a good summary of reasons. It really is a matter
|
||||
of personal preference as to which editor you should use. If you're
|
||||
the type of person who likes using the original version of a program, then
|
||||
Pico is the editor for you. If you're looking for a few more
|
||||
features and a 'better' license as far as adding your own changes (sacrificing
|
||||
mailer integration with Pine), nano is the way to go.
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.3"></a><font color="#330000">6.3. What is so bad about the Pine
|
||||
license?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The U of W license for Pine and
|
||||
Pico is not considered truly Free Software according to both the Free
|
||||
Software Foundation and the the <a
|
||||
href="http://www.debian.org/social_contract#guidelines">Debian
|
||||
Free Software Guidelines</a>. The main problem regards the
|
||||
limitations on distributing derived works: according to UW, you can
|
||||
distribute their software, and you can modify it, but you can not do
|
||||
both, i.e. distribute modified binaries.</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.4"></a><font color="#330000">6.4. Okay, well what mail program
|
||||
should I use then?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000"> If you are looking to use a Free
|
||||
Software program similar to Pine and emacs is not your thing, you should
|
||||
definitely take a look at <a href="http://www.mutt.org">mutt</a>. It
|
||||
is a full-screen, console based mail program that actually has a lot more
|
||||
flexibility than Pine, but has a keymap included in the distribution that
|
||||
allows you to use the same keystrokes as Pine would to send and receive
|
||||
mail. It's also licensed under the GPL.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.5"></a><font color="#330000">6.5. Why doesn't UW simply change
|
||||
their license?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">You're really not asking the right person
|
||||
here. I (Chris) waited a long time to see if UW would change their
|
||||
license because of the amount of high quality software being released and
|
||||
developed under the GPL without being taken advantage of by malicious corporate
|
||||
entities or other baddies, but no such luck so far.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.6"></a><font color="#330000">6.6. What if tomorrow UW changes
|
||||
the license to be truly Free Software?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Honestly nothing would make me happier
|
||||
than to see that happen. Nano would continue to be developed independently
|
||||
until such time as Pico had all the features nano did or the projects merged.
|
||||
That just does not seem very likely given that there has been no sign of
|
||||
any changes in the past few years in a positive direction.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="7"></a><font color="#330000">7. Miscellaneous</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.1"></a><font color="#330000">7.1. Nano related mailing lists.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">There are three mailing lists for nano
|
||||
hosted at <a href="http://savannah.gnu.org">Savannah</a>, info-nano, help-nano
|
||||
and nano-devel. Nano-announce is a very low traffic list where new
|
||||
versions of nano are announced (surprise!) Nano-devel is a normally
|
||||
low, sometimes high traffic list for discussing the present and future
|
||||
development of nano. Help-nano is for getting help with the editor
|
||||
without needing to hear all of the development issues surrunding it.
|
||||
Here are links to where you can sign up for
|
||||
a given list:</font><font color="#330000"></font>
|
||||
<p><font color="#330000">info-nano - <a href="
|
||||
http://mail.gnu.org/mailman/listinfo/info-nano">
|
||||
http://mail.gnu.org/mailman/listinfo/info-nano</a></font>
|
||||
<br>
|
||||
<font color="#330000">help-nano -
|
||||
<a href="http://mail.gnu.org/mailman/listinfo/help-nano">
|
||||
http://mail.gnu.org/mailman/listinfo/help-nano</a></font>
|
||||
<br>
|
||||
<font color="#330000">nano-devel -
|
||||
<a href="http://mail.gnu.org/mailman/listinfo/nano-devel">
|
||||
http://mail.gnu.org/mailman/listinfo/nano-devel</a></font>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.2"></a><font color="#330000">7.2. I want to send the development
|
||||
team a big load of cash (or just a thank you).</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">That's fine. Send it <a href="mailto:nano-devel@gnu.org">our
|
||||
way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/BUGS">bug</a>
|
||||
in the program or implement a <a href="http://www.nano-editor.org/dist/TODO">cool
|
||||
feature</a> and send us that instead (though cash is fine too).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.3"></a><font color="#330000">7.3. How do I submit a patch?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">See Section <a href="#7.2">7.2</a>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.4"></a><font color="#330000">7.4. How do I join the development
|
||||
team?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The easiest way is to consistently send
|
||||
in good patches that add some needed functionality, fix a bug or two and/or
|
||||
make the program more optimized/efficient. Then ask nicely and you
|
||||
will probably be added to the Savannah development list and be given
|
||||
CVS write after awhile. There is a lot of responsibility that goes
|
||||
along with being a team member, so don't think it's just something to add
|
||||
to your resume.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.5"></a><font color="#330000">7.5. Can I have CVS write access?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Re-read Section </font><a href="#7.4">7.4</a><font color="#330000">
|
||||
and you should know the answer.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="8"></a><font color="#330000">8. ChangeLog</font>
|
||||
</h2>
|
||||
|
||||
<blockquote>2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).</blockquote>
|
||||
<blockquote>2001/10/02 - Update for Free Translation Project.</blockquote>
|
||||
<blockquote>2001/10/02 - Assorted fixes, Debian additions.</blockquote>
|
||||
<blockquote>2001/06/30 - Silly typo fix.</blockquote>
|
||||
<blockquote>2001/05/05 - Spelling fixes by David Lawrence Ramsey.</blockquote>
|
||||
<blockquote>2001/05/02 - Misc fixes.</blockquote>
|
||||
<blockquote>2001/03/26 - Typo fix in an URL.</blockquote>
|
||||
<blockquote>2001/02/17 - Advocacy updates.</blockquote>
|
||||
<blockquote>2001/02/15 - Added GNU notes for 0.9.99pre3.</blockquote>
|
||||
<blockquote>2001/02/06 - Typo fixes.</blockquote>
|
||||
<blockquote>2001/01/14 - Added note about numlock glitch.</blockquote>
|
||||
<blockquote>2001/01/10 - Linux --> GNU/Linux.</blockquote>
|
||||
<blockquote>2001/01/09 - Added "making exe smaller section.</blockquote>
|
||||
<blockquote>2000/12/19 - Typo and assorted error fixes.</blockquote>
|
||||
<blockquote>2000/11/28 - Added blurb about make install-strip.</blockquote>
|
||||
<blockquote>2000/11/19 - Changed Debian frozen to stable.</blockquote>
|
||||
<blockquote>2000/11/18 - Previous string display (4.5).</blockquote>
|
||||
<blockquote>2000/09/27 - Moved addresses to nano-editor.org.</blockquote>
|
||||
<blockquote>2000/06/31 - Initial framework.</blockquote>
|
||||
<P>
|
||||
$Id$
|
||||
<p>
|
||||
2003/01/16 - Split section 4.5 into 4.5a and 4.5b for search string behavior. Added --enable-all docs.<br>
|
||||
2002/12/28 - More misc. fixes (David Benbennick, DLR).<br>
|
||||
2002/10/25 - Misc. fixes and link updates (DLR).<br>
|
||||
2002/09/10 - Another typo fix (DLR).<br>
|
||||
2002/05/15 - Typo fix (DLR).<br>
|
||||
2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).<br>
|
||||
2001/10/02 - Update for Free Translation Project.<br>
|
||||
2001/10/02 - Assorted fixes, Debian additions.<br>
|
||||
2001/06/30 - Silly typo fix.<br>
|
||||
2001/05/05 - Spelling fixes by David Lawrence Ramsey.<br>
|
||||
2001/05/02 - Misc fixes.<br>
|
||||
2001/03/26 - Typo fix in an URL.<br>
|
||||
2001/02/17 - Advocacy updates.<br>
|
||||
2001/02/15 - Added GNU notes for 0.9.99pre3.<br>
|
||||
2001/02/06 - Typo fixes.<br>
|
||||
2001/01/14 - Added note about NumLock glitch.<br>
|
||||
2001/01/10 - Linux -> GNU/Linux.<br>
|
||||
2001/01/09 - Added "making exe smaller" section.<br>
|
||||
2000/12/19 - Typo and assorted error fixes.<br>
|
||||
2000/11/28 - Added blurb about make install-strip.<br>
|
||||
2000/11/19 - Changed Debian frozen to stable.<br>
|
||||
2000/11/18 - Previous string display (4.5).<br>
|
||||
2000/09/27 - Moved addresses to nano-editor.org.<br>
|
||||
2000/06/31 - Initial framework.</p></blockquote>
|
||||
<p>$Id$</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Makefile
|
||||
libintl.h
|
||||
po2tbl.sed
|
||||
@@ -1,4 +0,0 @@
|
||||
2001-09-13 GNU <bug-gnu-utils@gnu.org>
|
||||
|
||||
* Version 0.10.40 released.
|
||||
|
||||
313
intl/Makefile.in
313
intl/Makefile.in
@@ -1,313 +0,0 @@
|
||||
# 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 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.
|
||||
|
||||
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 = COPYING.LIB-2 COPYING.LIB-2.1 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="COPYING.LIB-2 COPYING.LIB-2.1 $(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 COPYING.LIB-2 COPYING.LIB-2.1 $(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 +0,0 @@
|
||||
GNU gettext library from gettext-0.10.40
|
||||
@@ -1,369 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
@@ -1,438 +0,0 @@
|
||||
#! /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
|
||||
# BIG5-HKSCS glibc
|
||||
# GBK aix osf win32 dos
|
||||
# GB18030 glibc
|
||||
# SHIFT_JIS hpux osf solaris freebsd yes
|
||||
# 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 SHIFT_JIS"
|
||||
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 SHIFT_JIS"
|
||||
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 SHIFT_JIS"
|
||||
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 SHIFT_JIS"
|
||||
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
||||
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
|
||||
@@ -1,58 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
1259
intl/dcigettext.c
1259
intl/dcigettext.c
File diff suppressed because it is too large
Load Diff
@@ -1,60 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
@@ -1,59 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
@@ -1,61 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
@@ -1,192 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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;
|
||||
}
|
||||
@@ -1,198 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
@@ -1,64 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
102
intl/gettext.h
102
intl/gettext.h
@@ -1,102 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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 */
|
||||
252
intl/gettextP.h
252
intl/gettextP.h
@@ -1,252 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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 */
|
||||
@@ -1,59 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
/* @@ 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;
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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);
|
||||
}
|
||||
405
intl/l10nflist.c
405
intl/l10nflist.c
@@ -1,405 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
/* 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
|
||||
@@ -1,49 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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 */
|
||||
@@ -1,128 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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 */
|
||||
109
intl/loadinfo.h
109
intl/loadinfo.h
@@ -1,109 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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 */
|
||||
@@ -1,567 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
/* 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
|
||||
@@ -1,271 +0,0 @@
|
||||
/* 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 const char * volatile charset_aliases;
|
||||
|
||||
/* Return a pointer to the contents of the charset.alias file. */
|
||||
static const char *
|
||||
get_charset_aliases ()
|
||||
{
|
||||
const 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;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
# 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 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 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å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ç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 he_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
|
||||
@@ -1,404 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
/* 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
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
1326
intl/plural.c
1326
intl/plural.c
File diff suppressed because it is too large
Load Diff
413
intl/plural.y
413
intl/plural.y
@@ -1,413 +0,0 @@
|
||||
%{
|
||||
/* 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 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 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. */
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
# 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:/
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
# 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:/
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
/* 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 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. */
|
||||
|
||||
#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
|
||||
29
m4/ChangeLog
Normal file
29
m4/ChangeLog
Normal file
@@ -0,0 +1,29 @@
|
||||
2002-08-21 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* gettext.m4: Upgrade to gettext-0.11.5.
|
||||
* ulonglong.m4: New file, from gettext-0.11.5.
|
||||
* iconv.m4: Upgrade to gettext-0.11.5.
|
||||
* intdiv0.m4: New file, from gettext-0.11.5.
|
||||
* inttypes.m4: New file, from gettext-0.11.5.
|
||||
* inttypes_h.m4: New file, from gettext-0.11.5.
|
||||
* inttypes-pri.m4: New file, from gettext-0.11.5.
|
||||
* lcmessage.m4: Upgrade to gettext-0.11.5.
|
||||
* lib-link.m4: Upgrade to gettext-0.11.5.
|
||||
* stdint_h.m4: New file, from gettext-0.11.5.
|
||||
* uintmax_t.m4: New file, from gettext-0.11.5.
|
||||
* Makefile.am (EXTRA_DIST): Add the new files.
|
||||
|
||||
2002-06-03 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* codeset.m4: Upgrade to gettext-0.11.2.
|
||||
* gettext.m4: Upgrade to gettext-0.11.2.
|
||||
* glibc21.m4: Upgrade to gettext-0.11.2.
|
||||
* iconv.m4: Upgrade to gettext-0.11.2.
|
||||
* isc-posix.m4: New file, from gettext-0.11.2.
|
||||
* lcmessage.m4: Upgrade to gettext-0.11.2.
|
||||
* lib-ld.m4: New file, from gettext-0.11.2.
|
||||
* lib-link.m4: New file, from gettext-0.11.2.
|
||||
* lib-prefix.m4: New file, from gettext-0.11.2.
|
||||
* progtest.m4: Upgrade to gettext-0.11.2.
|
||||
* Makefile.am (EXTRA_DIST): Add the new files.
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
EXTRA_DIST = codeset.m4 glibc21.m4 progtest.m4 gettext.m4 iconv.m4 \
|
||||
lcmessage.m4
|
||||
EXTRA_DIST = ulonglong.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 \
|
||||
stdint_h.m4 uintmax_t.m4 isc-posix.m4 lib-ld.m4 lib-link.m4 \
|
||||
lib-prefix.m4 codeset.m4 glibc21.m4 progtest.m4 gettext.m4 \
|
||||
iconv.m4 lcmessage.m4
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
dnl AM_ACLOCAL_INCLUDE(macrodir)
|
||||
AC_DEFUN([AM_ACLOCAL_INCLUDE],
|
||||
[
|
||||
test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
|
||||
])
|
||||
@@ -1,8 +1,14 @@
|
||||
#serial AM1
|
||||
# codeset.m4 serial AM1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([NANO_AM_LANGINFO_CODESET],
|
||||
AC_DEFUN([AM_LANGINFO_CODESET],
|
||||
[
|
||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
||||
[AC_TRY_LINK([#include <langinfo.h>],
|
||||
|
||||
767
m4/gettext.m4
767
m4/gettext.m4
@@ -1,27 +1,42 @@
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
# gettext.m4 serial 17 (gettext-0.11.5)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
# serial 10
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
|
||||
|
||||
dnl Usage: NANO_AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
||||
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
||||
dnl Macro to add for using GNU gettext.
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
||||
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
||||
dnl default (if it is not specified or empty) is 'no-libtool'.
|
||||
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
||||
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
||||
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
||||
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||
dnl AM-DISABLE-SHARED). Otherwise, a static library
|
||||
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
||||
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||
dnl implementations (in libc or libintl) without the ngettext() function
|
||||
dnl will be ignored.
|
||||
dnl LIBDIR is used to find the intl libraries. If empty,
|
||||
dnl will be ignored. If NEEDSYMBOL is specified and is
|
||||
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
|
||||
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
|
||||
dnl INTLDIR is used to find the intl libraries. If empty,
|
||||
dnl the value `$(top_builddir)/intl/' is used.
|
||||
dnl
|
||||
dnl The result of the configuration is one of three cases:
|
||||
@@ -35,29 +50,68 @@ dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 3) No internationalization, always use English msgid.
|
||||
dnl Catalog format: none
|
||||
dnl Catalog extension: none
|
||||
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
||||
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||
dnl maintainers.
|
||||
dnl
|
||||
AC_DEFUN([NANO_AM_WITH_NLS],
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[
|
||||
dnl Argument checking.
|
||||
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
||||
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
||||
])])])])])
|
||||
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
|
||||
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
||||
])])])])
|
||||
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
|
||||
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
|
||||
|
||||
AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
||||
])
|
||||
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
dnl Ideally we would do this search only after the
|
||||
dnl if test "$USE_NLS" = "yes"; then
|
||||
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
|
||||
dnl the configure script would need to contain the same shell code
|
||||
dnl again, outside any 'if'. There are two solutions:
|
||||
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
|
||||
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
|
||||
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
|
||||
dnl documented, we avoid it.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
BUILD_INCLUDED_LIBINTL=no
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
INTLLIBS=
|
||||
])
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
POSUB=
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
gt_use_preinstalled_gnugettext=no
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
@@ -67,214 +121,177 @@ AC_DEFUN([NANO_AM_WITH_NLS],
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
])
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If GNU gettext is available we use this. Else we have
|
||||
dnl to fall back to GNU NLS library.
|
||||
CATOBJEXT=NONE
|
||||
|
||||
dnl Add a version number to the cache macros.
|
||||
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
||||
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
||||
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
|
||||
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
|
||||
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
]ifelse([$2], [need-formatstring-macros],
|
||||
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
||||
#endif
|
||||
changequote(,)dnl
|
||||
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
||||
changequote([,])dnl
|
||||
], [])[extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
gt_cv_func_gnugettext_libintl,
|
||||
[gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lintl $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AM_ICONV_LINK
|
||||
])
|
||||
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
||||
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
||||
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
||||
dnl even if libiconv doesn't exist.
|
||||
AC_LIB_LINKFLAGS_BODY([intl])
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
gt_cv_func_gnugettext_libintl,
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $INCINTL"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBINTL"
|
||||
dnl Now see whether libintl exists and does not depend on libiconv.
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
]ifelse([$2], [need-formatstring-macros],
|
||||
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
||||
#endif
|
||||
changequote(,)dnl
|
||||
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
||||
changequote([,])dnl
|
||||
], [])[extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
dnl Now see whether libintl exists and depends on libiconv.
|
||||
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
]ifelse([$2], [need-formatstring-macros],
|
||||
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
||||
#endif
|
||||
changequote(,)dnl
|
||||
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
||||
changequote([,])dnl
|
||||
], [])[extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
||||
[LIBINTL="$LIBINTL $LIBICONV"
|
||||
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
||||
gt_cv_func_gnugettext_libintl=yes
|
||||
])
|
||||
fi
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||
&& test "$PACKAGE" != gettext; }; then
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||
&& test "$PACKAGE" != gettext; }; then
|
||||
gt_use_preinstalled_gnugettext=yes
|
||||
else
|
||||
dnl Reset the values set by searching for libintl.
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
INCINTL=
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||
dnl If iconv() is in a separate libiconv library, then anyone
|
||||
dnl linking with libintl{.a,.so} also needs to link with
|
||||
dnl libiconv.
|
||||
INTLLIBS="-lintl $LIBICONV"
|
||||
fi
|
||||
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
LIBS="$gt_save_LIBS"
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
NANO_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
|
||||
dnl Search for GNU xgettext in the PATH.
|
||||
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||
|
||||
CATOBJEXT=.gmo
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
ifelse(gt_included_intl, yes, [
|
||||
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on included GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
NANO_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
|
||||
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions to use GNU gettext tools.
|
||||
CATOBJEXT=.gmo
|
||||
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
])
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test "$GMSGFMT" != ":"; then
|
||||
dnl If it is no GNU msgfmt we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found msgfmt program is not GNU msgfmt; ignore it])
|
||||
GMSGFMT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
else
|
||||
USE_NLS=no
|
||||
fi
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done])
|
||||
fi
|
||||
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||
AC_MSG_CHECKING([how to link with libintl])
|
||||
AC_MSG_RESULT([$LIBINTL])
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
||||
fi
|
||||
|
||||
dnl For backward compatibility. Some packages may be using this.
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
AC_DEFINE(HAVE_DCGETTEXT, 1,
|
||||
[Define if the GNU dcgettext() function is already present or preinstalled.])
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||
dnl to 'yes' because some of the testsuite requires it.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
|
||||
dnl For backward compatibility. Some configure.ins may be using this.
|
||||
nls_cv_header_intl=
|
||||
@@ -291,80 +308,280 @@ changequote([,])dnl
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
GENCAT=gencat
|
||||
AC_SUBST(GENCAT)
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
||||
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||
])
|
||||
|
||||
dnl Usage: Just like AM_WITH_NLS, which see.
|
||||
AC_DEFUN([NANO_AM_GNU_GETTEXT],
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([nano_jm_GLIBC21])dnl
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLLIBS="$LIBINTL"
|
||||
AC_SUBST(INTLLIBS)
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||
dnl Make all documented variables known to autoconf.
|
||||
AC_SUBST(LIBINTL)
|
||||
AC_SUBST(LTLIBINTL)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for all prerequisites of the po subdirectory,
|
||||
dnl except for USE_NLS.
|
||||
AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
|
||||
dnl Perform the following tests also if --disable-nls has been given,
|
||||
dnl because they are needed for "make dist" to work.
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
||||
dnl The second test excludes FreeBSD msgfmt.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
|
||||
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
|
||||
dnl Search for GNU xgettext 0.11 or newer in the PATH.
|
||||
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
||||
dnl The second test excludes FreeBSD xgettext.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
||||
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
|
||||
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test "$GMSGFMT" != ":"; then
|
||||
dnl If it is no GNU msgfmt we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
|
||||
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
||||
: ;
|
||||
else
|
||||
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
|
||||
AC_MSG_RESULT(
|
||||
[found $GMSGFMT program is not GNU msgfmt; ignore it])
|
||||
GMSGFMT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
||||
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
fi
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
||||
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
|
||||
# on $ac_dir but don't depend on user-specified configuration
|
||||
# parameters.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
# Hide the ALL_LINGUAS assigment from automake.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
fi
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
GMOFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
done
|
||||
fi
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
||||
if test -f "$f"; then
|
||||
case "$f" in
|
||||
*.orig | *.bak | *~) ;;
|
||||
*) cat "$f" >> "$ac_dir/Makefile" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done],
|
||||
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
|
||||
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
|
||||
# from automake.
|
||||
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
|
||||
# Capture the value of LINGUAS because we need it to compute CATALOGS.
|
||||
LINGUAS="${LINGUAS-%UNSET%}"
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for all prerequisites of the intl subdirectory,
|
||||
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
|
||||
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
|
||||
AC_DEFUN([AM_INTL_SUBDIR],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([jm_GLIBC21])dnl
|
||||
AC_REQUIRE([gt_INTDIV0])dnl
|
||||
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
|
||||
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
|
||||
AC_REQUIRE([gt_INTTYPES_PRI])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||
stdlib.h string.h unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
||||
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
||||
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
|
||||
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
|
||||
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||
|
||||
NANO_AM_ICONV
|
||||
NANO_AM_LANGINFO_CODESET
|
||||
NANO_AM_LC_MESSAGES
|
||||
NANO_AM_WITH_NLS([$1],[$2],[$3])
|
||||
AM_ICONV
|
||||
AM_LANGINFO_CODESET
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
AM_LC_MESSAGES
|
||||
fi
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
AC_DEFUN([AM_MKINSTALLDIRS],
|
||||
[
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
])
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
||||
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||
])
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
|
||||
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#serial 2
|
||||
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# Test for the GNU C Library, version 2.1 or newer.
|
||||
# From Bruno Haible.
|
||||
|
||||
AC_DEFUN([nano_jm_GLIBC21],
|
||||
AC_DEFUN([jm_GLIBC21],
|
||||
[
|
||||
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
||||
ac_cv_gnu_library_2_1,
|
||||
|
||||
64
m4/iconv.m4
64
m4/iconv.m4
@@ -1,19 +1,39 @@
|
||||
#serial AM2
|
||||
# iconv.m4 serial AM4 (gettext-0.11.3)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([NANO_AM_ICONV],
|
||||
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
||||
[
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
|
||||
AC_ARG_WITH([libiconv-prefix],
|
||||
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
||||
for dir in `echo "$withval" | tr : ' '`; do
|
||||
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
||||
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
||||
done
|
||||
])
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
@@ -26,7 +46,7 @@ AC_DEFUN([NANO_AM_ICONV],
|
||||
am_cv_func_iconv=yes)
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -liconv"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
@@ -39,6 +59,25 @@ AC_DEFUN([NANO_AM_ICONV],
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
AC_SUBST(LTLIBICONV)
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AM_ICONV_LINK
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL(am_cv_proto_iconv, [
|
||||
AC_TRY_COMPILE([
|
||||
@@ -61,9 +100,4 @@ size_t iconv();
|
||||
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
LIBICONV=
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
LIBICONV="-liconv"
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
])
|
||||
|
||||
72
m4/intdiv0.m4
Normal file
72
m4/intdiv0.m4
Normal file
@@ -0,0 +1,72 @@
|
||||
# intdiv0.m4 serial 1 (gettext-0.11.3)
|
||||
dnl Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([gt_INTDIV0],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
|
||||
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
|
||||
gt_cv_int_divbyzero_sigfpe,
|
||||
[
|
||||
AC_TRY_RUN([
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
||||
static void
|
||||
#ifdef __cplusplus
|
||||
sigfpe_handler (int sig)
|
||||
#else
|
||||
sigfpe_handler (sig) int sig;
|
||||
#endif
|
||||
{
|
||||
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
|
||||
exit (sig != SIGFPE);
|
||||
}
|
||||
|
||||
int x = 1;
|
||||
int y = 0;
|
||||
int z;
|
||||
int nan;
|
||||
|
||||
int main ()
|
||||
{
|
||||
signal (SIGFPE, sigfpe_handler);
|
||||
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
|
||||
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
|
||||
signal (SIGTRAP, sigfpe_handler);
|
||||
#endif
|
||||
/* Linux/SPARC yields signal SIGILL. */
|
||||
#if defined (__sparc__) && defined (__linux__)
|
||||
signal (SIGILL, sigfpe_handler);
|
||||
#endif
|
||||
|
||||
z = x / y;
|
||||
nan = y / y;
|
||||
exit (1);
|
||||
}
|
||||
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
|
||||
[
|
||||
# Guess based on the CPU.
|
||||
case "$host_cpu" in
|
||||
alpha* | i[34567]86 | m68k | s390*)
|
||||
gt_cv_int_divbyzero_sigfpe="guessing yes";;
|
||||
*)
|
||||
gt_cv_int_divbyzero_sigfpe="guessing no";;
|
||||
esac
|
||||
])
|
||||
])
|
||||
case "$gt_cv_int_divbyzero_sigfpe" in
|
||||
*yes) value=1;;
|
||||
*) value=0;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
|
||||
[Define if integer division by zero raises signal SIGFPE.])
|
||||
])
|
||||
32
m4/inttypes-pri.m4
Normal file
32
m4/inttypes-pri.m4
Normal file
@@ -0,0 +1,32 @@
|
||||
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
|
||||
# macros to non-string values. This is the case on AIX 4.3.3.
|
||||
|
||||
AC_DEFUN([gt_INTTYPES_PRI],
|
||||
[
|
||||
AC_REQUIRE([gt_HEADER_INTTYPES_H])
|
||||
if test $gt_cv_header_inttypes_h = yes; then
|
||||
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
|
||||
gt_cv_inttypes_pri_broken,
|
||||
[
|
||||
AC_TRY_COMPILE([#include <inttypes.h>
|
||||
#ifdef PRId32
|
||||
char *p = PRId32;
|
||||
#endif
|
||||
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
|
||||
])
|
||||
fi
|
||||
if test "$gt_cv_inttypes_pri_broken" = yes; then
|
||||
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
|
||||
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
|
||||
fi
|
||||
])
|
||||
27
m4/inttypes.m4
Normal file
27
m4/inttypes.m4
Normal file
@@ -0,0 +1,27 @@
|
||||
# inttypes.m4 serial 1 (gettext-0.11.4)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
|
||||
# <sys/types.h>.
|
||||
|
||||
AC_DEFUN([gt_HEADER_INTTYPES_H],
|
||||
[
|
||||
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
|
||||
[
|
||||
AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <inttypes.h>],
|
||||
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
|
||||
])
|
||||
if test $gt_cv_header_inttypes_h = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
|
||||
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
|
||||
fi
|
||||
])
|
||||
28
m4/inttypes_h.m4
Normal file
28
m4/inttypes_h.m4
Normal file
@@ -0,0 +1,28 @@
|
||||
# inttypes_h.m4 serial 4 (gettext-0.11.4)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
|
||||
# doesn't clash with <sys/types.h>, and declares uintmax_t.
|
||||
|
||||
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
|
||||
[
|
||||
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <inttypes.h>],
|
||||
[uintmax_t i = (uintmax_t) -1;],
|
||||
jm_ac_cv_header_inttypes_h=yes,
|
||||
jm_ac_cv_header_inttypes_h=no)])
|
||||
if test $jm_ac_cv_header_inttypes_h = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
|
||||
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
|
||||
and declares uintmax_t. ])
|
||||
fi
|
||||
])
|
||||
26
m4/isc-posix.m4
Normal file
26
m4/isc-posix.m4
Normal file
@@ -0,0 +1,26 @@
|
||||
# isc-posix.m4 serial 2 (gettext-0.11.2)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
|
||||
|
||||
# This test replaces the one in autoconf.
|
||||
# Currently this macro should have the same name as the autoconf macro
|
||||
# because gettext's gettext.m4 (distributed in the automake package)
|
||||
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
||||
# give these diagnostics:
|
||||
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
||||
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
||||
|
||||
undefine([AC_ISC_POSIX])
|
||||
|
||||
AC_DEFUN([AC_ISC_POSIX],
|
||||
[
|
||||
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
||||
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
||||
]
|
||||
)
|
||||
@@ -1,24 +1,32 @@
|
||||
# lcmessage.m4 serial 3 (gettext-0.11.3)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
|
||||
# serial 2
|
||||
|
||||
AC_DEFUN([NANO_AM_LC_MESSAGES],
|
||||
[if test $ac_cv_header_locale_h = yes; then
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
AC_DEFUN([AM_LC_MESSAGES],
|
||||
[
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||
fi
|
||||
fi])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||
fi
|
||||
])
|
||||
|
||||
97
m4/lib-ld.m4
Normal file
97
m4/lib-ld.m4
Normal file
@@ -0,0 +1,97 @@
|
||||
# lib-ld.m4 serial 1 (gettext-0.11)
|
||||
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
acl_cv_prog_gnu_ld=yes
|
||||
else
|
||||
acl_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(acl_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
554
m4/lib-link.m4
Normal file
554
m4/lib-link.m4
Normal file
@@ -0,0 +1,554 @@
|
||||
# lib-link.m4 serial 3 (gettext-0.11.3)
|
||||
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. If found, it
|
||||
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
||||
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIB[]NAME"
|
||||
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L,
|
||||
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
libext="$acl_cv_libext"
|
||||
shlibext="$acl_cv_shlibext"
|
||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
hardcode_direct="$acl_cv_hardcode_direct"
|
||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
|
||||
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH([lib$1-prefix],
|
||||
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
||||
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
if test $use_additional = yes; then
|
||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_so="$additional_libdir/lib$name.$shlibext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_a="$additional_libdir/lib$name.$libext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/lib$name.$shlibext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$dir/lib$name.$libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/lib$name.$libext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/lib | */lib/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
148
m4/lib-prefix.m4
Normal file
148
m4/lib-prefix.m4
Normal file
@@ -0,0 +1,148 @@
|
||||
# lib-prefix.m4 serial 1 (gettext-0.11)
|
||||
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
@@ -1,20 +1,28 @@
|
||||
# progtest.m4 serial 2 (gettext-0.10.40)
|
||||
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
# Search path for a program which passes the given test.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
|
||||
# serial 2
|
||||
|
||||
dnl NANO_AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
AC_DEFUN([NANO_AM_PATH_PROG_WITH_TEST],
|
||||
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
||||
[# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
|
||||
28
m4/stdint_h.m4
Normal file
28
m4/stdint_h.m4
Normal file
@@ -0,0 +1,28 @@
|
||||
# stdint_h.m4 serial 2 (gettext-0.11.4)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
|
||||
# doesn't clash with <sys/types.h>, and declares uintmax_t.
|
||||
|
||||
AC_DEFUN([jm_AC_HEADER_STDINT_H],
|
||||
[
|
||||
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <stdint.h>],
|
||||
[uintmax_t i = (uintmax_t) -1;],
|
||||
jm_ac_cv_header_stdint_h=yes,
|
||||
jm_ac_cv_header_stdint_h=no)])
|
||||
if test $jm_ac_cv_header_stdint_h = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
|
||||
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
|
||||
and declares uintmax_t. ])
|
||||
fi
|
||||
])
|
||||
29
m4/uintmax_t.m4
Normal file
29
m4/uintmax_t.m4
Normal file
@@ -0,0 +1,29 @@
|
||||
# uintmax_t.m4 serial 6 (gettext-0.11)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_PREREQ(2.13)
|
||||
|
||||
# Define uintmax_t to `unsigned long' or `unsigned long long'
|
||||
# if <inttypes.h> does not exist.
|
||||
|
||||
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
|
||||
[
|
||||
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
|
||||
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
|
||||
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
|
||||
test $ac_cv_type_unsigned_long_long = yes \
|
||||
&& ac_type='unsigned long long' \
|
||||
|| ac_type='unsigned long'
|
||||
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
|
||||
[Define to unsigned long or unsigned long long
|
||||
if <inttypes.h> and <stdint.h> don't define.])
|
||||
fi
|
||||
])
|
||||
23
m4/ulonglong.m4
Normal file
23
m4/ulonglong.m4
Normal file
@@ -0,0 +1,23 @@
|
||||
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
|
||||
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
|
||||
[
|
||||
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
|
||||
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
|
||||
[unsigned long long ullmax = (unsigned long long) -1;
|
||||
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
|
||||
ac_cv_type_unsigned_long_long=yes,
|
||||
ac_cv_type_unsigned_long_long=no)])
|
||||
if test $ac_cv_type_unsigned_long_long = yes; then
|
||||
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
|
||||
[Define if you have the unsigned long long type.])
|
||||
fi
|
||||
])
|
||||
284
move.c
284
move.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* move.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* 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) *
|
||||
@@ -24,33 +24,76 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
void page_down(void)
|
||||
int do_home(void)
|
||||
{
|
||||
if (!ISSET(SMOOTHSCROLL)) {
|
||||
if (editbot != filebot) {
|
||||
edit_update(editbot->next, CENTER);
|
||||
center_cursor();
|
||||
} else {
|
||||
while (current != filebot)
|
||||
current = current->next;
|
||||
edit_update(current, CENTER);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_end(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = strlen(current->data);
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void page_up(void)
|
||||
{
|
||||
if (edittop != fileage) {
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(SMOOTHSCROLL))
|
||||
edit_update(edittop->prev, TOP);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
edit_update(edittop, CENTER);
|
||||
/* Now that we've updated the edit window, edittop might be
|
||||
at the top of the file; if so, just move the cursor up one
|
||||
line and don't center it. */
|
||||
if (edittop != fileage)
|
||||
center_cursor();
|
||||
else
|
||||
reset_cursor();
|
||||
}
|
||||
} else {
|
||||
edit_update(editbot, NONE);
|
||||
}
|
||||
} else
|
||||
current_y = 0;
|
||||
|
||||
update_cursor();
|
||||
}
|
||||
|
||||
int do_page_up(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
wrap_reset();
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
|
||||
if (current == fileage)
|
||||
return 0;
|
||||
|
||||
current_y = 0;
|
||||
current = edittop;
|
||||
for (i = 0; i <= editwinrows - 3 && current->prev != NULL; i++)
|
||||
current = current->prev;
|
||||
|
||||
edit_update(current, TOP);
|
||||
update_cursor();
|
||||
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_page_down(void)
|
||||
{
|
||||
wrap_reset();
|
||||
@@ -61,10 +104,16 @@ int do_page_down(void)
|
||||
return 0;
|
||||
|
||||
/* AHEM, if we only have a screen or less of text, DON'T do an
|
||||
edit_update, just move the cursor to editbot! */
|
||||
edit_update(), just move the cursor to editbot! */
|
||||
if (edittop == fileage && editbot == filebot && totlines < editwinrows) {
|
||||
current = editbot;
|
||||
reset_cursor();
|
||||
#ifndef NANO_SMALL
|
||||
/* ...unless marking is on, in which case we need it to update
|
||||
the highlight. */
|
||||
if (ISSET(MARK_ISSET))
|
||||
edit_update(current, NONE);
|
||||
#endif
|
||||
} else if (editbot != filebot || edittop == fileage) {
|
||||
current_y = 0;
|
||||
current = editbot;
|
||||
@@ -88,142 +137,63 @@ int do_page_down(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_home(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_end(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = strlen(current->data);
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* What happens when we want to go past the bottom of the buffer */
|
||||
int do_down(void)
|
||||
{
|
||||
wrap_reset();
|
||||
if (current->next != NULL) {
|
||||
update_line(current->prev, 0);
|
||||
|
||||
if (placewewant > 0)
|
||||
current_x = actual_x(current->next, placewewant);
|
||||
|
||||
if (current_x > strlen(current->next->data))
|
||||
current_x = strlen(current->next->data);
|
||||
} else {
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (current_y < editwinrows - 1 && current != editbot)
|
||||
current_y++;
|
||||
else
|
||||
page_down();
|
||||
|
||||
update_cursor();
|
||||
update_line(current->prev, 0);
|
||||
update_line(current, current_x);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void page_up(void)
|
||||
{
|
||||
if (edittop != fileage) {
|
||||
if (!ISSET(SMOOTHSCROLL)) {
|
||||
edit_update(edittop, CENTER);
|
||||
/* Now that we've updated the edit window, edittop might be
|
||||
at the top of the file; if so, just move the cursor up one
|
||||
line and don't center it. */
|
||||
if (edittop != fileage)
|
||||
center_cursor();
|
||||
else {
|
||||
current = current->prev;
|
||||
reset_cursor();
|
||||
}
|
||||
} else {
|
||||
edit_update(edittop->prev, NONE);
|
||||
}
|
||||
} else
|
||||
current_y = 0;
|
||||
|
||||
update_cursor();
|
||||
|
||||
}
|
||||
|
||||
int do_page_up(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
wrap_reset();
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
|
||||
if (current == fileage)
|
||||
return 0;
|
||||
|
||||
current_y = 0;
|
||||
current = edittop;
|
||||
for (i = 0; i <= editwinrows - 3 && current->prev != NULL; i++)
|
||||
current = current->prev;
|
||||
|
||||
edit_update(current, TOP);
|
||||
update_cursor();
|
||||
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int do_up(void)
|
||||
{
|
||||
wrap_reset();
|
||||
if (current->prev != NULL) {
|
||||
if (placewewant > 0)
|
||||
current_x = actual_x(current->prev, placewewant);
|
||||
|
||||
if (current_x > strlen(current->prev->data))
|
||||
current_x = strlen(current->prev->data);
|
||||
current_x = actual_x(current->prev, placewewant);
|
||||
current = current->prev;
|
||||
if (current_y > 0) {
|
||||
update_line(current->next, 0);
|
||||
/* It is necessary to change current first, so the mark
|
||||
display will change! */
|
||||
current_y--;
|
||||
update_line(current, current_x);
|
||||
} else
|
||||
page_up();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
}
|
||||
if (current_y > 0)
|
||||
current_y--;
|
||||
else
|
||||
page_up();
|
||||
|
||||
update_cursor();
|
||||
update_line(current->next, 0);
|
||||
update_line(current, current_x);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_right(void)
|
||||
/* Return value 1 means we moved down, 0 means we were already at the
|
||||
* bottom. */
|
||||
int do_down(void)
|
||||
{
|
||||
if (current_x < strlen(current->data)) {
|
||||
current_x++;
|
||||
} else {
|
||||
if (do_down())
|
||||
current_x = 0;
|
||||
}
|
||||
|
||||
placewewant = xplustabs();
|
||||
update_cursor();
|
||||
update_line(current, current_x);
|
||||
wrap_reset();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
|
||||
if (current->next == NULL)
|
||||
return 0;
|
||||
|
||||
current = current->next;
|
||||
current_x = actual_x(current, placewewant);
|
||||
|
||||
/* Note current_y is zero-based. This test checks for the cursor's
|
||||
* being on the last row of the edit window. */
|
||||
if (current_y == editwinrows - 1) {
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(SMOOTHSCROLL)) {
|
||||
/* In this case current_y does not change. The cursor
|
||||
* remains at the bottom of the edit window. */
|
||||
edittop = edittop->next;
|
||||
editbot = editbot->next;
|
||||
edit_refresh();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
/* Set edittop so editbot->next (or else editbot) is
|
||||
* centered, and set current_y = editwinrows / 2. */
|
||||
edit_update(editbot->next != NULL ? editbot->next : editbot, CENTER);
|
||||
center_cursor();
|
||||
}
|
||||
} else {
|
||||
update_line(current->prev, 0);
|
||||
update_line(current, current_x);
|
||||
current_y++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -232,13 +202,27 @@ int do_left(void)
|
||||
if (current_x > 0)
|
||||
current_x--;
|
||||
else if (current != fileage) {
|
||||
placewewant = 0;
|
||||
current_x = strlen(current->prev->data);
|
||||
do_up();
|
||||
current_x = strlen(current->data);
|
||||
}
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_right(void)
|
||||
{
|
||||
assert(current_x <= strlen(current->data));
|
||||
|
||||
if (current->data[current_x] != '\0')
|
||||
current_x++;
|
||||
else if (current->next != NULL) {
|
||||
do_down();
|
||||
current_x = 0;
|
||||
}
|
||||
placewewant = xplustabs();
|
||||
|
||||
update_cursor();
|
||||
update_line(current, current_x);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
|
||||
126
nano.1
126
nano.1
@@ -1,45 +1,61 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nano.1 is copyright 1999-2002 by
|
||||
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by
|
||||
.\" Chris Allegretta <chrisa@asty.org>
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANO 1 "January 3, 2002"
|
||||
.TH NANO 1 "February 9, 2003"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
|
||||
.SH NAME
|
||||
nano \- Nano's ANOther editor, an enhanced free Pico Clone
|
||||
nano \- Nano's ANOther editor, an enhanced free Pico clone
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B nano
|
||||
.RI [options]\ [+LINE] " file"
|
||||
.I [\+LINE]\ [options]\ [file]
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B nano
|
||||
command.
|
||||
This manual page documents briefly the \fBnano\fP command.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
|
||||
.\" respectively.
|
||||
\fBnano\fP is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel,
|
||||
.B nano
|
||||
also implements some missing (or disabled by default) features in Pico,
|
||||
such as "search and replace" and "goto line number".
|
||||
than just copying Pico's look and feel, \fBnano\fP also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line number".
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \+\fILINE\fP
|
||||
Places cursor at \fILINE\fP on startup.
|
||||
.TP
|
||||
.B \-B (\-\-backup)
|
||||
When saving a file, back up the previous version of it to the current
|
||||
filename suffixed with a ~.
|
||||
.TP
|
||||
.B \-D (\-\-dos)
|
||||
Write file in DOS format.
|
||||
.TP
|
||||
.B \-F (\-\-multibuffer)
|
||||
Enable multiple file buffers (if available).
|
||||
Enable multiple file buffers, if available.
|
||||
.TP
|
||||
.B \-H (\-\-historylog)
|
||||
Log search and replace strings to ~/.nano_history so they may be
|
||||
stored for later editing, if nanorc support is configured.
|
||||
.TP
|
||||
.B \-I (\-\-ignorercfiles)
|
||||
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
|
||||
available.
|
||||
.TP
|
||||
.B \-K (\-\-keypad)
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
under nano.
|
||||
.TP
|
||||
.B \-M (\-\-mac)
|
||||
@@ -48,8 +64,10 @@ Write file in Mac format.
|
||||
.B \-N (\-\-noconvert)
|
||||
Disable automatic conversion of files from DOS/Mac format.
|
||||
.TP
|
||||
.B \-Q [str] (\-\-quotestr=[str])
|
||||
Set the quoting string for justifying. The default is "> ".
|
||||
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
|
||||
Set the quoting string for justifying. The default is
|
||||
"^([ \\t]*[|>:}#])+" if regular expression support is available, or
|
||||
"> " otherwise.
|
||||
.TP
|
||||
.B \-R (\-\-regexp)
|
||||
Enable regular expression matching for search strings, as well as
|
||||
@@ -57,14 +75,18 @@ Enable regular expression matching for search strings, as well as
|
||||
.TP
|
||||
.B \-S (\-\-smooth)
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behaviour.
|
||||
usual chunk-by-chunk behavior.
|
||||
.TP
|
||||
.B \-T [num] (\-\-tabsize=[num])
|
||||
.B \-T \fInum\fP (\-\-tabsize=\fInum\fP)
|
||||
Set the size (width) of a tab.
|
||||
.TP
|
||||
.B \-V (\-\-version)
|
||||
Show the current version number and author.
|
||||
.TP
|
||||
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
|
||||
Specify a specific syntax highlighting from the .nanorc to use, if
|
||||
available.
|
||||
.TP
|
||||
.B \-c (\-\-const)
|
||||
Constantly show the cursor position.
|
||||
.TP
|
||||
@@ -79,27 +101,27 @@ source code.
|
||||
Enable cut from cursor to end of line with ^K.
|
||||
.TP
|
||||
.B \-l (\-\-nofollow)
|
||||
If the file being edited is a symbolic link, replace the link with a
|
||||
If the file being edited is a symbolic link, replace the link with
|
||||
a new file, do not follow it. Good for editing files in /tmp, perhaps?
|
||||
.TP
|
||||
.B \-m (\-\-mouse)
|
||||
Enable mouse support (if available for your system).
|
||||
.TP
|
||||
.B \-o [dir] (\-\-operatingdir=[dir])
|
||||
Set operating directory. Makes nano set up something similar to a chroot.
|
||||
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
|
||||
Set operating directory. Makes nano set up something similar to a
|
||||
chroot.
|
||||
.TP
|
||||
.B \-p (\-\-pico)
|
||||
Emulate Pico as closely as possible. This affects both the "shortcut list"
|
||||
at the bottom of the screen, as well as the display and entry of previous
|
||||
search and replace strings.
|
||||
.B \-p (\-\-preserve)
|
||||
Preserve the XON and XOFF sequences (^Q and ^S) so they will be
|
||||
caught by the terminal.
|
||||
.TP
|
||||
.B \-r [#cols] (\-\-fill=[#cols])
|
||||
Wrap lines at column #cols. By default, this is the width of the screen,
|
||||
less eight. If this value is negative, wrapping will occur at #cols from
|
||||
the right of the screen, allowing it to vary along with the screen width
|
||||
if the screen is resized.
|
||||
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
|
||||
Wrap lines at column \fIcols\fP. By default, this is the width of the
|
||||
screen, less eight. If this value is negative, wrapping will occur at
|
||||
\fIcols\fP columns from the right of the screen, allowing the wrap point
|
||||
to vary along with the screen width if resized.
|
||||
.TP
|
||||
.B \-s [prog] (\-\-speller=[prog])
|
||||
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
|
||||
Enable alternative spell checker command.
|
||||
.TP
|
||||
.B \-t (\-\-tempfile)
|
||||
@@ -119,32 +141,48 @@ Enable suspend ability.
|
||||
.TP
|
||||
.B \-a, \-b, \-e, \-f, \-g, \-j
|
||||
Ignored, for compatibility with Pico.
|
||||
.TP
|
||||
.B \+LINE
|
||||
Places cursor at LINE on startup.
|
||||
|
||||
.SH INITIALIZATION FILE
|
||||
\fBnano\fP will read initialization files in the following
|
||||
order: $SYSCONFDIR/nanorc, then ~/.nanorc. Please see nanorc(5) and
|
||||
the example file \fBnanorc.sample\fP which should be provided with
|
||||
\fBnano\fP.
|
||||
|
||||
.SH NOTES
|
||||
Nano will try to dump the buffer into an emergency file in some cases.
|
||||
Mainly, this will happen if Nano receives a SIGHUP or runs out of
|
||||
memory, when it will write the buffer into a file named "nano.save" if the
|
||||
buffer didn't have a name already, or will add a ".save" suffix to the
|
||||
current filename. In multibuffer mode, nano will write all the open buffers to
|
||||
the respective emergency files. Nano will \fBnot\fP write this file if a
|
||||
previous one exists in the current directory.
|
||||
\fBnano\fP will try to dump the buffer into an emergency file in some
|
||||
cases. Mainly, this will happen if \fBnano\fP receives a SIGHUP or
|
||||
SIGTERM or runs out of memory, when it will write the buffer into a file
|
||||
named "nano.save" if the buffer didn't have a name already, or will add
|
||||
a ".save" suffix to the current filename. If an emergency file with that
|
||||
name already exists in the current directory, ".save" and a number (e.g.
|
||||
".save.1") will be suffixed to the current filename in order to make it
|
||||
unique. In multibuffer mode, \fBnano\fP will write all the open buffers
|
||||
to the respective emergency files.
|
||||
|
||||
.SH BUGS
|
||||
Please send any comments or bug reports to
|
||||
.br
|
||||
.B nano@nano-editor.org.
|
||||
.br
|
||||
The nano mailing list is available from
|
||||
The \fBnano\fP mailing list is available from
|
||||
.br
|
||||
.B nano-devel@gnu.org.
|
||||
To subscribe, email to nano-devel-request@gnu.org with a
|
||||
subject of "subscribe".
|
||||
|
||||
.SH HOMEPAGE
|
||||
http://www.nano-editor.org
|
||||
http://www.nano-editor.org/
|
||||
|
||||
.SH SEE ALSO
|
||||
.PD 0
|
||||
.TP
|
||||
\fBnanorc\fP(5)
|
||||
.PP
|
||||
\fI/usr/share/doc/nano/\fP (or equivalent on your system)
|
||||
|
||||
.SH AUTHOR
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for
|
||||
details).
|
||||
This manual page was originally written by Jordi Mallach
|
||||
<jordi@sindominio.net>, for the Debian GNU/Linux system (but may be
|
||||
<jordi@sindominio.net>, for the Debian GNU system (but may be
|
||||
used by others).
|
||||
|
||||
158
nano.1.html
158
nano.1.html
@@ -1,33 +1,31 @@
|
||||
Content-type: text/html
|
||||
|
||||
<HTML><HEAD><TITLE>Manpage of NANO</TITLE>
|
||||
</HEAD><BODY>
|
||||
<H1>NANO</H1>
|
||||
Section: User Commands (1)<BR>Updated: January 3, 2002<BR><A HREF="#index">Index</A>
|
||||
Section: User Commands (1)<BR>Updated: February 9, 2003<BR><A HREF="#index">Index</A>
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<A NAME="lbAB"> </A>
|
||||
<H2>NAME</H2>
|
||||
|
||||
nano - Nano's ANOther editor, an enhanced free Pico Clone
|
||||
nano - Nano's ANOther editor, an enhanced free Pico clone
|
||||
<P>
|
||||
<A NAME="lbAC"> </A>
|
||||
<H2>SYNOPSIS</H2>
|
||||
|
||||
<B>nano</B>
|
||||
|
||||
[options] [+LINE]<I> file</I>
|
||||
<I>[+LINE] [options] [file]</I>
|
||||
|
||||
<BR>
|
||||
|
||||
<P>
|
||||
<A NAME="lbAD"> </A>
|
||||
<H2>DESCRIPTION</H2>
|
||||
|
||||
This manual page documents briefly the
|
||||
<B>nano</B>
|
||||
|
||||
command.
|
||||
This manual page documents briefly the <B>nano</B> command.
|
||||
<P>
|
||||
|
||||
|
||||
@@ -35,15 +33,23 @@ command.
|
||||
|
||||
<B>nano</B> is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel,
|
||||
<B>nano</B>
|
||||
|
||||
also implements some missing (or disabled by default) features in Pico,
|
||||
such as "search and replace" and "goto line number".
|
||||
than just copying Pico's look and feel, <B>nano</B> also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line number".
|
||||
<P>
|
||||
<A NAME="lbAE"> </A>
|
||||
<H2>OPTIONS</H2>
|
||||
|
||||
<DL COMPACT>
|
||||
<DT><B>+</B><I>LINE</I>
|
||||
|
||||
<DD>
|
||||
Places cursor at <I>LINE</I> on startup.
|
||||
<DT><B>-B (--backup)</B>
|
||||
|
||||
<DD>
|
||||
When saving a file, back up the previous version of it to the current
|
||||
filename suffixed with a ~.
|
||||
<DT><B>-D (--dos)</B>
|
||||
|
||||
<DD>
|
||||
@@ -51,12 +57,22 @@ Write file in DOS format.
|
||||
<DT><B>-F (--multibuffer)</B>
|
||||
|
||||
<DD>
|
||||
Enable multiple file buffers (if available).
|
||||
Enable multiple file buffers, if available.
|
||||
<DT><B>-H (--historylog)</B>
|
||||
|
||||
<DD>
|
||||
Log search and replace strings to ~/.nano_history so they may be
|
||||
stored for later editing, if nanorc support is configured.
|
||||
<DT><B>-I (--ignorercfiles)</B>
|
||||
|
||||
<DD>
|
||||
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
|
||||
available.
|
||||
<DT><B>-K (--keypad)</B>
|
||||
|
||||
<DD>
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
under nano.
|
||||
<DT><B>-M (--mac)</B>
|
||||
|
||||
@@ -66,10 +82,12 @@ Write file in Mac format.
|
||||
|
||||
<DD>
|
||||
Disable automatic conversion of files from DOS/Mac format.
|
||||
<DT><B>-Q [str] (--quotestr=[str])</B>
|
||||
<DT><B>-Q </B><I>str</I> (--quotestr=<I>str</I>)
|
||||
|
||||
<DD>
|
||||
Set the quoting string for justifying. The default is "> ".
|
||||
Set the quoting string for justifying. The default is
|
||||
"^([ \t]*[|>:}#])+" if regular expression support is available, or
|
||||
"> " otherwise.
|
||||
<DT><B>-R (--regexp)</B>
|
||||
|
||||
<DD>
|
||||
@@ -79,8 +97,8 @@ Enable regular expression matching for search strings, as well as
|
||||
|
||||
<DD>
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behaviour.
|
||||
<DT><B>-T [num] (--tabsize=[num])</B>
|
||||
usual chunk-by-chunk behavior.
|
||||
<DT><B>-T </B><I>num</I> (--tabsize=<I>num</I>)
|
||||
|
||||
<DD>
|
||||
Set the size (width) of a tab.
|
||||
@@ -88,6 +106,11 @@ Set the size (width) of a tab.
|
||||
|
||||
<DD>
|
||||
Show the current version number and author.
|
||||
<DT><B>-Y </B><I>str</I> (--syntax=<I>str</I>)
|
||||
|
||||
<DD>
|
||||
Specify a specific syntax highlighting from the .nanorc to use, if
|
||||
available.
|
||||
<DT><B>-c (--const)</B>
|
||||
|
||||
<DD>
|
||||
@@ -108,30 +131,30 @@ Enable cut from cursor to end of line with ^K.
|
||||
<DT><B>-l (--nofollow)</B>
|
||||
|
||||
<DD>
|
||||
If the file being edited is a symbolic link, replace the link with a
|
||||
If the file being edited is a symbolic link, replace the link with
|
||||
a new file, do not follow it. Good for editing files in /tmp, perhaps?
|
||||
<DT><B>-m (--mouse)</B>
|
||||
|
||||
<DD>
|
||||
Enable mouse support (if available for your system).
|
||||
<DT><B>-o [dir] (--operatingdir=[dir])</B>
|
||||
<DT><B>-o </B><I>dir</I> (--operatingdir=<I>dir</I>)
|
||||
|
||||
<DD>
|
||||
Set operating directory. Makes nano set up something similar to a chroot.
|
||||
<DT><B>-p (--pico)</B>
|
||||
Set operating directory. Makes nano set up something similar to a
|
||||
chroot.
|
||||
<DT><B>-p (--preserve)</B>
|
||||
|
||||
<DD>
|
||||
Emulate Pico as closely as possible. This affects both the "shortcut list"
|
||||
at the bottom of the screen, as well as the display and entry of previous
|
||||
search and replace strings.
|
||||
<DT><B>-r [#cols] (--fill=[#cols])</B>
|
||||
Preserve the XON and XOFF sequences (^Q and ^S) so they will be
|
||||
caught by the terminal.
|
||||
<DT><B>-r </B><I>cols</I> (--fill=<I>cols</I>)
|
||||
|
||||
<DD>
|
||||
Wrap lines at column #cols. By default, this is the width of the screen,
|
||||
less eight. If this value is negative, wrapping will occur at #cols from
|
||||
the right of the screen, allowing it to vary along with the screen width
|
||||
if the screen is resized.
|
||||
<DT><B>-s [prog] (--speller=[prog])</B>
|
||||
Wrap lines at column <I>cols</I>. By default, this is the width of the
|
||||
screen, less eight. If this value is negative, wrapping will occur at
|
||||
<I>cols</I> columns from the right of the screen, allowing the wrap point
|
||||
to vary along with the screen width if resized.
|
||||
<DT><B>-s </B><I>prog</I> (--speller=<I>prog</I>)
|
||||
|
||||
<DD>
|
||||
Enable alternative spell checker command.
|
||||
@@ -159,22 +182,30 @@ Enable suspend ability.
|
||||
|
||||
<DD>
|
||||
Ignored, for compatibility with Pico.
|
||||
<DT><B>+LINE</B>
|
||||
|
||||
<DD>
|
||||
Places cursor at LINE on startup.
|
||||
<P>
|
||||
</DL>
|
||||
<A NAME="lbAF"> </A>
|
||||
<H2>INITIALIZATION FILE</H2>
|
||||
|
||||
<B>nano</B> will read initialization files in the following
|
||||
order: $SYSCONFDIR/nanorc, then ~/.nanorc. Please see <A HREF="http://localhost/cgi-bin/man/man2html?5+nanorc">nanorc</A>(5) and
|
||||
the example file <B>nanorc.sample</B> which should be provided with
|
||||
<B>nano</B>.
|
||||
<P>
|
||||
<A NAME="lbAG"> </A>
|
||||
<H2>NOTES</H2>
|
||||
|
||||
Nano will try to dump the buffer into an emergency file in some cases.
|
||||
Mainly, this will happen if Nano receives a SIGHUP or runs out of
|
||||
memory, when it will write the buffer into a file named "nano.save" if the
|
||||
buffer didn't have a name already, or will add a ".save" suffix to the
|
||||
current filename. In multibuffer mode, nano will write all the open buffers to
|
||||
the respective emergency files. Nano will <B>not</B> write this file if a
|
||||
previous one exists in the current directory.
|
||||
<A NAME="lbAG"> </A>
|
||||
<B>nano</B> will try to dump the buffer into an emergency file in some
|
||||
cases. Mainly, this will happen if <B>nano</B> receives a SIGHUP or
|
||||
SIGTERM or runs out of memory, when it will write the buffer into a file
|
||||
named "nano.save" if the buffer didn't have a name already, or will add
|
||||
a ".save" suffix to the current filename. If an emergency file with that
|
||||
name already exists in the current directory, ".save" and a number (e.g.
|
||||
".save.1") will be suffixed to the current filename in order to make it
|
||||
unique. In multibuffer mode, <B>nano</B> will write all the open buffers
|
||||
to the respective emergency files.
|
||||
<P>
|
||||
<A NAME="lbAH"> </A>
|
||||
<H2>BUGS</H2>
|
||||
|
||||
Please send any comments or bug reports to
|
||||
@@ -184,24 +215,37 @@ Please send any comments or bug reports to
|
||||
|
||||
<BR>
|
||||
|
||||
The nano mailing list is available from
|
||||
The <B>nano</B> mailing list is available from
|
||||
<BR>
|
||||
|
||||
<B><A HREF="mailto:nano-devel@gnu.org">nano-devel@gnu.org</A>.</B>
|
||||
|
||||
To subscribe, email to <A HREF="mailto:nano-devel-request@gnu.org">nano-devel-request@gnu.org</A> with a
|
||||
subject of "subscribe".
|
||||
<A NAME="lbAH"> </A>
|
||||
<P>
|
||||
<A NAME="lbAI"> </A>
|
||||
<H2>HOMEPAGE</H2>
|
||||
|
||||
<A HREF="http://www.nano-editor.org">http://www.nano-editor.org</A>
|
||||
<A NAME="lbAI"> </A>
|
||||
<A HREF="http://www.nano-editor.org/">http://www.nano-editor.org/</A>
|
||||
<P>
|
||||
<A NAME="lbAJ"> </A>
|
||||
<H2>SEE ALSO</H2>
|
||||
|
||||
|
||||
<DL COMPACT>
|
||||
<DT><B><A HREF="http://localhost/cgi-bin/man/man2html?5+nanorc">nanorc</A></B>(5)<DD>
|
||||
</DL>
|
||||
<P>
|
||||
|
||||
<I>/usr/share/doc/nano/</I> (or equivalent on your system)
|
||||
<P>
|
||||
<A NAME="lbAK"> </A>
|
||||
<H2>AUTHOR</H2>
|
||||
|
||||
Chris Allegretta <<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>>, et al (see AUTHORS and THANKS for
|
||||
details).
|
||||
This manual page was originally written by Jordi Mallach
|
||||
<<A HREF="mailto:jordi@sindominio.net">jordi@sindominio.net</A>>, for the Debian GNU/Linux system (but may be
|
||||
<<A HREF="mailto:jordi@sindominio.net">jordi@sindominio.net</A>>, for the Debian GNU system (but may be
|
||||
used by others).
|
||||
<P>
|
||||
|
||||
@@ -212,15 +256,17 @@ used by others).
|
||||
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
|
||||
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
|
||||
<DT><A HREF="#lbAE">OPTIONS</A><DD>
|
||||
<DT><A HREF="#lbAF">NOTES</A><DD>
|
||||
<DT><A HREF="#lbAG">BUGS</A><DD>
|
||||
<DT><A HREF="#lbAH">HOMEPAGE</A><DD>
|
||||
<DT><A HREF="#lbAI">AUTHOR</A><DD>
|
||||
<DT><A HREF="#lbAF">INITIALIZATION FILE</A><DD>
|
||||
<DT><A HREF="#lbAG">NOTES</A><DD>
|
||||
<DT><A HREF="#lbAH">BUGS</A><DD>
|
||||
<DT><A HREF="#lbAI">HOMEPAGE</A><DD>
|
||||
<DT><A HREF="#lbAJ">SEE ALSO</A><DD>
|
||||
<DT><A HREF="#lbAK">AUTHOR</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
|
||||
using the manual pages.<BR>
|
||||
Time: 12:14:20 GMT, March 04, 2002
|
||||
Time: 04:08:28 GMT, February 13, 2003
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
237
nano.h
237
nano.h
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* nano.h *
|
||||
* *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* 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) *
|
||||
@@ -19,10 +19,6 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
@@ -36,20 +32,38 @@
|
||||
#define ISSET(bit) (flags & bit)
|
||||
#define TOGGLE(bit) flags ^= bit
|
||||
|
||||
/* Define charalloc as a macro rather than duplicating code */
|
||||
#define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char))
|
||||
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char))
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* For the backup file copy ... */
|
||||
# define COPYFILEBLOCKSIZE 1024
|
||||
#endif
|
||||
|
||||
#ifdef USE_SLANG /* Slang support enabled */
|
||||
#include <slcurses.h>
|
||||
#define KEY_DC 0x113
|
||||
#define KEY_IC SL_KEY_IC
|
||||
#define KEY_DC SL_KEY_DELETE
|
||||
#elif defined(HAVE_NCURSES_H)
|
||||
#include <ncurses.h>
|
||||
#else /* Uh oh */
|
||||
#include <curses.h>
|
||||
#endif /* CURSES_H */
|
||||
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#ifdef ENABLE_NLS
|
||||
# ifdef HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
# endif
|
||||
# define _(string) gettext(string)
|
||||
# define P_(singular, plural, number) ngettext(singular, plural, number)
|
||||
#else
|
||||
# define _(string) (string)
|
||||
# define P_(singular, plural, number) (number == 1 ? singular : plural)
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||
@@ -62,6 +76,31 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRCASECMP) || !defined(HAVE_STRNCASECMP)
|
||||
# ifndef HAVE_STRCASECMP
|
||||
# define strcasecmp strcmp
|
||||
# endif
|
||||
# ifndef HAVE_STRNCASECMP
|
||||
# define strncasecmp strncmp
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END */
|
||||
#ifndef KEY_HOME
|
||||
#define KEY_HOME -1
|
||||
#endif /* KEY_HOME */
|
||||
|
||||
#ifndef KEY_END
|
||||
#define KEY_END -1
|
||||
#endif /* KEY_END */
|
||||
|
||||
/* Snatch these out of the ncurses defs, so we can use them in search
|
||||
history regardless of whether we're using ncurses or not */
|
||||
#if !defined(KEY_UP) || !defined(KEY_DOWN)
|
||||
#define KEY_UP 0403
|
||||
#define KEY_DOWN 0402
|
||||
#endif /* !KEY_UP || !KEY_DOWN */
|
||||
|
||||
#define VERMSG "GNU nano " VERSION
|
||||
|
||||
#if defined(DISABLE_WRAPPING) && defined(DISABLE_JUSTIFY)
|
||||
@@ -73,20 +112,37 @@ typedef struct filestruct {
|
||||
char *data;
|
||||
struct filestruct *next; /* Next node */
|
||||
struct filestruct *prev; /* Previous node */
|
||||
int lineno; /* The line number */
|
||||
} filestruct;
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
struct filestruct *file; /* Current file */
|
||||
typedef struct openfilestruct {
|
||||
char *filename;
|
||||
#ifndef NANO_SMALL
|
||||
struct stat originalfilestat;
|
||||
#endif
|
||||
struct openfilestruct *next; /* Next node */
|
||||
struct openfilestruct *prev; /* Previous node */
|
||||
struct filestruct *fileage; /* Current file */
|
||||
struct filestruct *filebot; /* Current file's last line */
|
||||
#ifndef NANO_SMALL
|
||||
struct filestruct *file_mark_beginbuf;
|
||||
/* Current file's beginning marked line */
|
||||
int file_mark_beginx; /* Current file's beginning marked line's
|
||||
x-coordinate position */
|
||||
#endif
|
||||
int file_current_x; /* Current file's x-coordinate position */
|
||||
int file_current_y; /* Current file's y-coordinate position */
|
||||
int file_modified; /* Current file's modification status */
|
||||
int file_flags; /* Current file's flags: modification
|
||||
status (and marking status, if
|
||||
available) */
|
||||
int file_placewewant; /* Current file's place we want */
|
||||
int file_totlines; /* Current file's total number of lines */
|
||||
long file_totsize; /* Current file's total size */
|
||||
int file_lineno; /* Current file's line number */
|
||||
} openfilestruct;
|
||||
#endif
|
||||
|
||||
int lineno; /* The line number */
|
||||
} filestruct;
|
||||
|
||||
typedef struct shortcut {
|
||||
int val; /* Actual sequence that generates the keystroke */
|
||||
int altval; /* Alt key # for this function, or 0 for none */
|
||||
@@ -94,44 +150,72 @@ typedef struct shortcut {
|
||||
int misc2;
|
||||
int viewok; /* is this function legal in view mode? */
|
||||
int (*func) (void); /* Function to call when we catch this key */
|
||||
char *desc; /* Description, e.g. "Page Up" */
|
||||
char *help; /* Help file entry text */
|
||||
const char *desc; /* Description, e.g. "Page Up" */
|
||||
#ifndef DISABLE_HELP
|
||||
const char *help; /* Help file entry text */
|
||||
#endif
|
||||
struct shortcut *next;
|
||||
} shortcut;
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
typedef struct toggle {
|
||||
int val; /* Sequence to toggle the key. Should only need 1 */
|
||||
char *desc; /* Description for when toggle is, uh, toggled,
|
||||
const char *desc; /* Description for when toggle is, uh, toggled,
|
||||
e.g. "Pico Messages"; we'll append Enabled or
|
||||
Disabled */
|
||||
int flag; /* What flag actually gets toggled */
|
||||
struct toggle *next;
|
||||
} toggle;
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
typedef struct rcoption {
|
||||
char *name;
|
||||
const char *name;
|
||||
int flag;
|
||||
} rcoption;
|
||||
|
||||
#endif /* ENABLE_NANORC */
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
#define COLORSTRNUM 16
|
||||
|
||||
typedef struct colortype {
|
||||
int fg; /* fg color */
|
||||
int bg; /* bg color */
|
||||
int bright; /* Is this color A_BOLD? */
|
||||
int pairnum; /* Color pair number used for this fg/bg */
|
||||
char *start; /* Start (or all) of the regex string */
|
||||
char *end; /* End of the regex string */
|
||||
regex_t start; /* Start (or all) of the regex string */
|
||||
regex_t *end; /* End of the regex string */
|
||||
struct colortype *next;
|
||||
} colortype;
|
||||
|
||||
typedef struct exttype {
|
||||
regex_t val; /* The extensions that match this syntax. */
|
||||
struct exttype *next;
|
||||
} exttype;
|
||||
|
||||
typedef struct syntaxtype {
|
||||
char *desc; /* Name of this syntax type */
|
||||
exttype *extensions; /* List of extensions that this applies to */
|
||||
colortype *color; /* color struct for this syntax */
|
||||
struct syntaxtype *next;
|
||||
} syntaxtype;
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
typedef struct historytype {
|
||||
struct historytype *next;
|
||||
struct historytype *prev;
|
||||
char *data;
|
||||
} historytype;
|
||||
typedef struct historyheadtype {
|
||||
struct historytype *next; /* keep *next and *prev members together */
|
||||
struct historytype *prev; /* and in same order as in historytype */
|
||||
struct historytype *tail;
|
||||
struct historytype *current;
|
||||
int count;
|
||||
int len;
|
||||
} historyheadtype;
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* Bitwise flags so we can save space (or more correctly, not waste it) */
|
||||
|
||||
@@ -141,30 +225,35 @@ typedef struct colortype {
|
||||
#define MARK_ISSET (1<<3)
|
||||
#define CONSTUPDATE (1<<4)
|
||||
#define NO_HELP (1<<5)
|
||||
#define PICO_MODE (1<<6)
|
||||
#define FOLLOW_SYMLINKS (1<<7)
|
||||
#define SUSPEND (1<<8)
|
||||
#define NO_WRAP (1<<9)
|
||||
#define AUTOINDENT (1<<10)
|
||||
#define SAMELINEWRAP (1<<11)
|
||||
#define VIEW_MODE (1<<12)
|
||||
#define USE_MOUSE (1<<13)
|
||||
#define USE_REGEXP (1<<14)
|
||||
#define REGEXP_COMPILED (1<<15)
|
||||
#define TEMP_OPT (1<<16)
|
||||
#define CUT_TO_END (1<<17)
|
||||
#define REVERSE_SEARCH (1<<18)
|
||||
#define MULTIBUFFER (1<<19)
|
||||
#define CLEAR_BACKUPSTRING (1<<20)
|
||||
#define DOS_FILE (1<<21)
|
||||
#define MAC_FILE (1<<22)
|
||||
#define SMOOTHSCROLL (1<<23)
|
||||
#define DISABLE_CURPOS (1<<24) /* Damn, we still need it */
|
||||
#define ALT_KEYPAD (1<<25)
|
||||
#define NO_CONVERT (1<<26)
|
||||
#define NOFOLLOW_SYMLINKS (1<<6)
|
||||
#define SUSPEND (1<<7)
|
||||
#define NO_WRAP (1<<8)
|
||||
#define AUTOINDENT (1<<9)
|
||||
#define SAMELINEWRAP (1<<10)
|
||||
#define VIEW_MODE (1<<11)
|
||||
#define USE_MOUSE (1<<12)
|
||||
#define USE_REGEXP (1<<13)
|
||||
#define REGEXP_COMPILED (1<<14)
|
||||
#define TEMP_OPT (1<<15)
|
||||
#define CUT_TO_END (1<<16)
|
||||
#define REVERSE_SEARCH (1<<17)
|
||||
#define MULTIBUFFER (1<<18)
|
||||
#define DOS_FILE (1<<19)
|
||||
#define MAC_FILE (1<<20)
|
||||
#define SMOOTHSCROLL (1<<21)
|
||||
#define DISABLE_CURPOS (1<<22) /* Damn, we still need it */
|
||||
#define ALT_KEYPAD (1<<23)
|
||||
#define NO_CONVERT (1<<24)
|
||||
#define BACKUP_FILE (1<<25)
|
||||
#define NO_RCFILE (1<<26)
|
||||
#define COLOR_SYNTAX (1<<27)
|
||||
#define PRESERVE (1<<28)
|
||||
#define HISTORY_CHANGED (1<<29)
|
||||
#define HISTORYLOG (1<<30)
|
||||
|
||||
/* Control key sequences, changing these would be very very bad */
|
||||
|
||||
#define NANO_CONTROL_SPACE 0
|
||||
#define NANO_CONTROL_A 1
|
||||
#define NANO_CONTROL_B 2
|
||||
#define NANO_CONTROL_C 3
|
||||
@@ -223,11 +312,12 @@ typedef struct colortype {
|
||||
#define NANO_ALT_X 'x'
|
||||
#define NANO_ALT_Y 'y'
|
||||
#define NANO_ALT_Z 'z'
|
||||
#define NANO_ALT_PERIOD ','
|
||||
#define NANO_ALT_COMMA '.'
|
||||
#define NANO_ALT_PERIOD '.'
|
||||
#define NANO_ALT_COMMA ','
|
||||
#define NANO_ALT_LCARAT '<'
|
||||
#define NANO_ALT_RCARAT '>'
|
||||
#define NANO_ALT_BRACKET ']'
|
||||
#define NANO_ALT_SPACE ' '
|
||||
|
||||
/* Some semi-changeable keybindings; don't play with unless you're sure you
|
||||
know what you're doing */
|
||||
@@ -284,67 +374,58 @@ know what you're doing */
|
||||
#define NANO_FROMSEARCHTOGOTO_KEY NANO_CONTROL_T
|
||||
#define NANO_TOFILES_KEY NANO_CONTROL_T
|
||||
#define NANO_APPEND_KEY NANO_ALT_A
|
||||
#define NANO_PREPEND_KEY NANO_ALT_P
|
||||
#define NANO_OPENPREV_KEY NANO_ALT_LCARAT
|
||||
#define NANO_OPENNEXT_KEY NANO_ALT_RCARAT
|
||||
#define NANO_OPENPREV_ALTKEY NANO_ALT_COMMA
|
||||
#define NANO_OPENNEXT_ALTKEY NANO_ALT_PERIOD
|
||||
#define NANO_BRACKET_KEY NANO_ALT_BRACKET
|
||||
#define NANO_EXTCMD_KEY NANO_CONTROL_X
|
||||
#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE
|
||||
#define NANO_PREVWORD_KEY NANO_ALT_SPACE
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Toggles do not exist with NANO_SMALL. */
|
||||
#define TOGGLE_CONST_KEY NANO_ALT_C
|
||||
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
|
||||
#define TOGGLE_SUSPEND_KEY NANO_ALT_Z
|
||||
#define TOGGLE_NOHELP_KEY NANO_ALT_X
|
||||
#define TOGGLE_PICOMODE_KEY NANO_ALT_P
|
||||
#define TOGGLE_MOUSE_KEY NANO_ALT_M
|
||||
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
|
||||
#define TOGGLE_REGEXP_KEY NANO_ALT_E
|
||||
#define TOGGLE_REGEXP_KEY NANO_ALT_R
|
||||
#define TOGGLE_WRAP_KEY NANO_ALT_W
|
||||
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
|
||||
#define TOGGLE_CASE_KEY NANO_ALT_A
|
||||
#define TOGGLE_CASE_KEY NANO_ALT_C
|
||||
#define TOGGLE_LOAD_KEY NANO_ALT_F
|
||||
#define TOGGLE_DOS_KEY NANO_ALT_D
|
||||
#define TOGGLE_MAC_KEY NANO_ALT_O
|
||||
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
|
||||
#define TOGGLE_NOCONVERT_KEY NANO_ALT_N
|
||||
#define TOGGLE_BACKUP_KEY NANO_ALT_B
|
||||
#define TOGGLE_SYNTAX_KEY NANO_ALT_Y
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
#define MAIN_VISIBLE 12
|
||||
|
||||
#define VIEW 1
|
||||
#define NOVIEW 0
|
||||
|
||||
#define NONE 3
|
||||
#define TOP 2
|
||||
#define CENTER 1
|
||||
#define BOTTOM 0
|
||||
typedef enum {
|
||||
CENTER, TOP, NONE
|
||||
} topmidbotnone;
|
||||
|
||||
/* Minimum editor window rows required for Nano to work correctly */
|
||||
/* Minimum editor window rows required for nano to work correctly */
|
||||
#define MIN_EDITOR_ROWS 3
|
||||
|
||||
/* Default number of characters from end-of-line where text wrapping occurs */
|
||||
/* Minimum editor window cols required for nano to work correctly */
|
||||
#define MIN_EDITOR_COLS 10
|
||||
|
||||
/* Default number of characters from end-of-line where text wrapping
|
||||
occurs */
|
||||
#define CHARS_FROM_EOL 8
|
||||
|
||||
/* Minimum fill length (space available for text before wrapping occurs) */
|
||||
#define MIN_FILL_LENGTH 10
|
||||
/* Maximum number of search history strings saved, same value used for
|
||||
replace history */
|
||||
#define MAX_SEARCH_HISTORY 100
|
||||
|
||||
/* Color specific defines */
|
||||
#ifdef ENABLE_COLOR
|
||||
typedef struct colorstruct {
|
||||
int fg;
|
||||
int bg;
|
||||
int bold;
|
||||
int set;
|
||||
} colorstruct;
|
||||
|
||||
#define FIRST_COLORNUM 16
|
||||
|
||||
#define COLOR_TITLEBAR 16
|
||||
#define COLOR_BOTTOMBARS 17
|
||||
#define COLOR_STATUSBAR 18
|
||||
#define COLOR_TEXT 19
|
||||
#define COLOR_MARKER 20
|
||||
|
||||
#define NUM_NCOLORS 5
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
#endif /* ifndef NANO_H */
|
||||
#endif /* !NANO_H */
|
||||
|
||||
44
nano.spec.in
Normal file
44
nano.spec.in
Normal file
@@ -0,0 +1,44 @@
|
||||
%define name @PACKAGE@
|
||||
%define ver @VERSION@
|
||||
%define rel 1
|
||||
|
||||
Summary : Pico editor clone with enhancements
|
||||
Name : %{name}
|
||||
Version : %{ver}
|
||||
Release : %{rel}
|
||||
Copyright : GPL
|
||||
Group : Console/Editors
|
||||
URL : http://www.nano-editor.org
|
||||
Source : http://www.nano-editor.org/dist/v1.2/%{name}-%{ver}.tar.gz
|
||||
BuildRoot : /var/tmp/%{name}-buildroot
|
||||
Requires : ncurses
|
||||
|
||||
%description
|
||||
GNU nano is a small and friendly text editor. It aims to emulate the Pico
|
||||
text editor while also offering a few enhancements.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --enable-all
|
||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
||||
|
||||
%install
|
||||
rm -rf "$RPM_BUILD_ROOT"
|
||||
make DESTDIR="$RPM_BUILD_ROOT" install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO nanorc.sample
|
||||
%{_bindir}/nano
|
||||
%{_mandir}/*/*
|
||||
%{_datadir}/locale/*/LC_MESSAGES/nano.mo
|
||||
%{_infodir}/nano.info*
|
||||
|
||||
%changelog
|
||||
* Sat Mar 30 2002 Chris Allegretta <chrisa@asty.org>
|
||||
- Accepted into main distribution
|
||||
- Added Packager and URL tage from original spec file.
|
||||
* Tue Mar 06 2002 Brett Pemberton <generica@email.com>
|
||||
- Initial spec-file
|
||||
307
nano.texi
307
nano.texi
@@ -8,12 +8,12 @@
|
||||
@c Run `makeinfo' rather than `texinfo-format-buffer'.
|
||||
@smallbook
|
||||
@set EDITION 0.1
|
||||
@set VERSION 1.1.7
|
||||
@set UPDATED 4 Jan 2002
|
||||
@set VERSION 1.2.0
|
||||
@set UPDATED 17 Jan 2003
|
||||
|
||||
@dircategory Editors
|
||||
@direntry
|
||||
* Nano: (nano). Small and friendly text editor.
|
||||
* nano: (nano). Small and friendly text editor.
|
||||
@end direntry
|
||||
|
||||
@c tex
|
||||
@@ -23,7 +23,7 @@
|
||||
@titlepage
|
||||
@title GNU @code{nano}
|
||||
@subtitle a small and friendly text editor.
|
||||
@subtitle version 1.1.7
|
||||
@subtitle version 1.2.0
|
||||
|
||||
@author Chris Allegretta
|
||||
@page
|
||||
@@ -35,34 +35,35 @@ This manual is part of the GNU @code{nano} distribution.@*
|
||||
@sp4
|
||||
Copyright (C) 1999, 2000, 2001, 2002 Chris Allegretta.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
@iftex
|
||||
Permission is granted to process this file through TeX and print the
|
||||
results, provided the printed document carries copying permission
|
||||
notice identical to this one except for the removal of this paragraph
|
||||
(this paragraph not being relevant to the printed manual).
|
||||
Permission is granted to process this file through @TeX{} and print the
|
||||
results, provided the printed document carries copying permission notice
|
||||
identical to this one except for the removal of this paragraph (this
|
||||
paragraph not being relevant to the printed manual).
|
||||
@end iftex
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the entire
|
||||
resulting derived work is distributed under the terms of a permission
|
||||
notice identical to this one.
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Foundation.
|
||||
|
||||
You may contact the author by:
|
||||
You may contact the author by
|
||||
e-mail: @email{chrisa@@asty.org}@*
|
||||
@end titlepage
|
||||
|
||||
@node Top, Introduction, (dir), (dir)
|
||||
|
||||
This manual documents GNU nano, a small and friendly text editor.
|
||||
This manual documents GNU @code{nano}, a small and friendly text
|
||||
editor.
|
||||
|
||||
@menu
|
||||
* Introduction::
|
||||
@@ -77,11 +78,10 @@ This manual documents GNU nano, a small and friendly text editor.
|
||||
@node Introduction, Editor Basics, Top, Top
|
||||
@chapter Introduction
|
||||
|
||||
GNU @code{nano} is a small and friendly text editor. Besides basic
|
||||
text editing, @code{nano} offers many extra features like an
|
||||
interactive search and replace, goto line number, auto-indentation,
|
||||
feature toggles, internationalization support, and filename tab
|
||||
completion.
|
||||
GNU @code{nano} is a small and friendly text editor. Besides basic text
|
||||
editing, @code{nano} offers many extra features like an interactive
|
||||
search and replace, goto line number, auto-indentation, feature toggles,
|
||||
internationalization support, and filename tab completion.
|
||||
|
||||
@menu
|
||||
* Overview::
|
||||
@@ -91,14 +91,12 @@ completion.
|
||||
@node Overview, Command Line Options, Introduction, Introduction
|
||||
@section Overview
|
||||
|
||||
@code{nano} [GNU long option] [option] +LINE [ @var{ file ...} ]
|
||||
@code{nano} +LINE [GNU long option] [option] [ @var{file ...} ]
|
||||
|
||||
The original goal for @code{nano} was a complete bug-for-bug compatible
|
||||
emulation of Pico, but consistency is now a slightly higher priority.
|
||||
There is a flag to implement (nearly) complete Pico emulation, (option -p
|
||||
or GNU long option --pico). This can also be toggled from within
|
||||
@code{nano} by typing Meta-P. @xref{Pico Compatibility}, for more
|
||||
info.
|
||||
emulation of Pico, but nano's main goal is to be as compatible as
|
||||
possible while offering a superset of Pico's functionality.
|
||||
Also see @xref{Pico Compatibility}, for other differences.
|
||||
|
||||
Email bug reports to @email{nano@@nano-editor.org}.
|
||||
|
||||
@@ -106,18 +104,27 @@ Email bug reports to @email{nano@@nano-editor.org}.
|
||||
@section Command Line Options
|
||||
|
||||
@code{nano} takes the following options from the command line:
|
||||
|
||||
@table @code
|
||||
|
||||
@item -B, --backup
|
||||
When saving a file, back up the previous version of it to the current
|
||||
filename suffixed with a ~.
|
||||
|
||||
@item -D, --dos
|
||||
Write file in DOS format.
|
||||
|
||||
@item -F, --multibuffer
|
||||
Enable multiple file buffers.
|
||||
Enable multiple file buffers, if available.
|
||||
|
||||
@item -I, --ignorercfiles
|
||||
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
|
||||
available.
|
||||
|
||||
@item -K, --keypad
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
under nano.
|
||||
under @code{nano}.
|
||||
|
||||
@item -M, --mac
|
||||
Write file in Mac format.
|
||||
@@ -126,13 +133,20 @@ Write file in Mac format.
|
||||
Do not convert files from DOS/Mac format.
|
||||
|
||||
@item -Q [str], --quotestr [str]
|
||||
Set the quoting string for justifying. The default is "> ".
|
||||
Set the quoting string for justifying. The default is
|
||||
|
||||
@quotation
|
||||
@code{^([ \t]*[|>:@}#])+}
|
||||
@end quotation
|
||||
|
||||
if regular expression support is available, or ``> '' otherwise. Note
|
||||
that @code{\t} above stands for a literal Tab character.
|
||||
|
||||
@item -R, --regexp
|
||||
Turns on regular expression search and search/replace.
|
||||
Turn on regular expression search and search/replace.
|
||||
|
||||
@item -S, --smooth
|
||||
Enables smooth scrolling.
|
||||
Enable smooth scrolling.
|
||||
|
||||
@item -T [num], --tabsize=[num]
|
||||
Set the displayed tab length to [num] columns.
|
||||
@@ -140,6 +154,10 @@ Set the displayed tab length to [num] columns.
|
||||
@item -V, --version
|
||||
Print the version number and copyright and quit.
|
||||
|
||||
@item -Y, --syntax=[str]
|
||||
Specify a specific syntax highlighting from the .nanorc to use, if
|
||||
available.
|
||||
|
||||
@item -c, --const
|
||||
Constantly display the cursor position and line number on the statusbar.
|
||||
|
||||
@@ -163,11 +181,12 @@ Enables the use of the mouse to select text (currently only useful for
|
||||
running under the X window system).
|
||||
|
||||
@item -o [dir], --operatingdir=[dir]
|
||||
Set operating directory. Makes nano set up something similar to a chroot.
|
||||
Set operating directory. Makes @code{nano} set up something similar to a
|
||||
chroot.
|
||||
|
||||
@item -p, --pico
|
||||
Emulate Pico as closely as possible, sacrificing consistency for correct
|
||||
emulation. @xref{Pico Compatibility}, for more info.
|
||||
@item -p, --preserve
|
||||
Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the editor
|
||||
can be can be stopped and started.
|
||||
|
||||
@item -r [#cols], --fill=[#cols].
|
||||
Wrap lines at column #cols. By default this is the width of the screen,
|
||||
@@ -228,7 +247,7 @@ Start at line number LINE instead of the default of line 1.
|
||||
@section Entering Text
|
||||
|
||||
All key sequences in @code{nano} are entered using the keyboard.
|
||||
@code{nano} is a "modeless" editor, all keys with the exception of
|
||||
@code{nano} is a ``modeless'' editor. All keys with the exception of
|
||||
Control and Meta key sequences will enter text into the file being
|
||||
edited.
|
||||
|
||||
@@ -248,7 +267,7 @@ Meta key sequences can be entered in a number of
|
||||
possible ways: Pressing the Escape key, then releasing it and pressing
|
||||
the desired key, or holding down the Alt key while pressing the desired
|
||||
key. This varies from keyboard to keyboard, and certain commercial
|
||||
operating systems "swallow" the Alt key so that it never reaches the
|
||||
operating systems ``swallow'' the Alt key so that it never reaches the
|
||||
application. If your operating system does this, you should use the
|
||||
Escape key to generate Meta key sequences.
|
||||
@end itemize
|
||||
@@ -259,33 +278,31 @@ Escape key to generate Meta key sequences.
|
||||
The titlebar is the line displayed at the top of the editor. There are
|
||||
three sections: left, center and right. The section on the left displays
|
||||
the version of @code{nano} being used. The center section displays the
|
||||
current file name, or "New Buffer" if the file has not yet been named.
|
||||
The section on the right will display "Modified" if the file has been
|
||||
current file name, or ``New Buffer'' if the file has not yet been named.
|
||||
The section on the right will display ``Modified'' if the file has been
|
||||
modified since it was last saved or opened.
|
||||
|
||||
Special modes: When nano is in "File browser" mode, the center section
|
||||
will display the current directory instead of the filename.
|
||||
Special modes: When @code{nano} is in ``File browser'' mode, the center
|
||||
section will display the current directory instead of the filename.
|
||||
@xref{The File Browser}.
|
||||
|
||||
@node The Statusbar, Shortcut Lists, The Titlebar, Editor Basics
|
||||
@section The Statusbar
|
||||
|
||||
The statusbar is located three lines from the bottom of the screen (or the
|
||||
bottom line in Expert Mode. @xref{Expert Mode}, for more info.
|
||||
The statusbar is located three lines from the bottom of the screen (or
|
||||
the bottom line in Expert Mode. @xref{Expert Mode}, for more info).
|
||||
|
||||
The Statusbar shows important and informational messages. Any error
|
||||
messages that occur from using the editor will appear on the statusbar.
|
||||
Any questions that are asked of the user will be asked on the statusbar,
|
||||
and any user input (search strings, file names, etc) will be input on the
|
||||
statusbar.
|
||||
and any user input (search strings, file names, etc) will be input on
|
||||
the statusbar.
|
||||
|
||||
@node Shortcut Lists, , The Statusbar, Editor Basics
|
||||
@section Shortcut Lists
|
||||
|
||||
The Shortcut Lists are the two lines at the bottom of the screen which show
|
||||
some of the more commonly used functions in the editor. The exact
|
||||
functions which are displayed depend on whether Pico Compatibility Mode mode
|
||||
is enabled. @xref{Pico Compatibility}, for more info.
|
||||
The Shortcut Lists are the two lines at the bottom of the screen which
|
||||
show some of the more commonly used functions in the editor.
|
||||
|
||||
@node Online Help, Feature Toggles, Editor Basics, Top
|
||||
@chapter Online Help
|
||||
@@ -301,56 +318,43 @@ and ^V (Page Down) keys. ^X exits the help system.
|
||||
|
||||
Toggles allow you to change certain aspects of the editor that
|
||||
would normally be done via command line flags. They are invoked via
|
||||
certain Meta key sequenced. @xref{Special Functions}, for more info.
|
||||
The following toggles are available:
|
||||
certain Meta key sequences. @xref{Special Functions}, for more info.
|
||||
The following global toggles are available:
|
||||
|
||||
@table @code
|
||||
|
||||
@item Case Sensitive Search Toggle (Meta-A)
|
||||
toggles case sensistive searching functionality on/off.
|
||||
|
||||
@item Backwards Search Toggle (Meta-B)
|
||||
toggles backwards searching fuctionality on/off.
|
||||
|
||||
@item Constant Update Toggle (Meta-C)
|
||||
toggles the -c (--const) command line flag.
|
||||
@item Backup File Toggle (Meta-B)
|
||||
toggles the -B (@code{--backup}) command line flag.
|
||||
|
||||
@item DOS Format Toggle (Meta-D)
|
||||
toggles the -D (--dos) command line flag.
|
||||
|
||||
@item Regular Expressions Toggle (Meta-E)
|
||||
toggles the -R (--regexp) command line flag.
|
||||
toggles the -D (@code{--dos}) command line flag.
|
||||
|
||||
@item Multiple Files Toggle (Meta-F)
|
||||
toggles the -F (--multibuffer) command line flag.
|
||||
toggles the -F (@code{--multibuffer}) command line flag.
|
||||
|
||||
@item AutoIndent Toggle (Meta-I)
|
||||
toggles the -i (--autoindent) command line flag.
|
||||
toggles the -i (@code{--autoindent}) command line flag.
|
||||
|
||||
@item Cut To End Toggle (Meta-K)
|
||||
toggles the -k (--cut) command line flag.
|
||||
toggles the -k (@code{--cut}) command line flag.
|
||||
|
||||
@item Mouse Toggle (Meta-M)
|
||||
toggles the -m (--mouse) command line flag.
|
||||
toggles the -m (@code{--mouse}) command line flag.
|
||||
|
||||
@item Mac Format Toggle (Meta-O)
|
||||
toggles the -M (--mac) command line flag.
|
||||
|
||||
@item Pico Mode Toggle (Meta-P)
|
||||
toggles the -p (--pico) command line flag.
|
||||
@xref{Pico Compatibility}, for more info.
|
||||
toggles the -M (@code{--mac}) command line flag.
|
||||
|
||||
@item Smooth Scrolling Toggle (Meta-S)
|
||||
toggles the -s (--smooth) command line flag.
|
||||
toggles the -S (@code{--smooth}) command line flag.
|
||||
|
||||
@item AutoWrap Toggle (Meta-W)
|
||||
toggles the -w (--nowrap) command line flag.
|
||||
toggles the -w (@code{--nowrap}) command line flag.
|
||||
|
||||
@item Expert/Nohelp Toggle (Meta-X)
|
||||
toggles the -x (--nohelp) command line flag.
|
||||
toggles the -x (@code{--nohelp}) command line flag.
|
||||
|
||||
@item Suspend Toggle (Meta-Z)
|
||||
toggles the -z (--suspend) command line flag.
|
||||
toggles the -z (@code{--suspend}) command line flag.
|
||||
|
||||
@item Open Previous File Toggle (Meta-<)
|
||||
changes buffer to previously loaded file.
|
||||
@@ -358,58 +362,61 @@ changes buffer to previously loaded file.
|
||||
@item Open Next File Toggle (Meta->)
|
||||
changes buffer to next loaded file.
|
||||
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@node The File Browser, Pico Compatibility, Feature Toggles, Top
|
||||
@chapter The File Browser
|
||||
|
||||
When reading or writing files, pressing ^T will invoke the file browser.
|
||||
Here, one can navigate directories in a graphical manner in order to find
|
||||
the desired file.
|
||||
Here, one can navigate directories in a graphical manner in order to
|
||||
find the desired file.
|
||||
|
||||
Basic movement in the file browser is accomplished with he arrow keys
|
||||
and page up/down. The behavior of the enter (or 's') key varies by what
|
||||
is currently selected. If the currently selected object is a directory,
|
||||
the file browser will enter and display the contents of the directory. If
|
||||
the object is a file, this filename and path are copied to the statusbar
|
||||
and the file browser is exited.
|
||||
Basic movement in the file browser is accomplished with the arrow keys
|
||||
and page up/down. The behavior of the enter (or `s') key varies by what
|
||||
is currently selected. If the currently selected object is a directory,
|
||||
the file browser will enter and display the contents of the directory.
|
||||
If the object is a file, this filename and path are copied to the
|
||||
statusbar and the file browser is exited.
|
||||
|
||||
@node Pico Compatibility, Building and Configure Options, The File Browser, Top
|
||||
@chapter Pico Compatibility
|
||||
|
||||
Nano does not completely emulate Pico by default. The following differences
|
||||
apply to the default mode and Pico Compatibility mode:
|
||||
@code{nano} attempts to emulate Pico as closely as possible, but there
|
||||
are certain differences between the editors:
|
||||
|
||||
@table @code
|
||||
@item Displayed Shortcuts
|
||||
By default, the following shortcuts are displayed in the Shortcut Lists:
|
||||
@item Search and Replace History
|
||||
As of version 1.2.0 of @code{nano}, text entered as search or replace
|
||||
strings will be stored and can be accessed with the up/down
|
||||
arrow keys. Previously, @code{nano} offered a more consistent, but incompatible
|
||||
with Pico, method for entering search and replace strings. In the old
|
||||
method, previous entries would be displayed by default as editable text
|
||||
in front of the cursor, as opposed to being bracketed and uneditable as
|
||||
it is in Pico. The old behavior could be made compatible with Pico via the
|
||||
@code{-p} flag, but recent versions of Pico use the @code{-p} flag
|
||||
to preserve the XON and XOFF sequences within the editor. Since with the new
|
||||
method search and replace strings can still be edited by simply
|
||||
hitting the up arrow key once, the old method was removed completely.
|
||||
|
||||
^G ^O ^\ ^Y ^K ^C@*
|
||||
^X ^R ^W ^V ^U ^T
|
||||
|
||||
Related functions are listed above or below each other by default. The
|
||||
Justify function is not listed, instead the "Replace" function is
|
||||
displayed. Also, he "Read File" and "WriteOut" functions are aligned for
|
||||
consistency.
|
||||
@item Writing or Appending Selected Text to Files
|
||||
Text selected using the Control-Caret (^^) key can be written out or
|
||||
appended to a new or existing file using the Writeout key (^O).
|
||||
|
||||
In Pico Compatibility mode, the default Pico shortcuts are displayed:
|
||||
@item Toggles
|
||||
Many options which alter the functionality of the program can be
|
||||
"toggled" on or off using Meta key sequences, meaning the program does
|
||||
not have to be restarted to turn a particular feature of the editor
|
||||
on or off. Please see the internal help function (^G) for a list of
|
||||
what functions can be toggled for a particular version of
|
||||
@code{nano}. Also see @xref{Feature Toggles}, though this may be out
|
||||
of date.
|
||||
|
||||
^G ^O ^R ^Y ^K ^C@*
|
||||
^X ^J ^W ^V ^U ^T
|
||||
|
||||
@item Previous String Text
|
||||
By default, previously entered string for a function (search string,
|
||||
file name) will be placed on the statusbar, and is editable. This is
|
||||
done so there is consistency across all functions. For example: even if
|
||||
there is a previous replace string, it can always be deleted if one
|
||||
wishes to perform an empty string replace.
|
||||
|
||||
In Pico Compatibility Mode, the previously entered text in a search or
|
||||
replace will appear in brackets, and is not editable. It is not a
|
||||
simple matter to do an empty string replace when a previous replace
|
||||
string exists, for example. When writing a file, the previous filename
|
||||
will be displayed in the editable text portion of the editor.
|
||||
@item Cursor Position Display
|
||||
The output of the "Display Cursor Position" in @code{nano} displays
|
||||
the given column position, as well as the row and total character
|
||||
position of the cursor.
|
||||
|
||||
@item Interactive Replace and Spell Checker
|
||||
It is worth noting that the @code{nano} replace function is interactive,
|
||||
@@ -417,23 +424,28 @@ i.e. it does not stop after one search string is found and automatically
|
||||
replace it. The @code{nano} implementation will stop at each search
|
||||
string found and query whether to replace this instance or not. The
|
||||
internal spell checker operates similarly. Note that these is no way
|
||||
to force these functions to behave in the Pico fashion.
|
||||
to force these functions to behave in the Pico fashion. As of
|
||||
version 1.2.0, misspelled words are sorted and trimmed for
|
||||
uniqueness in the internal spell checker such that the words 'apple'
|
||||
and 'Apple' will be prompted for correction separately.
|
||||
@end table
|
||||
|
||||
@node Building and Configure Options, , Pico Compatibility, Top
|
||||
@chapter Building and Configure Options
|
||||
|
||||
Building nano from source is fairly straightforward if you are familiar
|
||||
Building @code{nano} from source is fairly straightforward if you are familiar
|
||||
with compiling programs with autoconf support:
|
||||
|
||||
tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
|
||||
cd nano-x.y.z/
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
@itemize @bullet
|
||||
@item tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
|
||||
@item cd nano-x.y.z/
|
||||
@item ./configure
|
||||
@item make
|
||||
@item make install
|
||||
@end itemize
|
||||
|
||||
if you are looking to optimize nano for size, you may want to consider
|
||||
the following command line options:
|
||||
if you are looking to optimize @code{nano} for size, you may want to
|
||||
consider the following command line options:
|
||||
|
||||
|
||||
@table @code
|
||||
@@ -445,45 +457,44 @@ Disable the tab completion code when reading or writing files.
|
||||
Disable the justify (^J)/unjustify (^U) functions in the editor.
|
||||
|
||||
@item --disable-speller
|
||||
Disables spell checker ability.
|
||||
Disable spell checker ability.
|
||||
|
||||
@item --disable-help
|
||||
Disables the help function (^G). Disabling this option makes the
|
||||
binary much smaller, but makes it difficult for new users
|
||||
to learn more than very basic things about using the editor.
|
||||
Disable the help function (^G). Disabling this option makes the binary
|
||||
much smaller, but makes it difficult for new users to learn more than
|
||||
very basic things about using the editor.
|
||||
|
||||
@item --disable-browser
|
||||
Disables the mini file browser (^O) when reading or writing files.
|
||||
|
||||
@item --enable-tiny
|
||||
This options disables all the above. It also disables some of
|
||||
the larger internals of the editor, like the marker code (^^) and
|
||||
the cut to line (-k) option which it depends on to work properly.
|
||||
It also disables the function toggles and mouse support.
|
||||
|
||||
@item --disable-wrapping
|
||||
Disables all word wrapping in the editor. This also eliminates the
|
||||
-w command line flag, as nonwrapping is then the default behavior.
|
||||
Disable the mini file browser (^T) when reading or writing files.
|
||||
|
||||
@item --disable-mouse
|
||||
Disables all mouse functionality. This also disables the -m commands line
|
||||
flag which enables the mouse functions.
|
||||
Disable all mouse functionality. This also disables the -m command line
|
||||
flag, which enables the mouse functions.
|
||||
|
||||
@item --disable-operatingdir
|
||||
Disables setting of operating directory. This also disables the -o command
|
||||
line flag.
|
||||
Disable setting the operating directory. This also disables the -o
|
||||
command line flag.
|
||||
|
||||
@item --enable-tiny
|
||||
This option disables all the above. It also disables some of the larger
|
||||
internals of the editor, like the marker code (^^) and the cut to line
|
||||
(-k) option, which depends on the marker code to work properly. It also
|
||||
disables the function toggles.
|
||||
|
||||
@item --disable-wrapping
|
||||
Disable all word wrapping in the editor. This also eliminates the -w
|
||||
command line flag, as nonwrapping is then the default behavior.
|
||||
|
||||
@item --disable-nls
|
||||
Disables Native Language support. This will make the available GNU nano
|
||||
translations unusable.
|
||||
Disables Native Language support. This will make the available GNU
|
||||
@code{nano} translations unusable.
|
||||
|
||||
@item --with-slang
|
||||
Compiling GNU nano with Slang is supported, and will make the binary notably
|
||||
smaller than if compiled with ncurses or other curses libraries.
|
||||
Compiling GNU @code{nano} with Slang is supported, and will make the
|
||||
binary notably smaller than if compiled with ncurses or other curses
|
||||
libraries.
|
||||
|
||||
@end table
|
||||
|
||||
@contents
|
||||
@bye
|
||||
|
||||
|
||||
|
||||
154
nanorc.5
Normal file
154
nanorc.5
Normal file
@@ -0,0 +1,154 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANORC 5 "February 14, 2003"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.SH NAME
|
||||
nanorc \- GNU nano's rcfile
|
||||
.SH SYNOPSIS
|
||||
.B /etc/nanorc
|
||||
.br
|
||||
.B $HOME/.nanorc
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
This manual page documents GNU \fBnano\fP's rcfile.
|
||||
.PP
|
||||
\fBnano\fP is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel, \fBnano\fP also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line number".
|
||||
|
||||
.SH OPTIONS
|
||||
The configuration file accepts a series of "set" and "unset" commands,
|
||||
which can be used to configure nano on startup without using the
|
||||
command-line options. Additionally, the "syntax" and "color" keywords
|
||||
are used to define syntax highlighting rules for different text patterns.
|
||||
GNU nano will read one command per line.
|
||||
|
||||
Options in rcfiles take precedence over nano's defaults, and command line
|
||||
options override rcfile settings.
|
||||
|
||||
Options are unset by default, except for options that take an argument.
|
||||
|
||||
The supported commands and arguments are:
|
||||
|
||||
.TP 3
|
||||
\fBset/unset autoindent\fP
|
||||
Use auto-indentation.
|
||||
.TP
|
||||
\fBset/unset backup\fP
|
||||
Create backup files in filename~.
|
||||
.TP
|
||||
\fBset/unset const\fP
|
||||
Constantly display the cursor position in the status bar.
|
||||
.TP
|
||||
\fBset/unset cut\fP
|
||||
Use cut to end of line with ^K by default.
|
||||
.TP
|
||||
\fBset fill \fIn\fP\fP
|
||||
Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the line
|
||||
length will be the screen width less \fIn\fP. The default value is -8.
|
||||
.TP
|
||||
\fBset/unset keypad\fP
|
||||
Use alternate keypad routines.
|
||||
.TP
|
||||
\fBset/unset multibuffer\fP
|
||||
Allow inserting files into their own buffers.
|
||||
.TP
|
||||
\fBset/unset noconvert\fP
|
||||
Don't convert files from DOS/Mac format.
|
||||
.TP
|
||||
\fBset/unset nofollow\fP
|
||||
Don't follow symlinks when writing files.
|
||||
.TP
|
||||
\fBset/unset nohelp\fP
|
||||
Don't display the help lists at the bottom of the screen.
|
||||
.TP
|
||||
\fBset/unset nowrap\fP
|
||||
Don't wrap text at all.
|
||||
.TP
|
||||
\fBset operatingdir "\fIdirectory\fP"\fP
|
||||
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
|
||||
subdirectories. Also, the current directory is changed to here, so files
|
||||
are inserted from this dir. By default the operating directory feature is
|
||||
turned off.
|
||||
.TP
|
||||
\fBset/unset preserve\fP
|
||||
Preserve the XON and XOFF keys (^Q and ^S).
|
||||
.TP
|
||||
\fBset quotestr "\fIstring\fP"\fP
|
||||
The email-quote string, used to justify email-quoted paragraphs. This is
|
||||
an "extended regular expression" if your system supports them, otherwise a
|
||||
literal string. The default value is
|
||||
|
||||
set quotestr "^([ \\t]*[|>:}#])+"
|
||||
|
||||
if you have regexps, otherwise set quotestr "> ". Note that '\\t' above
|
||||
stands for a literal Tab character.
|
||||
.TP
|
||||
\fBset/unset regexp\fP
|
||||
Do regular expression searches by default.
|
||||
.TP
|
||||
\fBset/unset smooth\fP
|
||||
Use smooth scrolling by default.
|
||||
.TP
|
||||
\fBset speller \fIspellprog\fP\fP
|
||||
Use spelling checker \fIspellprog\fP instead of the built-in one, which
|
||||
calls \fIspell\fP.
|
||||
.TP
|
||||
\fBset/unset suspend\fP
|
||||
Allow nano to be suspended with ^Z.
|
||||
.TP
|
||||
\fBset tabsize \fIn\fP\fP
|
||||
Use a tab size of \fIn\fP instead of the default (8); must be greater
|
||||
than 0.
|
||||
.TP
|
||||
\fBset/unset tempfile\fP
|
||||
Save automatically on exit, don't prompt.
|
||||
.TP
|
||||
\fBset/unset historylog\fP
|
||||
Enable ~/.nano_history for saving and reading search/replace strings.
|
||||
.TP
|
||||
\fBset/unset view\fP
|
||||
Disallow file modification.
|
||||
.TP
|
||||
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
|
||||
Defines a syntax named \fIstr\fP which can be activated via the
|
||||
\fB-Y\fP flag, or will be automatically activated if the current
|
||||
filename matches \fIfileregex\fP. All following \fBcolor\fP statements
|
||||
will apply to \fIsyntax\fP until a new syntax is defined.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP[,\fIbgcolor\fP] "\fIregex\fP" ...
|
||||
For the currently defined syntax, display all expressions matching
|
||||
\fIregex\fP with foreground color \fIfgcolor\fP and optional background
|
||||
color \fIbgcolor\fP. Legal colors for foreground and background color are:
|
||||
white, black, red, blue, green, yellow, magenta, and cyan. You may use
|
||||
the prefix "bright" to force a stronger color highlight. If your
|
||||
terminal supports transparency, not specifying a \fIbgcolor\fP tells
|
||||
\fBnano\fP to attempt to use a transparent background.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP[,\fIbgcolor\fP] start="\fIsr\fP" end="\fIer\fP"
|
||||
Display expressions which start with \fIsr\fP and end with \fIer\fP
|
||||
with foreground color \fIfgcolor\fP and optional
|
||||
background color \fIbgcolor\fP. This allows syntax highlighting to span
|
||||
multiple lines. Note that all subsequent instances of \fIsr\fP after
|
||||
an initial \fIsr\fP is found will be highlighted until the first
|
||||
instance of \fIer\fP.
|
||||
\fI
|
||||
|
||||
.SH SEE ALSO
|
||||
.PD 0
|
||||
.TP
|
||||
\fBnano\fP(1)
|
||||
.PP
|
||||
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your system)
|
||||
.SH AUTHOR
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for
|
||||
details).
|
||||
This manual page was written by Jordi Mallach <jordi@gnu.org>.
|
||||
160
nanorc.5.html
Normal file
160
nanorc.5.html
Normal file
@@ -0,0 +1,160 @@
|
||||
<HTML><HEAD><TITLE>Manpage of NANORC</TITLE>
|
||||
</HEAD><BODY>
|
||||
<H1>NANORC</H1>
|
||||
Section: File Formats (5)<BR>Updated: February 9, 2003<BR><A HREF="#index">Index</A>
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||||
|
||||
|
||||
|
||||
<A NAME="lbAB"> </A>
|
||||
<H2>NAME</H2>
|
||||
|
||||
nanorc - GNU nano's rcfile
|
||||
<A NAME="lbAC"> </A>
|
||||
<H2>SYNOPSIS</H2>
|
||||
|
||||
<B>/etc/nanorc</B>
|
||||
|
||||
<B>$HOME/.nanorc</B>
|
||||
|
||||
<BR>
|
||||
|
||||
<A NAME="lbAD"> </A>
|
||||
<H2>DESCRIPTION</H2>
|
||||
|
||||
This manual page documents GNU <B>nano</B>'s rcfile.
|
||||
<P>
|
||||
|
||||
<B>nano</B> is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel, <B>nano</B> also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line number".
|
||||
<P>
|
||||
<A NAME="lbAE"> </A>
|
||||
<H2>OPTIONS</H2>
|
||||
|
||||
The configuration file accepts a series of "set" and "unset" commands,
|
||||
which can be used to configure nano on startup without using the
|
||||
command-line options. Additionally, the "syntax" and "color" keywords
|
||||
are used to define syntax highlighting rules for different text patterns.
|
||||
GNU nano will read one command per line.
|
||||
<P>
|
||||
Options in rcfiles take precedence over nano's defaults, and command line
|
||||
options override rcfile settings.
|
||||
<P>
|
||||
The supported commands and arguments are:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT><B>set/unset autoindent</B><DD>
|
||||
Use auto-indentation.
|
||||
<DT><B>set/unset backup</B><DD>
|
||||
Create backup files in filename~.
|
||||
<DT><B>set/unset const</B><DD>
|
||||
Constantly update the cursor position.
|
||||
<DT><B>set/unset cut</B><DD>
|
||||
Use cut to end of line with ^K by default.
|
||||
<DT><B>set fill </B><I>n</I><DD>
|
||||
Set the column where lines will be wrapped at to <I>n</I>.
|
||||
<DT><B>set/unset keypad</B><DD>
|
||||
Use alternate keypad routines.
|
||||
<DT><B>set/unset multibuffer</B><DD>
|
||||
Allow inserting files into their own buffers.
|
||||
<DT><B>set/unset noconvert</B><DD>
|
||||
Don't convert files from DOS/Mac format.
|
||||
<DT><B>set/unset nofollow</B><DD>
|
||||
Don't follow symlinks when writing files.
|
||||
<DT><B>set/unset nohelp</B><DD>
|
||||
Don't display the help lists at the bottom of the screen.
|
||||
<DT><B>set/unset nowrap</B><DD>
|
||||
Don't wrap text at all.
|
||||
<DT><B>set operatingdir "</B><I>directory</I>"<DD>
|
||||
Set operating directory (chroots the user to <I>directory</I> and below).
|
||||
<DT><B>set/unset preserve</B><DD>
|
||||
Preserve the XON and XOFF keys (^Q and ^S).
|
||||
<DT><B>set quotestr "</B><I>string</I>"<DD>
|
||||
The email-quote string. This is a "regular expression" if your
|
||||
system supports them, otherwise a literal string.
|
||||
Default value is set quotestr "^([ ]*[|>:}#])+" if you have regexps,
|
||||
otherwise set quotestr "> ".
|
||||
<DT><B>set/unset regexp</B><DD>
|
||||
Do regular expression searches by default.
|
||||
<DT><B>set/unset smooth</B><DD>
|
||||
Use smooth scrolling by default.
|
||||
<DT><B>set speller </B><I>spellprog</I><DD>
|
||||
Use spelling checker <I>spellprog</I> instead of the default (spell).
|
||||
<DT><B>set/unset suspend</B><DD>
|
||||
Allow nano to be suspended with ^Z.
|
||||
<DT><B>set tabsize </B><I>n</I><DD>
|
||||
Use a tab size of <I>n</I> instead of the default (8); must be greater
|
||||
than 0.
|
||||
<DT><B>set/unset tempfile</B><DD>
|
||||
Save automatically on exit, don't prompt.
|
||||
<DT><B>set/unset historylog</B><DD>
|
||||
Enable ~/.nano_history for saving and reading search/replace strings.
|
||||
<DT><B>set/unset view</B><DD>
|
||||
Disallow file modification.
|
||||
<DT><B>syntax </B><I>str</I> [<I>fileregex</I> ... ]
|
||||
|
||||
<DD>
|
||||
Defines a syntax named <I>str</I> which can be activated via the
|
||||
<B>-Y</B> flag, or will be automatically activated if the current
|
||||
filename matches <I>fileregex</I>. All following <B>color</B> statements
|
||||
will apply to <I>syntax</I> until a new syntax is defined.
|
||||
<DT><B>color </B><I>fgcolor</I>[,<I>bgcolor</I>] <I>regex</I> ...
|
||||
|
||||
<DD>
|
||||
For the currently defined syntax, display all expressions matching
|
||||
<I>regex</I> with foreground color <I>fgcolor</I> and optional background
|
||||
color <I>bgcolor</I>. Legal colors for foreground and background color are:
|
||||
white, black, red, blue, green, yellow, magenta, and cyan. You may use
|
||||
the prefix "bright" to force a stronger color highlight. If your
|
||||
terminal supports transparency, not specifying a <I>bgcolor</I> tells
|
||||
<B>nano</B> to attempt to use a transparent background.
|
||||
<DT><B>color </B><I>fgcolor</I>[,<I>bgcolor</I>] start=<I>sr</I> end=<I>er</I>
|
||||
|
||||
<DD>
|
||||
Display expressions which start with <I>sr</I> and end with <I>er</I>
|
||||
with foreground color <I>fgcolor</I> and optional
|
||||
background color <I>bgcolor</I>. This allows syntax highlighting to span
|
||||
multiple lines. Note that all subsequent instances of <I>sr</I> after
|
||||
an initial <I>sr</I> is found will be highlighted until the first
|
||||
instance of <I>er</I>.
|
||||
<I>
|
||||
<P>
|
||||
</DL>
|
||||
</I><A NAME="lbAF"> </A>
|
||||
<H2>SEE ALSO</H2>
|
||||
|
||||
|
||||
<DL COMPACT>
|
||||
<DT><B><A HREF="http://localhost/cgi-bin/man/man2html?1+nano">nano</A></B>(1)<DD>
|
||||
</DL>
|
||||
<P>
|
||||
|
||||
<I>/usr/share/doc/nano/examples/nanorc.sample</I> (or equivalent on your system)
|
||||
<A NAME="lbAG"> </A>
|
||||
<H2>AUTHOR</H2>
|
||||
|
||||
Chris Allegretta <<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>>, et al (see AUTHORS and THANKS for
|
||||
details).
|
||||
This manual page was written by Jordi Mallach <<A HREF="mailto:jordi@gnu.org">jordi@gnu.org</A>>.
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
<A NAME="index"> </A><H2>Index</H2>
|
||||
<DL>
|
||||
<DT><A HREF="#lbAB">NAME</A><DD>
|
||||
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
|
||||
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
|
||||
<DT><A HREF="#lbAE">OPTIONS</A><DD>
|
||||
<DT><A HREF="#lbAF">SEE ALSO</A><DD>
|
||||
<DT><A HREF="#lbAG">AUTHOR</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
|
||||
using the manual pages.<BR>
|
||||
Time: 04:08:33 GMT, February 13, 2003
|
||||
</BODY>
|
||||
</HTML>
|
||||
244
nanorc.sample
244
nanorc.sample
@@ -1,97 +1,177 @@
|
||||
# Sample initialization file for GNU nano
|
||||
# Please note that you must have configured nano with
|
||||
# --enable-nanorc for this file to be read!
|
||||
#
|
||||
# To make sure a value is not enabled, use "unset <option>"
|
||||
## Sample initialization file for GNU nano
|
||||
## Please note that you must have configured nano with
|
||||
## --enable-nanorc for this file to be read!
|
||||
##
|
||||
## To make sure a value is not enabled, use "unset <option>"
|
||||
|
||||
# Use regular expressions by default
|
||||
# set regexp
|
||||
|
||||
# Constantly update the cursor position
|
||||
# set const
|
||||
|
||||
# Show column position relative to the current line, not the whole file
|
||||
# set relative
|
||||
|
||||
# Use cut to end of line with ^K by default
|
||||
# set cut
|
||||
|
||||
# Use Auto-indentation
|
||||
## Use auto-indentation
|
||||
# set autoindent
|
||||
|
||||
# Don't follow symlinks when writing files
|
||||
# set nofollow
|
||||
## Backup files to filename~
|
||||
# set backup
|
||||
|
||||
# Set operating directory (chroot of sorts)
|
||||
# set operatingdir "~"
|
||||
## Constantly update the cursor position
|
||||
# set const
|
||||
|
||||
# Use Pico Compatibility mode for the shortcut lists and search text
|
||||
# set pico
|
||||
## Use cut to end of line with ^K by default
|
||||
# set cut
|
||||
|
||||
# Use this value instead of the default
|
||||
# set fill -8
|
||||
## Use this value instead of the default
|
||||
## An out-of-range negative value can make nano die complaining that the
|
||||
## screen is too small
|
||||
## set fill -8
|
||||
|
||||
# Use this tab size instead of the default
|
||||
# set tabsize 4
|
||||
|
||||
# Use this spelling checker instead of the default one
|
||||
# set speller aspell
|
||||
|
||||
# Save automatically on exit, don't prompt
|
||||
# set tempfile
|
||||
|
||||
# Disallow file modification, why would you want this in an rc file? ;)
|
||||
# set view
|
||||
|
||||
# Don't wrap text at all
|
||||
# set nowrap
|
||||
|
||||
# Don't display the help lists at the bottom of the screen
|
||||
# set nohelp
|
||||
|
||||
# Allow nano to be suspended with ^Z
|
||||
# set suspend
|
||||
|
||||
# Use smooth scrolling as the default
|
||||
# set smooth
|
||||
|
||||
# Use alternate keypad routines
|
||||
## Use alternate keypad routines
|
||||
# set keypad
|
||||
|
||||
# Don't convert files from DOS/Mac format
|
||||
## Allow multiple file buffers (using ^R inserts into separate buffer)
|
||||
## You must have configured with --enable-multibuffer or --enable-extra
|
||||
## for this to work
|
||||
##
|
||||
## set multibuffer
|
||||
|
||||
## Don't convert files from DOS/Mac format
|
||||
# set noconvert
|
||||
|
||||
# Allow multiple file buffers (using ^R inserts into separate buffer)
|
||||
# You must have configured with --enable-multibuffer or --enable-extra for
|
||||
# this to work
|
||||
#
|
||||
# set multibuffer
|
||||
## Don't follow symlinks when writing files
|
||||
# set nofollow
|
||||
|
||||
# Use this as the quoting string. You shouldn't need to change this,
|
||||
# but...... default "> "
|
||||
# set quotestr "// "
|
||||
## Don't display the help lists at the bottom of the screen
|
||||
# set nohelp
|
||||
|
||||
#
|
||||
# Color setup
|
||||
# Format: color foreground,background "regex" ["regex"...]
|
||||
#
|
||||
# Legal colors are: white, black, red, blue, green, yellow, purple, cyan
|
||||
# You may use the prefix "bright" to mean a stronger color highlight
|
||||
#
|
||||
# To use multi-line regexes use the start="regex" end="regex" format.
|
||||
#
|
||||
# If your system supports transparency, not specifying a background
|
||||
# color will use a transparent color. If you don't want this, be sure
|
||||
# to set the background color to black or white.
|
||||
#
|
||||
#color brightred "float " "char " "int " "void " "NULL" "[A-Z_]\{2,\}"
|
||||
#color brightred "static" "const" "[\ ]struct" "^struct" "if " "while[\ \n\(]"
|
||||
#color brightred "do[\ \n\(]" "else[\ \n]" "case " "switch " "break;"
|
||||
#color brightcyan "#define" "#include" "#ifn*def" "#endif" "#elif" "#else"
|
||||
## Don't wrap text at all
|
||||
# set nowrap
|
||||
|
||||
#You will in general want your comments and strings to come last, becase
|
||||
#syntax highlighting rules will be applied in the order they are read in
|
||||
## Set operating directory (chroot of sorts)
|
||||
# set operatingdir "~"
|
||||
|
||||
#color brightyellow "<.*[^=\ ]*>" "\".*\""
|
||||
#color brightblue "//.*"
|
||||
#color brightblue start="/\*.*" end="\*/"
|
||||
## Preserve the XON and XOFF keys (^Q and ^S)
|
||||
# set preserve
|
||||
|
||||
## The email-quote string. This is a "regular expression" if your
|
||||
## system supports them, otherwise a literal string. Default
|
||||
# set quotestr "^([ \t]*[|>:}#])+" if you have regexps, otherwise
|
||||
# set quotestr "> ".
|
||||
## You can get old nano quoted-justify behavior via:
|
||||
# set quotestr "(> )+"
|
||||
|
||||
## Do regular expression searches by default
|
||||
# set regexp
|
||||
|
||||
## Use smooth scrolling as the default
|
||||
# set smooth
|
||||
|
||||
## Use this spelling checker instead of the default one
|
||||
# set speller aspell
|
||||
|
||||
## Allow nano to be suspended with ^Z
|
||||
# set suspend
|
||||
|
||||
## Use this tab size instead of the default; it must be greater than 0
|
||||
# set tabsize 4
|
||||
|
||||
## Save automatically on exit, don't prompt
|
||||
# set tempfile
|
||||
|
||||
## Enable ~/.nano_history for saving and reading search/replace strings.
|
||||
# set historylog
|
||||
|
||||
## Disallow file modification, why would you want this in an rc file? ;)
|
||||
# set view
|
||||
|
||||
## Color setup
|
||||
## Format:
|
||||
## syntax "short description" ["filename regex" ...]
|
||||
## color foreground,background "regex" ["regex"...]
|
||||
##
|
||||
## Legal colors are: white, black, red, blue, green, yellow, magenta,
|
||||
## cyan. You may use the prefix "bright" to mean a stronger color
|
||||
## highlight.
|
||||
##
|
||||
## To use multi-line regexes use the start="regex" end="regex" format.
|
||||
##
|
||||
## If your system supports transparency, not specifying a background
|
||||
## color will use a transparent color. If you don't want this, be sure
|
||||
## to set the background color to black or white.
|
||||
|
||||
# syntax "c-file" ".*\.c$" ".*\.h$"
|
||||
# color red "\<[A-Z_]{2,}\>"
|
||||
# color green "\<float\>" "\<char\>" "\<int\>" "\<void\>"
|
||||
# color green "\<static\>" "\<const\>" "\<struct\>"
|
||||
# color brightyellow "\<if\>" "\<while\>" "\<do\>" "\<else\>" "\<case\>" "\<switch\>"
|
||||
# color brightcyan "#define" "#include" "#ifn*def" "#endif"
|
||||
# color brightcyan "#elif" "#else" "#if"
|
||||
|
||||
## You will in general want your comments and strings to come last,
|
||||
## because syntax highlighting rules will be applied in the order they
|
||||
## are read in. Note that quotes in regexes should not be escaped (use "
|
||||
## instead of \").
|
||||
|
||||
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
|
||||
|
||||
## This string is VERY resource intensive!!!
|
||||
# color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
|
||||
|
||||
## And we want to have some nice comment highlighting too
|
||||
# color brightblue "//.*"
|
||||
# color brightblue start="/\*" end="\*/"
|
||||
|
||||
|
||||
## Here are some short examples for TeX files and HTML
|
||||
# syntax "HTML" "\.html$"
|
||||
#
|
||||
# color blue start="<" end=">"
|
||||
# color red "&([^; ])*;"
|
||||
#
|
||||
# syntax "TeX" "\.tex$"
|
||||
#
|
||||
# color green "\\(.|([A-Za-z]*))"
|
||||
# color magenta "\{" "\}"
|
||||
# color blue "%.*"
|
||||
|
||||
|
||||
## For this you will probably want to set your editor to "nano -Y mutt"
|
||||
# syntax "mutt"
|
||||
# color green "^>.*"
|
||||
|
||||
|
||||
## Here is are examples for groff and for your .nanorc
|
||||
|
||||
#syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
|
||||
## The argument of .nr or .ds
|
||||
#color cyan "^\.ds [^ ]*"
|
||||
#color cyan "^\.nr [^ ]*"
|
||||
## Single character escapes
|
||||
#color brightmagenta "\\."
|
||||
## Highlight the argument of \f or \s in the same colour
|
||||
#color brightmagenta "\\f."
|
||||
#color brightmagenta "\\f\(.."
|
||||
#color brightmagenta "\\s(\+|\-)?[0-9]"
|
||||
## \n
|
||||
#color cyan "(\\|\\\\)n."
|
||||
#color cyan "(\\|\\\\)n\(.."
|
||||
#color cyan start="(\\|\\\\)n\[" end="]"
|
||||
## Requests
|
||||
#color brightgreen "^\. *[^ ]*"
|
||||
## Comments
|
||||
#color yellow "^\.\\\".*$"
|
||||
## Strings
|
||||
#color green "(\\|\\\\)\*."
|
||||
#color green "(\\|\\\\)\*\(.."
|
||||
#color green start="(\\|\\\\)\*\[" end="]"
|
||||
## Characters
|
||||
#color brightred "\\\(.."
|
||||
#color brightred start="\\\[" end="]"
|
||||
## Macro arguments
|
||||
#color brightcyan "\\\\\$[1-9]"
|
||||
|
||||
|
||||
#syntax "nanorc" "[\.]*nanorc$"
|
||||
#color white "^ *(set|unset).*$"
|
||||
#color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
|
||||
#color brightwhite "^ *syntax [^ ]*"
|
||||
#color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
|
||||
#color white "^ *color\>.*"
|
||||
#color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>"
|
||||
#color magenta "^ *color\>"
|
||||
#color green "^#.*$"
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
Makefile.in.in
|
||||
POTFILES
|
||||
*.gmo
|
||||
*.pot
|
||||
Rules-quot
|
||||
boldquot.sed
|
||||
cat-id*
|
||||
en@boldquot.header
|
||||
en@quot.header
|
||||
insert-header.sin
|
||||
messages
|
||||
messages.mo
|
||||
nano.pot
|
||||
remove-potcdate.sed
|
||||
remove-potcdate.sin
|
||||
stamp-cat*
|
||||
quot.sed
|
||||
*.gmo
|
||||
|
||||
352
po/ChangeLog
352
po/ChangeLog
@@ -1,3 +1,353 @@
|
||||
2003-02-19 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Updated Finnish translation by Kalle Olavi Niemitalo.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* ru.po: Updated Russian translation by Sergey A. Ribalchenko.
|
||||
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
|
||||
|
||||
2003-02-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-02-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* nl.po: Updated Dutch translation by Guus Sliepen.
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-02-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ru.po: Updated Russian translation from Sergey A. Ribalchenko.
|
||||
|
||||
2003-02-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* Makevars (XGETTEXT_OPTIONS): Added --keyword=P_:1,2.
|
||||
* update.pl: likewise.
|
||||
* fi.po: Added Plural-Forms: header.
|
||||
|
||||
2003-02-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Updated Finnish translation by Kalle Kivimaa and
|
||||
Kalle Olavi Niemitalo.
|
||||
|
||||
2003-02-08 Chris Allegretta <chrisa@asty.org>
|
||||
|
||||
* it.po: Fix broken format string in translation.
|
||||
|
||||
2003-02-08 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pl.po: Updated Polish translation by Wojciech Kotwica.
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
|
||||
2003-02-04 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
|
||||
2003-01-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-01-26 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
|
||||
2002-01-22 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2003-01-21 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
|
||||
2003-01-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* nl.po: Updated translation by Guus Sliepen.
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2003-01-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* Makefile.in.in: Removed, generated by autopoint.
|
||||
* Rules-quot: Likewise.
|
||||
* boldquot.sed: Likewise.
|
||||
* en@boldquot.header: Likewise.
|
||||
* en@quot.header: Likewise.
|
||||
* insert-header.sin: Likewise.
|
||||
* quot.sed: Likewise.
|
||||
* remove-potcdate.sin: Likewise.
|
||||
|
||||
2003-01-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* LINGUAS: New file, exported values from configure.ac's ALL_LINGUAS.
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
* eu.po: New Basque translation by Peio Ziarsolo.
|
||||
|
||||
2002-12-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* tr.po: New Turkish translation by Doruk Fisek.
|
||||
|
||||
2002-11-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-11-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-11-03 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-10-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-10-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-10-17 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michel Piefel.
|
||||
|
||||
2002-10-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-10-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michel Piefel.
|
||||
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-09-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-09-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-08-19 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-07-30 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
* sv.po: Upadted translation by Christian Rose.
|
||||
|
||||
2002-07-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-07-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-07-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pt_BR.po: New Brazilian Portuguese translation by
|
||||
Claudio Neves.
|
||||
|
||||
2002-07-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
|
||||
2002-07-09 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-07-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-07-03 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ms.po: New Bahasa Melayu translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-06-03 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.11.2.
|
||||
* Rules-quot: New file, from gettext-0.11.2.
|
||||
* boldquot.sed: New file, from gettext-0.11.2.
|
||||
* en@boldquot.header: New file, from gettext-0.11.2.
|
||||
* en@quot.header: New file, from gettext-0.11.2.
|
||||
* insert-header.sin: New file, from gettext-0.11.2.
|
||||
* quot.sed: New file, from gettext-0.11.2.
|
||||
* remove-potcdate.sin: New file, from gettext-0.11.2.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* ca.po: Updated translation.
|
||||
* es.po: Updated translation.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-05-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-04-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
|
||||
2002-04-19 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ru.po: Updated translation by Sergey A. Ribalchenko.
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
|
||||
2002-04-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
|
||||
2002-04-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* nl.po: Updated translation by Guus Sliepen.
|
||||
|
||||
2002-04-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-04-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrio.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-03-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-03-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
|
||||
2002-03-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
|
||||
2002-03-17 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-03-15 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-03-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* uk.po, ru.po: Updated translations by Sergey A.
|
||||
Ribalchenko.
|
||||
|
||||
2002-03-12 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated to current CVS.
|
||||
* es.po: Updated to current CVS.
|
||||
* gl.po: Updated translation to current CVS by Jacobo Tarrio.
|
||||
|
||||
2002-03-12 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrio.
|
||||
|
||||
2002-03-11 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-03-09 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-03-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-03-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
@@ -24,7 +374,7 @@
|
||||
|
||||
2002-02-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* uk.po, ru.po: Updated translations by Sergei A.
|
||||
* uk.po, ru.po: Updated translations by Sergey A.
|
||||
Ribalchenko.
|
||||
|
||||
2002-02-06 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
2
po/LINGUAS
Normal file
2
po/LINGUAS
Normal file
@@ -0,0 +1,2 @@
|
||||
# List of available languages.
|
||||
es de fr it id fi hu ca cs gl uk ru sv nn nl da pl nb ms pt_BR tr eu
|
||||
@@ -1,196 +0,0 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995-1997, 2000, 2001 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 General 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@
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
||||
localedir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||
|
||||
CC = @CC@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
MSGMERGE = msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||
$(POFILES) $(GMOFILES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo
|
||||
|
||||
.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) --statistics -o $$file $<
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
|
||||
$(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 )
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
||||
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# 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/\.gmo$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
check: all
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(PACKAGE).po *.new.po
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
|
||||
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 = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||
cp -p $$dir/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(GMOFILES)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
|
||||
mv -f $$lang.new.po $$lang.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.new.po; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) update-gmo
|
||||
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
|
||||
cd $(top_builddir) \
|
||||
&& 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:
|
||||
25
po/Makevars
Normal file
25
po/Makevars
Normal file
@@ -0,0 +1,25 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=P_:1,2
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user