From a2ea193bd4eb60ae01912750331021d24d02a2f8 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Tue, 6 Jun 2000 05:53:49 +0000 Subject: [PATCH] Initial revision git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ABOUT-NLS | 226 +++ AUTHORS | 15 + BUGS | 36 + COPYING | 340 ++++ ChangeLog | 667 +++++++ INSTALL | 182 ++ Makefile.am | 19 + Makefile.in | 505 +++++ NEWS | 194 ++ README | 82 + TODO | 14 + acconfig.h | 23 + aclocal.m4 | 708 +++++++ config.h.in | 180 ++ configure | 4537 ++++++++++++++++++++++++++++++++++++++++++++ configure.in | 149 ++ cut.c | 379 ++++ global.c | 328 ++++ install-sh | 251 +++ intl/ChangeLog | 1086 +++++++++++ intl/Makefile.in | 214 +++ intl/VERSION | 1 + intl/bindtextdom.c | 203 ++ intl/cat-compat.c | 262 +++ intl/dcgettext.c | 655 +++++++ intl/dgettext.c | 59 + intl/explodename.c | 198 ++ intl/finddomain.c | 216 +++ intl/gettext.c | 70 + intl/gettext.h | 105 + intl/gettextP.h | 89 + intl/hash-string.h | 59 + intl/intl-compat.c | 76 + intl/l10nflist.c | 411 ++++ intl/libgettext.h | 182 ++ intl/linux-msg.sed | 100 + intl/loadinfo.h | 78 + intl/loadmsgcat.c | 220 +++ intl/localealias.c | 438 +++++ intl/po2tbl.sed.in | 102 + intl/textdomain.c | 108 ++ intl/xopen-msg.sed | 104 + missing | 190 ++ mkinstalldirs | 40 + nano.1 | 97 + nano.1.html | 158 ++ nano.c | 2640 ++++++++++++++++++++++++++ nano.h | 227 +++ po/ChangeLog | 0 po/Makefile.in.in | 248 +++ po/POTFILES.in | 11 + po/cat-id-tbl.c | 215 +++ po/de.gmo | Bin 0 -> 15190 bytes po/de.po | 947 +++++++++ po/es.gmo | Bin 0 -> 15558 bytes po/es.po | 818 ++++++++ po/fr.gmo | Bin 0 -> 9784 bytes po/fr.po | 830 ++++++++ po/it.gmo | Bin 0 -> 13438 bytes po/it.po | 832 ++++++++ po/nano.pot | 793 ++++++++ po/stamp-cat-id | 1 + proto.h | 103 + stamp-h.in | 1 + utils.c | 81 + winio.c | 1184 ++++++++++++ 66 files changed, 23287 insertions(+) create mode 100644 ABOUT-NLS create mode 100644 AUTHORS create mode 100644 BUGS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 TODO create mode 100644 acconfig.h create mode 100644 aclocal.m4 create mode 100644 config.h.in create mode 100755 configure create mode 100644 configure.in create mode 100644 cut.c create mode 100644 global.c create mode 100755 install-sh create mode 100644 intl/ChangeLog create mode 100644 intl/Makefile.in create mode 100644 intl/VERSION create mode 100644 intl/bindtextdom.c create mode 100644 intl/cat-compat.c create mode 100644 intl/dcgettext.c create mode 100644 intl/dgettext.c create mode 100644 intl/explodename.c create mode 100644 intl/finddomain.c create mode 100644 intl/gettext.c create mode 100644 intl/gettext.h create mode 100644 intl/gettextP.h create mode 100644 intl/hash-string.h create mode 100644 intl/intl-compat.c create mode 100644 intl/l10nflist.c create mode 100644 intl/libgettext.h create mode 100644 intl/linux-msg.sed create mode 100644 intl/loadinfo.h create mode 100644 intl/loadmsgcat.c create mode 100644 intl/localealias.c create mode 100644 intl/po2tbl.sed.in create mode 100644 intl/textdomain.c create mode 100644 intl/xopen-msg.sed create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 nano.1 create mode 100644 nano.1.html create mode 100644 nano.c create mode 100644 nano.h create mode 100644 po/ChangeLog create mode 100644 po/Makefile.in.in create mode 100644 po/POTFILES.in create mode 100644 po/cat-id-tbl.c create mode 100644 po/de.gmo create mode 100644 po/de.po create mode 100644 po/es.gmo create mode 100644 po/es.po create mode 100644 po/fr.gmo create mode 100644 po/fr.po create mode 100644 po/it.gmo create mode 100644 po/it.po create mode 100644 po/nano.pot create mode 100644 po/stamp-cat-id create mode 100644 proto.h create mode 100644 stamp-h.in create mode 100644 utils.c create mode 100644 winio.c diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 00000000..28d38c76 --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,226 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do *not* +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +One advise in advance +===================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias or message inheritance) as the +implementation here. It is also not possible to offer this additional +functionality on top of a `catgets' implementation. Future versions of +GNU `gettext' will very likely convey even more functionality. So it +might be a good idea to change to GNU `gettext' as soon as possible. + + So you need not provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system provides +usable `catgets' (if using this is selected by the installer) or +`gettext' functions. If neither is available, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is *not* required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --with-catgets + ./configure --disable-nls + +will respectively bypass any pre-existing `catgets' or `gettext' to use +the internationalizing routines provided within this package, enable +the use of the `catgets' functions (if found on the locale system), or +else, *totally* disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + By default the configuration process will not test for the `catgets' +function and therefore they will not be used. The reasons are already +given above: the emulation on top of `catgets' cannot provide all the +extensions provided by the GNU `gettext' library. If you nevertheless +want to use the `catgets' functions use + + ./configure --with-catgets + +to enable the test for `catgets' (this causes no harm if `catgets' is +not available on your system). If you really select this option we +would like to hear about the reasons because we cannot think of any +good one ourself. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +ISO 639 `LL' two-letter code prior to using the programs in the +package. For example, let's suppose that you speak German. At the +shell prompt, merely execute `setenv LANG de' (in `csh'), +`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This +can be done from your `.login' or `.profile' file, once and for all. + + An operating system might already offer message localization for +many of its programs, while other programs have been installed locally +with the full capabilities of GNU `gettext'. Just using `gettext' +extended syntax for `LANG' would break proper localization of already +available operating system programs. In this case, users should set +both `LANGUAGE' and `LANG' variables in their environment, as programs +using GNU `gettext' give preference to `LANGUAGE'. For example, some +Swedish users would rather read translations in German than English for +when Swedish is not available. This is easily accomplished by setting +`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list, courtesy of Linux +International. You may reach your translation team at the address +`LL@li.org', replacing LL by the two-letter ISO 639 code for your +language. Language codes are *not* the same as the country codes given +in ISO 3166. The following translation teams exist, as of December +1997: + + Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en', + Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian + `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja', + Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish + `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es', + Swedish `sv', and Turkish `tr'. + +For example, you may reach the Chinese translation team by writing to +`zh@li.org'. + + If you'd like to volunteer to *work* at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is *not* the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +*actively* in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of December +1997. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination. + + Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv + .----------------------------------------------------. + bash | [] [] [] | 3 + bison | [] [] [] | 3 + clisp | [] [] [] [] | 4 + cpio | [] [] [] [] [] [] | 6 + diffutils | [] [] [] [] [] | 5 + enscript | [] [] [] [] [] [] | 6 + fileutils | [] [] [] [] [] [] [] [] [] [] | 10 + findutils | [] [] [] [] [] [] [] [] [] | 9 + flex | [] [] [] [] | 4 + gcal | [] [] [] [] [] | 5 + gettext | [] [] [] [] [] [] [] [] [] [] [] | 12 + grep | [] [] [] [] [] [] [] [] [] [] | 10 + hello | [] [] [] [] [] [] [] [] [] [] [] | 11 + id-utils | [] [] [] | 3 + indent | [] [] [] [] [] | 5 + libc | [] [] [] [] [] [] [] | 7 + m4 | [] [] [] [] [] [] | 6 + make | [] [] [] [] [] [] | 6 + music | [] [] | 2 + ptx | [] [] [] [] [] [] [] [] | 8 + recode | [] [] [] [] [] [] [] [] [] | 9 + sh-utils | [] [] [] [] [] [] [] [] | 8 + sharutils | [] [] [] [] [] [] | 6 + tar | [] [] [] [] [] [] [] [] [] [] [] | 11 + texinfo | [] [] [] | 3 + textutils | [] [] [] [] [] [] [] [] [] | 9 + wdiff | [] [] [] [] [] [] [] [] | 8 + `----------------------------------------------------' + 17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv + 27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If December 1997 seems to be old, you may fetch a more recent copy +of this `ABOUT-NLS' file on most GNU archive sites. + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..865135d3 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,15 @@ +This file lists people who have made significant contribution to the nano +editor. Please see the ChangeLog for specific changes by author. +------------------------------------------------------------------------- + +Chris Allegretta + * Main program author and maintainer + +Jordi Mallach + * Debian package maintainer, fellow bug squasher. + * Internationalization support head, es.po maintainer. + +Adam Rogoyski + * New write_file() function, read_file() optimization, mouse + support, resize support, nohelp (-x) option, justify function, + follow symlink option and bugfixes, and much more. diff --git a/BUGS b/BUGS new file mode 100644 index 00000000..1a9d3c00 --- /dev/null +++ b/BUGS @@ -0,0 +1,36 @@ +- 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) + { I know I posted this, but is it really a bug, Pico 3.5 seems to behave + in the same way. I must be scatterbrained or something. + - Rob Siemborski } + +- Certains are not lined up properly when there are tabs in them at + certain col values. (9) [FIXED] +- edit_refresh() and update_line() do not handle selecting text when the + cursor is beyond COLS (10) +- no way to do a replace with the empty string. (11) +- Spelling support is not elegant like pico's integration of the 'spell' + program. Nano only uses ispell (for now) (12) +- Moving to the end of a line when close to a multiple of COLS and at + least COLS * 2 does not make the screen jump early like it would for + if we were around COLS (bugs in edit_refresh, update_line) (13) + [FIXED, mostly] +- When at the very bottom of the edit window, do_wrap goes berzerk and + puts the curor somewhere bad, subsequent keystrokes crash the program + (14) [FIXED, mostly] +- Doing a replacement of a substring of the replace string (e.g. replacing + "ed" with "fred" causes an infinite loop. (15) [FIXED] +- Cutting a file with marked text and both marker ends on the same line + causes a random segfault (16) +- Cutting more than one line resets the KEEP_CUTBUFFER flag in 0.9.3 + Error is in bitwise assignment (nano.h). (17) [FIXED] +- The wrapping code does not work right for lines like the following: + * * + Error is in do_wrap, must be rewritten (18). +- Wrapping a line with autoindent mode sometimes causes a segfault (19). +- Nano fails to follow symlinks, even though -l isn't being used (20). + [Bug in global flag init, FIXED] +- When using --help or --version, the SIGINT character gets lost. (21) [FIXED] +- When inserting files, the display sometimes fails to display properly + until a pageup/down occurs (22). diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..60549be5 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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. + + , 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. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..784cd211 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,667 @@ +nano-0.9.10 - 06/04/2000 +- es.po: + - Translation updates (Jordi). +- AUTHORS, nano.1.html, TODO, README: + - Documentation and email address updates (Jordi). +- nano.c: + main(): + - Moved Adam's termio code down to after getopt() and before initscr() + to stop people losing their SIGINT character when using args that + exit nano before it runs (--version, --help, etc). + +nano-0.9.9 - 05/31/2000 +- Makeile.am: + - Added proper lines for defining LOCALEDIR. +- configure.in: + - Spelling fixes (Jordi Mallach) + - Removed CFLAGS changes for gcc, reduces portability according to + some, and it certainly doesn't seem to decrease exe size. +- es.po: + - Spanish ranslation updates (Jordi Mallach) +- POTFILES.in: + - Added global.c file, was screwing up translations (i.e. they + weren't getting done). +- cut.c: + add_to_cutbuffer(): + - Added totsize increment. + - Cut fixes and optimizations (Rob Siemborski). + do_uncut_text(): + - Added totsize increment in several places. +- nano.c: + headers: + - Removed LOCALEDIR define. + do_justify(): + - Added edit_refresh() call (bug discovered by Adam). + page_down_center(): + - Added call to edit_update(current) for last case. Removed + increment of current_y since it's now just wasteful. + do_enter(): + - Added totsize increment. + renumber(), renumber_all(): + - Removed totsize-- and totsize init in renumber_all. + do_mouse(): + - Added edit_refresh() call to show hilight updates. Removed + unnecessary wrefresh(edit). + main(): + - Moved up locale calls so that translated --help messages would + actually get translated. + do_backspace(), do_delete(): + - Added decrement of totsize. + init_help_msg(): + - New function, initializes help text if NANO_SMALL isn't set (fixes + broken i18n). + read_file(): + - malloc call changed to nmalloc (Rob Siemborski). +- winio.c: + total_refresh(): + - Completely rewrote function, not quite so braindamaged now. + +nano-0.9.8 - 05/18/2000 +- nano.c: + main(): + - Added awesome code that disables the CINTR and CQUIT + character (Adam Rogoyski). Removed raw()/noraw() calls so that + nano gets input in 'normal' mode, which is the Right Way(tm) to + do it. ^S, ^Z and ^Q now work properly as a result, as well as + ^C. New variable term, global bariable oldterm to save previous + term settings, and changes to finish() and die(). + - Added extra #ifdefs in getopt code, so that above code and + flag init is run even if GETOPT_LONG is not #defined. + - Added memset line before sigactions. (Adam Rogoyski) + do_suspend(): + Removed function, see above for why. +- winio.c: + update_line(), center_cursor(): + - Removed wrefresh(edit) from bottom of functions. wrefresh + should now only be called once, at the bottom of the main() + loop. +- global.c: + shortcut_init(): + - Removed suspend sc_init call and suspend message because suspend is no + longer needed in the shortcut list to work properly. + +nano-0.9.7 - 05/14/2000 +- nano.c: + do_home(), do_end(): + - Added calls to update_line for the current line, fixes + lack of update (bug discovered by Alberto García). + main(): + - Added SET(FOLLOW_SYMLINKS) before getopt call, fixes not + following symlinks even when -l isn't set, and "no changes" + error when nano is called from crontab -e (Adam Rogoyski). +- cut.c: + do_cut_text(): + - Added edit_update_top to cut when mark is set, fixes lack of + display update (bug discovered by Ken Tyler). + +nano-0.9.6 - 05/08/2000 +- New Italian translation (it.po), by Daniele Medri. +- nano.c: + page_up(), page_down(): + - Added reset of placewewant to 0, as it should be. + do_up(), do_down(): + - Added call to update_line() for line we move from and line we + move to, in order to keep the highlighting correct. + do_wrap(): + - Added var chop, new code to wrap lines more like Pico, mostly. + THIS STILL DEFINITELY NEEDS TO BE REWRITTEN! +- winio.c: + do_help(): + - Added edit_refresh() before exit. + update_cursor(): + - Removed cursor updating which really wasn't needed anyway. + edit_update(): + - Removed yucky code that didn't work, this function now just + computes edittop and editbot and calls edit_refresh() to do the + rest, which removes a lot of dupliicate code.. + +nano-0.9.5 - 05/01/2000 +- Removed bytes from file struct because it was computationally wasteful. +- cut.c: + do_uncut_text(): + - Added call to edit_refresh(). +- nano.c: + do_backspace(): + - Added reset of editbot when deleting the last line of the file + (bug discovered by Adam). + do_char(): + - Removed call to reset_cursor(). + do_delete(): + - Added similar check as to do_backspace(). + do_enter(): + - Added call to edit_refresh(). + do_left(), right(): + - Added call to update_line(), still redundant but better... + do_up(), do_down(): + - Added refresh calls both for current line and line to which + we are moving. + main(): + - Removed inefficient call to edit_refresh() after every keystroke. + It is now up each function to leave the screen in a good state. +- winio.c: + do_cursorpos() + - Rewritten to not use bytes from filestruct by an incremental sum. + update_line(), reset_cursor(): + - Optimized calls to xplustabs() through a single variable. + - update_line() now takes a new arg, an index into the string + for where to update the line from. Needed for new update + code. +- configure.in: + - Better checks for slang, allows argument to --with-slang. + (Albert Chin-A-Young) + - Removed -Iintl from CFLAGS in gcc check. +- Makefile.am: + - Addition of -Iintl for gettext (Albert Chin-A-Young) + +nano-0.9.4 - 04/25/2000 + - Fixed calls to no_help and changed them to the more consistent + ISSET(NO_HELP). Fixed return val of no_help to be what it should (2, + not 1. Code to temporarily disable NO_HELP when in the + help system. (Adam Rogoyski) +- cut.c: + do_marked_cut(), do_cut(), do_uncut(): + - Commented out unnecessary bits when NANO_SMALL is being used. +- winio.c: + xpt(), strlenpt(), actual_x(): + - Added check for value of data[i] & 0x80, if so do not make + character 2 chars wide (orig. by Chris, 0x80 check by Adam). + edit_refresh(): + - New check for temp == NULL (bad thing), if so go back to the + previous line. New filestruct var hold points to prev line. + Fixes segfault when paging down to the end of a file. +- nano.c: + write_file(): + - Added check for if file exists and is not equal to the current + filename, prompt for overwrite (Adam Rogoyski). + do_down(): + - Removed check for current->next == NULL, now checks return value + of do_down before setting current_x = 0 (discovered by Adam). + do_justify(): + - Fixed segfault when reaching the last line (tried to assign + currrent->next->data when current->next == NULL) (discovered + by Adam). +- utils.c: + - Removed extra macro defs that are now in nano.h. +- nano.h: + - Changed macro SET() to use |= instead of ^=. Fixes bug in + cut code when cutting more than one line, and cutbuffer gets + blown away when it shouldnt. + +nano-0.9.3 - 04/29/2000 +- cut.c: + do_marked_cut(): + - Fixed off by one error in cut code for marked text. + do_cut_text(): + - Removed check for being on the last line, part of + magic line code. + add_to_cutbuffer(): + - Moved tmp->prev = inptr line to part where cutbuffer != NULL. + - Added inptr->prev = NULL for case where cutbuffer == NULL. +- nano.c: + do_backspace(), do_char(): + - Removed "magic line" code. It was basically causing more bugs + than it was helping for the sake of compatibillity. This fixes + at least one known segfault condition. + do_enter(): + - Added setting editbot to new node if the new node is the last + node in the file. + write_file(): + - Changed writing file bahavior. Now, if last line of the file + has any data on it, we write a newline on it, else we dont. +- winio.c: + add_marked_sameline(): + - New code that checks for whether the begin and end of the marker + are on different lines. Missing previously. + edit_add(): + - added some more checks for text length. Cleaned up some mvwaddnstrs that + could be written more simply as waddnstrs. + edit_refresh(): + - Removed check for temp == filebot, it is now treated like any other line. + Fixes a bug where selected text on the last line shows normally. + xpt(): + - Removed an extra computation for tabs variable that was incorrect. + xplustabs(): + - Since xpt now actualy works, this func is now just a wrapper for + xpt(current, current_x) +- nano.1, nano.1.html: + - Added -l option to man pages. +- configure.in: + - New option --enable-tiny, #defines NANO_SMALL in config.h. + Disables call to gettext in functions and other i18n stuff in + nano.c, the detailed help mode, the resize functions, and the + justify code which no one ever uses. + - New option --with-slang. Enables slang libraries instead of + ncurses, requires slcurses.h for wrapper functions. (Based + on patches for 0.8.7 by Glenn McGrath). + +nano-0.9.2 - 04/15/2000 +- This release 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-0.9.1 - 04/14/2000 +- Added pico compatibility for ^T when in search or switch to switch + to the opposite function. Added one to REPLACE_LIST_LEN and + WHEREIS_LIST_LEN in nano.h, new args to sc_init_one in global.c and + new strings that will have to be gettex()ed. New argument 'replacing' + to search_init(). Handlers in do_replace and do_search(). +- New write code, now follows symbolic links instead of replacing them + with the new file. New option (-l, --nofollow) to enable the old + (incorrect, but secure) behavior (Adam Rogoyski). +- nano.c: + do_wrap(): + - Fixed another bug relating to wrapping, and which would cause + a segfault *sigh*. + do_replace(): + - Incremented current_x by the length of the replacement + text inside the main repalce loop. Fixes bug #15. + add_marked_sameline(): + - New function, handles marked text when start & end of marker is + on one line, also supports most marked text when cursor > COLS. + main(): + - Code to check if nano is invoked as 'pico', and if so + automatically set pico_msgs (Robert Jones). + +nano-0.9.0 - 04/07/2000 +- nano.1, nano.1.html: Updated man page with my email address and homepage. +- winio.c: + reset_cursor(), update_line(): + - Changed update algorithm for x value to (COLS - 7) multiple when x + value > (COLS - 2). +- edit_refresh(): + - Removed inner loop code, now calls update_line() for each line + in question, MUCH nicer. +- xplustabs(), xpt(): + - Removed redundant increment of tabs when collumn no % 8 == 0. + - Added check for data[i] < 32, most of such bits are 2 chars wide. +- update_line(): + - Fixed a stupid call to strlenpt with col when we should have + been using actual_col. Ugh. + +nano-0.8.9 - 03/22/2000 +- nano.c: + empty_line(), no_spaces(), justify_format(), do_justify(): + Actually added these (screwup applying patch). + do_justify(): Added call to set_modified(). + +nano-0.8.8 - 03/12/2000 +- Preliminary internationalization support. Many many functions modified + to use gettext (via _() macro). es.po file included. (Jordi Mallach) + New dirs po/ and intl/, changes to configure.in and Automake.am to + support i18n. +- nano.c: + includes: Ddded sys/param.h and limits.h. (Adam Rogoyski). + statics: Changed some things that were not necessarily static + (Adam Rogoyski). + nrealloc(): New function, similar to nmalloc(). Changed calls from + realloc() to nrealloc (Adam Rogoyski). + empty_line(), no_spaces(), justify_format(), do_justify(): + New functions for justify function (Adam Rogoyski). +- winio.c: + blank_edit(): Added wrefresh call to edit so that screen updates (like + on ^L) actually work. + xplustabs(), xpt(), strlenpt(): Fixed off-by-one buglets (Adam Rogoyski). + +nano-0.8.7 - 03/01/2000 +- main.c: + do_wrap(): Better fix for segfaults, and fix for lisnes being wrapped + to a single character on one line when no good place to + break the line exists, and for wrapping lines longer than COLS. +- nano.1.html: + Html version of man page, now included in dist. For + the benefit of nano packages in Linux distributions. + +nano-0.8.6 - 02/24/2000 +- gobal.c: + shortcut_init(): + Added shortcuts for goto_line and do_replace when using + pico_msgs. Oops. +- nano.c: + statics: Changed fill back to 0 from 71 by default (Adam Rogoyski). + do_wrap(): Added check for backing up past tabs, which we shouldnt do. + Removed check for backing up past spaces first. + main(): Added for loop to check for alt keys instead of hard list. + do_enter(): Fix for bug #14, added call to reset_cursor and messed + up do_char quite a bit. + version(): Added time and date stamp for compile on version message. + Added mail and web page info. +- README: Updated mailing list info. + +nano-0.8.5 - 02/18/2000 +- nano.c: + main(): Finally fixed tilde being input on page up/down keys in + certain terminal types. Fix was input 26->91->5[34] check + for 126, if so make the kbinput PAGE UP/DOWN, else unget + the keystroke and continue. Added #include for + ioctl call. + handle_hup(): + Handler for hangup signal. Belated include of patch from + Tim Sherwood. +- winio.c: + edit_refresh(): + Temporary fix for selecting text when temp == current. + edit_refresh() is now unmanagably complex, and must be + revamped. + check_statblank(): + Added check for constupdate, makes things less choppy + (Adam Rogoyski) + +nano-0.8.4 - 02/11/2000 +- Moved global variables that were only (or mostly) used in one file into + its proper file as a static. Affects cut.c, nano.c, global.c (Andy Kahn). +- global.c: + shortcut_init(): + Removed redundant NANO_CONTROL_H from backspace shortcut, + added char 127 which should have been there. +- nano.c: + main(): Fix for loops looping until MAIN_LEN, added -1 to stop + segfaults (Adam Rogoyski). +- Makefile.am: Added all source filenames (Adam Rogoyski). +- nano.1: Fixed mail addressed and added mailing list address. +- README: Updated my email address and the nano web page. + +nano-0.8.3 - 02/08/2000 +- New pico mode (-p, --pico), toggles (more) compatibility with the + Pico messages displayed in the shortcut list. Note that there are still + small differences in this mode. +- nano.h: New shortcut struct format, for the benefit of i18n and + our help menu. Removed shortcut message macros, they are + now all in shortcut_init in global.c. +- nano.c: + do_wrap(): Removed resetting of current_x when we are in fact + wrapping to the next line, fixes a bug in -i mode. + do_enter(): + Rewrote the autoindent mode code to be a lot less pretty, + but a lot more magical. + main(): + Removed case for ignoring char 126 (~). That's kind of + important, we'll have to fix handling that sequence when + pageing up/down on a terminal some other way... Revamped + main switch loop in much snazzier fashion based on the + shortcut list. +- winio.c: + New function display_main_list. Affects all functions + that used to call bottombars() with main_list. Added + because we now only call bottombars with the macro + MAIN_VISIBLE instead of MAIN_LIST_LEN, because of the + changes to the main_list shortcut list (see global.c below). + New function do_help, our preliminary dynamic help system. +- Many many funcs: + Changed from int to void to allow one uniform type to call + from the shortcut struct. Also a few functions that do + not simple have void argument have new functions called + funcname_void(void) to be called from the shortcut list. + do_cut_text and do_uncut_text were changed to void + arguments because they were never called with a filestruct + other than *current anyway. +- global.c: + Shortcut list main_list was expanded to cover all + shortcuts that could be caught in the main loop. + Consequently there is a new macro MAIN_VISIBLE which tells + how many items in the main list to actually show. + +nano-0.8.2 - 02/02/2000 +- Added initial mouse (-m, --mouse) support. New global variable + use_mouse. (Adam Rogoyski) + +- nano.c: Set intial value of fill to COLS - 8 rather than just 72 + regardless. (Adam Rogoyski). + do_delete(): + Deleted call to do_backspace() when on the end of a line, + because it won't update the line properly. + do_backspace(): + Removed unnecessary pointer manipulation that was being + handled by unlink_node(). + open_file(): + Added check for trying to open a directory (currently we + segfault on this). Bug pointed out by Chad Ziccardi. + +nano-0.8.1 - 01/28/2000 +- Implemented Pico's -r (fill) mode, command line flag -r or --fill. New + global variable fill, affects check_wrap(), do_wrap(), main(), usage(), + global.c and proto.h. +- nano.c: +write_file(): Added (incredibly) necessary check for EPERM when + link() fails. This allows us to actually save + files via rename() on filesystems that dont + support hard links (AIEEEEEE). +do_goto(): + Fixed a stupid mistake where we were calling + bottombars() with replace_list instead of goto_list. +- nano.h: + New char *help in shortcut structure for help + feature. Added NANO_*_MSG and NANO_*_HELP #deifnes + for help function and i18n. +- global.c: + New functions shortcut_init (called in nano.c) and + sc_init_one() to initialize the shortcuts without + using {}s (for i18n). + +nano-0.8.0 - 01/25/2000 +- View flag (-v, --view) implemented. Global variable view_mode, affects + main loop of nano.c and new_file(). (me) +- nano.c: + split checks for TERMIOS_H and TERMIO_H up so we + can (theoretically) include them both, which is good. +handle_sigwinch(): + Added check for ncurses.h. (Andy Kahn) +do_spell(): + We now only try ispell because we don't as of yet + handle the 'spell' program the right way, now that + I finally know what the right way is =-). Added + call to edit_update(fileage) to stop segfaults. +global_init(): + Added initialization of edit* filestruct pointers + to stop segfaults on spell check. +usage(): + Check for getopt_long, and if no leave out the + GNU options everyone seems to love so much (Andy Kahn) +main(): + Added checks for getopt_long (Andy Kahn) + We ignore character 126 because it gets put into + the buffer when we page up/down on a vt terminal. +write_file(): + Fixes for umask (Adam Rogoyski). Renamed tmpfile + variable to tmp. Documented the tmp opttion + better in the function comments. Fixed my + stupidly commented out check for tmp on setting + umask which I really like => +- nano.h: + Made desc variable in shortcut struct a pointer + instead of a fixed-length string. +- utils.c: + Fixed check for config.h before nano.h. +- configure.in: + New checks for getopt_long, getopt.h, removed + CFLAGS and LDFLAGS changes. Gonna have to run + strip manually now =-) (Andy Kahn) + Added check for HAVE_WRESIZE, new file acconfig.h (me). + +nano-0.7.9 - 01/24/2000 +- New autoindent feature. Command flag 'i' or '--autoindent'. New + function do_char() to clean up character output, global + variable autoindent in global.c. (Graham Mainwaring) +- New flag 't' or '--tempfile', like Pico's -t mode, automatically saves + files on exit without prompting. Affects do_writeout(). Also + do_writeout() now takes a parameter for if exiting. + Global variable temp_opt in global.c (Graham Mainwaring) +- Preliminary spell program support. Added command flag '-s' or + '--speller' for alternative speller command. Added function do_spell() + and exit_spell() to nano.c. New global variable alt_speller. +- nano.c: + main(): We now ignore input of decimal 410 because these get entered + when we resize the screen. Sorted options in getopt() + switch statement. + usage(): Sorted options and changed tabs to make room for -s option. + write_file(): Now takes a second parameter 'tmpfile', uses mask 0600 and + doesn't print the number of lines written on the statusbar. + global_init(): + Added more initializations to globals to support do_spell(). + +nano-0.7.8 - 01/23/2000 +- Stubbed justify function. Affects main() in nano.c and nano.h defines. +- Added Fkey equivalents for Pico compatibilty. Affects nano.h defines + and main() in nano.c +- Removed redundant reset_cursor() calls from the blank() routines. +- nano.c: + main(): Fixed typo in main while loop for NANO_ALT_REPLACE_KEY. + Removed check for isprint() characters in main while loop + for people with odd character sets *shrug*. Added some X + window F-key combos. + read_line(): New function, consolidates of most of the special + sections of the file reading code. (Rob Siemborski) + do_replace(): Many scattered fixes. (Rob Siemborski) + write_file(): Added check for empty filename. +- winio.c: + nanogetstr(): Fixes for deleting at places other than the end of the + buffer, cut support. (Adam Rogoyski) + blank_edit(): New function, blanks edit buffer. Added call to it in + total_refresh(). +- configure: Checks for glib if snprintf of vsnprintf aren't available + (Andy Kahn). Changed warning message when no termcap lib + is found. + +nano-0.7.7 - 01/19/2000 +- Option '-v' for version moved to '-V', because -v is Pico's "read only" + mode (affects getopt() in main() and usage() function in nano.c +- New flag -c, always show cursor position. Affects main() in nano.c and + statusbar() in winio.c +- Option '-x' doesn't show help window at the bottom of the editor. + New variable no_help in nano.h and proto.h, affects main(), usage(), + and global_init() in nano.c, blank_bottombars(), clear_bottomwin(), + bottombars(), and do_yesno() in winio.c (I had to apply this patch by + hand =P) (Adam Rogoyski) +- nano.c: + handle_sigwinch(): New function (Adam Rogoyski), handles resizing. + page_up(), page_down(): + - New functions. We now set the cursor at the top right corner, + not at the center line, and page up and down a full screen + rather than a half screen. Original functions renamed to + page_up_center() and page_down_center(). + main(): + - Added check for keystroke key sequence 407 or NANO_CONTROL_Z + in main while loop because suspend mode was broken. This should + fix it, at least for now. + - Added long option support (By popular harassment ;-) - Added + #include for getopt.h, changed getopt() to getopt_long(). + Options added so far: --version (-V), --nowrap (-w), --suspend + (-z), --help (-h), --nohelp (-x). + - Rewrote signal statements (Adam Rogoyski) + +nano 0.7.6 - 01/15/2000 +- New ChangeLog format +- nano.c: + main(): Bound CONTROL_H to backspace (oops) + Added more Alt-[-key combinations, for page up & down. + read_bytes(): New function (Adam Rogoyski) + read_file(): Optimizations - malloc()s *buf a little at a time rather + than one huge buffer, and replaced the strcat at the end + with an index variable. Added call to read_bytes(). + do_next_word(): New function, binding is control-space (0) (me) + +- winio.c: + bottombars(): Fixed non-expanding shortcut keys at bottom of screen. + (formula is extra space needed = COLS / 6 - 13). + actual_x() & strlenpt(): + Added bug#9 fix - when tabs % 8 == 0, we should only + increment tabs by 1. + titlebar(): Fixed overrun in titlebar on very long filenames. + +0.7.5 Pico 'last line' feature added (Rob Siemborski & me). Eliminated + writing a newline at EOF. do_cursorpos and do_replace are now not + directly bound to signals but picked up as their control sequences + in raw mode. Bug fix in do_backspace. Fixed bug #9 (woohoo!) +0.7.4 Optimized (obfuscated?) edit_refresh. Malloc() calls checked for + available memory, align bug fixed (Big Gaute). + +--- As of version 0.7.4 TIP is renamed to nano. + +0.7.3 Fixed a double blank_statusbar() when jumping to first and last + lines. Took out unnecessary updates in load_file. Bug fix in + do_left. Missing updates to totlines, fixed bug #7 (last line not + having a newline at the end doesnt get read, bugfix in do_replace + with replace all, more/better comments (Robert Siemborski) +0.7.2 Our first patch accepted into the source! configure fixes + and optimizations (Erik Anderson). Added missing stdarg.h to winio.c. + Bug fix in update_line for editing long lines. Fixed arguments + being put into the filename when none is specified. Preliminary + +line command argument function. +0.7.1 configure tweak for better FreeBSD support. Removed refresh() from + edit_refresh to stop cursor "jumping" during screen updates. This + will probably cause a bug or two. Replace is now Alt-R (@R) and + Goto line is Alt-G (@G), but they have control key aliases of ^\ and + ^_ respectively. Made Control-F,B,N,P work like they do in Pico. + Control-G will become the Help key, but for now is stubbed out. +0.7.0 Fixed missing stdlib.h from cut.c. Fixed a few message bugs in + findnextstr. Bound Control-D to Delete. Refixed segfault on zero + length file. Added Esc-[-A,B,C,D cursor key sequences. +0.6.9 Preliminary cursor position function. Split up tip.c more, made + new files cut.c and winio.c. Fixed a bug in cut_marked_segment + that was leaving out a character. +0.6.8 By request, optchr in main() is now an int. Removed unneeded + globals. Bound functions for next/prev page, and wrote functions + do_home and do_end. +0.6.7 Bugfix in do_uncut_text for totlines. Broke up open_file and + created read_file. Implemented Insert File. Fixes in tipgetstr + for erroneous keystrokes. Added leave_cursor arg to do_yesno(). +0.6.6 Fixes in do_search(), do_replace(), do_writeout, and do_exit() for + aborted searches and more Pico-compatible messages. statusq() now + returns -2 on a blank entry instead of -1. Bug fix in actual_x(). +0.6.5 More BSD compatibility. Fixed two bugs in do_uncut_text + regarding buffers with filebot in them. Fixins in do_backspace + and do_enter. Removed unused variables. Removed strip_newline. +0.6.4 Took out the awful newlines from each string buffers. This will + certainly cause more bugs. Fixes in do_exit(). Better empty file + handling (I hope). +0.6.3 Implemented ^E. Removed now unneeded wrapline from filestruct. + do_enter() rewritten. +0.6.2 Better default file permissions. Complete rewrite of do_wrap(). + Better handling of editing with cursor near COLS - 1. +0.6.1 Starting to implement wrapping toggle. Fix for unhandled control + codes being entered into the buffer. Bug fix in actual_x; more + > COLS - 1 functionality, especially on lines with TABs. Fixed being + locked into cutbuffer when cutting more than one marked screen of text. +0.6.0 We have TABs!!! To do this, placewewant is now set to the actual + width on the screen we want to be, not an index of current->data. + New functions xplustabs and actual_x convert the actual place + the cursor should be on the screen to and from the place in the + string. +0.5.5 Changed do_right to test do_down before setting current_x to 0, + eliminiating the "looping" on the last line when holding the right + arrow. Preliminary support for longer than COLS - 1 lines. + Wrote do_delete. +0.5.4 Fixed a big in total_update that wasn't repainting the screen properly. + tipgetstr is much more messy but text is now more editable ;) + Fixed crash on entering a new file, hopefully. Awful stub for tab + handling, only in do_right() to save me some sanity. +0.5.3 Added check for malloc.h. Implementing uncut from marker slowly. + Fixed a few bugs in do_uncut when not uncutting from marked text. + I would not trust your data with the mark code right now, but then + we're not at version 1.0 yet so dont trust anything ;) +0.5.2 Added reset_cursor() before end of update_line so cursor doesnt + jump after each keystroke entered. Select text stubbed. Fixed + a bug in total_refresh(). Setting a mark will hilight properly, + but does not actually affect what gets put in the cutbuffer (yet). +0.5.1 Writing a file out causes modified to be set back to 0. Good. + Set_modified function written. Cut and uncut text now set + modified when called. +0.5.0 Half way there! Implemented write out, save function seems + stable. Changed statusbar blank routing to not refresh, a separte + program calls it and then refreshes. Made the program not clear + the srceen on exit, just the bottom two lines (like Pico). +0.4.2 Implemented replace all in replace function. Crude exit function + (asks yes or no if modified but does not write to file). +0.4.1 Implementing search & replace. Fixed crash on deleting at top of + edit buffer. Implemented "timeout" of statusbar messages. + Implemented ^A and ^E (beginning and end of line). +0.4.0 Split code into global.c and proto.h to allow for better multiple + file handling. Added #defines for the majority of the shortcut + kets in tip.h for easy modification. +0.3.1 Write edit_refresh which doesn't move the screen around, just + updates what's there already. do_wrap() and do_enter() added. +0.3.0 Preliminary cutbuffer (cut and uncut) support. +0.2.7 Check for Modification added. do_search() works. +0.2.5 Rewrite of file data struct. +0.2 Read in data to buffer, bound keystrokes to stub functions, + initial cursor movement on screen. Initial autoconf support. +0.1 Initial program setup w/ncurses diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..b42a17ac --- /dev/null +++ b/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..1e5f7d5b --- /dev/null +++ b/Makefile.am @@ -0,0 +1,19 @@ +bin_PROGRAMS = nano +nano_SOURCES = cut.c \ + global.c \ + nano.c \ + nano.h \ + proto.h \ + utils.c \ + winio.c + +man_MANS = nano.1 +nano_LDADD = @INTLLIBS@ + +EXTRA_DIST = AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README \ + TODO install-sh missing mkinstalldirs nano.1 nano.1.html + +SUBDIRS = po intl + +localedir = $(datadir)/locale +INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@ diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..1f9429e3 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,505 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = . + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CURSES_LIB = @CURSES_LIB@ +DATADIRNAME = @DATADIRNAME@ +GENCAT = @GENCAT@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_CONFIG = @GLIB_CONFIG@ +GLIB_LIBS = @GLIB_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +PACKAGE = @PACKAGE@ +POFILES = @POFILES@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +l = @l@ + +bin_PROGRAMS = nano +nano_SOURCES = cut.c global.c nano.c nano.h proto.h utils.c winio.c + + +man_MANS = nano.1 +nano_LDADD = @INTLLIBS@ + +EXTRA_DIST = AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO install-sh missing mkinstalldirs nano.1 nano.1.html + + +SUBDIRS = po intl + +localedir = $(datadir)/locale +INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@ +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +nano_OBJECTS = cut.o global.o nano.o utils.o winio.o +nano_DEPENDENCIES = +nano_LDFLAGS = +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +man1dir = $(mandir)/man1 +MANS = $(man_MANS) + +NROFF = nroff +DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ +INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 \ +config.h.in configure configure.in install-sh missing mkinstalldirs + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +SOURCES = $(nano_SOURCES) +OBJECTS = $(nano_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h:config.h.in \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: $(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.c.o: + $(COMPILE) -c $< + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +nano: $(nano_OBJECTS) $(nano_DEPENDENCIES) + @rm -f nano + $(LINK) $(nano_LDFLAGS) $(nano_OBJECTS) $(nano_LDADD) $(LIBS) + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: install-binPROGRAMS +install-exec: install-exec-recursive + +install-data-am: install-man +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-binPROGRAMS uninstall-man +uninstall: uninstall-recursive +all-am: Makefile $(PROGRAMS) $(MANS) config.h +all-redirect: all-recursive-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ + mostlyclean-compile mostlyclean-tags \ + mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ + clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ + distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile install-man1 uninstall-man1 install-man \ +uninstall-man install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-am uninstall all-redirect all-am all installdirs-am \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 00000000..1b03cea0 --- /dev/null +++ b/NEWS @@ -0,0 +1,194 @@ +05/31/2000 - Nano 0.9.9 introduces much better working i18n support, + more portability, and a ton of bugfixes. While + nano is not likely anywhere near 1.0 in terms of + code quality, it gets a quantum leap closer with this + release. + +05/18/2000 - Nano 0.9.8 (the 'what broke now?' release) should fix + the resize crash people have been experiencing. It also + offers a new input method that should allow nano to do + things the right way (like ^S, ^Q, custom suspend keys) + and hopefully wont break with non-US keyboards. There + are also the obligatory display fixes and speedups. Have + fun with it. + +05/14/2000 - Nano 0.9.7 (the Mother's Day release) continues in the long + line of display fixes, and also fixes the broken symlink + behavior (i.e. symlinks weren't being followed by + default). Hopefully all major bugs can be worked out soon + and we can have a 1.0 release before the end of the year, + but who knows. + +05/08/2000 - Nano 0.9.6 cleans up a lot of the display bugs that 0.9.5 + uncovered. There are improvements (and some remaining + segfaults) in the wrapping code, and even more + display optimizations. I would still say 0.9.4 or 0.9.2 + are the most stable versions of nano to date, but this one + may not be too bad =-) + +05/01/2000 - Nano 0.9.5 attempts to speed up the display of text + to be at least somewhat reasonable. Much + code profiling has been done to reduce the + rediculous number of redundant display updates. This + will probably expose a lot of bugs that can then be + fixed, so this release is probably not for the faint + of heart. For anyone curious, I would call nano 0.9.2 + the most stable version recently, so use that if you're + not particularly concerned with being on the bleeding + edge. + +04/25/2000 - Nano 0.9.4 fixes some problems in 0.9.3 with the last + line code and related segfaults. It also now has + much better handling for 8-bit characters. The + --enable-tiny code also produces a smaller executable. + +04/19/2000 - Nano 0.9.3 is officially the "Micro$oft" release. It + underscores the recent problem of bugfixes introducing + more bugs than they fix. The most important change + to this version of nano is the removal of the "magic + line". You will no longer see a blank line at the end of + the file. If you want a new line at the end of your file, + you'll have to hit enter to get one. + + NOTE: THIS BREAKS COMPATIBILITY WITH PICO. Unfortunately, + this feature has been causing many many problems with nano + so it is being removed for the time being, and perhaps + indefinitely. + + Other new stuff includes a --emable-tiny option to make + nano ultra small (disabling i18n, detailed help and the + marker and mouse code), and --with-slang to use the + slang libraries instead of ncurses. + +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. + +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 + 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, + rather than replace the symlink with the updated file. + This behavior is still available with the --nofollow + or -l flags. + Other new things include a fix for the infamous + "recursive replace" bug, and more bugfixes in the wrapping + code. + +04/07/2000 - Nano 0.9.0 has some updates, new language support and + a much better refresh setup (It's still not great, but...) + There should also be more stabillity editing long lines, + as there was a stupid mistake in the update_line + call. Silly me =) + +03/22/2000 - Nano 0.8.9 is basically just a bugfix release of 0.8.8 + to reflect the current stagnant status of the project. + Most things work, the rest doesn't doesn't work because + (a) I can't fix it or I would have already done so, and + (b) the amount of patches I'm receiving right now is quite + negligible. Forrunately this release marks the first + release since I have acquired ownership of the nano pages + on SourceForge. Here's hoping SF will get us some more + visibilitiy, translators and patches. + +03/12/2000 - After a hiatus, I have finally moved (not unpacked though) + to my new home into albany. Thus I should now have more + time to work on nano. Nano 0.8.8, the "dear god what + broke this time?" release, incorporates patches for both + i18n and many bugfixes. It is VERY likely something broke + this version, and it's likely I didn't even apply the i18n + stuff properly, so *it* may not even work. + + I would like to announce that I'm going to need + translations soonish, so if you are fluent in other + languages than english (or even better, if your native + language is not english) and you would like to submit a + translation file to me, please feel free to do so. If you + do, I will list your name and email in the AUTHORS file as + the maintainer of the .po file, and from then on it is + yours to take care of and keep up to date. + +03/01/2000 - Well, to continue my trend of going back on my previous + release's comments, nano 0.8.7 is released. The crashing + behavior was still occuring, and this most recent fix also + fixes some other wrapping problems, so here you go. + There may be another relase soon, there may not be, is + that vague enough? =) + +02/25/2000 - More minor bugfixes in 0.8.6, the bizarre behavior at the end + of a page has ceased, thankfully. I'm also moving next + weekend, so don't be shocked if you don't see a new + version of nano next week =-) + +02/11/2000 - Okay, here we go again. Aside from a few minor fixes and + some under-the-hood changes, you won't notice much + different in this version of nano. I haven't gotten much + feedback on the help feature, is it simply amazing or does + no one care? Write and let me know! =) + +02/08/2000 - Nano 0.8.3 marks the first time in a long time that there has + been more than three days since the last release. New + features include an initial help mode (YAY!), hopefully + much more support for i18n out of the box, and a flag + for more Pico compatibility in the shortcut lists + displayed. This release also marks the new nano + distribution site, http://www.asty.org/nano and email + address nano@asty.org for bugs, etc. + +02/02/2000 - Okay, I hate to go back on what I said in the last release, + but I may be changing jobs very soon. I will release + version 0.8.2 as is (no i18n, no help menu (yet). I + expect things to settle down by the end of next week, and + then I can try to start on the i18n support and help menu, + look for these new features in version 0.8.5 to 0.9.0. + +01/28/2000 - Nano 0.8.1 marks our first official step toward + internationaliation (i18n) and the help system (^G). I + will be merging in Jordi's patches for initial i18n in the + next version, and will implement the help system with + i18n built into it shortly after that. Please don't + hesitate to send bug reports, as long as you're sure the + fault lies with nano =-). + +01/25/2000 - Nano 0.8.0 is officially the 'let's try and be at least a + little portable, mmmmkay?' release. There are many + portability checks and fixes, many thanks to Andy Kahn for + his patches. I removed the broken do_spell behavior with + the 'spell' program, for now we only try to call 'ispell' + until I write a better method to handle the output of the + normal 'spell' command. + +01/24/2000 - Nano 0.7.9 features many new features. Among them are a + new autoindent feature (-i, --autoondent), tempfile + flag like Pico's -t flag (-t, --tempfile), and preliminary + spelling program support. The spelling function tries + to run 'spell' and then 'ispell' in that order, but you + can specify another spelling program with -s or --speller. + +01/17/00 - Nano 0.7.7 is officially the 'way too much stuff changed this + release' release. It's the busy time at work for me, so + please don't get offended if your patch doesn't get + included in the next immediate version of nano. I'm sure + all the changes in this release will cause a few bugs, so + 0.7.8 will primarily be about fixing those bugs. + + Things added this release include resizeability (kinda), + new -x and -c flags (see nano -h for help), long command + line flag support, and the usual array of bugfixes. + +01/15/00 - Nano 0.7.6 is officially the 'lightning' release. It now loads + large files much faster than previous versions, and is + even much faster than Pico or vi in some rather + rudimentary tests. Many thanks to Adam Rogoyski for the + read_byte patch! + +01/09/00 - As of this version (0.7.4), TIP has officially been renamed + to nano. The new homepage is at + http://faculty.plattsburgh.edu/astyanax/nano. Please + update your bookmarks, tell your friends, and all that + jazz. diff --git a/README b/README new file mode 100644 index 00000000..0ba0fa02 --- /dev/null +++ b/README @@ -0,0 +1,82 @@ + + The nano editor (Nano's ANOther editor) by Chris Allegretta + +Manifesto + + Nano is the editor formerly known as TIP (TIP Isn't Pico). + The nano project was started because of three main problems with the + wonderfully easy-to-use and friendly Pico text editor: + + - It's license is not the GNU GPL, and hence some Linux + distributions, including Debian (my favorite) don't always + include it/don't include binaries. This is not necessarily a + problem, but an issue nonetheless. + + - Until recently, it had no ability to go to a line # from within + the editor. There was the +number command line option, but who wants + to exit a file to go to a specific line number? When I want to go to + a line, since I have to exit anyway, I just call up vi temporarily. + + - No search and replace feature. Well, apparently there is a flag + that lets you do a search and replace (-b in newer versions) but, + well, I still dont like it. + + nano aims to solve these problems by emulating the functionality of + Pico as closely as possible while adressing the problems above and + perhaps providing other extra functionality. + +How to compile and install nano + + Download the nano source code, then: + tar zxvf nano-x.y.z.tar.gz + cd nano-x.y.z + ./configure + make + make install + + It's that simple. Use --prefix to override the default installation + directory of /usr/local. + +Web Page + + http://www.asty.org/nano + +Mailing List and Bug Reports + + SourceForge hosts all the nano-related mailing-lists. + + nano-announce@lists.sourceforge.net is a very low traffic list + used to announce new Nano versions or other important information + about the project. + + nano-devel@lists.sourceforge.net is the list used by the people + that make Nano and a general development discussion list, with + moderate traffic. + To subscribe, send email to nano--request@lists.sourceforge.net + with a subject of "subscribe", where is the list you want to + subscribe to. + For general bug reports, send a description of the problem to + nano@asty.org or directly to the development list. + +Current Status + + nano is currently at version 0.9.x, and it will probably remain there + for awhile. This reflects the adage that the last 10% of a project + takes 90% of the time. Version 1.0 will be released when there are + no unresolved bugs, and not before. I am also currently looking for + patches for all things listed in the TODO file. If you have a + comment or suggestion, please let me know, all help is appreciated. + + Warning: This program can and possibly will corrupt your data in + its current form! It is beta software, so treat it as such! + Thank you. + + Note that the primary aim of nano is to emulate Pico while adding a + few key "missing" features. I do NOT want just a GPL'ed Pico clone, + nor do I want something that strays too far from the Pico design + (simple and straightforward). If you don't like this, feel free to + fork my code at any time, but please call your editor something + else, believe it or not I struggled awhile before coming up with + the name nano (and before that TIP), and it would be much easier for + everyone if there weren't five versions of the same program. As you + can guess, I'm not much of an emacs fan ;) + + Chris Allegretta (chrisa@asty.org) diff --git a/TODO b/TODO new file mode 100644 index 00000000..84bbc231 --- /dev/null +++ b/TODO @@ -0,0 +1,14 @@ +TODO file (? means the feature may be implemented, but not definitely) +----------------------------------------------------------------------------- + +- Implement Spelling [DONE, mostly...] +- Implement Help [DONE] +- Internationalization [In progress, translators welcome!] +- Allow nano to be resized in X. [DONE] +- Color syntax highlighting? (certainly seems like there's a demand for it.) +- On page up/down, put the cursor on the first line (like Pico), not the + center line [DONE] +- Undo/Redo key? +- single line scroll up/down? +- Rewrite edit_refresh, if at all possible [In progress] +- Implement justify function [DONE] diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 00000000..ce9f23c3 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,23 @@ +/* Define this if you have the wresize function in your ncurses-type library */ +#undef HAVE_WRESIZE + +/* 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 diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 00000000..efced845 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,708 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4 + +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Do all the work for Automake. This macro actually does too much -- +# some checks are only needed if your package does certain things. +# But this isn't really a big deal. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or +dnl gthread is specified in MODULES, pass to glib-config +dnl +AC_DEFUN(AM_PATH_GLIB, +[dnl +dnl Get the cflags and libraries from the glib-config script +dnl +AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], + glib_config_prefix="$withval", glib_config_prefix="") +AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], + glib_config_exec_prefix="$withval", glib_config_exec_prefix="") +AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], + , enable_glibtest=yes) + + if test x$glib_config_exec_prefix != x ; then + glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" + if test x${GLIB_CONFIG+set} != xset ; then + GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config + fi + fi + if test x$glib_config_prefix != x ; then + glib_config_args="$glib_config_args --prefix=$glib_config_prefix" + if test x${GLIB_CONFIG+set} != xset ; then + GLIB_CONFIG=$glib_config_prefix/bin/glib-config + fi + fi + + for module in . $4 + do + case "$module" in + gmodule) + glib_config_args="$glib_config_args gmodule" + ;; + gthread) + glib_config_args="$glib_config_args gthread" + ;; + esac + done + + AC_PATH_PROG(GLIB_CONFIG, glib-config, no) + min_glib_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + no_glib="" + if test "$GLIB_CONFIG" = "no" ; then + no_glib=yes + else + GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` + GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` + glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" +dnl +dnl Now check if the installed GLIB is sufficiently new. (Also sanity +dnl checks the results of glib-config to some extent +dnl + rm -f conf.glibtest + AC_TRY_RUN([ +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If glib-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); + printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the glib-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); + printf("*** correct copy of glib-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GLIB_CONFIG" = "no" ; then + echo "*** The glib-config script installed by GLIB could not be found" + echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GLIB_CONFIG environment variable to the" + echo "*** full path to glib-config." + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB was incorrectly installed" + echo "*** or that you have moved GLIB since it was installed. In the latter case, you" + echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + rm -f conf.glibtest +]) + +# Macro to add for using GNU gettext. +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 5 + +AC_DEFUN(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) + + USE_INCLUDED_LIBINTL=no + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS) + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + 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 gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include ], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_CHECK_LIB(intl, gettext, + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)], + gt_cv_func_gettext_libintl=no)]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + AC_MSG_CHECKING([whether catgets can be used]) + AC_ARG_WITH(catgets, + [ --with-catgets use catgets functions if available], + nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) + AC_MSG_RESULT($nls_cv_use_catgets) + + if test "$nls_cv_use_catgets" = "yes"; then + dnl No gettext in C library. Try catgets next. + AC_CHECK_LIB(i, main) + AC_CHECK_FUNC(catgets, + [AC_DEFINE(HAVE_CATGETS) + INTLOBJS="\$(CATOBJS)" + AC_PATH_PROG(GENCAT, gencat, no)dnl + if test "$GENCAT" != "no"; then + AC_PATH_PROG(GMSGFMT, gmsgfmt, no) + if test "$GMSGFMT" = "no"; then + AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) + fi + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi]) + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on 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)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_SUBST(MSGFMT) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + 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 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + 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(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN(AM_GNU_GETTEXT, + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])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_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next]) + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + AC_CHECK_FUNCS(stpcpy) + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + AC_DEFINE(HAVE_STPCPY) + fi + + AM_LC_MESSAGES + AM_WITH_NLS + + 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 lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + 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 The reference to in the installed file + dnl must be resolved because we cannot expect the users of this + dnl to define HAVE_LOCALE_H. + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include " + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header . Take care yourself. */" + fi + AC_SUBST(INCLUDE_LOCALE_H) + + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + dnl po2tbl.sed is always needed. + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + dnl In the intl/Makefile.in we have a special dependency which makes + dnl only sense for gettext. We comment this out for non-gettext + dnl packages. + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + AC_SUBST(GT_NO) + AC_SUBST(GT_YES) + + 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 *** For now the libtool support in intl/Makefile is not for real. + l= + AC_SUBST(l) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + +# Search path for a program which passes the given test. +# Ulrich Drepper , 1996. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +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]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# Check whether LC_MESSAGES is available in . +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +AC_DEFUN(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 ], [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) + fi + fi]) + diff --git a/config.h.in b/config.h.in new file mode 100644 index 00000000..a6cdb362 --- /dev/null +++ b/config.h.in @@ -0,0 +1,180 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have the vprintf function. */ +#undef HAVE_VPRINTF + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define this if you have the wresize function in your ncurses-type library */ +#undef HAVE_WRESIZE + +/* 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 if you have the __argz_count function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the __argz_next function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the __argz_stringify function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* Define if you have the dcgettext function. */ +#undef HAVE_DCGETTEXT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getopt_long function. */ +#undef HAVE_GETOPT_LONG + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the munmap function. */ +#undef HAVE_MUNMAP + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the snprintf function. */ +#undef HAVE_SNPRINTF + +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF + +/* Define if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the header file. */ +#undef HAVE_CURSES_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_NCURSES_H + +/* Define if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the i library (-li). */ +#undef HAVE_LIBI + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION + diff --git a/configure b/configure new file mode 100755 index 00000000..08583495 --- /dev/null +++ b/configure @@ -0,0 +1,4537 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-tiny Disables features for the sake of size + (currently disables detailed help and i18n)" +ac_help="$ac_help + --with-slang[=DIR] Use the slang library instead of curses" +ac_help="$ac_help + --with-glib-prefix=PFX Prefix where GLIB is installed (optional)" +ac_help="$ac_help + --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)" +ac_help="$ac_help + --disable-glibtest Do not try to compile and run a test GLIB program" +ac_help="$ac_help + --enable-debug Enable debugging (def disabled)" +ac_help="$ac_help + --disable-nls do not use Native Language Support" +ac_help="$ac_help + --with-included-gettext use the GNU gettext library included here" +ac_help="$ac_help + --with-catgets use catgets functions if available" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=nano.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:575: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:628: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:685: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=nano + +VERSION=0.9.10 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <> confdefs.h <&6 +echo "configure:731: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:744: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:757: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:770: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:783: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + + + +ALL_LINGUAS="es de fr it" + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:804: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:834: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:885: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:917: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 928 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:959: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:964: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:992: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1024: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1046: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1126: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +for ac_hdr in fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1233: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +# Check whether --enable-tiny or --disable-tiny was given. +if test "${enable_tiny+set}" = set; then + enableval="$enable_tiny" + if test x$enableval = xyes; then + cat >> confdefs.h <<\EOF +#define NANO_SMALL 1 +EOF + tiny_support=yes + fi +fi + + +echo $ac_n "checking whether to use slang""... $ac_c" 1>&6 +echo "configure:1283: checking whether to use slang" >&5 +CURSES_LIB_NAME="" +# Check whether --with-slang or --without-slang was given. +if test "${with_slang+set}" = set; then + withval="$with_slang" + case "$with_slang" in + yes) + echo "$ac_t""yes" 1>&6 + + ac_safe=`echo "slcurses.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for slcurses.h""... $ac_c" 1>&6 +echo "configure:1294: checking for slcurses.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for SLcurses_newwin in -lslang""... $ac_c" 1>&6 +echo "configure:1321: checking for SLcurses_newwin in -lslang" >&5 +ac_lib_var=`echo slang'_'SLcurses_newwin | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lslang $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_SLANG 1 +EOF + slang_support=yes + CURSES_LIB="-lslang" CURSES_LIB_NAME=slang +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: +*** The header file slcurses.h was not found. If you wish to use +*** slang support this header file is required. Please either +*** install a version of slang that includes the slcurses.h file or +*** do not call the configure script with --with-slang +" 1>&2; exit 1; } +fi + + ;; + no) + echo "$ac_t""no" 1>&6 + ;; + *) + echo "$ac_t""yes" 1>&6 + + # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at + # alternate readline path + _ldflags=${LDFLAGS} + _cppflags=${CPPFLAGS} + + # Add additional search path + LDFLAGS="-L$with_slang/lib $LDFLAGS" + CPPFLAGS="-I$with_slang/include $CPPFLAGS" + + ac_safe=`echo "slcurses.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for slcurses.h""... $ac_c" 1>&6 +echo "configure:1392: checking for slcurses.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for SLcurses_newwin in -lslang""... $ac_c" 1>&6 +echo "configure:1419: checking for SLcurses_newwin in -lslang" >&5 +ac_lib_var=`echo slang'_'SLcurses_newwin | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lslang $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_SLANG 1 +EOF + slang_support=yes + CURSES_LIB="-L${with_slang}/lib -lslang" + CURSES_LIB_NAME=slang +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: +*** The slang library was not found or the version you have installed +*** is incorrect. +" 1>&2; exit 1; } +fi + +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: +*** The header file slcurses.h was not found. If you wish to use +*** slang support this header file is required. Please either +*** install a version of slang that includes the slcurses.h file or +*** do not call the configure script with --with-slang +" 1>&2; exit 1; } +fi + + + LDFLAGS=${_ldflags} + ;; + esac +fi + + +for ac_func in snprintf vsnprintf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1487: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno" +then + # Check whether --with-glib-prefix or --without-glib-prefix was given. +if test "${with_glib_prefix+set}" = set; then + withval="$with_glib_prefix" + glib_config_prefix="$withval" +else + glib_config_prefix="" +fi + +# Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given. +if test "${with_glib_exec_prefix+set}" = set; then + withval="$with_glib_exec_prefix" + glib_config_exec_prefix="$withval" +else + glib_config_exec_prefix="" +fi + +# Check whether --enable-glibtest or --disable-glibtest was given. +if test "${enable_glibtest+set}" = set; then + enableval="$enable_glibtest" + : +else + enable_glibtest=yes +fi + + + if test x$glib_config_exec_prefix != x ; then + glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" + if test x${GLIB_CONFIG+set} != xset ; then + GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config + fi + fi + if test x$glib_config_prefix != x ; then + glib_config_args="$glib_config_args --prefix=$glib_config_prefix" + if test x${GLIB_CONFIG+set} != xset ; then + GLIB_CONFIG=$glib_config_prefix/bin/glib-config + fi + fi + + for module in . glib + do + case "$module" in + gmodule) + glib_config_args="$glib_config_args gmodule" + ;; + gthread) + glib_config_args="$glib_config_args gthread" + ;; + esac + done + + # Extract the first word of "glib-config", so it can be a program name with args. +set dummy glib-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1594: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GLIB_CONFIG" in + /*) + ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no" + ;; +esac +fi +GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG" +if test -n "$GLIB_CONFIG"; then + echo "$ac_t""$GLIB_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_glib_version=1.2.4 + echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 +echo "configure:1629: checking for GLIB - version >= $min_glib_version" >&5 + no_glib="" + if test "$GLIB_CONFIG" = "no" ; then + no_glib=yes + else + GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` + GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` + glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" + rm -f conf.glibtest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If glib-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); + printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the glib-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); + printf("*** correct copy of glib-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +EOF +if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_glib=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$GLIB_CONFIG" = "no" ; then + echo "*** The glib-config script installed by GLIB could not be found" + echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GLIB_CONFIG environment variable to the" + echo "*** full path to glib-config." + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + cat > conftest.$ac_ext < +#include + +int main() { + return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); +; return 0; } +EOF +if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB was incorrectly installed" + echo "*** or that you have moved GLIB since it was installed. In the latter case, you" + echo "*** may want to edit the glib-config script: $GLIB_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + { echo "configure: error: +*** snprintf() and/or vsnprintf() not found. GLIB not found either. +*** You need both snprintf() and vsnprintf(). Alternatively you can +*** install the GLIB library which can be found at ftp://ftp.gtk.org/." 1>&2; exit 1; } + fi + + + rm -f conf.glibtest + + glib_cflags=`$GLIB_CONFIG --cflags glib` + glib_libs=`$GLIB_CONFIG --libs glib` +fi + + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:1819: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1860: checking for vprintf" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vprintf(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vprintf) || defined (__stub___vprintf) +choke me +#else +vprintf(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_VPRINTF 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +if test "$ac_cv_func_vprintf" != yes; then +echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +echo "configure:1912: checking for _doprnt" >&5 +if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__doprnt) || defined (__stub____doprnt) +choke me +#else +_doprnt(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__doprnt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DOPRNT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +for ac_func in getopt_long +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1967: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + + +if eval "test x$CURSES_LIB_NAME = x" +then + for ac_hdr in curses.h ncurses.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2028: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +echo "configure:2065: checking for tgetent in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses +else + echo "$ac_t""no" 1>&6 +fi + +fi + +if eval "test x$CURSES_LIB_NAME = x" +then + echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 +echo "configure:2109: checking for tgetent in -lcurses" >&5 +ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses +else + echo "$ac_t""no" 1>&6 +fi + +fi + +if eval "test x$CURSES_LIB_NAME = x" +then + echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +echo "configure:2153: checking for tgetent in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap +else + echo "$ac_t""no" 1>&6 +fi + +fi + +if eval "test x$CURSES_LIB_NAME = x" +then + echo "configure: warning: +*** No termcap lib available, consider getting the official ncurses +*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get +*** errors compiling nano." 1>&2 +else + echo "$ac_t"""Using $CURSES_LIB_NAME as the termcap library"" 1>&6 +fi + + +echo $ac_n "checking for wresize in -l$CURSES_LIB_NAME""... $ac_c" 1>&6 +echo "configure:2206: checking for wresize in -l$CURSES_LIB_NAME" >&5 +ac_lib_var=`echo $CURSES_LIB_NAME'_'wresize | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$CURSES_LIB_NAME $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_WRESIZE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + +LIBS="$LIBS $CURSES_LIB" +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + : +fi + + + + +if test "x$glib_cflags" != "x" +then + CFLAGS="$CFLAGS $glib_cflags" +fi +if test "x$glib_libs" != "x" +then + LDFLAGS="$LDFLAGS $glib_libs" +fi + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2272: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:2300: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:2375: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <&6 +echo "configure:2415: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:2448: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:2483: checking for working alloca.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:2516: checking for alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int main() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_alloca_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_alloca_works=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 +if test $ac_cv_func_alloca_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.${ac_objext} + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:2581: checking whether alloca needs Cray hooks" >&5 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2611: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:2666: checking stack direction for C alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat > conftest.$ac_ext < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_stack_direction=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_stack_direction=-1 +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <&6 +echo "configure:2718: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2757: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:2810: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat > conftest.$ac_ext < +#include +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + + + for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2986: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3026: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + for ac_func in stpcpy +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3083: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STPCPY 1 +EOF + + fi + + if test $ac_cv_header_locale_h = yes; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:3145: checking for LC_MESSAGES" >&5 +if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +return LC_MESSAGES +; return 0; } +EOF +if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_val_LC_MESSAGES=no +fi +rm -f conftest* +fi + +echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 + if test $am_cv_val_LC_MESSAGES = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LC_MESSAGES 1 +EOF + + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +echo "configure:3178: checking whether NLS is requested" >&5 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi + + echo "$ac_t""$USE_NLS" 1>&6 + + + USE_INCLUDED_LIBINTL=no + + if test "$USE_NLS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ENABLE_NLS 1 +EOF + + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +echo "configure:3198: checking whether included gettext is requested" >&5 + # Check whether --with-included-gettext or --without-included-gettext was given. +if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +echo "configure:3217: checking for libintl.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +echo "configure:3244: checking for gettext in libc" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +return (int) gettext ("") +; return 0; } +EOF +if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gt_cv_func_gettext_libc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gt_cv_func_gettext_libc=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 + + if test "$gt_cv_func_gettext_libc" != "yes"; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +echo "configure:3272: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +echo "configure:3307: checking for gettext in libintl" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 +echo "configure:3312: checking for gettext in -lintl" >&5 +ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + gt_cv_func_gettext_libintl=yes +else + echo "$ac_t""no" 1>&6 +gt_cv_func_gettext_libintl=no +fi + +fi + +echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT 1 +EOF + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3370: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$MSGFMT" != "no"; then + for ac_func in dcgettext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3404: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3459: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3495: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CATOBJEXT=.mo + DATADIRNAME=lib +fi +rm -f conftest* + INSTOBJEXT=.mo + fi + fi + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "$CATOBJEXT" = "NONE"; then + echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 +echo "configure:3558: checking whether catgets can be used" >&5 + # Check whether --with-catgets or --without-catgets was given. +if test "${with_catgets+set}" = set; then + withval="$with_catgets" + nls_cv_use_catgets=$withval +else + nls_cv_use_catgets=no +fi + + echo "$ac_t""$nls_cv_use_catgets" 1>&6 + + if test "$nls_cv_use_catgets" = "yes"; then + echo $ac_n "checking for main in -li""... $ac_c" 1>&6 +echo "configure:3571: checking for main in -li" >&5 +ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-li $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for catgets""... $ac_c" 1>&6 +echo "configure:3614: checking for catgets" >&5 +if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char catgets(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_catgets) || defined (__stub___catgets) +choke me +#else +catgets(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_catgets=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_catgets=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_CATGETS 1 +EOF + + INTLOBJS="\$(CATOBJS)" + # Extract the first word of "gencat", so it can be a program name with args. +set dummy gencat; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3664: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GENCAT" in + /*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GENCAT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" + ;; +esac +fi +GENCAT="$ac_cv_path_GENCAT" +if test -n "$GENCAT"; then + echo "$ac_t""$GENCAT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$GENCAT" != "no"; then + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3700: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$GMSGFMT" = "no"; then + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3737: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3772: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3830: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3864: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3900: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + + + + + + + + + + + + + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +echo "configure:3993: checking for catalogs to be installed" >&5 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + echo "$ac_t""$LINGUAS" 1>&6 + fi + + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include " + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header . Take care yourself. */" + fi + + + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +echo "configure:4021: checking for linux/version.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + msgformat=linux +else + echo "$ac_t""no" 1>&6 +msgformat=xopen +fi + + + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + l= + + + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile intl/Makefile po/Makefile.in config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@GLIB_CONFIG@%$GLIB_CONFIG%g +s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g +s%@GLIB_LIBS@%$GLIB_LIBS%g +s%@CURSES_LIB@%$CURSES_LIB%g +s%@RANLIB@%$RANLIB%g +s%@ALLOCA@%$ALLOCA%g +s%@USE_NLS@%$USE_NLS%g +s%@MSGFMT@%$MSGFMT%g +s%@GMSGFMT@%$GMSGFMT%g +s%@XGETTEXT@%$XGETTEXT%g +s%@GENCAT@%$GENCAT%g +s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g +s%@CATALOGS@%$CATALOGS%g +s%@CATOBJEXT@%$CATOBJEXT%g +s%@DATADIRNAME@%$DATADIRNAME%g +s%@GMOFILES@%$GMOFILES%g +s%@INSTOBJEXT@%$INSTOBJEXT%g +s%@INTLDEPS@%$INTLDEPS%g +s%@INTLLIBS@%$INTLLIBS%g +s%@INTLOBJS@%$INTLOBJS%g +s%@POFILES@%$POFILES%g +s%@POSUB@%$POSUB%g +s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g +s%@GT_NO@%$GT_NO%g +s%@GT_YES@%$GT_YES%g +s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g +s%@l@%$l%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi +done +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h +case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/configure.in b/configure.in new file mode 100644 index 00000000..533de849 --- /dev/null +++ b/configure.in @@ -0,0 +1,149 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(nano.c) +AM_INIT_AUTOMAKE(nano, 0.9.10) +AM_CONFIG_HEADER(config.h:config.h.in) +ALL_LINGUAS="es de fr it" + +dnl Checks for programs. +AC_PROG_CC +AC_ISC_POSIX + +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) + +dnl options +AC_ARG_ENABLE(tiny, +[ --enable-tiny Disables 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 + fi]) + +AC_MSG_CHECKING(whether to use slang) +CURSES_LIB_NAME="" +AC_ARG_WITH(slang, +[ --with-slang[=DIR] Use the slang library instead of curses], +[ case "$with_slang" in + yes) + AC_MSG_RESULT(yes) + + AC_CHECK_HEADER(slcurses.h, + AC_CHECK_LIB(slang, SLcurses_newwin, + [AC_DEFINE(USE_SLANG) slang_support=yes + CURSES_LIB="-lslang" CURSES_LIB_NAME=slang]), + AC_MSG_ERROR([ +*** The header file slcurses.h was not found. If you wish to use +*** slang support this header file is required. Please either +*** install a version of slang that includes the slcurses.h file or +*** do not call the configure script with --with-slang +])) + ;; + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + + # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at + # alternate readline path + _ldflags=${LDFLAGS} + _cppflags=${CPPFLAGS} + + # Add additional search path + LDFLAGS="-L$with_slang/lib $LDFLAGS" + CPPFLAGS="-I$with_slang/include $CPPFLAGS" + + AC_CHECK_HEADER(slcurses.h, + AC_CHECK_LIB(slang, SLcurses_newwin, + [AC_DEFINE(USE_SLANG) slang_support=yes + CURSES_LIB="-L${with_slang}/lib -lslang" + CURSES_LIB_NAME=slang], + AC_MSG_ERROR([ +*** The slang library was not found or the version you have installed +*** is incorrect. +])), + AC_MSG_ERROR([ +*** The header file slcurses.h was not found. If you wish to use +*** slang support this header file is required. Please either +*** install a version of slang that includes the slcurses.h file or +*** do not call the configure script with --with-slang +])) + + LDFLAGS=${_ldflags} + ;; + esac]) + +dnl Checks for functions +AC_CHECK_FUNCS(snprintf vsnprintf) +if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno" +then + AM_PATH_GLIB(1.2.4,, + AC_MSG_ERROR([ +*** snprintf() and/or vsnprintf() not found. GLIB not found either. +*** You need both snprintf() and vsnprintf(). Alternatively you can +*** install the GLIB library which can be found at ftp://ftp.gtk.org/.]), + glib) + glib_cflags=`$GLIB_CONFIG --cflags glib` + glib_libs=`$GLIB_CONFIG --libs glib` +fi + +dnl Checks for typedefs, structures, and compiler characteristics. + +dnl Checks for library functions. +AC_TYPE_SIGNAL +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(getopt_long) + +dnl Checks for libraries. + + +if eval "test x$CURSES_LIB_NAME = x" +then + AC_CHECK_HEADERS(curses.h ncurses.h) + AC_CHECK_LIB(ncurses, tgetent, CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses) +fi + +if eval "test x$CURSES_LIB_NAME = x" +then + AC_CHECK_LIB(curses, tgetent, CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses) +fi + +if eval "test x$CURSES_LIB_NAME = x" +then + AC_CHECK_LIB(termcap, tgetent, CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap) +fi + +if eval "test x$CURSES_LIB_NAME = x" +then + AC_MSG_WARN([ +*** No termcap lib available, consider getting the official ncurses +*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get +*** errors compiling nano.]) +else + AC_MSG_RESULT("Using $CURSES_LIB_NAME as the termcap library") +fi + + +AC_CHECK_LIB($CURSES_LIB_NAME, wresize, AC_DEFINE(HAVE_WRESIZE)) + +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" +then + CFLAGS="$CFLAGS $glib_cflags" +fi +if test "x$glib_libs" != "x" +then + LDFLAGS="$LDFLAGS $glib_libs" +fi + +dnl i18n stuff - pretty incomplete for now +AM_GNU_GETTEXT + +AC_OUTPUT([Makefile intl/Makefile po/Makefile.in]) diff --git a/cut.c b/cut.c new file mode 100644 index 00000000..24b0b32a --- /dev/null +++ b/cut.c @@ -0,0 +1,379 @@ +/************************************************************************** + * cut.c * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +#include +#include +#include +#include "config.h" +#include "proto.h" +#include "nano.h" + +#ifndef NANO_SMALL +#include +#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 */ + +void add_to_cutbuffer(filestruct * inptr) +{ + filestruct *tmp; + +#ifdef DEBUG + fprintf(stderr, _("add_to_cutbuffer called with inptr->data = %s\n"), + inptr->data); +#endif + + totsize -= strlen(inptr->data) + 1; + tmp = cutbuffer; + if (cutbuffer == NULL) { + cutbuffer = inptr; + inptr->prev = NULL; + } else { + cutbottom->next = inptr; + inptr->prev = cutbottom; + } + + inptr->next = NULL; + cutbottom = inptr; +} + +#ifndef NANO_SMALL +void cut_marked_segment(filestruct * top, int top_x, filestruct * bot, + int bot_x) +{ + filestruct *tmp, *next; + char *tmpstr; + + /* Set up the beginning of the cutbuffer */ + tmp = copy_node(top); + tmpstr = nmalloc(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 = nmalloc(top_x + 1); + strncpy(tmpstr, top->data, top_x); + free(top->data); + top->data = tmpstr; + + do { + next = tmp->next; + add_to_cutbuffer(tmp); + totlines--; + tmp = next; + } + while (next != bot && next != NULL); + + dump_buffer(cutbuffer); + if (next == NULL) + return; + /* Now, paste bot[bot_x] into top[top_x] */ + tmpstr = nmalloc(strlen(top->data) + strlen(&bot->data[bot_x])); + strncpy(tmpstr, top->data, top_x); + strcpy(&tmpstr[top_x], &bot->data[bot_x]); + free(top->data); + top->data = tmpstr; + + bot->data[bot_x] = 0; + align(&bot->data); + next = bot->next; + + /* 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 */ + + add_to_cutbuffer(bot); + top->next = next; + if (next != NULL) + next->prev = top; + + dump_buffer(cutbuffer); + 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->lineno < edittop->lineno) + edit_update(top); +} +#endif + +int do_cut_text(void) +{ + filestruct *tmp, *fileptr = current; +#ifndef NANO_SMALL + char *tmpstr; + int newsize; +#endif + + if (fileptr == NULL || fileptr->data == NULL) + return 0; + + tmp = fileptr->next; + + if (!ISSET(KEEP_CUTBUFFER) || ISSET(MARK_ISSET)) { + free_filestruct(cutbuffer); + cutbuffer = NULL; +#ifdef DEBUG + fprintf(stderr, _("Blew away cutbuffer =)\n")); +#endif + } +#ifndef NANO_SMALL + if (ISSET(MARK_ISSET)) { + if (current->lineno == mark_beginbuf->lineno) { + tmp = copy_node(current); + newsize = abs(strlen(¤t->data[mark_beginx]) - + strlen(¤t->data[current_x])); + + tmpstr = nmalloc(newsize); + if (current_x < mark_beginx) { + strncpy(tmpstr, ¤t->data[current_x], newsize); + memmove(¤t->data[current_x], + ¤t->data[mark_beginx], + strlen(¤t->data[mark_beginx] - newsize)); + } else { + strncpy(tmpstr, ¤t->data[mark_beginx], newsize); + memmove(¤t->data[mark_beginx], + ¤t->data[current_x], + strlen(¤t->data[current_x] - newsize)); + current_x = mark_beginx; + update_cursor(); + } + tmpstr[newsize] = 0; + tmp->data = tmpstr; + add_to_cutbuffer(tmp); + dump_buffer(cutbuffer); + align(¤t->data); + } else if (current->lineno < mark_beginbuf->lineno) + cut_marked_segment(current, current_x, mark_beginbuf, + mark_beginx); + else + cut_marked_segment(mark_beginbuf, mark_beginx, current, + current_x); + + placewewant = xplustabs(); + UNSET(MARK_ISSET); + marked_cut = 1; + set_modified(); + edit_update_top(edittop); + 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); + totlines--; + fileptr->prev = NULL; + edit_update(fileage); + current = fileptr; + } else { + add_to_cutbuffer(fileptr); + totlines--; + fileage = make_new_node(NULL); + fileage->data = nmalloc(1); + strcpy(fileage->data, ""); + 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--; + } else { + /* we're deleteing the last line + and replacing it with a dummy line, + so totlines is the same */ + tmp = fileptr->prev; + tmp->next = make_new_node(tmp); + tmp = tmp->next; + tmp->data = nmalloc(1); + strcpy(tmp->data, ""); + current = tmp; + filebot = tmp; + } + + add_to_cutbuffer(fileptr); + } + + if (fileptr == edittop) + edittop = current; + + 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 + char *tmpstr, *tmpstr2; +#endif + int i; + + wrap_reset(); + if (cutbuffer == NULL || fileptr == NULL) + return 0; /* AIEEEEEEEEEEEE */ + + 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 == 1) { + /* If there's only one line in the cutbuffer */ + if (cutbuffer->next == NULL) { + tmpstr = + nmalloc(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); + + placewewant = xplustabs(); + update_cursor(); + renumber(current); + } else { /* yuck -- no kidding! */ + tmp = current->next; + /* New beginning */ + tmpstr = nmalloc(current_x + strlen(newbuf->data) + 1); + strncpy(tmpstr, current->data, current_x); + strcpy(&tmpstr[current_x], newbuf->data); + totsize += strlen(newbuf->data) + strlen(newend->data) + 1; + + /* New end */ + tmpstr2 = nmalloc(strlen(newend->data) + + strlen(¤t->data[current_x]) + 1); + strcpy(tmpstr2, newend->data); + strcat(tmpstr2, ¤t->data[current_x]); + + free(current->data); + current->data = tmpstr; + current->next = newbuf->next; + newbuf->next->prev = current; + delete_node(newbuf); + + current_x = strlen(newend->data); + placewewant = xplustabs(); + free(newend->data); + newend->data = tmpstr2; + + 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 */ + + if (tmp != NULL) + tmp->prev = newend; + else + filebot = newend; + + /* Now why don't we update the totsize also */ + for (tmp = current->next; tmp != newend; tmp = tmp->next) + totsize += strlen(tmp->data) + 1; + + i = editbot->lineno; + + renumber(current); + + current = newend; + if (i <= newend->lineno) + edit_update(current); + } + + dump_buffer(fileage); + dump_buffer(cutbuffer); + set_modified(); + edit_refresh(); + return 0; +#else + if (0) { +#endif + } else if (fileptr != fileage) { + tmp = fileptr->prev; + tmp->next = newbuf; + newbuf->prev = tmp; + totlines++; /* Unmarked uncuts don't split lines */ + } else { + fileage = newbuf; + totlines++; /* Unmarked uncuts don't split lines */ + } + + /* This is so uncutting at the top of the buffer will work => */ + if (current_y == 0) + edittop = newbuf; + + /* Connect the end of the buffer to the filestruct */ + newend->next = fileptr; + fileptr->prev = newend; + + /* 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) + edit_update(fileptr); + + dump_buffer_reverse(fileptr); + + set_modified(); + UNSET(KEEP_CUTBUFFER); + edit_refresh(); + return 1; +} diff --git a/global.c b/global.c new file mode 100644 index 00000000..416c0398 --- /dev/null +++ b/global.c @@ -0,0 +1,328 @@ +/************************************************************************** + * global.c * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +#include +#include "config.h" +#include "nano.h" +#include "proto.h" + +#ifndef NANO_SMALL +#include +#define _(string) gettext(string) +#else +#define _(string) (string) +#endif + +/* + * Global variables + */ +int flags = 0; /* Our new flag containig many options */ +int center_x = 0, center_y = 0; /* Center of screen */ +WINDOW *edit; /* The file portion of the editor */ +WINDOW *topwin; /* Top line of screen */ +WINDOW *bottomwin; /* Bottom buffer */ +char *filename; /* Name of the file */ +int editwinrows = 0; /* How many rows long is the edit + window? */ +filestruct *current; /* Current buffer pointer */ +int current_x = 0, current_y = 0; /* Current position of X and Y in + the editor - relative to edit + window (0,0) */ +filestruct *fileage = NULL; /* Our file buffer */ +filestruct *edittop = NULL; /* Pointer to the top of the edit + buffer with respect to the + file struct */ +filestruct *editbot = NULL; /* Same for the bottom */ +filestruct *filebot = NULL; /* Last node in the file struct */ +filestruct *cutbuffer = NULL; /* A place to store cut text */ + +char *answer; /* Answer str to many questions */ +int totlines = 0; /* Total number of lines in the file */ +int totsize = 0; /* Total number of bytes in the file */ +int placewewant = 0; /* The collum we'd like the cursor + to jump to when we go to the + next or previous line */ + +char *hblank; /* A horizontal blank line */ +char *help_text; /* The text in the help window */ + +/* More stuff for the marker select */ + +filestruct *mark_beginbuf; /* the begin marker buffer */ +int mark_beginx; /* X value in the string to start */ + +shortcut main_list[MAIN_LIST_LEN]; +shortcut whereis_list[WHEREIS_LIST_LEN]; +shortcut replace_list[REPLACE_LIST_LEN]; +shortcut goto_list[GOTO_LIST_LEN]; +shortcut writefile_list[WRITEFILE_LIST_LEN]; +shortcut help_list[HELP_LIST_LEN]; +shortcut spell_list[SPELL_LIST_LEN]; + +/* Initialize a struct *without* our lovely braces =( */ +void sc_init_one(shortcut * s, int key, char *desc, char *help, int alt, + int misc1, int misc2, int view, int (*func) (void)) +{ + s->val = key; + s->desc = desc; + s->help = help; + s->altval = alt; + s->misc1 = misc1; + s->misc2 = misc2; + s->viewok = view; + s->func = func; +} + +void shortcut_init(void) +{ + char *nano_help_msg = "", *nano_writeout_msg = "", *nano_exit_msg = "", + *nano_goto_msg = "", *nano_justify_msg = "", *nano_replace_msg = + "", *nano_insert_msg = "", *nano_whereis_msg = + "", *nano_prevpage_msg = "", *nano_nextpage_msg = + "", *nano_cut_msg = "", *nano_uncut_msg = "", *nano_cursorpos_msg = + "", *nano_spell_msg = "", *nano_up_msg = "", *nano_down_msg = + "", *nano_forward_msg = "", *nano_back_msg = "", *nano_home_msg = + "", *nano_end_msg = "", *nano_firstline_msg = + "", *nano_lastline_msg = "", *nano_refresh_msg = + "", *nano_mark_msg = "", *nano_delete_msg = + "", *nano_backspace_msg = "", *nano_tab_msg = + "", *nano_enter_msg = "", *nano_case_msg = + "", *nano_cancel_msg = ""; + +#ifndef NANO_SMALL + nano_help_msg = _("Invoke the help menu"); + nano_writeout_msg = _("Write the current file to disk"); + nano_exit_msg = _("Exit from nano"); + nano_goto_msg = _("Goto a specific line number"); + nano_justify_msg = _("Justify the current paragraph"); + nano_replace_msg = _("Replace text within the editor"); + nano_insert_msg = _("Insert another file into the current one"); + nano_whereis_msg = _("Search for text within the editor"); + nano_prevpage_msg = _("Move to the previous screen"); + nano_nextpage_msg = _("Move to the next screen"); + nano_cut_msg = _("Cut the current line and store it in the cutbuffer"); + nano_uncut_msg = _("Uncut from the cutbuffer into the current line"); + nano_cursorpos_msg = _("Show the posititon of the cursor"); + nano_spell_msg = _("Invoke the spell checker (if available)"); + nano_up_msg = _("Move up one line"); + nano_down_msg = _("Move down one line"); + nano_forward_msg = _("Move forward one character"); + nano_back_msg = _("Move back one character"); + nano_home_msg = _("Move to the beginning of the current line"); + nano_end_msg = _("Move to the end of the current line"); + nano_firstline_msg = _("Go to the first line of the file"); + nano_lastline_msg = _("Go to the last line of the file"); + nano_refresh_msg = _("Refresh (redraw) the current screen"); + nano_mark_msg = _("Mark text at the current cursor location"); + nano_delete_msg = _("Delete the character under the cursor"); + nano_backspace_msg = + _("Delete the character to the left of the cursor"); + nano_tab_msg = _("Insert a tab character"); + nano_enter_msg = _("Insert a carriage return at the cursor position"); + nano_case_msg = + _("Make the current search or replace case (in)sensitive"); + nano_cancel_msg = _("Cancel the current function"); +#endif + + + if (ISSET(PICO_MSGS)) + sc_init_one(&main_list[0], NANO_HELP_KEY, _("Get Help"), + nano_help_msg, 0, 0, 0, VIEW, do_help); + else + sc_init_one(&main_list[0], NANO_WRITEOUT_KEY, _("WriteOut"), + nano_writeout_msg, + 0, NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void); + + sc_init_one(&main_list[1], NANO_EXIT_KEY, _("Exit"), + nano_exit_msg, 0, NANO_EXIT_FKEY, 0, VIEW, do_exit); + + if (ISSET(PICO_MSGS)) + sc_init_one(&main_list[2], NANO_WRITEOUT_KEY, _("WriteOut"), + nano_writeout_msg, + 0, NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void); + else + sc_init_one(&main_list[2], NANO_GOTO_KEY, _("Goto Line"), + nano_goto_msg, + NANO_ALT_G, NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void); + + if (ISSET(PICO_MSGS)) + sc_init_one(&main_list[3], NANO_JUSTIFY_KEY, _("Justify"), + nano_justify_msg, 0, 0, 0, NOVIEW, do_justify); + else + sc_init_one(&main_list[3], NANO_REPLACE_KEY, _("Replace"), + nano_replace_msg, + NANO_ALT_R, NANO_REPLACE_FKEY, 0, NOVIEW, do_replace); + + sc_init_one(&main_list[4], NANO_INSERTFILE_KEY, _("Read File"), + nano_insert_msg, + 0, NANO_INSERTFILE_FKEY, 0, NOVIEW, do_insertfile); + + sc_init_one(&main_list[5], NANO_WHEREIS_KEY, _("Where Is"), + nano_whereis_msg, + 0, NANO_WHEREIS_FKEY, 0, VIEW, do_search); + + sc_init_one(&main_list[6], NANO_PREVPAGE_KEY, _("Prev Page"), + nano_prevpage_msg, + 0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, page_up); + + sc_init_one(&main_list[7], NANO_NEXTPAGE_KEY, _("Next Page"), + nano_nextpage_msg, + 0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, page_down); + + sc_init_one(&main_list[8], NANO_CUT_KEY, _("Cut Text"), + nano_cut_msg, 0, NANO_CUT_FKEY, 0, NOVIEW, do_cut_text); + + sc_init_one(&main_list[9], NANO_UNCUT_KEY, _("UnCut Txt"), + nano_uncut_msg, + 0, NANO_UNCUT_FKEY, 0, NOVIEW, do_uncut_text); + + sc_init_one(&main_list[10], NANO_CURSORPOS_KEY, _("Cur Pos"), + nano_cursorpos_msg, + 0, NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos); + + sc_init_one(&main_list[11], NANO_SPELL_KEY, _("To Spell"), + nano_spell_msg, 0, NANO_SPELL_FKEY, 0, NOVIEW, do_spell); + + + sc_init_one(&main_list[12], NANO_UP_KEY, _("Up"), + nano_up_msg, 0, KEY_UP, 0, VIEW, do_up); + + sc_init_one(&main_list[13], NANO_DOWN_KEY, _("Down"), + nano_down_msg, 0, KEY_DOWN, 0, VIEW, do_down); + + sc_init_one(&main_list[14], NANO_FORWARD_KEY, _("Forward"), + nano_forward_msg, 0, KEY_RIGHT, 0, VIEW, do_right); + + sc_init_one(&main_list[15], NANO_BACK_KEY, _("Back"), + nano_back_msg, 0, KEY_LEFT, 0, VIEW, do_left); + + sc_init_one(&main_list[16], NANO_HOME_KEY, _("Home"), + nano_home_msg, 0, KEY_HOME, 362, VIEW, do_home); + + sc_init_one(&main_list[17], NANO_END_KEY, _("End"), + nano_end_msg, 0, KEY_END, 385, VIEW, do_end); + + sc_init_one(&main_list[18], NANO_REFRESH_KEY, _("Refresh"), + nano_refresh_msg, 0, 0, 0, VIEW, total_refresh); + + sc_init_one(&main_list[19], NANO_MARK_KEY, _("Mark Text"), + nano_mark_msg, 0, 0, 0, NOVIEW, do_mark); + + sc_init_one(&main_list[20], NANO_DELETE_KEY, _("Delete"), + nano_delete_msg, 0, KEY_DC, + NANO_CONTROL_D, NOVIEW, do_delete); + + sc_init_one(&main_list[21], NANO_BACKSPACE_KEY, _("Backspace"), + nano_backspace_msg, 0, + KEY_BACKSPACE, 127, NOVIEW, do_backspace); + + sc_init_one(&main_list[22], NANO_TAB_KEY, _("Tab"), + nano_tab_msg, 0, 0, 0, NOVIEW, do_tab); + + if (ISSET(PICO_MSGS)) + sc_init_one(&main_list[23], NANO_REPLACE_KEY, _("Replace"), + nano_replace_msg, + NANO_ALT_R, NANO_REPLACE_FKEY, 0, NOVIEW, do_replace); + else + sc_init_one(&main_list[23], NANO_JUSTIFY_KEY, _("Justify"), + nano_justify_msg, 0, 0, 0, NOVIEW, do_justify); + + sc_init_one(&main_list[24], NANO_ENTER_KEY, _("Enter"), + nano_enter_msg, + 0, KEY_ENTER, NANO_CONTROL_M, NOVIEW, do_enter_void); + + if (ISSET(PICO_MSGS)) + sc_init_one(&main_list[25], NANO_GOTO_KEY, _("Goto Line"), + nano_goto_msg, + NANO_ALT_G, NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void); + else + sc_init_one(&main_list[25], NANO_HELP_KEY, _("Get Help"), + nano_help_msg, 0, 0, 0, VIEW, do_help); + + + sc_init_one(&whereis_list[0], NANO_FIRSTLINE_KEY, _("First Line"), + nano_firstline_msg, 0, 0, 0, VIEW, do_first_line); + + sc_init_one(&whereis_list[1], NANO_LASTLINE_KEY, _("Last Line"), + nano_lastline_msg, 0, 0, 0, VIEW, do_last_line); + + sc_init_one(&whereis_list[2], NANO_CASE_KEY, _("Case Sens"), + nano_case_msg, 0, 0, 0, VIEW, 0); + + + sc_init_one(&whereis_list[3], NANO_OTHERSEARCH_KEY, _("To Replace"), + nano_replace_msg, 0, 0, 0, VIEW, do_replace); + + sc_init_one(&whereis_list[4], NANO_CANCEL_KEY, _("Cancel"), + nano_cancel_msg, 0, 0, 0, VIEW, 0); + + + sc_init_one(&replace_list[0], NANO_FIRSTLINE_KEY, _("First Line"), + nano_firstline_msg, 0, 0, 0, VIEW, do_first_line); + + sc_init_one(&replace_list[1], NANO_LASTLINE_KEY, _("Last Line"), + nano_lastline_msg, 0, 0, 0, VIEW, do_last_line); + + sc_init_one(&replace_list[2], NANO_CASE_KEY, _("Case Sens"), + nano_case_msg, 0, 0, 0, VIEW, 0); + + sc_init_one(&replace_list[3], NANO_OTHERSEARCH_KEY, _("To Search"), + nano_whereis_msg, 0, 0, 0, VIEW, do_search); + + sc_init_one(&replace_list[4], NANO_CANCEL_KEY, _("Cancel"), + nano_cancel_msg, 0, 0, 0, VIEW, 0); + + + sc_init_one(&goto_list[0], NANO_FIRSTLINE_KEY, _("First Line"), + nano_firstline_msg, 0, 0, 0, VIEW, &do_first_line); + + sc_init_one(&goto_list[1], NANO_LASTLINE_KEY, _("Last Line"), + nano_lastline_msg, 0, 0, 0, VIEW, &do_last_line); + + sc_init_one(&goto_list[2], NANO_CANCEL_KEY, _("Cancel"), + nano_cancel_msg, 0, 0, 0, VIEW, 0); + + + sc_init_one(&help_list[0], NANO_PREVPAGE_KEY, _("Prev Page"), + nano_prevpage_msg, + 0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, page_up); + + sc_init_one(&help_list[1], NANO_NEXTPAGE_KEY, _("Next Page"), + nano_nextpage_msg, + 0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, page_down); + + sc_init_one(&help_list[2], NANO_EXIT_KEY, _("Exit"), + nano_exit_msg, 0, NANO_EXIT_FKEY, 0, VIEW, do_exit); + + + sc_init_one(&writefile_list[0], NANO_CANCEL_KEY, _("Cancel"), + nano_cancel_msg, 0, 0, 0, VIEW, 0); + + + sc_init_one(&writefile_list[0], NANO_CANCEL_KEY, _("Cancel"), + nano_cancel_msg, 0, 0, 0, VIEW, 0); + + sc_init_one(&spell_list[0], NANO_HELP_KEY, _("Get Help"), + nano_help_msg, 0, 0, 0, VIEW, do_help); + + sc_init_one(&spell_list[1], NANO_CANCEL_KEY, _("Cancel"), + nano_cancel_msg, 0, 0, 0, VIEW, 0); + +} diff --git a/install-sh b/install-sh new file mode 100755 index 00000000..e9de2384 --- /dev/null +++ b/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/intl/ChangeLog b/intl/ChangeLog new file mode 100644 index 00000000..19895015 --- /dev/null +++ b/intl/ChangeLog @@ -0,0 +1,1086 @@ +1998-04-29 Ulrich Drepper + + * intl/localealias.c (read_alias_file): Use unsigned char for + local variables. Remove unused variable tp. + * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char * + for type of codeset. For loosing Solaris systems. + * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset. + * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable + len if not needed. + Patches by Jim Meyering. + +1998-04-28 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if + mmap is not supported. + + * hash-string.h: Don't include . + +1998-04-27 Ulrich Drepper + + * textdomain.c: Use strdup is available. + + * localealias.c: Define HAVE_MEMPCPY so that we can use this + function. Define and use semapahores to protect modfication of + global objects when compiling for glibc. Add code to allow + freeing alias table. + + * l10nflist.c: Don't assume stpcpy not being a macro. + + * gettextP.h: Define internal_function macri if not already done. + Use glibc byte-swap macros instead of defining SWAP when compiled + for glibc. + (struct loaded_domain): Add elements to allow unloading. + + * Makefile.in (distclean): Don't remove libintl.h here. + + * bindtextdomain.c: Carry over changes from glibc. Use strdup if + available. + + * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal + functions. Add memory freeing code for glibc. + + * dgettext.c: Update copyright. + + * explodename.c: Include stdlib.h and string.h only if they exist. + Use strings.h eventually. + + * finddomain.c: Mark internal functions. Use strdup if available. + Add memory freeing code for glibc. + +1997-10-10 20:00 Ulrich Drepper + + * libgettext.h: Fix dummy textdomain and bindtextdomain macros. + They should return reasonable values. + Reported by Tom Tromey . + +1997-09-16 03:33 Ulrich Drepper + + * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. + * intlh.inst.in: Likewise. + Reported by Jean-Marc Lasgouttes . + + * libintl.glibc: Update from current glibc version. + +1997-09-06 02:10 Ulrich Drepper + + * intlh.inst.in: Reformat copyright. + +1997-08-19 15:22 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Remove wrong comment. + +1997-08-16 00:13 Ulrich Drepper + + * Makefile.in (install-data): Don't change directory to install. + +1997-08-01 14:30 Ulrich Drepper + + * cat-compat.c: Fix copyright. + + * localealias.c: Don't define strchr unless !HAVE_STRCHR. + + * loadmsgcat.c: Update copyright. Fix typos. + + * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. + (_nl_make_l10nflist): Handle sponsor and revision correctly. + + * gettext.c: Update copyright. + * gettext.h: Likewise. + * hash-string.h: Likewise. + + * finddomain.c: Remoave dead code. Define strchr only if + !HAVE_STRCHR. + + * explodename.c: Include . + + * explodename.c: Reformat copyright text. + (_nl_explode_name): Fix typo. + + * dcgettext.c: Define and use __set_errno. + (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is + not defined. + + * bindtextdom.c: Pretty printing. + +1997-05-01 02:25 Ulrich Drepper + + * dcgettext.c (guess_category_value): Don't depend on + HAVE_LC_MESSAGES. We don't need the macro here. + Patch by Bruno Haible . + + * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL + macro. Instead use HAVE_LOCALE_NULL and define it when using + glibc, as in dcgettext.c. + Patch by Bruno Haible . + + * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois + Pinard. + +Mon Mar 10 06:51:17 1997 Ulrich Drepper + + * Makefile.in: Implement handling of libtool. + + * gettextP.h: Change data structures for use of generic lowlevel + i18n file handling. + +Wed Dec 4 20:21:18 1996 Ulrich Drepper + + * textdomain.c: Put parentheses around arguments of memcpy macro + definition. + * localealias.c: Likewise. + * l10nflist.c: Likewise. + * finddomain.c: Likewise. + * bindtextdom.c: Likewise. + Reported by Thomas Esken. + +Mon Nov 25 22:57:51 1996 Ulrich Drepper + + * textdomain.c: Move definition of `memcpy` macro to right + position. + +Fri Nov 22 04:01:58 1996 Ulrich Drepper + + * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using + bcopy if not already defined. Reported by Thomas Esken. + * bindtextdom.c: Likewise. + * l10nflist.c: Likewise. + * localealias.c: Likewise. + * textdomain.c: Likewise. + +Tue Oct 29 11:10:27 1996 Ulrich Drepper + + * Makefile.in (libdir): Change to use exec_prefix instead of + prefix. Reported by Knut-HĺvardAksnes . + +Sat Aug 31 03:07:09 1996 Ulrich Drepper + + * l10nflist.c (_nl_normalize_codeset): We convert to lower case, + so don't prepend uppercase `ISO' for only numeric arg. + +Fri Jul 19 00:15:46 1996 Ulrich Drepper + + * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after + definition of _GNU_SOURCE. Patch by Roland McGrath. + + * Makefile.in (uninstall): Fix another bug with `for' loop and + empty arguments. Patch by Jim Meyering. Correct name os + uninstalled files: no intl- prefix anymore. + + * Makefile.in (install-data): Again work around shells which + cannot handle mpty for list. Reported by Jim Meyering. + +Sat Jul 13 18:11:35 1996 Ulrich Drepper + + * Makefile.in (install): Split goal. Now depend on install-exec + and install-data. + (install-exec, install-data): New goals. Created from former + install goal. + Reported by Karl Berry. + +Sat Jun 22 04:58:14 1996 Ulrich Drepper + + * Makefile.in (MKINSTALLDIRS): New variable. Path to + mkinstalldirs script. + (install): use MKINSTALLDIRS variable or if the script is not present + try to find it in the $top_scrdir). + +Wed Jun 19 02:56:56 1996 Ulrich Drepper + + * l10nflist.c: Linux libc *partly* includes the argz_* functions. + Grr. Work around by renaming the static version and use macros + for renaming. + +Tue Jun 18 20:11:17 1996 Ulrich Drepper + + * l10nflist.c: Correct presence test macros of __argz_* functions. + + * l10nflist.c: Include based on test of it instead when + __argz_* functions are available. + Reported by Andreas Schwab. + +Thu Jun 13 15:17:44 1996 Ulrich Drepper + + * explodename.c, l10nflist.c: Define NULL for dumb systems. + +Tue Jun 11 17:05:13 1996 Ulrich Drepper + + * intlh.inst.in, libgettext.h (dcgettext): Rename local variable + result to __result to prevent name clash. + + * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to + get prototype for stpcpy and strcasecmp. + + * intlh.inst.in, libgettext.h: Move declaration of + `_nl_msg_cat_cntr' outside __extension__ block to prevent warning + from gcc's -Wnested-extern option. + +Fri Jun 7 01:58:00 1996 Ulrich Drepper + + * Makefile.in (install): Remove comment. + +Thu Jun 6 17:28:17 1996 Ulrich Drepper + + * Makefile.in (install): Work around for another Buglix stupidity. + Always use an `else' close for `if's. Reported by Nelson Beebe. + + * Makefile.in (intlh.inst): Correct typo in phony rule. + Reported by Nelson Beebe. + +Thu Jun 6 01:49:52 1996 Ulrich Drepper + + * dcgettext.c (read_alias_file): Rename variable alloca_list to + block_list as the macro calls assume. + Patch by Eric Backus. + + * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using + malloc. + (read_alias_file): Rename varriabe alloca_list to block_list as the + macro calls assume. + Patch by Eric Backus. + + * l10nflist.c: Correct conditional for inclusion. + Reported by Roland McGrath. + + * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not + all-@USE_NLS@. + + * Makefile.in (install): intlh.inst comes from local dir, not + $(srcdir). + + * Makefile.in (intlh.inst): Special handling of this goal. If + used in gettext, this is really a rul to construct this file. If + used in any other package it is defined as a .PHONY rule with + empty body. + + * finddomain.c: Extract locale file information handling into + l10nfile.c. Rename local stpcpy__ function to stpcpy. + + * dcgettext.c (stpcpy): Add local definition. + + * l10nflist.c: Solve some portability problems. Patches partly by + Thomas Esken. Add local definition of stpcpy. + +Tue Jun 4 02:47:49 1996 Ulrich Drepper + + * intlh.inst.in: Don't depend including on + HAVE_LOCALE_H. Instead configure must rewrite this fiile + depending on the result of the configure run. + + * Makefile.in (install): libintl.inst is now called intlh.inst. + Add rules for updating intlh.inst from intlh.inst.in. + + * libintl.inst: Renamed to intlh.inst.in. + + * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 + because gcc has __buitlin_alloca. + Reported by Roland McGrath. + +Mon Jun 3 00:32:16 1996 Ulrich Drepper + + * Makefile.in (installcheck): New goal to fulfill needs of + automake's distcheck. + + * Makefile.in (install): Reorder commands so that VERSION is + found. + + * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in + @datadir@/gettext. + (COMSRCS): Add l10nfile.c. + (OBJECTS): Add l10nfile.o. + (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). + (DISTFILE.gettext): Remove $(DISTFILES.common). + (all-gettext): Remove goal. + (install): If $(PACKAGE) = gettext install, otherwose do nothing. No + package but gettext itself should install libintl.h + headers. + (dist): Extend goal to work for gettext, too. + (dist-gettext): Remove goal. + + * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. + +Sun Jun 2 17:33:06 1996 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Parameter is now comes from + find_l10nfile. + +Sat Jun 1 02:23:03 1996 Ulrich Drepper + + * l10nflist.c (__argz_next): Add definition. + + * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca + code. Use new l10nfile handling. + + * localealias.c [!HAVE_ALLOCA]: Add code for handling missing + alloca code. + + * l10nflist.c: Initial revision. + +Tue Apr 2 18:51:18 1996 Ulrich Drepper + + * Makefile.in (all-gettext): New goal. Same as all-yes. + +Thu Mar 28 23:01:22 1996 Karl Eichwalder + + * Makefile.in (gettextsrcdir): Define using @datadir@. + +Tue Mar 26 12:39:14 1996 Ulrich Drepper + + * finddomain.c: Include . Reported by Roland McGrath. + +Sat Mar 23 02:00:35 1996 Ulrich Drepper + + * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing + with external declaration. + +Sat Mar 2 00:47:09 1996 Ulrich Drepper + + * Makefile.in (all-no): Rename from all_no. + +Sat Feb 17 00:25:59 1996 Ulrich Drepper + + * gettextP.h [loaded_domain]: Array `successor' must now contain up + to 63 elements (because of codeset name normalization). + + * finddomain.c: Implement codeset name normalization. + +Thu Feb 15 04:39:09 1996 Ulrich Drepper + + * Makefile.in (all): Define to `all-@USE_NLS@'. + (all-yes, all_no): New goals. `all-no' is noop, `all-yes' + is former all. + +Mon Jan 15 21:46:01 1996 Howard Gayle + + * localealias.c (alias_compare): Increment string pointers in loop + of strcasecmp replacement. + +Fri Dec 29 21:16:34 1995 Ulrich Drepper + + * Makefile.in (install-src): Who commented this goal out ? :-) + +Fri Dec 29 15:08:16 1995 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls + should not effect it because a missing catalog is no error. + Reported by Harald Knig . + +Tue Dec 19 22:09:13 1995 Ulrich Drepper + + * Makefile.in (Makefile): Explicitly use $(SHELL) for running + shell scripts. + +Fri Dec 15 17:34:59 1995 Andreas Schwab + + * Makefile.in (install-src): Only install library and header when + we use the own implementation. Don't do it when using the + system's gettext or catgets functions. + + * dcgettext.c (find_msg): Must not swap domain->hash_size here. + +Sat Dec 9 16:24:37 1995 Ulrich Drepper + + * localealias.c, libintl.inst, libgettext.h, hash-string.h, + gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: + Use PARAMS instead of __P. Suggested by Roland McGrath. + +Tue Dec 5 11:39:14 1995 Larry Schwimmer + + * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if + !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. + +Mon Dec 4 15:42:07 1995 Ulrich Drepper + + * Makefile.in (install-src): + Install libintl.inst instead of libintl.h.install. + +Sat Dec 2 22:51:38 1995 Marcus Daniels + + * cat-compat.c (textdomain): + Reverse order in which files are tried you load. First + try local file, when this failed absolute path. + +Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe + + * cat-compat.c (bindtextdomain): Add missing { }. + +Sun Nov 26 18:21:41 1995 Ulrich Drepper + + * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. + + * Makefile.in: + Add dummy `all' and `dvi' goals. Reported by Tom Tromey. + +Sat Nov 25 16:12:01 1995 Franc,ois Pinard + + * hash-string.h: Capitalize arguments of macros. + +Sat Nov 25 12:01:36 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Prevent files names longer than 13 + characters. libintl.h.glibc->libintl.glibc, + libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. + +Sat Nov 25 11:31:12 1995 Eric Backus + + * dcgettext.c: Fix bug in preprocessor conditionals. + +Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe + + * libgettext.h: Solaris cc does not understand + #if !SYMBOL1 && !SYMBOL2. Sad but true. + +Thu Nov 23 16:22:14 1995 Ulrich Drepper + + * hash-string.h (hash_string): + Fix for machine with >32 bit `unsigned long's. + + * dcgettext.c (DCGETTEXT): + Fix horrible bug in loop for alternative translation. + +Thu Nov 23 01:45:29 1995 Ulrich Drepper + + * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: + Some further simplifications in message number generation. + +Mon Nov 20 21:08:43 1995 Ulrich Drepper + + * libintl.h.glibc: Use __const instead of const in prototypes. + + * Makefile.in (install-src): + Install libintl.h.install instead of libintl.h. This + is a stripped-down version. Suggested by Peter Miller. + + * libintl.h.install, libintl.h.glibc: Initial revision. + + * localealias.c (_nl_expand_alias, read_alias_file): + Protect prototypes in type casts by __P. + +Tue Nov 14 16:43:58 1995 Ulrich Drepper + + * hash-string.h: Correct prototype for hash_string. + +Sun Nov 12 12:42:30 1995 Ulrich Drepper + + * hash-string.h (hash_string): Add prototype. + + * gettextP.h: Fix copyright. + (SWAP): Add prototype. + +Wed Nov 8 22:56:33 1995 Ulrich Drepper + + * localealias.c (read_alias_file): Forgot sizeof. + Avoid calling *printf function. This introduces a big overhead. + Patch by Roland McGrath. + +Tue Nov 7 14:21:08 1995 Ulrich Drepper + + * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. + + * finddomain.c (stpcpy): + Define substitution function local. The macro was to flaky. + + * cat-compat.c: Fix typo. + + * xopen-msg.sed, linux-msg.sed: + While bringing message number to right place only accept digits. + + * linux-msg.sed, xopen-msg.sed: Now that the counter does not have + leading 0s we don't need to remove them. Reported by Marcus + Daniels. + + * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in + dependency. Reported by Marcus Daniels. + + * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. + Generally cleanup using #if instead of #ifndef. + + * Makefile.in: Correct typos in comment. By Franc,ois Pinard. + +Mon Nov 6 00:27:02 1995 Ulrich Drepper + + * Makefile.in (install-src): Don't install libintl.h and libintl.a + if we use an available gettext implementation. + +Sun Nov 5 22:02:08 1995 Ulrich Drepper + + * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported + by Franc,ois Pinard. + + * libgettext.h: Use #if instead of #ifdef/#ifndef. + + * finddomain.c: + Comments describing what has to be done should start with FIXME. + +Sun Nov 5 19:38:01 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. + DISTFILES.common names the files common to both dist goals. + DISTFILES.gettext are the files only distributed in GNU gettext. + +Sun Nov 5 17:32:54 1995 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Correct searching in derived locales. + This was necessary since a change in _nl_find_msg several weeks + ago. I really don't know this is still not fixed. + +Sun Nov 5 12:43:12 1995 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This + might mark a special condition. + + * finddomain.c (make_entry_rec): Don't make illegal entry as decided. + + * Makefile.in (dist): Suppress error message when ln failed. + Get files from $(srcdir) explicitly. + + * libgettext.h (gettext_const): Rename to gettext_noop. + +Fri Nov 3 07:36:50 1995 Ulrich Drepper + + * finddomain.c (make_entry_rec): + Protect against wrong locale names by testing mask. + + * libgettext.h (gettext_const): Add macro definition. + Capitalize macro arguments. + +Thu Nov 2 23:15:51 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Test for pointer != NULL before accessing value. + Reported by Tom Tromey. + + * gettext.c (NULL): + Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. + +Mon Oct 30 21:28:52 1995 Ulrich Drepper + + * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. + +Sat Oct 28 23:20:47 1995 Ulrich Drepper + + * libgettext.h: Disable dcgettext optimization for Solaris 2.3. + + * localealias.c (alias_compare): + Peter Miller reported that tolower in some systems is + even dumber than I thought. Protect call by `isupper'. + +Fri Oct 27 22:22:51 1995 Ulrich Drepper + + * Makefile.in (libdir, includedir): New variables. + (install-src): Install libintl.a and libintl.h in correct dirs. + +Fri Oct 27 22:07:29 1995 Ulrich Drepper + + * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. + + * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. + + * localealias.c: + Fix typo and superflous test. Reported by Christian von Roques. + +Fri Oct 6 11:52:05 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Correct some remainder from the pre-CEN syntax. Now + we don't have a constant number of successors anymore. + +Wed Sep 27 21:41:13 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Add libintl.h.glibc. + + * Makefile.in (dist-libc): Add goal for packing sources for glibc. + (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. + + * loadmsgcat.c: Forget to continue #if line. + + * localealias.c: + [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name + space clean. + + * dcgettext.c, finddomain.c: Better comment to last change. + + * loadmsgcat.c: + [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to + __fstat, __open, __close, __read, __mmap, and __munmap resp + to keep ANSI C name space clean. + + * finddomain.c: + [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. + + * dcgettext.c: + [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to + keep ANSI C name space clean. + + * libgettext.h: + Include sys/types.h for those old SysV systems out there. + Reported by Francesco Potorti`. + + * loadmsgcat.c (use_mmap): Define if compiled for glibc. + + * bindtextdom.c: Include all those standard headers + unconditionally if _LIBC is defined. + + * finddomain.c: Fix 2 times defiend -> defined. + + * textdomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. + + * gettext.c: + Include libintl.h instead of libgettext.h when compiling for glibc. + Get NULL from stddef.h if we compile for glibc. + + * finddomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * dcgettext.c: Include all those standard headers unconditionally + if _LIBC is defined. + + * dgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. + + * dcgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. + + * bindtextdom.c: + If compiled in glibc include libintl.h instead of libgettext.h. + +Mon Sep 25 22:23:06 1995 Ulrich Drepper + + * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. + Reported by Marcus Daniels. + + * cat-compat.c (bindtextdomain): + String used in putenv must not be recycled. + Reported by Marcus Daniels. + + * libgettext.h (__USE_GNU_GETTEXT): + Additional symbol to signal that we use GNU gettext + library. + + * cat-compat.c (bindtextdomain): + Fix bug with the strange stpcpy replacement. + Reported by Nelson Beebe. + +Sat Sep 23 08:23:51 1995 Ulrich Drepper + + * cat-compat.c: Include for stpcpy prototype. + + * localealias.c (read_alias_file): + While expand strdup code temporary variable `cp' hided + higher level variable with same name. Rename to `tp'. + + * textdomain.c (textdomain): + Avoid warning by using temporary variable in strdup code. + + * finddomain.c (_nl_find_domain): Remove unused variable `application'. + +Thu Sep 21 15:51:44 1995 Ulrich Drepper + + * localealias.c (alias_compare): + Use strcasecmp() only if available. Else use + implementation in place. + + * intl-compat.c: + Wrapper functions now call *__ functions instead of __*. + + * libgettext.h: Declare prototypes for *__ functions instead for __*. + + * cat-compat.c, loadmsgcat.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + + * bindtextdom.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Rename to bindtextdomain__ if not used in GNU C Library. + + * dgettext.c: + Rename function to dgettext__ if not used in GNU C Library. + + * gettext.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Functions now called gettext__ if not used in GNU C Library. + + * dcgettext.c, localealias.c, textdomain.c, finddomain.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + +Sun Sep 17 23:14:49 1995 Ulrich Drepper + + * finddomain.c: Correct some bugs in handling of CEN standard + locale definitions. + +Thu Sep 7 01:49:28 1995 Ulrich Drepper + + * finddomain.c: Implement CEN syntax. + + * gettextP.h (loaded_domain): Extend number of successors to 31. + +Sat Aug 19 19:25:29 1995 Ulrich Drepper + + * Makefile.in (aliaspath): Remove path to X11 locale dir. + + * Makefile.in: Make install-src depend on install. This helps + gettext to install the sources and other packages can use the + install goal. + +Sat Aug 19 15:19:33 1995 Ulrich Drepper + + * Makefile.in (uninstall): Remove stuff installed by install-src. + +Tue Aug 15 13:13:53 1995 Ulrich Drepper + + * VERSION.in: Initial revision. + + * Makefile.in (DISTFILES): + Add VERSION file. This is not necessary for gettext, but + for other packages using this library. + +Tue Aug 15 06:16:44 1995 Ulrich Drepper + + * gettextP.h (_nl_find_domain): + New prototype after changing search strategy. + + * finddomain.c (_nl_find_domain): + We now try only to find a specified catalog. Fall back to other + catalogs listed in the locale list is now done in __dcgettext. + + * dcgettext.c (__dcgettext): + Now we provide message fall back even to different languages. + I.e. if a message is not available in one language all the other + in the locale list a tried. Formerly fall back was only possible + within one language. Implemented by moving one loop from + _nl_find_domain to here. + +Mon Aug 14 23:45:50 1995 Ulrich Drepper + + * Makefile.in (gettextsrcdir): + Directory where source of GNU gettext library are made + available. + (INSTALL, INSTALL_DATA): Programs used for installing sources. + (gettext-src): New. Rule to install GNU gettext sources for use in + gettextize shell script. + +Sun Aug 13 14:40:48 1995 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): + Use mmap for loading only when munmap function is + also available. + + * Makefile.in (install): Depend on `all' goal. + +Wed Aug 9 11:04:33 1995 Ulrich Drepper + + * localealias.c (read_alias_file): + Do not overwrite '\n' when terminating alias value string. + + * localealias.c (read_alias_file): + Handle long lines. Ignore the rest not fitting in + the buffer after the initial `fgets' call. + +Wed Aug 9 00:54:29 1995 Ulrich Drepper + + * gettextP.h (_nl_load_domain): + Add prototype, replacing prototype for _nl_load_msg_cat. + + * finddomain.c (_nl_find_domain): + Remove unneeded variable filename and filename_len. + (expand_alias): Remove prototype because functions does not + exist anymore. + + * localealias.c (read_alias_file): + Change type of fname_len parameter to int. + (xmalloc): Add prototype. + + * loadmsgcat.c: Better prototypes for xmalloc. + +Tue Aug 8 22:30:39 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Allow alias name to be constructed from the four components. + + * Makefile.in (aliaspath): New variable. Set to preliminary value. + (SOURCES): Add localealias.c. + (OBJECTS): Add localealias.o. + + * gettextP.h: Add prototype for _nl_expand_alias. + + * finddomain.c: Aliasing handled in intl/localealias.c. + + * localealias.c: Aliasing for locale names. + + * bindtextdom.c: Better prototypes for xmalloc and xstrdup. + +Mon Aug 7 23:47:42 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): gettext.perl is now found in misc/. + + * cat-compat.c (bindtextdomain): + Correct implementation. dirname parameter was not used. + Reported by Marcus Daniels. + + * gettextP.h (loaded_domain): + New fields `successor' and `decided' for oo, lazy + message handling implementation. + + * dcgettext.c: + Adopt for oo, lazy message handliing. + Now we can inherit translations from less specific locales. + (find_msg): New function. + + * loadmsgcat.c, finddomain.c: + Complete rewrite. Implement oo, lazy message handling :-). + We now have an additional environment variable `LANGUAGE' with + a higher priority than LC_ALL for the LC_MESSAGE locale. + Here we can set a colon separated list of specifications each + of the form `language[_territory[.codeset]][@modifier]'. + +Sat Aug 5 09:55:42 1995 Ulrich Drepper + + * finddomain.c (unistd.h): + Include to get _PC_PATH_MAX defined on system having it. + +Fri Aug 4 22:42:00 1995 Ulrich Drepper + + * finddomain.c (stpcpy): Include prototype. + + * Makefile.in (dist): Remove `copying instead' message. + +Wed Aug 2 18:52:03 1995 Ulrich Drepper + + * Makefile.in (ID, TAGS): Do not use $^. + +Tue Aug 1 20:07:11 1995 Ulrich Drepper + + * Makefile.in (TAGS, ID): Use $^ as command argument. + (TAGS): Give etags -o option t write to current directory, + not $(srcdir). + (ID): Use $(srcdir) instead os $(top_srcdir)/src. + (distclean): Remove ID. + +Sun Jul 30 11:51:46 1995 Ulrich Drepper + + * Makefile.in (gnulocaledir): + New variable, always using share/ for data directory. + (DEFS): Add GNULOCALEDIR, used in finddomain.c. + + * finddomain.c (_nl_default_dirname): + Set to GNULOCALEDIR, because it always has to point + to the directory where GNU gettext Library writes it to. + + * intl-compat.c (textdomain, bindtextdomain): + Undefine macros before function definition. + +Sat Jul 22 01:10:02 1995 Ulrich Drepper + + * libgettext.h (_LIBINTL_H): + Protect definition in case where this file is included as + libgettext.h on Solaris machines. Add comment about this. + +Wed Jul 19 02:36:42 1995 Ulrich Drepper + + * intl-compat.c (textdomain): Correct typo. + +Wed Jul 19 01:51:35 1995 Ulrich Drepper + + * dcgettext.c (dcgettext): Function now called __dcgettext. + + * dgettext.c (dgettext): Now called __dgettext and calls + __dcgettext. + + * gettext.c (gettext): + Function now called __gettext and calls __dgettext. + + * textdomain.c (textdomain): Function now called __textdomain. + + * bindtextdom.c (bindtextdomain): Function now called + __bindtextdomain. + + * intl-compat.c: Initial revision. + + * Makefile.in (SOURCES): Add intl-compat.c. + (OBJECTS): We always compile the GNU gettext library functions. + OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, + and intl-compat.o. + (GETTOBJS): Contains now only intl-compat.o. + + * libgettext.h: + Re-include protection matches dualistic character of libgettext.h. + For all functions in GNU gettext library define __ counter part. + + * finddomain.c (strchr): Define as index if not found in C library. + (_nl_find_domain): For relative paths paste / in between. + +Tue Jul 18 16:37:45 1995 Ulrich Drepper + + * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. + + * xopen-msg.sed: Fix bug with `msgstr ""' lines. + A little bit better comments. + +Tue Jul 18 01:18:27 1995 Ulrich Drepper + + * Makefile.in: + po-mode.el, makelinks, combine-sh are now found in ../misc. + + * po-mode.el, makelinks, combine-sh, elisp-comp: + Moved to ../misc/. + + * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. + +Sun Jul 16 22:33:02 1995 Ulrich Drepper + + * Makefile.in (INSTALL, INSTALL_DATA): New variables. + (install-data, uninstall): Install/uninstall .elc file. + + * po-mode.el (Installation comment): + Add .pox as possible extension of .po files. + +Sun Jul 16 13:23:27 1995 Ulrich Drepper + + * elisp-comp: Complete new version by Franc,ois: This does not + fail when not compiling in the source directory. + +Sun Jul 16 00:12:17 1995 Ulrich Drepper + + * Makefile.in (../po/cat-id-tbl.o): + Use $(MAKE) instead of make for recursive make. + + * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. + (install-exec): Add missing dummy goal. + (install-data, uninstall): @ in multi-line shell command at + beginning, not in front of echo. Reported by Eric Backus. + +Sat Jul 15 00:21:28 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): + Rename libgettext.perl to gettext.perl to fit in 14 chars + file systems. + + * gettext.perl: + Rename to gettext.perl to fit in 14 chars file systems. + +Thu Jul 13 23:17:20 1995 Ulrich Drepper + + * cat-compat.c: If !STDC_HEADERS try to include malloc.h. + +Thu Jul 13 20:55:02 1995 Ulrich Drepper + + * po2tbl.sed.in: Pretty printing. + + * linux-msg.sed, xopen-msg.sed: + Correct bugs with handling substitute flags in branches. + + * hash-string.h (hash_string): + Old K&R compilers don't under stand `unsigned char'. + + * gettext.h (nls_uint32): + Some old K&R compilers (eg HP) don't understand `unsigned int'. + + * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. + +Thu Jul 13 01:34:33 1995 Ulrich Drepper + + * Makefile.in (ELCFILES): New variable. + (DISTFILES): Add elisp-comp. + Add implicit rule for .el -> .elc compilation. + (install-data): install $ELCFILES + (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. + + * elisp-comp: Initial revision + +Wed Jul 12 16:14:52 1995 Ulrich Drepper + + * Makefile.in: + cat-id-tbl.c is now found in po/. This enables us to use an identical + intl/ directory in all packages. + + * dcgettext.c (dcgettext): hashing does not work for table size <= 2. + + * textdomain.c: fix typo (#if def -> #if defined) + +Tue Jul 11 18:44:43 1995 Ulrich Drepper + + * Makefile.in (stamp-cat-id): use top_srcdir to address source files + (DISTFILES,distclean): move tupdate.perl to src/ + + * po-to-tbl.sed.in: + add additional jump to clear change flag to recognize multiline strings + +Tue Jul 11 01:32:50 1995 Ulrich Drepper + + * textdomain.c: Protect inclusion of stdlib.h and string.h. + + * loadmsgcat.c: Protect inclusion of stdlib.h. + + * libgettext.h: Protect inclusion of locale.h. + Allow use in C++ programs. + Define NULL is not happened already. + + * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of + po-to-tbl.sed. + (distclean): remove po-to-tbl.sed and tupdate.perl. + + * tupdate.perl.in: Substitute Perl path even in exec line. + Don't include entries without translation from old .po file. + +Tue Jul 4 00:41:51 1995 Ulrich Drepper + + * tupdate.perl.in: use "Updated: " in msgid "". + + * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). + Define getenv if !__STDC__. + + * bindtextdom.c: Protect stdlib.h and string.h inclusion. + Define free if !__STDC__. + + * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + Define free if !__STDC__. + + * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + +Mon Jul 3 23:56:30 1995 Ulrich Drepper + + * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. + Remove unneeded $(srcdir) from Makefile.in dependency. + + * makelinks: Add copyright and short description. + + * po-mode.el: Last version for 0.7. + + * tupdate.perl.in: Fix die message. + + * dcgettext.c: Protect include of string.h. + + * gettext.c: Protect include of stdlib.h and further tries to get NULL. + + * finddomain.c: Some corrections in includes. + + * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. + + * po-to-tbl.sed: Adopt for new .po file format. + + * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. + +Sun Jul 2 23:55:03 1995 Ulrich Drepper + + * tupdate.perl.in: Complete rewrite for new .po file format. + +Sun Jul 2 02:06:50 1995 Ulrich Drepper + + * First official release. This directory contains all the code + needed to internationalize own packages. It provides functions + which allow to use the X/Open catgets function with an interface + like the Uniforum gettext function. For system which does not + have neither of those a complete implementation is provided. diff --git a/intl/Makefile.in b/intl/Makefile.in new file mode 100644 index 00000000..4bdb186d --- /dev/null +++ b/intl/Makefile.in @@ -0,0 +1,214 @@ +# Makefile for directory with message catalog handling in GNU NLS Utilities. +# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = .. +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +transform = @program_transform_name@ +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = @datadir@/gettext/intl +aliaspath = $(localedir):. +subdir = intl + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ + +l = @l@ + +AR = ar +CC = @CC@ +LIBTOOL = @LIBTOOL@ +RANLIB = @RANLIB@ + +DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ +-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +HEADERS = $(COMHDRS) libgettext.h loadinfo.h +COMHDRS = gettext.h gettextP.h hash-string.h +SOURCES = $(COMSRCS) intl-compat.c cat-compat.c +COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ +finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ +explodename.c +OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ +finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ +explodename.$lo +CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo +GETTOBJS = intl-compat.$lo +DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ +xopen-msg.sed $(HEADERS) $(SOURCES) +DISTFILES.normal = VERSION +DISTFILES.gettext = libintl.glibc intlh.inst.in + +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(COMPILE) $< +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) $< + +INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib + +all: all-@USE_INCLUDED_LIBINTL@ + +all-yes: libintl.$la intlh.inst +all-no: + +libintl.a: $(OBJECTS) + rm -f $@ + $(AR) cru $@ $(OBJECTS) + $(RANLIB) $@ + +libintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ + -version-info 1:0 -rpath $(libdir) + +../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot + cd ../po && $(MAKE) cat-id-tbl.$lo + +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 gettext() function in its C library or in a +# separate library or use the catgets interface. A special case is +# where configure found a previously installed GNU gettext 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 \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(libdir) $(includedir); \ + else \ + $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ + fi; \ + $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ + $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ + else \ + : ; \ + fi +install-data: all + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + rm -f $(gettextsrcdir)/$$file; \ + done + +info dvi: + +$(OBJECTS): ../config.h libgettext.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 *.o *.lo core core.* + +clean: mostlyclean + +distclean: clean + rm -f Makefile ID TAGS po2msg.sed po2tbl.sed + +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 $(DISTFILES) + if test "$(PACKAGE)" = gettext; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + for file in $(DISTFILES.common) $$additional; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +dist-libc: + tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc + +Makefile: Makefile.in ../config.status + cd .. \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# The dependency for intlh.inst is different in gettext and all other +# packages. Because we cannot you GNU make features we have to solve +# the problem while rewriting Makefile.in. +@GT_YES@intlh.inst: intlh.inst.in ../config.status +@GT_YES@ cd .. \ +@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ +@GT_YES@ $(SHELL) ./config.status +@GT_NO@.PHONY: intlh.inst +@GT_NO@intlh.inst: + +# 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: diff --git a/intl/VERSION b/intl/VERSION new file mode 100644 index 00000000..ee66b061 --- /dev/null +++ b/intl/VERSION @@ -0,0 +1 @@ +GNU gettext library from gettext-0.10.35 diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c new file mode 100644 index 00000000..d9c3f349 --- /dev/null +++ b/intl/bindtextdom.c @@ -0,0 +1,203 @@ +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "gettext.h" +#include "gettextP.h" + +/* @@ 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; + + +/* 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 +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define BINDTEXTDOMAIN bindtextdomain__ +#endif + +/* 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; +{ + struct binding *binding; + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0') + return NULL; + + 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 (dirname == NULL) + /* The current binding has be to returned. */ + return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; + + if (binding != NULL) + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + if (strcmp (dirname, binding->dirname) != 0) + { + char *new_dirname; + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_dirname = strdup (dirname); + if (new_dirname == NULL) + return NULL; +#else + size_t len = strlen (dirname) + 1; + new_dirname = (char *) malloc (len); + if (new_dirname == NULL) + return NULL; + + memcpy (new_dirname, dirname, len); +#endif + } + + if (binding->dirname != _nl_default_dirname) + free (binding->dirname); + + binding->dirname = new_dirname; + } + } + else + { + /* We have to create a new binding. */ +#if !defined _LIBC && !defined HAVE_STRDUP + size_t len; +#endif + struct binding *new_binding = + (struct binding *) malloc (sizeof (*new_binding)); + + if (new_binding == NULL) + return NULL; + +#if defined _LIBC || defined HAVE_STRDUP + new_binding->domainname = strdup (domainname); + if (new_binding->domainname == NULL) + return NULL; +#else + len = strlen (domainname) + 1; + new_binding->domainname = (char *) malloc (len); + if (new_binding->domainname == NULL) + return NULL; + memcpy (new_binding->domainname, domainname, len); +#endif + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_binding->dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_binding->dirname = strdup (dirname); + if (new_binding->dirname == NULL) + return NULL; +#else + len = strlen (dirname) + 1; + new_binding->dirname = (char *) malloc (len); + if (new_binding->dirname == NULL) + return NULL; + memcpy (new_binding->dirname, dirname, len); +#endif + } + + /* 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; + } + + binding = new_binding; + } + + return binding->dirname; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +#endif diff --git a/intl/cat-compat.c b/intl/cat-compat.c new file mode 100644 index 00000000..867d901b --- /dev/null +++ b/intl/cat-compat.c @@ -0,0 +1,262 @@ +/* Compatibility code for gettext-using-catgets interface. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef STDC_HEADERS +# include +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# endif +#endif + +#ifdef HAVE_NL_TYPES_H +# include +#endif + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* The catalog descriptor. */ +static nl_catd catalog = (nl_catd) -1; + +/* Name of the default catalog. */ +static const char default_catalog_name[] = "messages"; + +/* Name of currently used catalog. */ +static const char *catalog_name = default_catalog_name; + +/* Get ID for given string. If not found return -1. */ +static int msg_to_cat_id PARAMS ((const char *msg)); + +/* Substitution for systems lacking this function in their C library. */ +#if !_LIBC && !HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +#endif + + +/* Set currently used domain/catalog. */ +char * +textdomain (domainname) + const char *domainname; +{ + nl_catd new_catalog; + char *new_name; + size_t new_name_len; + char *lang; + +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ + && defined HAVE_LOCALE_NULL + lang = setlocale (LC_MESSAGES, NULL); +#else + lang = getenv ("LC_ALL"); + if (lang == NULL || lang[0] == '\0') + { + lang = getenv ("LC_MESSAGES"); + if (lang == NULL || lang[0] == '\0') + lang = getenv ("LANG"); + } +#endif + if (lang == NULL || lang[0] == '\0') + lang = "C"; + + /* See whether name of currently used domain is asked. */ + if (domainname == NULL) + return (char *) catalog_name; + + if (domainname[0] == '\0') + domainname = default_catalog_name; + + /* Compute length of added path element. */ + new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) + + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 + + sizeof (".cat"); + + new_name = (char *) malloc (new_name_len); + if (new_name == NULL) + return NULL; + + strcpy (new_name, PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + /* NLSPATH search didn't work, try absolute path */ + sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, + PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + free (new_name); + return (char *) catalog_name; + } + } + + /* Close old catalog. */ + if (catalog != (nl_catd) -1) + catclose (catalog); + if (catalog_name != default_catalog_name) + free ((char *) catalog_name); + + catalog = new_catalog; + catalog_name = new_name; + + return (char *) catalog_name; +} + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ +#if HAVE_SETENV || HAVE_PUTENV + char *old_val, *new_val, *cp; + size_t new_val_len; + + /* This does not make much sense here but to be compatible do it. */ + if (domainname == NULL) + return NULL; + + /* Compute length of added path element. If we use setenv we don't need + the first byts for NLSPATH=, but why complicate the code for this + peanuts. */ + new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + + old_val = getenv ("NLSPATH"); + if (old_val == NULL || old_val[0] == '\0') + { + old_val = NULL; + new_val_len += 1 + sizeof (LOCALEDIR) - 1 + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + } + else + new_val_len += strlen (old_val); + + new_val = (char *) malloc (new_val_len); + if (new_val == NULL) + return NULL; + +# if HAVE_SETENV + cp = new_val; +# else + cp = stpcpy (new_val, "NLSPATH="); +# endif + + cp = stpcpy (cp, dirname); + cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); + + if (old_val == NULL) + { +# if __STDC__ + stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); +# else + + cp = stpcpy (cp, LOCALEDIR); + stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); +# endif + } + else + stpcpy (cp, old_val); + +# if HAVE_SETENV + setenv ("NLSPATH", new_val, 1); + free (new_val); +# else + putenv (new_val); + /* Do *not* free the environment entry we just entered. It is used + from now on. */ +# endif + +#endif + + return (char *) domainname; +} + +#undef gettext +char * +gettext (msg) + const char *msg; +{ + int msgid; + + if (msg == NULL || catalog == (nl_catd) -1) + return (char *) msg; + + /* Get the message from the catalog. We always use set number 1. + The message ID is computed by the function `msg_to_cat_id' + which works on the table generated by `po-to-tbl'. */ + msgid = msg_to_cat_id (msg); + if (msgid == -1) + return (char *) msg; + + return catgets (catalog, 1, msgid, (char *) msg); +} + +/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries + for the one equal to msg. If it is found return the ID. In case when + the string is not found return -1. */ +static int +msg_to_cat_id (msg) + const char *msg; +{ + int cnt; + + for (cnt = 0; cnt < _msg_tbl_length; ++cnt) + if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) + return _msg_tbl[cnt]._msg_number; + + return -1; +} + + +/* @@ 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 diff --git a/intl/dcgettext.c b/intl/dcgettext.c new file mode 100644 index 00000000..0f7bb486 --- /dev/null +++ b/intl/dcgettext.c @@ -0,0 +1,655 @@ +/* Implementation of the dcgettext(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#if defined __GNUC__ && !defined C_ALLOCA +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if (defined HAVE_ALLOCA_H || defined _LIBC) && !defined C_ALLOCA +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "hash-string.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 getcwd __getcwd +# ifndef stpcpy +# define stpcpy __stpcpy +# endif +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) +# include +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +# include +#endif + +#if !defined(PATH_MAX) && defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +const char _nl_default_dirname[] = GNULOCALEDIR; + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, + const char *msgid)) internal_function; +static const char *category_to_name PARAMS ((int category)) internal_function; +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)) + internal_function; + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +/* 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 +#else +# define DCGETTEXT dcgettext__ +#endif + +/* Checking whether the binaries runs SUID must be done and glibc provides + easier methods therefore we make a difference here. */ +#ifdef _LIBC +# define ENABLE_SECURE __libc_enable_secure +# define DETERMINE_SECURE +#else +static int enable_secure; +# define ENABLE_SECURE (enable_secure == 1) +# define DETERMINE_SECURE \ + if (enable_secure == 0) \ + { \ + if (getuid () != geteuid () || getgid () != getegid ()) \ + enable_secure = 1; \ + else \ + enable_secure = -1; \ + } +#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; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + int saved_errno = errno; + + /* If no real MSGID is given return NULL. */ + if (msgid == NULL) + return NULL; + + /* See whether this is a SUID binary or not. */ + DETERMINE_SECURE; + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + definition left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* First find matching binding. */ + 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) + dirname = (char *) _nl_default_dirname; + else if (binding->dirname[0] == '/') + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned int) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) + { + path_max += PATH_INCR; + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + __set_errno (0); + } + + if (ret == NULL) + { + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + xdomainname = (char *) alloca (strlen (categoryname) + + strlen (domainname) + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for the translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') + *cp++ = *categoryvalue++; + *cp = '\0'; + + /* When this is a SUID binary we must not allow accessing files + outside the dedicated directories. */ + if (ENABLE_SECURE + && (memchr (single_locale, '/', + _nl_find_language (single_locale) - single_locale) + != NULL)) + /* Ingore this entry. */ + continue; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname); + + if (domain != NULL) + { + retval = find_msg (domain, msgid); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = find_msg (domain->successor[cnt], msgid); + + if (retval != NULL) + break; + } + } + + if (retval != NULL) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return retval; + } + } + } + /* NOTREACHED */ +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcgettext, dcgettext); +#endif + + +static char * +internal_function +find_msg (domain_file, msgid) + struct loaded_l10nfile *domain_file; + const char *msgid; +{ + size_t act = 0; + size_t top, bottom; + struct loaded_domain *domain; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) == 0) + return (char *) domain->data + W (domain->must_swap, + domain->trans_tab[nstr - 1].offset); + + while (1) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = W (domain->must_swap, domain->hash_tab[idx]); + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) + == 0) + return (char *) domain->data + + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted + array of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + break; + } + + /* If an translation is found return this. */ + return bottom >= top ? NULL : (char *) domain->data + + W (domain->must_swap, + domain->trans_tab[act].offset); +} + + +/* Return string representation of locale CATEGORY. */ +static const char * +internal_function +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} + +/* Guess value of current locale from value of the environment variables. */ +static const char * +internal_function +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. This is a GNU extension. */ + retval = getenv ("LANGUAGE"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* `LANGUAGE' is not set. So we have to proceed with the POSIX + methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some + systems this can be done by the `setlocale' function itself. */ +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + return setlocale (category, NULL); +#else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* We use C as the default domain. POSIX says this is implementation + defined. */ + return "C"; +#endif +} + +/* @@ 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 + + +#ifdef _LIBC +/* If we want to free all resources we have to do some work at + program's end. */ +static void __attribute__ ((unused)) +free_mem (void) +{ + struct binding *runp; + + for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) + { + free (runp->domainname); + if (runp->dirname != _nl_default_dirname) + /* Yes, this is a pointer comparison. */ + free (runp->dirname); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/intl/dgettext.c b/intl/dgettext.c new file mode 100644 index 00000000..0510c2b0 --- /dev/null +++ b/intl/dgettext.c @@ -0,0 +1,59 @@ +/* Implementation of the dgettext(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined HAVE_LOCALE_H || defined _LIBC +# include +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.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 diff --git a/intl/explodename.c b/intl/explodename.c new file mode 100644 index 00000000..7f480973 --- /dev/null +++ b/intl/explodename.c @@ -0,0 +1,198 @@ +/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +#endif +#include + +#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; +} diff --git a/intl/finddomain.c b/intl/finddomain.c new file mode 100644 index 00000000..81ea29bf --- /dev/null +++ b/intl/finddomain.c @@ -0,0 +1,216 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.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) + const char *dirname; + char *locale; + const char *domainname; +{ + 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); + + 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]); + + 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); + 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]); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + 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 (here); + } +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/intl/gettext.c b/intl/gettext.c new file mode 100644 index 00000000..d929f98d --- /dev/null +++ b/intl/gettext.c @@ -0,0 +1,70 @@ +/* Implementation of gettext(3) function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef _LIBC +# define __need_NULL +# include +#else +# ifdef STDC_HEADERS +# include /* Just for NULL. */ +# else +# ifdef HAVE_STRING_H +# include +# else +# define NULL ((void *) 0) +# endif +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.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 DGETTEXT __dgettext +#else +# define GETTEXT gettext__ +# define DGETTEXT dgettext__ +#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 DGETTEXT (NULL, msgid); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff --git a/intl/gettext.h b/intl/gettext.h new file mode 100644 index 00000000..3cd23d7d --- /dev/null +++ b/intl/gettext.h @@ -0,0 +1,105 @@ +/* Internal header for GNU gettext internationalization functions. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include + +#if HAVE_LIMITS_H || _LIBC +# include +#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 + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#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 ) 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 */ diff --git a/intl/gettextP.h b/intl/gettextP.h new file mode 100644 index 00000000..00c52031 --- /dev/null +++ b/intl/gettextP.h @@ -0,0 +1,89 @@ +/* Header describing internals of gettext library + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include "loadinfo.h" + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include +# define SWAP(i) bswap_32 (i) +#else +static nls_uint32 SWAP PARAMS ((nls_uint32 i)); + +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +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; +}; + +struct binding +{ + struct binding *next; + char *domainname; + char *dirname; +}; + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname)) + internal_function; +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) + internal_function; +void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) + internal_function; + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/intl/hash-string.h b/intl/hash-string.h new file mode 100644 index 00000000..939e9582 --- /dev/null +++ b/intl/hash-string.h @@ -0,0 +1,59 @@ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* @@ 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; +} diff --git a/intl/intl-compat.c b/intl/intl-compat.c new file mode 100644 index 00000000..503efa0f --- /dev/null +++ b/intl/intl-compat.c @@ -0,0 +1,76 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995 Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef textdomain +#undef bindtextdomain + + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return bindtextdomain__ (domainname, dirname); +} + + +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return dcgettext__ (domainname, msgid, category); +} + + +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return dgettext__ (domainname, msgid); +} + + +char * +gettext (msgid) + const char *msgid; +{ + return gettext__ (msgid); +} + + +char * +textdomain (domainname) + const char *domainname; +{ + return textdomain__ (domainname); +} diff --git a/intl/l10nflist.c b/intl/l10nflist.c new file mode 100644 index 00000000..30f5f645 --- /dev/null +++ b/intl/l10nflist.c @@ -0,0 +1,411 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined _LIBC || defined HAVE_ARGZ_H +# include +#endif +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#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, ':'); + 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. */ +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 diff --git a/intl/libgettext.h b/intl/libgettext.h new file mode 100644 index 00000000..3a92960a --- /dev/null +++ b/intl/libgettext.h @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Because on some systems (e.g. Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H +#ifndef _LIBINTL_H +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include + +#if HAVE_LOCALE_H +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* 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)); +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)); +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)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, 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)); +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)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/intl/linux-msg.sed b/intl/linux-msg.sed new file mode 100644 index 00000000..5918e720 --- /dev/null +++ b/intl/linux-msg.sed @@ -0,0 +1,100 @@ +# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# Mitch's old catalog format does not allow comments. +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { + s/msgid[ ]*"// +# +# This does not work now with the new format. +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/# \1/ +# Clear substitution flag. + tb +# Append the next line. + :b + N +# Look whether second part is continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that D includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/intl/loadinfo.h b/intl/loadinfo.h new file mode 100644 index 00000000..1c4524ab --- /dev/null +++ b/intl/loadinfo.h @@ -0,0 +1,78 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#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]; +}; + + +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)); + +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)); diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c new file mode 100644 index 00000000..2c6a5650 --- /dev/null +++ b/intl/loadmsgcat.c @@ -0,0 +1,220 @@ +/* Load needed message catalogs. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || (defined _LIBC && defined _POSIX_MAPPED_FILES) +# include +# undef HAVE_MMAP +# define HAVE_MMAP 1 +#else +# undef HAVE_MMAP +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ 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 + +/* 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 = 0; + + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +internal_function +_nl_load_domain (domain_file) + struct loaded_l10nfile *domain_file; +{ + int fd; + size_t size; + struct stat st; + struct mo_file_header *data = (struct mo_file_header *) -1; + int use_mmap = 0; + struct loaded_domain *domain; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* 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); + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if (fstat (fd, &st) != 0 + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + /* 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 (data != (struct mo_file_header *) -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 == -1) + { + 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 (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) + { + /* 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_file->data + = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain_file->data == NULL) + return; + + domain = (struct loaded_domain *) domain_file->data; + 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; + } + + /* Show that one domain is changed. This might make some cached + translations invalid. */ + ++_nl_msg_cat_cntr; +} + + +#ifdef _LIBC +void +internal_function +_nl_unload_domain (domain) + struct loaded_domain *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 diff --git a/intl/localealias.c b/intl/localealias.c new file mode 100644 index 00000000..861020dd --- /dev/null +++ b/intl/localealias.c @@ -0,0 +1,438 @@ +/* Handle aliases for locale names. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#include "gettext.h" +#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 + +__libc_lock_define_initialized (static, lock); +#endif + +#ifndef internal_function +# define internal_function +#endif + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + +#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 = NULL; +static size_t string_space_act = 0; +static size_t string_space_max = 0; +static struct alias_map *map; +static size_t nmap = 0; +static size_t maxmap = 0; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; +static void 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] == ':') + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') + ++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; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + ADD_BLOCK (block_list, full_fname); +#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"); + if (fp == NULL) + { + FREE_BLOCKS (block_list); + 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) + extend_alias_table (); + + 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) + { + FREE_BLOCKS (block_list); + return added; + } + 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); + + FREE_BLOCKS (block_list); + return added; +} + + +static void +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; + + map = new_map; + maxmap = new_size; +} + + +#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 +} diff --git a/intl/po2tbl.sed.in b/intl/po2tbl.sed.in new file mode 100644 index 00000000..b3bcca4d --- /dev/null +++ b/intl/po2tbl.sed.in @@ -0,0 +1,102 @@ +# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +1 { + i\ +/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ +\ +#if HAVE_CONFIG_H\ +# include \ +#endif\ +\ +#include "libgettext.h"\ +\ +const struct _msg_ent _msg_tbl[] = { + h + s/.*/0/ + x +} +# +# Write msgid entries in C array form. +# +/^msgid/ { + s/msgid[ ]*\(".*"\)/ {\1/ + tb +# Append the next line + :b + N +# Look whether second part is continuation line. + s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ +# Yes, then branch. + ta +# Because we assume that the input file correctly formed the line +# just read cannot be again be a msgid line. So it's safe to ignore +# it. + s/\(.*\)\n.*/\1/ + bc +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ +# Some buggy seds do not clear the `successful substitution since last ``t''' +# flag on `N', so we do a `t' here to clear it. + tb +# Not reached + :c + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)\n\([0-9]*\)/\1, \2},/ + s/\(.*\)"$/\1/ + p +} +# +# Last line. +# +$ { + i\ +};\ + + g + s/0*\(.*\)/int _msg_tbl_length = \1;/p +} +d diff --git a/intl/textdomain.c b/intl/textdomain.c new file mode 100644 index 00000000..88557460 --- /dev/null +++ b/intl/textdomain.c @@ -0,0 +1,108 @@ +/* Implementation of the textdomain(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#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 + +/* 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 *old; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + old = (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; + 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 + _nl_current_default_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + char *cp = (char *) malloc (len); + if (cp != NULL) + memcpy (cp, domainname, len); + _nl_current_default_domain = cp; +#endif + } + + if (old != _nl_default_default_domain) + free (old); + + return (char *) _nl_current_default_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff --git a/intl/xopen-msg.sed b/intl/xopen-msg.sed new file mode 100644 index 00000000..b19c0bbd --- /dev/null +++ b/intl/xopen-msg.sed @@ -0,0 +1,104 @@ +# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# We copy all comments into the .msg file. Perhaps they can help. +# +/^#/ s/^#[ ]*/$ /p +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { +# Does not work now +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ + p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/\1/ + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x +# Bring the line in the format ` ' + G + s/^[^\n]*$/& / + s/\(.*\)\n\([0-9]*\)/\2 \1/ +# Clear flag from last substitution. + tb +# Append the next line. + :b + N +# Look whether second part is a continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that `D' includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use the sed command `D' here + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/missing b/missing new file mode 100755 index 00000000..7789652e --- /dev/null +++ b/missing @@ -0,0 +1,190 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 00000000..6b3b5fc5 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id$ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/nano.1 b/nano.1 new file mode 100644 index 00000000..d5801d11 --- /dev/null +++ b/nano.1 @@ -0,0 +1,97 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH NANO 1 "January 4, 2000" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +nano \- Nano's ANOther editor, an enhanced free Pico Clone +.SH SYNOPSIS +.B nano +.RI [options]\ [+LINE] " file" +.br +.SH DESCRIPTION +This manual page documents briefly the +.B nano +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBnano\fP was originally known as TIP (TIP Isn't Pico). It 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". +.SH OPTIONS +.TP +.B \-V (\-\-version) +Show the current version number and author. +.TP +.B \-h (\-\-help) +Display a summary of commandline options. +.TP +.B \-c (\-\-const) +Constantly show the cursor position. +.TP +.B \-i (\-\-autoindent) +Indent new lines to the previous line's indentation. Useful when editing +source code. +.TP +.B \-l (\-\-nofollow) +If the file being edited is a symbolic link, replace the link with a +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 \-p (\-\-pico) +Display the same shortcut lists as Pico does. +.TP +.B \-s (\-\-speller) +Enable alternative spell checker command. +.TP +.B \-t (\-\-tempfile) +Always save changed buffer without prompting. Same as Pico -t option. +.TP +.B \-v (\-\-view) +View file (read only) mode. +.TP +.B \-w (\-\-nowrap) +Disable wrapping of long lines. +.TP +.B \-x (\-\-nohelp) +Disable help screen at bottom of editor. +.TP +.B \-z (\-\-suspend) +Enable suspend ability. +.TP +.B \+LINE +Places cursor at LINE on startup. +.SH BUGS +Please send any comments or bug reports to +.B nano@asty.org. +The nano mailing list is available from +.B nano-devel@lists.sourceforge.net. +To subscribe, email to nano-devel-request@lists.sourceforge.net with a +subject of "subscribe". +.SH HOMEPAGE +http://www.asty.org/nano +.SH AUTHOR +Chris Allegretta , et al. This manual page was +originally written by Jordi Mallach , for the Debian +GNU/Linux system (but may be used by others). diff --git a/nano.1.html b/nano.1.html new file mode 100644 index 00000000..d0be08b6 --- /dev/null +++ b/nano.1.html @@ -0,0 +1,158 @@ +Content-type: text/html + +Manpage of NANO + +

NANO

+Section: User Commands (1)
Updated: January 4, 2000
Index +Return to Main Contents
+ + + + + + + + + + + + + +  +

NAME

+ +nano - Nano's ANOther editor, an enhanced free Pico Clone +  +

SYNOPSIS

+ +nano + +[options] [+LINE] file + +
+ +  +

DESCRIPTION

+ +This manual page documents briefly the +nano + +command. +

+ + + + +nano was originally known as TIP (TIP Isn't Pico). It 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, +nano + +also implements some missing (or disabled by +default) features in Pico, such as "search and replace" and "goto line +number". +  +

OPTIONS

+ +
+
-V (--version) + +
+Show the current version number and author. +
-h (--help) + +
+Display a summary of commandline options. +
-c (--const) + +
+Constantly show the cursor position. +
-i (--autoindent) + +
+Indent new lines to the previous line's indentation. Useful when editing +source code. +
-l (--nofollow) + +
+If the file being edited is a symbolic link, replace the link with a +a new file, do not follow it. Good for editing files in /tmp perhaps? +
-m (--mouse) + +
+Enable mouse support (if available for your system). +
-p (--pico) + +
+Display the same shortcut lists as Pico does. +
-s (--speller) + +
+Enable alternative spell checker command. +
-t (--tempfile) + +
+Always save changed buffer without prompting. Same as Pico -t option. +
-v (--view) + +
+View file (read only) mode. +
-w (--nowrap) + +
+Disable wrapping of long lines. +
-x (--nohelp) + +
+Disable help screen at bottom of editor. +
-z (--suspend) + +
+Enable suspend ability. +
+LINE + +
+Places cursor at LINE on startup. +
+  +

BUGS

+ +Please send any comments or bug reports to +nano@asty.org. + +The nano mailing list is available from +nano-devel@lists.sourceforge.net. + +To subscribe, email to nano-devel-request@lists.sourceforge.net with a +subject of "subscribe". +  +

HOMEPAGE

+ +http://www.asty.org/nano +  +

AUTHOR

+ +Chris Allegretta <chrisa@asty.org>, et al. This manual page was +originally written by Jordi Mallach <jordi@sindominio.net>, for the Debian +GNU/Linux system (but may be used by others). +

+ +


+ 

Index

+
+
NAME
+
SYNOPSIS
+
DESCRIPTION
+
OPTIONS
+
BUGS
+
HOMEPAGE
+
AUTHOR
+
+
+This document was created by +man2html, +using the manual pages.
+Time: 23:18:59 GMT, June 04, 2000 + + diff --git a/nano.c b/nano.c new file mode 100644 index 00000000..799ac299 --- /dev/null +++ b/nano.c @@ -0,0 +1,2640 @@ +/************************************************************************** + * nano.c * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" +#include "proto.h" +#include "nano.h" + +#ifndef NANO_SMALL +#include +#define _(string) gettext(string) +#else +#define _(string) (string) +#endif + +#ifdef HAVE_TERMIOS_H +#include +#endif + +#ifdef HAVE_TERMIO_H +#include +#endif + +#ifdef HAVE_GETOPT_H +#include +#endif + +/* Former globals, now static */ +char *last_search; /* Last string we searched for */ +char *last_replace; /* Last replacement string */ +int temp_opt = 0; /* Editing temp file (pico -t option) */ +int fill = 0; /* Fill - where to wrap lines, basically */ +static char *alt_speller; /* Alternative spell command */ +static int editwineob = 0; /* Last Line in edit buffer + (0 - editwineob) */ +struct termios oldterm; /* The user's original term settings */ +static char *alt_speller; /* Alternative spell command */ +static char *help_text_init = ""; + /* Initial message, not including shortcuts */ + +/* What we do when we're all set to exit */ +RETSIGTYPE finish(int sigage) +{ + if (!ISSET(NO_HELP)) { + mvwaddstr(bottomwin, 1, 0, hblank); + mvwaddstr(bottomwin, 2, 0, hblank); + } + else + mvwaddstr(bottomwin, 0, 0, hblank); + + wrefresh(bottomwin); + endwin(); + + /* Restore the old term settings */ + tcsetattr (0, TCSANOW, &oldterm); + + exit(sigage); +} + +/* Die (gracefully?) */ +void die(char *msg, ...) +{ + va_list ap; + + va_start(ap, msg); + vfprintf(stderr, msg, ap); + va_end(ap); + + /* if we can't save we have REAL bad problems, + * but we might as well TRY. FIXME: This should probabally base it + * off of the current filename */ + write_file("nano.save", 0); + + /* Restore the old term settings */ + tcsetattr (0, TCSANOW, &oldterm); + + clear(); + refresh(); + resetty(); + endwin(); + + fprintf(stderr, msg); + fprintf(stderr, _("\nBuffer written to 'nano.save'\n")); + + exit(1); /* We have a problem: exit w/ errorlevel(1) */ +} + +/* Thanks BG, many ppl have been asking for this... */ +void *nmalloc(size_t howmuch) +{ + void *r; + + /* Panic save? */ + + if (!(r = malloc(howmuch))) + die(_("nano: malloc: out of memory!")); + + return r; +} + +void *nrealloc(void *ptr, size_t howmuch) +{ + void *r; + + if (!(r = realloc(ptr, howmuch))) + die("nano: realloc: out of memory!"); + + return r; +} + +void print_view_warning(void) +{ + statusbar(_("Key illegal in VIEW mode")); +} + +/* Initialize global variables - no better way for now */ +void global_init(void) +{ + int i; + + center_x = COLS / 2; + center_y = LINES / 2; + current_x = 0; + current_y = 0; + editwinrows = LINES - 5 + no_help(); + editwineob = editwinrows - 1; + fileage = NULL; + cutbuffer = NULL; + current = NULL; + edittop = NULL; + editbot = NULL; + totlines = 0; + placewewant = 0; + if (!fill) + fill = COLS - 8; + hblank = nmalloc(COLS + 1); + + /* Thanks BG for this bit... */ + for (i = 0; i <= COLS - 1; i++) + hblank[i] = ' '; + hblank[i] = 0; + last_search = nmalloc(132); + last_replace = nmalloc(132); + answer = nmalloc(132); + +} + +void init_help_msg(void) +{ + +#ifndef NANO_SMALL + + help_text_init = + _(" nano help text\n\n " + "The nano editor is designed to emulate the functionality and " + "ease-of-use of the UW Pico text editor. There are four main " + "sections of the editor: The top line shows the program " + "version, the current filename being edited, and whether " + "or not the file has been modified. Next is the main editor " + "window showing the file being edited. The status line is " + "the third line from the bottom and shows important messages. " + "The bottom two lines show the most commonly used shortcuts " + "in the editor.\n\n " + "The notation for shortcuts is as follows: Control-key " + "sequences are notated with a caret (^) symbol. Alt-key " + "sequences are notated with an at (@) symbol. The following " + "keystrokes are available in the main editor window. " + "Optional keys are shown in parentheses:\n\n"); +#endif + +} + +/* Make a copy of a node to a pointer (space will be malloc()ed) */ +filestruct *copy_node(filestruct * src) +{ + filestruct *dst; + + dst = nmalloc(sizeof(filestruct)); + dst->data = nmalloc(strlen(src->data) + 1); + + dst->next = src->next; + dst->prev = src->prev; + + strcpy(dst->data, src->data); + dst->lineno = src->lineno; + + return dst; +} + +/* Unlink a node from the rest of the struct */ +void unlink_node(filestruct * fileptr) +{ + if (fileptr->prev != NULL) + fileptr->prev->next = fileptr->next; + + if (fileptr->next != NULL) + fileptr->next->prev = fileptr->prev; +} + +void delete_node(filestruct * fileptr) +{ + if (fileptr->data != NULL) + free(fileptr->data); + free(fileptr); +} + +/* Okay, now let's duplicate a whole struct! */ +filestruct *copy_filestruct(filestruct * src) +{ + filestruct *dst, *tmp, *head, *prev; + + head = copy_node(src); + dst = head; /* Else we barf on copying just one line */ + head->prev = NULL; + tmp = src->next; + prev = head; + + while (tmp != NULL) { + dst = copy_node(tmp); + dst->prev = prev; + prev->next = dst; + + prev = dst; + tmp = tmp->next; + } + + dst->next = NULL; + return head; +} + +/* Free() a single node */ +int free_node(filestruct * src) +{ + if (src == NULL) + return 0; + + if (src->next != NULL) + free(src->data); + free(src); + return 1; +} + +int free_filestruct(filestruct * src) +{ + filestruct *fileptr = src; + + if (src == NULL) + return 0; + + while (fileptr->next != NULL) { + fileptr = fileptr->next; + free_node(fileptr->prev); + +#ifdef DEBUG + fprintf(stderr, _("free_node(): free'd a node, YAY!\n")); +#endif + } + free_node(fileptr); +#ifdef DEBUG + fprintf(stderr, _("free_node(): free'd last node.\n")); +#endif + + return 1; +} + +int renumber_all(void) +{ + filestruct *temp; + long i = 1; + + for (temp = fileage; temp != NULL; temp = temp->next) { + temp->lineno = i++; + } + + return 0; +} + +int renumber(filestruct * fileptr) +{ + filestruct *temp; + + if (fileptr == NULL || fileptr->prev == NULL || fileptr == fileage) { + renumber_all(); + return 0; + } + for (temp = fileptr; temp != NULL; temp = temp->next) { + temp->lineno = temp->prev->lineno + 1; + } + + return 0; +} + +/* Fix the memory allocation for a string */ +void align(char **strp) +{ + /* There was a serious bug here: the new address was never + stored anywhere... */ + + *strp = nrealloc(*strp, strlen(*strp) + 1); +} + +/* Load file into edit buffer - takes data from file struct */ +void load_file(void) +{ + current = fileage; + wmove(edit, current_y, current_x); +} + +/* What happens when there is no file to open? aiee! */ +void new_file(void) +{ + fileage = nmalloc(sizeof(filestruct)); + fileage->data = nmalloc(1); + strcpy(fileage->data, ""); + fileage->prev = NULL; + fileage->next = NULL; + fileage->lineno = 1; + filebot = fileage; + edittop = fileage; + editbot = fileage; + current = fileage; + totlines = 1; + UNSET(VIEW_MODE); +} + + +int read_byte(int fd, char *filename, char *input) +{ + static char buf[BUFSIZ]; + static int index = 0; + static int size = 0; + + if (index == size) { + index = 0; + size = read(fd, buf, BUFSIZ); + if (size == -1) { + clear(); + refresh(); + resetty(); + endwin(); + perror(filename); + } + if (!size) + return 0; + } + *input = buf[index++]; + return 1; +} + +filestruct *read_line(char *buf, filestruct * prev, int *line1ins) +{ + filestruct *fileptr; + + fileptr = nmalloc(sizeof(filestruct)); + fileptr->data = nmalloc(strlen(buf) + 2); + strcpy(fileptr->data, buf); + + if (*line1ins) { + /* Special case, insert with cursor on 1st line. */ + fileptr->prev = NULL; + fileptr->next = fileage; + fileptr->lineno = 1; + *line1ins = 0; + fileage = fileptr; + } else if (fileage == NULL) { + fileage = fileptr; + fileage->lineno = 1; + fileage->next = fileage->prev = NULL; + fileptr = filebot = fileage; + } else if (prev) { + fileptr->prev = prev; + fileptr->next = NULL; + fileptr->lineno = prev->lineno + 1; + prev->next = fileptr; + } else { + die(_("read_line: not on first line and prev is NULL")); + } + + return fileptr; +} + + +int read_file(int fd, char *filename) +{ + long size, lines = 0, linetemp = 0; + char input[2]; /* buffer */ + char *buf; + long i = 0, bufx = 128; + filestruct *fileptr = current, *tmp = NULL; + int line1ins = 0; + + buf = nmalloc(bufx); + + if (fileptr != NULL && fileptr->prev != NULL) { + fileptr = fileptr->prev; + tmp = fileptr; + } else if (fileptr != NULL && fileptr->prev == NULL) { + tmp = fileage; + current = fileage; + line1ins = 1; + } + input[1] = 0; + /* Read the entire file into file struct */ + while ((size = read_byte(fd, filename, input)) > 0) { + linetemp = 0; + if (input[0] == '\n') { + fileptr = read_line(buf, fileptr, &line1ins); + lines++; + buf[0] = 0; + i = 0; + } else { + /* Now we allocate a bigger buffer 128 characters at a time. + If we allocate a lot of space for one line, we may indeed + have to use a buffer this big later on, so we don't + decrease it at all. We do free it at the end though. */ + + if (i >= bufx - 1) { + buf = nrealloc(buf, bufx + 128); + bufx += 128; + } + buf[i] = input[0]; + buf[i + 1] = 0; + i++; + } + totsize += size; + } + + /* Did we not get a newline but still have stuff to do? */ + if (buf[0]) { + fileptr = read_line(buf, fileptr, &line1ins); + lines++; + buf[0] = 0; + } + /* Did we even GET a file? */ + if (totsize == 0) { + new_file(); + statusbar(_("Read %d lines"), lines); + return 1; + } + if (current != NULL) { + fileptr->next = current; + current->prev = fileptr; + renumber(current); + current_x = 0; + placewewant = 0; + edit_update(fileptr); + } else if (fileptr->next == NULL) { + filebot = fileptr; + load_file(); + } + statusbar(_("Read %d lines"), lines); + totlines += lines; + + free(buf); + close(fd); + + return 1; +} + +/* Open the file (and decide if it exists) */ +int open_file(char *filename, int insert, int quiet) +{ + int fd; + struct stat fileinfo; + + if (!strcmp(filename, "") || stat(filename, &fileinfo) == -1) { + if (insert) { + if (!quiet) + statusbar(_("\"%s\" not found"), filename); + return -1; + } else { + /* We have a new file */ + statusbar(_("New File")); + new_file(); + } + } else if ((fd = open(filename, O_RDONLY)) == -1) { + if (!quiet) + statusbar("%s: %s", strerror(errno), filename); + return -1; + } else { /* File is A-OK */ + if (S_ISDIR(fileinfo.st_mode)) { + statusbar(_("File \"%s\" is a directory"), filename); + new_file(); + return -1; + } + if (!quiet) + statusbar(_("Reading File")); + read_file(fd, filename); + } + + return 1; +} + +int do_insertfile(void) +{ + int i; + + wrap_reset(); + i = statusq(writefile_list, WRITEFILE_LIST_LEN, "", + _("File to insert [from ./] ")); + if (i != -1) { + +#ifdef DEBUG + fprintf(stderr, "filename is %s", answer); +#endif + + i = open_file(answer, 1, 0); + + dump_buffer(fileage); + set_modified(); + UNSET(KEEP_CUTBUFFER); + display_main_list(); + return i; + } else { + statusbar(_("Cancelled")); + UNSET(KEEP_CUTBUFFER); + display_main_list(); + return 0; + } +} + +void usage(void) +{ +#ifdef HAVE_GETOPT_LONG + printf(_("Usage: nano [GNU long option] [option] +LINE \n\n")); + printf(_("Option Long option Meaning\n")); + printf + (_ + (" -V --version Print version information and exit\n")); + printf(_ + (" -c --const Constantly show cursor position\n")); + printf(_ + (" -h --help Show this message\n")); + printf(_ + (" -i --autoindent Automatically indent new lines\n")); + printf(_ + (" -l --nofollow Don't follow symbolic links, overwrite.\n")); +#ifndef NANO_SMALL +#ifdef NCURSES_MOUSE_VERSION + printf(_(" -m --mouse Enable mouse\n")); +#endif +#endif + printf + (_ + (" -r [#cols] --fill=[#cols] Set fill cols to (wrap lines at) #cols\n")); + printf(_ + (" -p --pico Make bottom 2 lines more Pico-like\n")); + printf(_ + (" -s [prog] --speller=[prog] Enable alternate speller\n")); + printf(_ + (" -t --tempfile Auto save on exit, don't prompt\n")); + printf(_ + (" -v --view View (read only) mode\n")); + printf(_ + (" -w --nowrap Don't wrap long lines\n")); + printf(_ + (" -x --nohelp Don't show help window\n")); + printf(_ + (" -z --suspend Enable suspend\n")); + printf(_ + (" +LINE Start at line number LINE\n")); +#else + printf(_("Usage: nano [option] +LINE \n\n")); + printf(_("Option Meaning\n")); + printf(_(" -V Print version information and exit\n")); + printf(_(" -c Constantly show cursor position\n")); + printf(_(" -h Show this message\n")); + printf(_(" -i Automatically indent new lines\n")); + printf(_ + (" -l Don't follow symbolic links, overwrite.\n")); +#ifndef NANO_SMALL +#ifdef NCURSES_MOUSE_VERSION + printf(_(" -m Enable mouse\n")); +#endif +#endif + printf(_ + (" -r [#cols] Set fill cols to (wrap lines at) #cols\n")); + printf(_(" -s [prog] Enable alternate speller\n")); + printf(_(" -p Make bottom 2 lines more Pico-like\n")); + printf(_(" -t Auto save on exit, don't prompt\n")); + printf(_(" -v View (read only) mode\n")); + printf(_(" -w Don't wrap long lines\n")); + printf(_(" -x Don't show help window\n")); + printf(_(" -z Enable suspend\n")); + printf(_(" +LINE Start at line number LINE\n")); +#endif + exit(0); +} + +void version(void) +{ + printf(_(" nano version %s by Chris Allegretta (compiled %s, %s)\n"), + VERSION, __TIME__, __DATE__); + printf(_(" Email: nano@asty.org Web: http://www.asty.org/nano\n")); +} + +void page_down_center(void) +{ + if (editbot->next != NULL && editbot->next != filebot) { + edit_update(editbot->next); + center_cursor(); + } else if (editbot != filebot) { + edit_update(editbot); + center_cursor(); + } else { + while (current != filebot) + current = current->next; + edit_update(current); + } + update_cursor(); + +} + +int page_down(void) +{ + wrap_reset(); + current_x = 0; + placewewant = 0; + + if (current == filebot) + return 0; + + if (editbot != filebot) { + current_y = 0; + current = editbot; + } else + while (current != filebot) { + current = current->next; + current_y++; + } + + edit_update_top(current); + update_cursor(); + UNSET(KEEP_CUTBUFFER); + check_statblank(); + return 1; +} + +int do_home(void) +{ + current_x = 0; + placewewant = 0; + update_line(current, current_x); + return 1; +} + +int do_end(void) +{ + current_x = strlen(current->data); + placewewant = xplustabs(); + update_line(current, current_x); + + return 1; +} + +filestruct *make_new_node(filestruct * prevnode) +{ + filestruct *newnode; + + newnode = nmalloc(sizeof(filestruct)); + newnode->data = NULL; + + newnode->prev = prevnode; + newnode->next = NULL; + + if (prevnode != NULL) + newnode->lineno = prevnode->lineno + 1; + + return newnode; +} + +int do_mark() +{ +#ifdef NANO_SMALL + nano_small_msg(); +#else + if (!ISSET(MARK_ISSET)) { + statusbar(_("Mark Set")); + SET(MARK_ISSET); + mark_beginbuf = current; + mark_beginx = current_x; + } else { + statusbar(_("Mark UNset")); + UNSET(MARK_ISSET); + mark_beginbuf = NULL; + mark_beginx = 0; + + edit_refresh(); + } +#endif + return 1; +} + +int no_help(void) +{ + if ISSET + (NO_HELP) + return 2; + else + return 0; +} + +void nano_small_msg(void) +{ + statusbar("Sorry, this function not available with nano-tiny option"); +} + +/* 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 < editwineob && current != editbot) + current_y++; + else + page_down_center(); + + update_cursor(); + update_line(current->prev, 0); + update_line(current, current_x); + UNSET(KEEP_CUTBUFFER); + check_statblank(); + return 1; +} + +void page_up_center(void) +{ + if (edittop != fileage) { + edit_update(edittop); + center_cursor(); + } else + current_y = 0; + + update_cursor(); + +} + +int do_up(void) +{ + wrap_reset(); + if (current->prev != NULL) { + update_line(current, 0); + + if (placewewant > 0) + current_x = actual_x(current->prev, placewewant); + + if (current_x > strlen(current->prev->data)) + current_x = strlen(current->prev->data); + } + if (current_y > 0) + current_y--; + else + page_up_center(); + + update_cursor(); + update_line(current->next, 0); + update_line(current, current_x); + UNSET(KEEP_CUTBUFFER); + check_statblank(); + return 1; +} + +int do_right(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); + UNSET(KEEP_CUTBUFFER); + check_statblank(); + return 1; +} + +int do_left(void) +{ + if (current_x > 0) + current_x--; + else if (current != fileage) { + placewewant = 0; + current_x = strlen(current->prev->data); + do_up(); + } + placewewant = xplustabs(); + + update_cursor(); + update_line(current, current_x); + UNSET(KEEP_CUTBUFFER); + check_statblank(); + return 1; +} + +/* The user typed a printable character; add it to the edit buffer */ +void do_char(char ch) +{ + /* More dangerousness fun =) */ + current->data = nrealloc(current->data, strlen(current->data) + 2); + memmove(¤t->data[current_x + 1], + ¤t->data[current_x], + strlen(current->data) - current_x + 1); + current->data[current_x] = ch; + do_right(); + + if (!ISSET(NO_WRAP)) + check_wrap(current); + set_modified(); + check_statblank(); + UNSET(KEEP_CUTBUFFER); + totsize++; + +} + +/* Someone hits return *gasp!* */ +int do_enter(filestruct * inptr) +{ + filestruct *new; + char *tmp, *spc; + int extra = 0; + + new = make_new_node(inptr); + tmp = ¤t->data[current_x]; + current_x = 0; + + /* Do auto-indenting, like the neolithic Turbo Pascal editor */ + if (ISSET(AUTOINDENT)) { + spc = current->data; + if (spc) { + while ((*spc == ' ') || (*spc == '\t')) { + extra++; + spc++; + current_x++; + } + new->data = nmalloc(strlen(tmp) + extra + 1); + strncpy(new->data, current->data, extra); + strcpy(&new->data[extra], tmp); + } + } else { + new->data = nmalloc(strlen(tmp) + 1); + strcpy(new->data, tmp); + } + *tmp = 0; + + new->next = inptr->next; + new->prev = inptr; + inptr->next = new; + if (new->next != NULL) + new->next->prev = new; + else { + filebot = new; + editbot = new; + } + + totsize++; + renumber(current); + current = new; + align(¤t->data); + + if (current_y == editwinrows - 1) { + edit_update(current); + + /* FIXME - figure out why the hell this is needed =) */ + reset_cursor(); + } else + current_y++; + + totlines++; + set_modified(); + + update_cursor(); + edit_refresh(); + return 1; +} + +int do_enter_void(void) +{ + return do_enter(current); +} + +void do_next_word(void) +{ + filestruct *fileptr; + int i; + + if (current == NULL) + return; + + i = current_x; + for (fileptr = current; fileptr != NULL; fileptr = fileptr->next) { + if (fileptr == current) { + while (isalnum((int) fileptr->data[i]) + && fileptr->data[i] != 0) + i++; + + if (fileptr->data[i] == 0) { + i = 0; + continue; + } + } + while (!isalnum((int) fileptr->data[i]) && fileptr->data[i] != 0) + i++; + + if (fileptr->data[i] != 0) + break; + + i = 0; + } + if (fileptr == NULL) + current = filebot; + else + current = fileptr; + + current_x = i; + placewewant = xplustabs(); + if (current->lineno >= editbot->lineno) + edit_update(current); + +} + +/* Actually wrap a line, called by check_wrap() */ +void do_wrap(filestruct * inptr) +{ + int i, j, chop; + char *tmp, *foo; + + i = actual_x(inptr, fill); + + while (inptr->data[i] != ' ' && inptr->data[i] != '\t' && i != 0) + i--; + + if (i == 0) + return; + + while ((inptr->data[i] == ' ' || inptr->data[i] == '\t') && i != 0) + i--; + + if (i == 0) + return; + + /* NB: This sucks */ + if (inptr->data[i] != 0) + i++; + if (inptr->data[i] != 0) + i++; + + chop = i; + while ((inptr->data[i] == ' ' || inptr->data[i] == '\t') && + inptr->data[i] != 0) + i++; + + if (inptr->data[i] == 0) + return; + + if (ISSET(SAMELINEWRAP)) { + tmp = ¤t->data[i]; + foo = nmalloc(strlen(tmp) + strlen(current->next->data) + 1); + strcpy(foo, tmp); + strcpy(&foo[strlen(tmp)], current->next->data); + free(current->next->data); + current->next->data = foo; + *tmp = 0; + current->data[chop] = 0; + align(¤t->data); + + if (current_x >= i) { + current_x = current_x - i; + current = current->next; + } + if (current->next == NULL) { + current->next = make_new_node(current); + current->next->data = nmalloc(1); + current->next->data[0] = 0; + filebot = current->next; + } + align(¤t->next->data); + + edit_refresh(); + } else { + + j = current_x; + current_x = i; + do_enter(current); + + current->prev->data[chop] = 0; + align(¤t->prev->data); + + if (j > i) { + current_x = j - i; + UNSET(SAMELINEWRAP); + } else { + current_x = j; + current = current->prev; + SET(SAMELINEWRAP); + } + } + +} + +/* Check to see if we've just caused the line to wrap to a new line */ +void check_wrap(filestruct * inptr) +{ + +#ifdef DEBUG + fprintf(stderr, _("check_wrap called with inptr->data=\"%s\"\n"), + inptr->data); +#endif + + if ((int) strlenpt(inptr->data) <= fill) + return; + else + do_wrap(inptr); +} + +/* Stuff we do when we abort from programs and want to clean up the + * screen. This doesnt do much right now. + */ +void do_early_abort(void) +{ + blank_statusbar_refresh(); +} + +/* Set up the system variables for a search or replace. Returns -1 on + abort, 0 on success, and 1 on rerun calling program + Return -2 to run opposite program (searchg -> replace, replace -> search) + + replacing = 1 if we call from do_replace, 0 if called from do_search func. +*/ +int search_init(int replacing) +{ + int i; + char buf[135]; + + if (last_search[0]) { + sprintf(buf, " [%s]", last_search); + } else { + buf[0] = '\0'; + } + + i = statusq(replacing ? replace_list : whereis_list, + replacing ? REPLACE_LIST_LEN : WHEREIS_LIST_LEN, "", + ISSET(CASE_SENSITIVE) ? _("Case Sensitive Search%s") : + _("Search%s"), buf); + + /* Cancel any search, or just return with no previous search */ + if ((i == -1) || (i < 0 && !last_search[0])) { + statusbar(_("Search Cancelled")); + reset_cursor(); + return -1; + } else if (i == -2) { /* Same string */ + strncpy(answer, last_search, 132); + } else if (i == 0) { /* They entered something new */ + strncpy(last_search, answer, 132); + + /* Blow away last_replace because they entered a new search + string....uh, right? =) */ + last_replace[0] = '\0'; + } else if (i == NANO_CASE_KEY) { /* They want it case sensitive */ + if (ISSET(CASE_SENSITIVE)) + UNSET(CASE_SENSITIVE); + else + SET(CASE_SENSITIVE); + + return 1; + } else if (i == NANO_OTHERSEARCH_KEY) { + return -2; /* Call the opposite search function */ + } else { /* First line key, etc. */ + do_early_abort(); + return -3; + } + + return 0; +} + +filestruct *findnextstr(int quiet, filestruct * begin, char *needle) +{ + filestruct *fileptr; + char *searchstr, *found = NULL, *tmp; + + fileptr = current; + + searchstr = ¤t->data[current_x + 1]; + /* Look for searchstr until EOF */ + while (fileptr != NULL && + (found = strstrwrapper(searchstr, needle)) == NULL) { + fileptr = fileptr->next; + + if (fileptr == begin) + return NULL; + + if (fileptr != NULL) + searchstr = fileptr->data; + } + + /* If we're not at EOF, we found an instance */ + if (fileptr != NULL) { + current = fileptr; + current_x = 0; + for (tmp = fileptr->data; tmp != found; tmp++) + current_x++; + + edit_update(current); + reset_cursor(); + } else { /* We're at EOF, go back to the top, once */ + + fileptr = fileage; + + while (fileptr != current && fileptr != begin && + (found = strstrwrapper(fileptr->data, needle)) == NULL) + fileptr = fileptr->next; + + if (fileptr == begin) { + if (!quiet) + statusbar(_("\"%s\" not found"), needle); + + return NULL; + } + if (fileptr != current) { /* We found something */ + current = fileptr; + current_x = 0; + for (tmp = fileptr->data; tmp != found; tmp++) + current_x++; + + edit_update(current); + reset_cursor(); + + if (!quiet) + statusbar(_("Search Wrapped")); + } else { /* Nada */ + + if (!quiet) + statusbar(_("\"%s\" not found"), needle); + return NULL; + } + } + + return fileptr; +} + +void search_abort(void) +{ + UNSET(KEEP_CUTBUFFER); + display_main_list(); + wrefresh(bottomwin); +} + +/* Search for a string */ +int do_search(void) +{ + int i; + filestruct *fileptr = current; + + wrap_reset(); + if ((i = search_init(0)) == -1) { + current = fileptr; + search_abort(); + return 0; + } else if (i == -3) { + search_abort(); + return 0; + } else if (i == -2) { + search_abort(); + do_replace(); + return 0; + } else if (i == 1) { + do_search(); + search_abort(); + return 1; + } + findnextstr(0, current, answer); + search_abort(); + return 1; +} + +void print_replaced(int num) +{ + if (num > 1) + statusbar(_("Replaced %d occurences"), num); + else if (num == 1) + statusbar(_("Replaced 1 occurence")); +} + +void replace_abort(void) +{ + UNSET(KEEP_CUTBUFFER); + display_main_list(); + reset_cursor(); +} + +/* Search for a string */ +int do_replace(void) +{ + int i, replaceall = 0, numreplaced = 0, beginx; + filestruct *fileptr, *begin; + char *tmp, *copy, prevanswer[132] = ""; + + if ((i = search_init(1)) == -1) { + statusbar(_("Replace Cancelled")); + replace_abort(); + return 0; + } else if (i == 1) { + do_replace(); + return 1; + } else if (i == -2) { + replace_abort(); + do_search(); + return 0; + } else if (i == -3) { + replace_abort(); + return 0; + } + strncpy(prevanswer, answer, 132); + + if (strcmp(last_replace, "")) { /* There's a previous replace str */ + i = statusq(replace_list, REPLACE_LIST_LEN, "", + _("Replace with [%s]"), last_replace); + + if (i == -1) { /* Aborted enter */ + strncpy(answer, last_replace, 132); + statusbar(_("Replace Cancelled")); + replace_abort(); + return 0; + } else if (i == 0) /* They actually entered something */ + strncpy(last_replace, answer, 132); + else if (i == NANO_CASE_KEY) { /* They asked for case sensitivity */ + if (ISSET(CASE_SENSITIVE)) + UNSET(CASE_SENSITIVE); + else + SET(CASE_SENSITIVE); + + do_replace(); + return 0; + } else { /* First page, last page, for example could get here */ + + do_early_abort(); + replace_abort(); + return 0; + } + } else { /* last_search is empty */ + + i = statusq(replace_list, REPLACE_LIST_LEN, "", _("Replace with")); + if (i == -1) { + statusbar(_("Replace Cancelled")); + reset_cursor(); + replace_abort(); + return 0; + } else if (i == 0) /* They entered something new */ + strncpy(last_replace, answer, 132); + else if (i == NANO_CASE_KEY) { /* They want it case sensitive */ + if (ISSET(CASE_SENSITIVE)) + UNSET(CASE_SENSITIVE); + else + SET(CASE_SENSITIVE); + + do_replace(); + return 1; + } else { /* First line key, etc. */ + + do_early_abort(); + replace_abort(); + return 0; + } + } + + /* save where we are */ + begin = current; + beginx = current_x; + + while (1) { + + if (replaceall) + fileptr = findnextstr(1, begin, prevanswer); + else + fileptr = findnextstr(0, begin, prevanswer); + + /* No more matches. Done! */ + if (!fileptr) + break; + + /* If we're here, we've found the search string */ + if (!replaceall) + i = do_yesno(1, 1, _("Replace this instance?")); + + if (i > 0 || replaceall) { /* Yes, replace it!!!! */ + if (i == 2) + replaceall = 1; + + /* Create buffer */ + copy = nmalloc(strlen(current->data) - strlen(last_search) + + strlen(last_replace) + 1); + + /* Head of Original Line */ + strncpy(copy, current->data, current_x); + copy[current_x] = 0; + + /* Replacement Text */ + strcat(copy, last_replace); + + /* The tail of the original line */ + /* This may expose other bugs, because it no longer + goes through each character on the string + and tests for string goodness. But because + we can assume the invariant that current->data + is less than current_x + strlen(last_search) long, + this should be safe. Or it will expose bugs ;-) */ + tmp = current->data + current_x + strlen(last_search); + strcat(copy, tmp); + + /* Cleanup */ + free(current->data); + current->data = copy; + + /* Stop bug where we replace a substring of the replacement text */ + current_x += strlen(last_replace); + + edit_refresh(); + set_modified(); + numreplaced++; + } else if (i == -1) /* Abort, else do nothing and continue loop */ + break; + } + + current = begin; + current_x = beginx; + renumber_all(); + edit_update(current); + print_replaced(numreplaced); + replace_abort(); + return 1; +} + + +int page_up(void) +{ + wrap_reset(); + current_x = 0; + placewewant = 0; + + if (current == fileage) + return 0; + + current_y = 0; + edit_update_bot(edittop); + update_cursor(); + + UNSET(KEEP_CUTBUFFER); + check_statblank(); + return 1; +} + +void delete_buffer(filestruct * inptr) +{ + if (inptr != NULL) { + delete_buffer(inptr->next); + free(inptr->data); + free(inptr); + } +} + +int do_backspace(void) +{ + filestruct *previous, *tmp; + + if (current_x != 0) { + /* Let's get dangerous */ + memmove(¤t->data[current_x - 1], ¤t->data[current_x], + strlen(current->data) - current_x + 1); +#ifdef DEBUG + fprintf(stderr, _("current->data now = \"%s\"\n"), current->data); +#endif + align(¤t->data); + do_left(); + } else { + if (current == fileage) + return 0; /* Can't delete past top of file */ + + previous = current->prev; + current_x = strlen(previous->data); + previous->data = nrealloc(previous->data, + strlen(previous->data) + + strlen(current->data) + 1); + strcat(previous->data, current->data); + + tmp = current; + unlink_node(current); + delete_node(current); + if (current == edittop) { + if (previous->next) + current = previous->next; + else + current = previous; + page_up(); + } else { + if (previous->next) + current = previous->next; + else + current = previous; + update_line(current, current_x); + } + + /* Ooops, sanity check */ + if (tmp == filebot) + { + filebot = current; + editbot = current; + } + + current = previous; + renumber(current); + previous_line(); + totlines--; + +#ifdef DEBUG + fprintf(stderr, _("After, data = \"%s\"\n"), current->data); +#endif + + } + + totsize--; + set_modified(); + UNSET(KEEP_CUTBUFFER); + edit_refresh(); + return 1; +} + +int do_delete(void) +{ + filestruct *foo; + + if (current_x != strlen(current->data)) { + /* Let's get dangerous */ + memmove(¤t->data[current_x], ¤t->data[current_x + 1], + strlen(current->data) - current_x); + + align(¤t->data); + + } else if (current->next != NULL) { + current->data = nrealloc(current->data, + strlen(current->data) + + strlen(current->next->data) + 1); + strcat(current->data, current->next->data); + + foo = current->next; + if (filebot == foo) + { + filebot = current; + editbot = current; + } + + unlink_node(foo); + delete_node(foo); + update_line(current, current_x); + + renumber(current); + totlines--; + + } else + return 0; + + totsize--; + set_modified(); + UNSET(KEEP_CUTBUFFER); + edit_refresh(); + return 1; +} + +void goto_abort(void) +{ + UNSET(KEEP_CUTBUFFER); + display_main_list(); +} + +int do_gotoline(long defline) +{ + long line, i = 1, j = 0; + filestruct *fileptr; + + if (defline > 0) /* We already know what line we want to go to */ + line = defline; + else { /* Ask for it */ + + j = statusq(goto_list, GOTO_LIST_LEN, "", _("Enter line number")); + if (j == -1) { + statusbar(_("Aborted")); + goto_abort(); + return 0; + } else if (j != 0) { + do_early_abort(); + goto_abort(); + return 0; + } + if (!strcmp(answer, "$")) { + current = filebot; + current_x = 0; + edit_update(current); + goto_abort(); + return 1; + } + line = atoi(answer); + } + + /* Bounds check */ + if (line <= 0) { + statusbar(_("Come on, be reasonable")); + goto_abort(); + return 0; + } + if (line > totlines) { + statusbar(_("Only %d lines available, skipping to last line"), + filebot->lineno); + current = filebot; + current_x = 0; + edit_update(current); + } else { + for (fileptr = fileage; fileptr != NULL && i < line; i++) + fileptr = fileptr->next; + + current = fileptr; + current_x = 0; + edit_update(current); + } + + goto_abort(); + return 1; +} + +int do_gotoline_void(void) +{ + return do_gotoline(0); +} + +void wrap_reset(void) +{ + UNSET(SAMELINEWRAP); +} + +/* + * Write a file out. If tmp is nonzero, we set the umask to 0600, + * we don't set the global variable filename to it's name, and don't + * print out how many lines we wrote on the statusbar. + * + * Note that tmp is only set to 1 for storing temporary files internal + * to the editor, and is completely different from temp_opt. + */ +int write_file(char *name, int tmp) +{ + long size, lineswritten = 0; + char buf[PATH_MAX + 1]; + filestruct *fileptr; + int fd, mask = 0; + struct stat st; + + if (!strcmp(name, "")) { + statusbar(_("Cancelled")); + return -1; + } + titlebar(); + fileptr = fileage; + + + /* Open the file and truncate it. Trust the symlink. */ + if (ISSET(FOLLOW_SYMLINKS) && !tmp) { + if ((fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | + S_IWOTH)) == -1) { + statusbar(_("Could not open file for writing: %s"), + strerror(errno)); + return -1; + } + } + /* Don't follow symlink. Create new file. */ + else { + if (strlen(name) > (PATH_MAX - 7)) { + statusbar(_("Could not open file: Path length exceeded.")); + return -1; + } + + memset(buf, 0x00, PATH_MAX + 1); + strcat(buf, name); + strcat(buf, ".XXXXXX"); + if ((fd = mkstemp(buf)) == -1) { + statusbar(_("Could not open file for writing: %s"), + strerror(errno)); + return -1; + } + } + + + + dump_buffer(fileage); + while (fileptr != NULL && fileptr->next != NULL) { + size = write(fd, fileptr->data, strlen(fileptr->data)); + if (size == -1) { + statusbar(_("Could not open file for writing: %s"), + strerror(errno)); + return -1; + } else { +#ifdef DEBUG + fprintf(stderr, _("Wrote >%s\n"), fileptr->data); +#endif + } + write(fd, "\n", 1); + + fileptr = fileptr->next; + lineswritten++; + } + + if (fileptr != NULL) { + size = write(fd, fileptr->data, strlen(fileptr->data)); + if (size == -1) { + statusbar(_("Could not open file for writing: %s"), + strerror(errno)); + return -1; + } else if (size > 0) { + size = write(fd, "\n", 1); + if (size == -1) { + statusbar(_("Could not open file for writing: %s"), + strerror(errno)); + return -1; + } + } + } + + + if (close(fd) == -1) { + statusbar(_("Could not close %s: %s"), name, strerror(errno)); + unlink(buf); + return -1; + } + + if (!ISSET(FOLLOW_SYMLINKS) || tmp) { + if (stat(name, &st) == -1) { + /* Use default umask as file permisions if file is a new file. */ + mask = umask(0); + umask(mask); + + if (tmp) /* We don't want anyone reading our temporary file! */ + mask = 0600; + else + mask = 0666 & ~mask; + + } else { + /* Use permissions from file we are overwriting. */ + mask = st.st_mode; + if (unlink(name) == -1) { + if (errno != ENOENT) { + statusbar(_("Could not open %s for writing: %s"), + name, strerror(errno)); + unlink(buf); + return -1; + } + } + } + + if (link(buf, name) != -1) + unlink(buf); + else if (errno != EPERM) { + statusbar(_("Could not open %s for writing: %s"), + name, strerror(errno)); + unlink(buf); + return -1; + } else if (rename(buf, name) == -1) { /* Try a rename?? */ + statusbar(_("Could not open %s for writing: %s"), + name, strerror(errno)); + unlink(buf); + return -1; + } + if (chmod(name, mask) == -1) { + statusbar(_("Could not set permissions %o on %s: %s"), + mask, name, strerror(errno)); + } + + } + if (!tmp) { + strncpy(filename, name, 132); + statusbar(_("Wrote %d lines"), lineswritten); + } + UNSET(MODIFIED); + titlebar(); + return 1; +} + +int do_writeout(int exiting) +{ + int i = 0; + + strncpy(answer, filename, 132); + + if ((exiting) && (temp_opt) && (filename)) { + i = write_file(answer, 0); + display_main_list(); + return i; + } + + while (1) { + i = statusq(writefile_list, WRITEFILE_LIST_LEN, answer, + _("File Name to write")); + + if (i != -1) { + +#ifdef DEBUG + fprintf(stderr, _("filename is %s"), answer); +#endif + if (strncmp(answer, filename, 132)) { + struct stat st; + if (!stat(answer, &st)) { + i = do_yesno(0, 0, _("File exists, OVERWRITE ?")); + + if (!i || (i == -1)) + continue; + } + } + i = write_file(answer, 0); + + display_main_list(); + return i; + } else { + statusbar(_("Cancelled")); + display_main_list(); + return 0; + } + } +} + +int do_writeout_void(void) +{ + return do_writeout(0); +} + +/* Stuff we want to do when we exit the spell program one of its many ways */ +void exit_spell(char *tmpfilename, char *foo) +{ + free(foo); + + if (remove(tmpfilename) == -1) + statusbar(_("Error deleting tempfile, ack!")); +} + +/* + * This is Chris' very ugly spell function. Someone please make this + * better =-) + */ +int do_oldspell(void) +{ + char *temp, *foo; + int i; + + if ((temp = tempnam(0, "nano.")) == NULL) { + statusbar(_("Could not create a temporary filename: %s"), + strerror(errno)); + return 0; + } + if (write_file(temp, 1) == -1) + return 0; + + if (alt_speller) { + foo = nmalloc(strlen(temp) + strlen(alt_speller) + 2); + sprintf(foo, "%s %s", alt_speller, temp); + } else { + + /* For now, we only try ispell because we're not capable of + handling the normal spell program (yet...) */ + foo = nmalloc(strlen(temp) + 8); + sprintf(foo, "ispell %s", temp); + } + + endwin(); + resetty(); + if (alt_speller) { + if ((i = system(foo)) == -1 || i == 32512) { + statusbar(_("Could not invoke spell program \"%s\""), + alt_speller); + exit_spell(temp, foo); + return 0; + } + } else if ((i = system(foo)) == -1 || i == 32512) { /* Why 32512? I dont know! */ + statusbar(_("Could not invoke \"ispell\"")); + exit_spell(temp, foo); + return 0; + } + initscr(); + + free_filestruct(fileage); + global_init(); + open_file(temp, 0, 1); + edit_update(fileage); + set_modified(); + exit_spell(temp, foo); + statusbar(_("Finished checking spelling")); + return 1; +} + +int do_spell(void) +{ + char *temp, *foo; + int i; + + if ((temp = tempnam(0, "nano.")) == NULL) { + statusbar(_("Could not create a temporary filename: %s"), + strerror(errno)); + return 0; + } + if (write_file(temp, 1) == -1) + return 0; + + if (alt_speller) { + foo = nmalloc(strlen(temp) + strlen(alt_speller) + 2); + sprintf(foo, "%s %s", alt_speller, temp); + } else { + + /* For now, we only try ispell because we're not capable of + handling the normal spell program (yet...) */ + foo = nmalloc(strlen(temp) + 8); + sprintf(foo, "ispell %s", temp); + } + + endwin(); + resetty(); + if (alt_speller) { + if ((i = system(foo)) == -1 || i == 32512) { + statusbar(_("Could not invoke spell program \"%s\""), + alt_speller); + exit_spell(temp, foo); + return 0; + } + } else if ((i = system(foo)) == -1 || i == 32512) { /* Why 32512? I dont know! */ + statusbar(_("Could not invoke \"ispell\"")); + exit_spell(temp, foo); + return 0; + } + initscr(); + + free_filestruct(fileage); + global_init(); + open_file(temp, 0, 1); + edit_update(fileage); + set_modified(); + exit_spell(temp, foo); + statusbar(_("Finished checking spelling")); + return 1; +} + +int do_exit(void) +{ + int i; + + if (!ISSET(MODIFIED)) + finish(0); + + if (temp_opt) { + i = 1; + } else { + i = + do_yesno(0, 0, + _ + ("Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ")); + } + +#ifdef DEBUG + dump_buffer(fileage); +#endif + + if (i == 1) { + if (do_writeout(1) > 0) + finish(0); + } else if (i == 0) + finish(0); + else + statusbar(_("Cancelled")); + + display_main_list(); + return 1; +} + +#ifndef NANO_SMALL +#ifdef NCURSES_MOUSE_VERSION +void do_mouse(void) +{ + MEVENT mevent; + + if (getmouse(&mevent) == ERR) + return; + + /* If mouse not in edit window, return (add help selection later). */ + if (!wenclose(edit, mevent.y, mevent.x)) + return; + + /* Subtract out size of topwin. Perhaps we need a constant somewhere? */ + mevent.y -= 2; + + /* Selecting where the cursor is sets the mark. + * Selecting beyond the line length with the cursor at the end of the + * line sets the mark as well. + */ + if ((mevent.y == current_y) && + ((mevent.x == current_x) || (current_x == strlen(current->data) + && (mevent.x > + strlen(current->data))))) { + if (ISSET(VIEW_MODE)) { + print_view_warning(); + return; + } + do_mark(); + } else if (mevent.y > current_y) { + while (mevent.y > current_y) { + if (current->next != NULL) + current = current->next; + else + break; + current_y++; + } + } else if (mevent.y < current_y) { + while (mevent.y < current_y) { + if (current->prev != NULL) + current = current->prev; + else + break; + current_y--; + } + } + current_x = mevent.x; + if (current_x > strlen(current->data)) + current_x = strlen(current->data); + + update_cursor(); + edit_refresh(); + +} +#endif +#endif + +/* Handler for SIGHUP */ +RETSIGTYPE handle_hup(int signal) +{ + write_file("nano.save", 0); + finish(1); +} + + +void handle_sigwinch(int s) +{ +#ifndef NANO_SMALL + char *tty = NULL; + int fd = 0; + int result = 0; + int i = 0; + struct winsize win; + + tty = ttyname(0); + if (!tty) + return; + fd = open(tty, O_RDWR); + if (fd == -1) + return; + result = ioctl(fd, TIOCGWINSZ, &win); + if (result == -1) + return; + + + COLS = win.ws_col; + LINES = win.ws_row; + + center_x = COLS / 2; + center_y = LINES / 2; + editwinrows = LINES - 5 + no_help(); + editwineob = editwinrows - 1; + fill = COLS - 8; + + free(hblank); + hblank = nmalloc(COLS + 1); + + for (i = 0; i <= COLS - 1; i++) + hblank[i] = ' '; + hblank[i] = 0; + +#ifdef HAVE_NCURSES_H + resizeterm(LINES, COLS); +#ifdef HAVE_WRESIZE + if (wresize(topwin, 2, COLS) == ERR) + die(_("Cannot resize top win")); + if (mvwin(topwin, 0, 0) == ERR) + die(_("Cannot move top win")); + if (wresize(edit, editwinrows, COLS) == ERR) + die(_("Cannot resize edit win")); + if (mvwin(edit, 2, 0) == ERR) + die(_("Cannot move edit win")); + if (wresize(bottomwin, 3 - no_help(), COLS) == ERR) + die(_("Cannot resize bottom win")); + if (mvwin(bottomwin, LINES - 3 + no_help(), 0) == ERR) + die(_("Cannot move bottom win")); +#endif /* HAVE_WRESIZE */ +#endif /* HAVE_NCURSES_H */ + + editbot = edittop; + + for (i = 0; (i <= editwineob) && (editbot->next != NULL) + && (editbot->next != filebot); i++) + editbot = editbot->next; + + if (current_y > editwineob) { + edit_update(editbot); + } + erase(); + refresh(); + total_refresh(); +#endif +} + +int do_tab(void) +{ + do_char('\t'); + return 1; +} + +#ifndef NANO_SMALL +int empty_line(const char *data) +{ + while (*data) { + if (!isspace(*data)) + return 0; + + data++; + } + + return 1; +} + +int no_spaces(const char *data) +{ + while (*data) { + if (isspace(*data)) + return 0; + + data++; + } + + return 1; +} + +void justify_format(char *data) +{ + int i = 0; + int len = strlen(data); + + /* Skip first character regardless and leading whitespace. */ + for (i = 1; i < len; i++) { + if (!isspace(data[i])) + break; + } + + i++; /* (i) is now at least 2. */ + + /* No double spaces allowed unless following a period. Tabs -> space. No double tabs. */ + for (; i < len; i++) { + if (isspace(data[i]) && isspace(data[i - 1]) + && (data[i - 2] != '.')) { + memmove(data + i, data + i + 1, len - i); + len--; + i--; + } + } +} +#endif + +int do_justify(void) +{ +#ifndef NANO_SMALL + int slen = 0; /* length of combined lines on one line. */ + int initial_y; + filestruct *initial = NULL; + + if (empty_line(current->data)) { + /* Justify starting at first non-empty line. */ + do { + if (!current->next) + return 1; + + current = current->next; + current_y++; + } + while (empty_line(current->data)); + } else { + /* Search back for the beginning of the paragraph, where + * Paragraph is 1) A line with leading whitespace + * or 2) A line following an empty line. + */ + while (current->prev != NULL) { + if (isspace(current->data[0]) || !current->data[0]) + break; + + current = current->prev; + current_y--; + } + + /* First line with leading whitespace may be empty. */ + if (empty_line(current->data)) { + if (current->next) { + current = current->next; + current_y++; + } else + return 1; + } + } + initial = current; + initial_y = current_y; + + set_modified(); + /* Put the whole paragraph into one big line. */ + while (current->next && !isspace(current->next->data[0]) + && current->next->data[0]) { + filestruct *tmpnode = current->next; + int len = strlen(current->data); + int len2 = strlen(current->next->data); + + /* length of both strings plus space between strings and ending \0. */ + current->data = nrealloc(current->data, len + len2 + 2); + current->data[len++] = ' '; + current->data[len] = '\0'; + + strncat(current->data, current->next->data, len2); + + unlink_node(tmpnode); + delete_node(tmpnode); + + } + + justify_format(current->data); + + slen = strlen(current->data); + while ((strlenpt(current->data) > (fill + 1)) + && !no_spaces(current->data)) { + int i = 0; + int len2 = 0; + filestruct *tmpline = nmalloc(sizeof(filestruct)); + + /* Start at fill + 2, unless line isn't that long (but it appears at least + * fill + 2 long with tabs. + */ + if (slen > (fill + 2)) + i = fill + 2; + else + i = slen; + for (; i > 0; i--) { + if (isspace(current->data[i]) && + ((strlenpt(current->data) - strlen(current->data + i)) <= + fill)) break; + } + if (!i) + break; + + current->data[i] = '\0'; + + len2 = strlen(current->data + i + 1); + tmpline->data = nmalloc(len2 + 1); + + /* Skip the white space in current. */ + memcpy(tmpline->data, current->data + i + 1, len2); + tmpline->data[len2] = '\0'; + + current->data = nrealloc(current->data, i + 1); + + tmpline->prev = current; + tmpline->next = current->next; + if (current->next != NULL) + current->next->prev = tmpline; + + current->next = tmpline; + current = tmpline; + slen -= i + 1; + current_y++; + } + + renumber(initial); + + if (current->next) + current = current->next; + current_x = 0; + placewewant = 0; + + if ((current_y < 0) || (current_y >= editwineob) || (initial_y <= 0)) { + edit_update(current); + center_cursor(); + } else { + int i = 0; + + editbot = edittop; + for (i = 0; (i <= editwineob) && (editbot->next != NULL) + && (editbot->next != filebot); i++) + editbot = editbot->next; + edit_refresh(); + } + + statusbar("Justify Complete"); + return 1; +#else + nano_small_msg(); + return 1; +#endif +} + + +void help_init(void) +{ + int i, sofar = 0; + long allocsize = 1; /* How much space we're gonna need for the help text */ + char buf[BUFSIZ]; + + /* Compute the space needed for the shortcut lists - we add 15 to + have room for the shortcut abbrev and its possible alternate keys */ + for (i = 0; i < MAIN_LIST_LEN; i++) + if (main_list[i].help != NULL) + allocsize += strlen(main_list[i].help) + 15; + + allocsize += strlen(help_text_init); + + if (help_text != NULL) + free(help_text); + + /* Allocate space for the help text */ + help_text = nmalloc(allocsize); + + /* Now add the text we want */ + strcpy(help_text, help_text_init); + + /* Now add our shortcut info */ + for (i = 0; i < MAIN_LIST_LEN; i++) { + sofar = sprintf(buf, "^%c ", main_list[i].val + 64); + + if (main_list[i].misc1 > KEY_F0 && main_list[i].misc1 <= KEY_F(64)) + sofar += sprintf(&buf[sofar], "(F%d) ", + main_list[i].misc1 - KEY_F0); + else + sofar += sprintf(&buf[sofar], " "); + + if (main_list[i].altval > 0) + sofar += sprintf(&buf[sofar], "(@%c) ", + main_list[i].altval - 32); + else + sofar += sprintf(&buf[sofar], " "); + + if (main_list[i].help != NULL) + sprintf(&buf[sofar], "%s\n", main_list[i].help); + + strcat(help_text, buf); + } + +} + +int main(int argc, char *argv[]) +{ + int optchr; + int kbinput; /* Input from keyboard */ + long startline = 0; /* Line to try and start at */ + struct sigaction act; /* For our lovely signals */ + int keyhandled = 0; /* Have we handled the keystroke yet? */ + int tmpkey = 0, i; + char *argv0; + struct termios term; + +#ifdef HAVE_GETOPT_LONG + int option_index = 0; + struct option long_options[] = { + {"version", 0, 0, 'V'}, + {"const", 0, 0, 'c'}, + {"suspend", 0, 0, 'z'}, + {"nowrap", 0, 0, 'w'}, + {"nohelp", 0, 0, 'x'}, + {"help", 0, 0, 'h'}, + {"autoindent", 0, 0, 'i'}, + {"tempfile", 0, 0, 't'}, + {"speller", 1, 0, 's'}, + {"fill", 1, 0, 'r'}, + {"mouse", 0, 0, 'm'}, + {"pico", 0, 0, 'p'}, + {"nofollow", 0, 0, 'l'}, + {0, 0, 0, 0} + }; +#endif + + /* Flag inits... */ + SET(FOLLOW_SYMLINKS); + +#ifndef NANO_SMALL + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + +#ifdef HAVE_GETOPT_LONG + while ((optchr = getopt_long(argc, argv, "?Vchilmpr:s:tvwxz", + long_options, &option_index)) != EOF) { +#else + while ((optchr = getopt(argc, argv, "h?Vcilmpr:s:tvwxz")) != EOF) { +#endif + + switch (optchr) { + case 'V': + version(); + exit(0); + case 'c': + SET(CONSTUPDATE); + break; + case 'h': + case '?': + usage(); + exit(0); + case 'i': + SET(AUTOINDENT); + break; + case 'l': + UNSET(FOLLOW_SYMLINKS); + break; + case 'm': + SET(USE_MOUSE); + break; + case 'p': + SET(PICO_MSGS); + break; + case 'r': + fill = atoi(optarg); + if (fill <= 0) { + usage(); /* To stop bogus data (like a string) */ + finish(1); + } + break; + case 's': + alt_speller = nmalloc(strlen(optarg) + 1); + strcpy(alt_speller, optarg); + break; + case 't': + temp_opt = 1; + break; + case 'v': + SET(VIEW_MODE); + break; + case 'w': + SET(NO_WRAP); + break; + case 'x': + SET(NO_HELP); + break; + case 'z': + SET(SUSPEND); + break; + default: + usage(); + exit(0); + } + + } + + argv0 = strrchr(argv[0], '/'); + if ((argv0 && strstr(argv0, "pico")) + || (!argv0 && strstr(argv[0], "pico"))) + SET(PICO_MSGS); + + filename = nmalloc(PATH_MAX); + strcpy(filename, ""); + + /* See if there's a non-option in argv (first non-option is the + filename, if +LINE is not given) */ + if (argc == 1 || argc <= optind) + strcpy(filename, ""); + else { + /* Look for the +line flag... */ + if (argv[optind][0] == '+') { + startline = atoi(&argv[optind][1]); + optind++; + if (argc == 1 || argc <= optind) + strcpy(filename, ""); + else + strncpy(filename, argv[optind], 132); + } else + strncpy(filename, argv[optind], 132); + + } + + + /* First back up the old settings so they can be restored, duh */ + tcgetattr (0, &oldterm); + + /* Adam's code to blow away intr character so ^C can show cursor pos */ + tcgetattr (0, &term); + for (i = 0; i < NCCS; i++) { + if (term.c_cc[i] == CINTR || term.c_cc[i] == CQUIT) + term.c_cc[i] = 0; + } + tcsetattr (0, TCSANOW, &term); + + /* now ncurses init stuff... */ + initscr(); + savetty(); + nonl(); + cbreak(); + noecho(); + timeout(0); + + /* Set up some global variables */ + global_init(); + shortcut_init(); + init_help_msg(); + help_init(); + + /* Trap SIGINT and SIGQUIT cuz we want them to do useful things. */ + memset (&act, 0, sizeof (struct sigaction)); + act.sa_handler = SIG_IGN; + sigaction(SIGINT, &act, NULL); + sigaction(SIGQUIT, &act, NULL); + + if (!ISSET(SUSPEND)) + sigaction(SIGTSTP, &act, NULL); + + /* Trap SIGHUP cuz we want to write the file out. */ + act.sa_handler = handle_hup; + sigaction(SIGHUP, &act, NULL); + + act.sa_handler = handle_sigwinch; + sigaction(SIGWINCH, &act, NULL); + +#ifdef DEBUG + fprintf(stderr, _("Main: set up windows\n")); +#endif + + /* Setup up the main text window */ + edit = newwin(editwinrows, COLS, 2, 0); + keypad(edit, TRUE); + +#ifndef NANO_SMALL +#ifdef NCURSES_MOUSE_VERSION + if (ISSET(USE_MOUSE)) { + mousemask(BUTTON1_RELEASED, NULL); + mouseinterval(50); + } +#endif +#endif + + /* And the other windows */ + topwin = newwin(2, COLS, 0, 0); + bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0); + keypad(bottomwin, TRUE); + +#ifdef DEBUG + fprintf(stderr, _("Main: bottom win\n")); +#endif + /* Set up up bottom of window */ + display_main_list(); + +#ifdef DEBUG + fprintf(stderr, _("Main: open file\n")); +#endif + + titlebar(); + if (argc == 1) + new_file(); + else + open_file(filename, 0, 0); + + if (startline > 0) + do_gotoline(startline); + else + edit_update(fileage); + + edit_refresh(); + reset_cursor(); + + while (1) { + kbinput = wgetch(edit); + if (kbinput == 27) { /* Grab Alt-key stuff first */ + switch (kbinput = wgetch(edit)) { + case 91: + + switch (kbinput = wgetch(edit)) { + case 'A': + kbinput = KEY_UP; + break; + case 'B': + kbinput = KEY_DOWN; + break; + case 'C': + kbinput = KEY_RIGHT; + break; + case 'D': + kbinput = KEY_LEFT; + break; + case 'H': + kbinput = KEY_HOME; + break; + case 'F': + kbinput = KEY_END; + break; + case 49: /* X window F-keys */ + tmpkey = wgetch(edit); + kbinput = KEY_F(tmpkey) - 48; + wgetch(edit); /* Junk character */ + break; + case 53: /* page up */ + kbinput = KEY_PPAGE; + if ((kbinput = wgetch(edit)) == 126) + kbinput = KEY_PPAGE; /* Ignore extra tilde */ + else { /* I guess this could happen ;-) */ + ungetch(kbinput); + continue; + } + break; + case 54: /* page down */ + kbinput = KEY_NPAGE; + if ((kbinput = wgetch(edit)) == 126) + kbinput = KEY_NPAGE; /* Same thing here */ + else { + ungetch(kbinput); + continue; + } + break; + + default: +#ifdef DEBUG + fprintf(stderr, _("I got Alt-[-%c! (%d)\n"), + kbinput, kbinput); +#endif + break; + } + break; + default: + + /* Check for the altkey defs.... */ + for (i = 0; i <= MAIN_LIST_LEN - 1; i++) + if (kbinput == main_list[i].altval || + kbinput == main_list[i].altval - 32) { + kbinput = main_list[i].val; + break; + } +#ifdef DEBUG + fprintf(stderr, _("I got Alt-%c! (%d)\n"), kbinput, + kbinput); +#endif + break; + } + } + /* Look through the main shortcut list to see if we've hit a + shortcut key */ + for (i = 0; i < MAIN_LIST_LEN; i++) { + if (kbinput == main_list[i].val || + (main_list[i].misc1 && kbinput == main_list[i].misc1) || + (main_list[i].misc2 && kbinput == main_list[i].misc2)) { + if (ISSET(VIEW_MODE) && !main_list[i].viewok) + print_view_warning(); + else + main_list[i].func(); + keyhandled = 1; + } + } + /* Last gasp, stuff that's not in the main lists */ + if (!keyhandled) + switch (kbinput) { +#ifndef NANO_SMALL +#ifdef NCURSES_MOUSE_VERSION + case KEY_MOUSE: + do_mouse(); + break; +#endif +#endif + case 0: /* Erg */ + do_next_word(); + break; + case 331: /* Stuff that we don't want to do squat */ + case -1: + case 410: /* Must ignore this, it gets sent when we resize */ + break; + default: +#ifdef DEBUG + fprintf(stderr, "I got %c (%d)!\n", kbinput, kbinput); +#endif + /* We no longer stop unhandled sequences so that people with + odd character sets can type... */ + + if (ISSET(VIEW_MODE)) { + print_view_warning(); + break; + } + do_char(kbinput); + } + if (ISSET(CONSTUPDATE)) + do_cursorpos(); + + reset_cursor(); + wrefresh(edit); + keyhandled = 0; + } + + getchar(); + finish(0); + +} diff --git a/nano.h b/nano.h new file mode 100644 index 00000000..82be177b --- /dev/null +++ b/nano.h @@ -0,0 +1,227 @@ +/************************************************************************** + * nano.h * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +#ifdef HAVE_MALLOC_H +#include +#endif + +#ifdef HAVE_LIMITS_H +#include +#endif + +#ifndef NANO_H +#define NANO_H 1 + +/* Macros for the flags int... */ +#define SET(bit) flags |= bit +#define UNSET(bit) flags &= ~bit +#define ISSET(bit) (flags & bit) + + +#ifdef USE_SLANG /* Slang support enabled */ +#include +#define KEY_DC 0x113 +#elif defined(HAVE_NCURSES_H) +#include +#else /* Uh oh */ +#include +#endif /* CURSES_H */ + +#ifdef HAVE_LIBINTL_H +#include +#endif + +#include "config.h" + +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) +#include +# ifndef HAVE_SNPRINTF +# define snprintf g_snprintf +# endif +# ifndef HAVE_VSNPRINTF +# define vsnprintf g_vsnprintf +# endif +#endif + +#define VERMSG "nano " VERSION + +/* Structure types */ +typedef struct filestruct { + char *data; + struct filestruct *next; /* Next node */ + struct filestruct *prev; /* Previous node */ + long 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 */ + int misc1; /* Other int functions we want bound */ + 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 */ +} shortcut; + +/* Bitwise flags so we can save space (or more correctly, not waste it) */ + +#define MODIFIED (1<<0) +#define KEEP_CUTBUFFER (1<<1) +#define CASE_SENSITIVE (1<<2) +#define MARK_ISSET (1<<3) +#define CONSTUPDATE (1<<4) +#define NO_HELP (1<<5) +#define PICO_MSGS (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) + + +/* Control key sequences, chaning these would be very very bad */ + +#define NANO_CONTROL_A 1 +#define NANO_CONTROL_B 2 +#define NANO_CONTROL_C 3 +#define NANO_CONTROL_D 4 +#define NANO_CONTROL_E 5 +#define NANO_CONTROL_F 6 +#define NANO_CONTROL_G 7 +#define NANO_CONTROL_H 8 +#define NANO_CONTROL_I 9 +#define NANO_CONTROL_J 10 +#define NANO_CONTROL_K 11 +#define NANO_CONTROL_L 12 +#define NANO_CONTROL_M 13 +#define NANO_CONTROL_N 14 +#define NANO_CONTROL_O 15 +#define NANO_CONTROL_P 16 +#define NANO_CONTROL_Q 17 +#define NANO_CONTROL_R 18 +#define NANO_CONTROL_S 19 +#define NANO_CONTROL_T 20 +#define NANO_CONTROL_U 21 +#define NANO_CONTROL_V 22 +#define NANO_CONTROL_W 23 +#define NANO_CONTROL_X 24 +#define NANO_CONTROL_Y 25 +#define NANO_CONTROL_Z 26 + +#define NANO_CONTROL_4 28 +#define NANO_CONTROL_5 29 +#define NANO_CONTROL_6 30 +#define NANO_CONTROL_7 31 + +#define NANO_ALT_A 'a' +#define NANO_ALT_B 'b' +#define NANO_ALT_C 'c' +#define NANO_ALT_D 'd' +#define NANO_ALT_E 'e' +#define NANO_ALT_F 'f' +#define NANO_ALT_G 'g' +#define NANO_ALT_H 'h' +#define NANO_ALT_I 'i' +#define NANO_ALT_J 'j' +#define NANO_ALT_K 'k' +#define NANO_ALT_L 'l' +#define NANO_ALT_M 'm' +#define NANO_ALT_N 'n' +#define NANO_ALT_O 'o' +#define NANO_ALT_P 'p' +#define NANO_ALT_Q 'q' +#define NANO_ALT_R 'r' +#define NANO_ALT_S 's' +#define NANO_ALT_T 't' +#define NANO_ALT_U 'u' +#define NANO_ALT_V 'v' +#define NANO_ALT_W 'w' +#define NANO_ALT_X 'x' +#define NANO_ALT_Y 'y' +#define NANO_ALT_Z 'z' + +/* Some semi-changeable keybindings, dont play with unless you're sure you +know what you're doing */ + +#define NANO_INSERTFILE_KEY NANO_CONTROL_R +#define NANO_INSERTFILE_FKEY KEY_F(5) +#define NANO_EXIT_KEY NANO_CONTROL_X +#define NANO_EXIT_FKEY KEY_F(2) +#define NANO_WRITEOUT_KEY NANO_CONTROL_O +#define NANO_WRITEOUT_FKEY KEY_F(3) +#define NANO_GOTO_KEY NANO_CONTROL_7 +#define NANO_GOTO_FKEY KEY_F(13) +#define NANO_ALT_GOTO_KEY NANO_ALT_G +#define NANO_HELP_KEY NANO_CONTROL_G +#define NANO_HELP_FKEY KEY_F(1) +#define NANO_WHEREIS_KEY NANO_CONTROL_W +#define NANO_WHEREIS_FKEY KEY_F(6) +#define NANO_REPLACE_KEY NANO_CONTROL_4 +#define NANO_REPLACE_FKEY KEY_F(14) +#define NANO_ALT_REPLACE_KEY NANO_ALT_R +#define NANO_OTHERSEARCH_KEY NANO_CONTROL_T +#define NANO_PREVPAGE_KEY NANO_CONTROL_Y +#define NANO_PREVPAGE_FKEY KEY_F(7) +#define NANO_NEXTPAGE_KEY NANO_CONTROL_V +#define NANO_NEXTPAGE_FKEY KEY_F(8) +#define NANO_CUT_KEY NANO_CONTROL_K +#define NANO_CUT_FKEY KEY_F(9) +#define NANO_UNCUT_KEY NANO_CONTROL_U +#define NANO_UNCUT_FKEY KEY_F(10) +#define NANO_CURSORPOS_KEY NANO_CONTROL_C +#define NANO_CURSORPOS_FKEY KEY_F(11) +#define NANO_SPELL_KEY NANO_CONTROL_T +#define NANO_SPELL_FKEY KEY_F(12) +#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY +#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY +#define NANO_CANCEL_KEY NANO_CONTROL_C +#define NANO_CASE_KEY NANO_CONTROL_A +#define NANO_REFRESH_KEY NANO_CONTROL_L +#define NANO_JUSTIFY_KEY NANO_CONTROL_J +#define NANO_JUSTIFY_FKEY KEY_F(4) +#define NANO_UP_KEY NANO_CONTROL_P +#define NANO_DOWN_KEY NANO_CONTROL_N +#define NANO_FORWARD_KEY NANO_CONTROL_F +#define NANO_BACK_KEY NANO_CONTROL_B +#define NANO_MARK_KEY NANO_CONTROL_6 +#define NANO_HOME_KEY NANO_CONTROL_A +#define NANO_END_KEY NANO_CONTROL_E +#define NANO_DELETE_KEY NANO_CONTROL_D +#define NANO_BACKSPACE_KEY NANO_CONTROL_H +#define NANO_TAB_KEY NANO_CONTROL_I +#define NANO_SUSPEND_KEY NANO_CONTROL_Z +#define NANO_ENTER_KEY NANO_CONTROL_M + +#define MAIN_LIST_LEN 26 +#define MAIN_VISIBLE 12 +#define WHEREIS_LIST_LEN 5 +#define REPLACE_LIST_LEN 5 +#define GOTO_LIST_LEN 3 +#define WRITEFILE_LIST_LEN 1 +#define HELP_LIST_LEN 3 +#define SPELL_LIST_LEN 3 + +#define VIEW 1 +#define NOVIEW 0 + +#endif diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 00000000..111b40fc --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,248 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: cat-id-tbl.c $(CATALOGS) +all-no: + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(PACKAGE).po \ + || ( rm -f $(srcdir)/$(PACKAGE).pot \ + && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 00000000..5ae4e7a4 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,11 @@ +# List of source files containing translatable strings. + +# Package source files +cut.c +global.c +nano.c +winio.c + +# Package header files +nano.h +proto.h diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c new file mode 100644 index 00000000..b67bd83a --- /dev/null +++ b/po/cat-id-tbl.c @@ -0,0 +1,215 @@ +/* Automatically generated by po2tbl.sed from nano.pot. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include "libgettext.h" + +const struct _msg_ent _msg_tbl[] = { + {"", 1}, + {"add_to_cutbuffer called with inptr->data = %s\n", 2}, + {"Blew away cutbuffer =)\n", 3}, + {"Invoke the help menu", 4}, + {"Write the current file to disk", 5}, + {"Exit from nano", 6}, + {"Goto a specific line number", 7}, + {"Justify the current paragraph", 8}, + {"Replace text within the editor", 9}, + {"Insert another file into the current one", 10}, + {"Search for text within the editor", 11}, + {"Move to the previous screen", 12}, + {"Move to the next screen", 13}, + {"Cut the current line and store it in the cutbuffer", 14}, + {"Uncut from the cutbuffer into the current line", 15}, + {"Show the posititon of the cursor", 16}, + {"Invoke the spell checker (if available)", 17}, + {"Move up one line", 18}, + {"Move down one line", 19}, + {"Move forward one character", 20}, + {"Move back one character", 21}, + {"Move to the beginning of the current line", 22}, + {"Move to the end of the current line", 23}, + {"Go to the first line of the file", 24}, + {"Go to the last line of the file", 25}, + {"Refresh (redraw) the current screen", 26}, + {"Mark text at the current cursor location", 27}, + {"Delete the character under the cursor", 28}, + {"Delete the character to the left of the cursor", 29}, + {"Insert a tab character", 30}, + {"Insert a carriage return at the cursor position", 31}, + {"Make the current search or replace case (in)sensitive", 32}, + {"Cancel the current function", 33}, + {"Get Help", 34}, + {"WriteOut", 35}, + {"Exit", 36}, + {"Goto Line", 37}, + {"Justify", 38}, + {"Replace", 39}, + {"Read File", 40}, + {"Where Is", 41}, + {"Prev Page", 42}, + {"Next Page", 43}, + {"Cut Text", 44}, + {"UnCut Txt", 45}, + {"Cur Pos", 46}, + {"To Spell", 47}, + {"Up", 48}, + {"Down", 49}, + {"Forward", 50}, + {"Back", 51}, + {"Home", 52}, + {"End", 53}, + {"Refresh", 54}, + {"Mark Text", 55}, + {"Delete", 56}, + {"Backspace", 57}, + {"Tab", 58}, + {"Enter", 59}, + {"First Line", 60}, + {"Last Line", 61}, + {"Case Sens", 62}, + {"To Replace", 63}, + {"Cancel", 64}, + {"To Search", 65}, + {"\ +\n\ +Buffer written to 'nano.save'\n", 66}, + {"nano: malloc: out of memory!", 67}, + {"Key illegal in VIEW mode", 68}, + {"\ + nano help text\n\ +\n\ + The nano editor is designed to emulate the functionality and ease-of-use of \ +the UW Pico text editor. There are four main sections of the editor: The \ +top line shows the program version, the current filename being edited, and \ +whether or not the file has been modified. Next is the main editor window \ +showing the file being edited. The status line is the third line from the \ +bottom and shows important messages. The bottom two lines show the most \ +commonly used shortcuts in the editor.\n\ +\n\ + The notation for shortcuts is as follows: Control-key sequences are notated \ +with a caret (^) symbol. Alt-key sequences are notated with an at (@) \ +symbol. The following keystrokes are available in the main editor window. \ +Optional keys are shown in parentheses:\n\ +\n", 69}, + {"free_node(): free'd a node, YAY!\n", 70}, + {"free_node(): free'd last node.\n", 71}, + {"read_line: not on first line and prev is NULL", 72}, + {"Read %d lines", 73}, + {"\"%s\" not found", 74}, + {"New File", 75}, + {"File \"%s\" is a directory", 76}, + {"Reading File", 77}, + {"File to insert [from ./] ", 78}, + {"Cancelled", 79}, + {"\ +Usage: nano [GNU long option] [option] +LINE \n\ +\n", 80}, + {"Option\t\tLong option\t\tMeaning\n", 81}, + {" -V \t\t--version\t\tPrint version information and exit\n", 82}, + {" -c \t\t--const\t\t\tConstantly show cursor position\n", 83}, + {" -h \t\t--help\t\t\tShow this message\n", 84}, + {" -i \t\t--autoindent\t\tAutomatically indent new lines\n", 85}, + {" -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n", 86}, + {" -m \t\t--mouse\t\t\tEnable mouse\n", 87}, + {"\ + -r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n", 88}, + {" -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n", 89}, + {" -s [prog] \t--speller=[prog]\tEnable alternate speller\n", 90}, + {" -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n", 91}, + {" -v \t\t--view\t\t\tView (read only) mode\n", 92}, + {" -w \t\t--nowrap\t\tDon't wrap long lines\n", 93}, + {" -x \t\t--nohelp\t\tDon't show help window\n", 94}, + {" -z \t\t--suspend\t\tEnable suspend\n", 95}, + {" +LINE\t\t\t\t\tStart at line number LINE\n", 96}, + {"\ +Usage: nano [option] +LINE \n\ +\n", 97}, + {"Option\t\tMeaning\n", 98}, + {" -V \t\tPrint version information and exit\n", 99}, + {" -c \t\tConstantly show cursor position\n", 100}, + {" -h \t\tShow this message\n", 101}, + {" -i \t\tAutomatically indent new lines\n", 102}, + {" -l \t\tDon't follow symbolic links, overwrite.\n", 103}, + {" -m \t\tEnable mouse\n", 104}, + {" -r [#cols] \tSet fill cols to (wrap lines at) #cols\n", 105}, + {" -s [prog] \tEnable alternate speller\n", 106}, + {" -p \t\tMake bottom 2 lines more Pico-like\n", 107}, + {" -t \t\tAuto save on exit, don't prompt\n", 108}, + {" -v \t\tView (read only) mode\n", 109}, + {" -w \t\tDon't wrap long lines\n", 110}, + {" -x \t\tDon't show help window\n", 111}, + {" -z \t\tEnable suspend\n", 112}, + {" +LINE\t\tStart at line number LINE\n", 113}, + {" nano version %s by Chris Allegretta (compiled %s, %s)\n", 114}, + {" Email: nano@asty.org\tWeb: http://www.asty.org/nano\n", 115}, + {"Mark Set", 116}, + {"Mark UNset", 117}, + {"check_wrap called with inptr->data=\"%s\"\n", 118}, + {"Case Sensitive Search%s", 119}, + {"Search%s", 120}, + {"Search Cancelled", 121}, + {"Search Wrapped", 122}, + {"Replaced %d occurences", 123}, + {"Replaced 1 occurence", 124}, + {"Replace Cancelled", 125}, + {"Replace with [%s]", 126}, + {"Replace with", 127}, + {"Replace this instance?", 128}, + {"current->data now = \"%s\"\n", 129}, + {"After, data = \"%s\"\n", 130}, + {"Enter line number", 131}, + {"Aborted", 132}, + {"Come on, be reasonable", 133}, + {"Only %d lines available, skipping to last line", 134}, + {"Could not open file for writing: %s", 135}, + {"Could not open file: Path length exceeded.", 136}, + {"Wrote >%s\n", 137}, + {"Could not close %s: %s", 138}, + {"Could not open %s for writing: %s", 139}, + {"Could not set permissions %o on %s: %s", 140}, + {"Wrote %d lines", 141}, + {"File Name to write", 142}, + {"filename is %s", 143}, + {"File exists, OVERWRITE ?", 144}, + {"Error deleting tempfile, ack!", 145}, + {"Could not create a temporary filename: %s", 146}, + {"Could not invoke spell program \"%s\"", 147}, + {"Could not invoke \"ispell\"", 148}, + {"Finished checking spelling", 149}, + {"Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ", 150}, + {"Cannot resize top win", 151}, + {"Cannot move top win", 152}, + {"Cannot resize edit win", 153}, + {"Cannot move edit win", 154}, + {"Cannot resize bottom win", 155}, + {"Cannot move bottom win", 156}, + {"Main: set up windows\n", 157}, + {"Main: bottom win\n", 158}, + {"Main: open file\n", 159}, + {"I got Alt-[-%c! (%d)\n", 160}, + {"I got Alt-%c! (%d)\n", 161}, + {"actual_x for xplus=%d returned %d\n", 162}, + {"input '%c' (%d)\n", 163}, + {"New Buffer", 164}, + {" File: ...", 165}, + {"Modified", 166}, + {"Moved to (%d, %d) in edit buffer\n", 167}, + {"current->data = \"%s\"\n", 168}, + {"I got \"%s\"\n", 169}, + {" Y", 170}, + {"Yes", 171}, + {" A", 172}, + {"All", 173}, + {" N", 174}, + {"No", 175}, + {"^C", 176}, + {"do_cursorpos: linepct = %f, bytepct = %f\n", 177}, + {"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 178}, + {"Dumping file buffer to stderr...\n", 179}, + {"Dumping cutbuffer to stderr...\n", 180}, + {"Dumping a buffer to stderr...\n", 181}, +}; + +int _msg_tbl_length = 181; diff --git a/po/de.gmo b/po/de.gmo new file mode 100644 index 0000000000000000000000000000000000000000..97515cb98f9ac10523e550f8a11121581b6d872f GIT binary patch literal 15190 zcmbW7e{daFb;mb9i3CGJLI^+7aATraO8jKmiNT0Cv24q-Vp%qpY{xc^S-rRKY0-PT zFT49JOBB*Hl$JmWZJ{Iq0yO++p+IKnA3&KYox+qtXWD`O0@|d*g#MAz0y9iXTSNQ# z-n;vL$WrX^#z)`Xd(ZuK?m6e4d)7}}dGY%^evd=fLLa=u^M0h~=ktf(KfTcNUI~5& zRMCHf1K=f>d)_+mX7E;U8XN-e2S>oqfH#6qfY*bUT;X{y1=oYOfZIX!lYzeiJ_23^ zegWJJ{xzun{tw&*4!y{Y6M?Vh{V`Dee-{-01y{QFTS4`E9MpR5%gZ0l-@gW~r~Lb% z#_eZN0}g^$gOlKe;7L&Hn#Ypp5~9*UkJ1CWuW9Z0=^792EGc+K<&#z`TLi^n|OZ$lwA8@)_O+3%fPMRW^fGD zyfbhZd^0F{e+tw({}#Ls{CiM(^HWgcy!ho#9%8rt_TeC?_DxXoY=KP0 zdmG4Bc^?Al%6lB-pZ5*^^n*VDHP0V|n&;0z173hoHU2tK^4S4O&Qtu+IP;+NxdBSP zOQ7WWAh;2H43zx74Gw}&gW8X)P%7!qAgFN_4`5X>s_Ga&;(hccR#3oeH7GwejOCw4?(8tUCbtE zTmwq}n?UtH1FGMm5J z=a1|x0abnq)O_y+wVro?THhBy$^B13&GRRq_^+l@&F?x;@7qA>-)>OrJp`)%H-hS? z06_V4uMy~tp08TDf0G$EX`|xTHk}v_zzt4r87O`y@cdEe%b0WV^+B!?S7MC0wr@g7j~egu@g zd=%8aeHMHk_yf>@{{d=#FJv>se=Df>*MXX!pTEBslsvu!UIP9ZC^>x%lsvu%s$VtI zc$a~i@719E%B`UEa|*m33_-2?o#18Q`$6^l5m5U72~cwQN?!jxQ2jgwith~A4_=5c zHIFMm)!zt8k8TIA1Q);;f^P+{0v`m~8tPB(fhTa=6xF| zxf})efcJvx|LdUo{~mZ1_%w(}y<#-P$`DP$0>pcwK41N<-yZ-`p{`HSKyBh+p;C%+vepK@Ew}X=J;~-n@{ROCb z{R~9J-Yao}7l6{W;)CP4(R>R z4rmH0e$vz5gZ>CQ2+1Fxg7lLt7NK8*J_AWc#cu--@;PsTwARO_=J+}A_4%`Ge9(f-QDLg=H= zuS1ggZO}uI^%HP{4Fwk3}` zfju)`&hxvWU(L$|uY&G^KBgCbk3$zhBB&%X(7%AW;y=Fgu6V@P(h9SWe|g+2@w zzXy1z-#-pc8B#~)C>;~d*TQC43v>3qCs%B>`g6Vr^-P-CcTH8>BpdE4)NP;W{G>MNTM zQ_~32)UO5VNF1wHgtn>Q%HlAp1QGKZ<5{aL`*mjKN=+0jTA8NmOl{81)v!G`;#L|k ztMSO6s|Uuust?t!ENk`|q~8q7F%9+-POtYH%iU%W)j!zz-cq6 z*Mnr6D=8%4*Rvpr{46key~b)cGtbJFSutlpqsbDGv^K`bN(^c$72RMeakM@&%%Rb= z3acjP!FI~_d@2kU*^a}28B7AdLcjH;A@-tTcR*ZgRxa8uqFD0m>)U1L;ba>}wT?oG zZOzKlc^^)_9hgReR=xaP&Bc%_WT$k@Gvf_EtdANw zpY48{Ee*#>t?x)MH)`gytU0=IQZ1gtmnWLUHd+bNuoeXssa?=$)ujX(Y}Hm&mKX5rVYcMljh_akxLU%VOkA~0hmKflFzP<< zbJ%DU%*2PPaVs&*KQd`xdrOO!ZUUorMp^81-FhMPpV6hSiQgz(-v(QVe@gHWGL<0m z8(3!$vWw~}sBExvT$~SRo*32^#hF_O+-BZS;l_`nHDNUjDok@)lSTp>&(1LyirY~; z8FjB}jo34qTcyE$X06ofQPC5QFR8eaDhh9#=UzlUTZ)sKu+fYYx!%G>ro&beIb*gM z=f-dK%uX;)Gu%U?A>}u0f$b{E%B_soMoBwdJ&oPtJQNf|1VGG{WAd6~TuQQQR zgLBW4xL#TaI0S-wT0v9};9&2NAG%OM!Lxben=)mY8N7SQq)UytxQ+zI>e)HlaZ=H0 zdsnMj$Atqm6#%lp~);GWRV8xXg_vf zmAyDW2hf2fvvWRS)5q|FHCB}QW)QJ9+2D#9NH;)3{ocBPbe&Zo6gaAQV{=F^0IRr3 z+?h|SZAMJ}9vyi*{PKeRlQ#Ww;O(g6s{BQNi4!%Ob8*Brdfn+G+mjdL*+*X7=>=n-38IuS@+V>grZf}y zNqK&N@)$#mqYapc!8@mT49;1KTlI<+VYwdDasXYk-0fnRaWy`^L&o4IOKrPe!5K!U z&=0dNv}e=0uCDVMTi$jV+LkV!7=O#i)(RBNp>!+yw;a~OWhv+288rud>;VT<1A^1# zAgJI?x&}-!lV*@K!c;L_Y6fB*gvI*thX-P$*2>H*{>MJZb_-3gaiet<_~*c|!MP!{ zRms~G)PpR@!Ku-_pZH~TQ%+pH)q`qQcv=_Lth_E@>MHflX*%`q;<;1PM(B2pkO*(T`*EaNM1W~KI z&{?aMGW`sORnvC*L*AXOGz+Us1s1Alk9~Z*Pf*aD_x5sF5iSQczb^AQJUM>EhJ)Ue zL~Mn*&kv)~F2~vLxstZA7X>ocRuRT=yRgB0E*Cp&YCWAIiX>>(@$VdkIJChq8cK1D z)*aF+S->Y|?!j8NEjlz!|E|!+NF0XUeLLGU^|)-0YHwd2o$w&HkILga7_hwyww!n~ zvgJ}X$BO5YUarQSZ_!*(3!_MSooipQXPr)RPU6#Z@{z{OY?d=W8h zFzG_rw2q6(w2jSk(L!I}lp_Avh7MfW0$;M|Z`Za94zL0@)Ir@fig7&qW+$U3$uWPa za%9d^ZBaLrO5!gL^=xx4sDn;_;B|WB;sG7@MTylB1zfq)cM)BuT9;~E7m;H*xT9UH z20bt4_&|E1D6wmZ%WSue?K;JqOuN*Z(S5CmjSIIwI5s_VWc=Xd^n_VA9j`M-Ca0#% zuJM`KgZqz~oqNWnC&p)n%pJya!GP(kCoedHwKiE^{;K13jTJhMfz+FE$pdZxHVct) zbawPrC)BJz=gr1uM)z3nP-G8M&e1~=$B{b}oPiaA*I7Qws^OugcSxxTcds(XC#DZ! zg>3~nVU9aZIpMN4<~I4e+leT9TCKrz#NK}hP(e7BTt8KKGOmXVuBHo>PO zur!1xv*A^<7}9#&+RmcYAuYRG#mJhQ8PjC z3jb=H`zH5|ch<6Lc%)zVM{ZoD*`+2^mvwK%xrNc|tdKeUwuNb2+PZbiYfGCt%$gqA z)zWxW=EPG(zO^)`WM=;X7cb)fy3(zt7NljaZNXfitfY~g!Xo#2YNA$;~;}v#_kpz2;k%D(h$%x_GOxQrF1}`8P_MLbW!=4rZSC5#bFkAv3n@yL#EE%6mMt(O zT#_^81vf=CJ1@rGOzb{{Y5WDQks)~^D@HM_Qrwe|9Z#45v2T_A60l7^XhwMyZcTx?{o4F^!JI&R2xz#XJ=x}77saCOEGq}Kx z2L=iA-g5_x30r7-vNc8J29NEpf@?17|MCgL@bgj@Q|l2_O{$8)w5%c-=s)o0Ro zcGbi$xe^T1SL&uz&6T4wgIZwCf>_aZ125C!dm=e#H`zhWvtmD4<|mKJ9UA6t zcRp97>3nWdR>X3a&hE-J*zVR#8XAA1iMVwP_AG>)HQ#nno8IkU@2Y2NbAHlEM58cv zjjjPhu$DS58!bivxw04PLoQMhS}P4*sQ!vvwDm}}0FTaeNl0rGVtFHP+Aq)Jea}uy z2i`Gj`(2soN$VM`JdZ7gI!~3Yl@n)Gi*bU=ky$i*5Uhgc{Shjf14kwalosf}GIJkf2*v5rA`|r(QA6%%>&_mXycnfV%rmdey;wMYi9QTSj zKd+I@K)96qgT(qd#o$#|=WOso{ zlQcFfEP_0x4umA~rk;V{H5ckqyC5TO7&nNiuVCQzB!}*5i~mm1<~nE<)|=oyVf`0T zth@9?SaP07mqWA3cFVQ4*{<2dN%C1bCI=tnNq8%ki2OSaOEbc^u-aVRR;rTQoMOd! zNN8`(#l6ULW9J!p>!Wpcaze2YVd|>w#b4oGN6fC7%Eq~Kol&HBT;^ia^S$b5BU^iB zurqvLB4Xsj0Y{NL^}NHRL!U~r)Uy$W{GiDXHm3q zgo0T0X}9G&j@iVpxVd_fmM`9P1a%Vg-KE{BdE24Bd)Ujv>RQ8oSXn6XrLXhk(Aq^# zV(nKKFYXJXGwr({*}k)G1iHRhQ|G^#1bA>tmQms`NZkwT}PkgX)4O)e#=#e~7vS7#R<*@3X zv*g=`!7p>ZskfDe-{}N1aB&}s$A4~!6Z}gpz^5n%K^v@lX)Bo2wiBYP&^~q0Q@OHj z!)*hRSQXESowZfIsL`<9<<@C+`kY}oXVFD$62_ZV#_;Md`Ub`LA1LCo*U{ zM~FsZ*PORRBT6vv&D2)d7k8wQQ`YR54TT)Ix&xBqa~5T%KsqkaA?ns`FF-w(-cJ4N zU3kdLDsrQ8nL>NK&UiIGSIP%<>oCSZGRBr*SJf*2>%g8OJIGz| z6ebNBV!Id(wTGAd7!T4!#l%IFXSESy8+ZS42LW|+2hkmQJM@UCqvyqa4Pde)HBF~? zM2D^tZZPjnYm~S3m2UI1r0uWG;5tcuoedqsgb&UNm%fVB-8J2P8L)9s_d=Xea^!aI z*4*?u3!QAQ(VlH~-Kl!XgDOHDd#<*R)#BDH2ib9V!`^t|IB{yLMZ6uiNgS;m!YB58 z4(L(~z6ZF^NPG`)xy9S;#_EeeZ_72=j_}br&2kNC3(=ctM;YDPgnqber#IuCjQtvL zr{DWAfY7J?F`&lRTDowmxyt7NbgjnD5aHRd^jW_Mtj+rzJ_@`^Ui6pvEMNtje;3FU z+4iLU_mX#K36$Y!ZJ;u|;=_P5^2DsliBce_p!*|%^Q(wXu?EojOi(!Fv+GuTCD@BD l>5G*7H~z0UPkX-?=&aGlPDO^8ZztkVMkD`jkhu>B{|`nbh&=!R literal 0 HcmV?d00001 diff --git a/po/de.po b/po/de.po new file mode 100644 index 00000000..97be1fd1 --- /dev/null +++ b/po/de.po @@ -0,0 +1,947 @@ +# German Messages for the nano editor +# Florian König March 30, 2000 +# Copyright (C) 2000 Free Software Foundation, Inc. +# Florian König , 2000. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2000-05-31 10:00-0500\n" +"PO-Revision-Date: 2000-03-30 20:50+0100\n" +"Last-Translator: Florian König \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: cut.c:43 +#, c-format +msgid "add_to_cutbuffer called with inptr->data = %s\n" +msgstr "add_to_cutbuffer aufgerufen mit inptr->data = %s\n" + +#: cut.c:146 +msgid "Blew away cutbuffer =)\n" +msgstr "Inhalt der Zwischenablage verworfen\n" + +#: global.c:110 +msgid "Invoke the help menu" +msgstr "Hilfe-Menü anzeigen" + +#: global.c:111 +msgid "Write the current file to disk" +msgstr "Datei speichern" + +#: global.c:112 +msgid "Exit from nano" +msgstr "nano beenden" + +#: global.c:113 +msgid "Goto a specific line number" +msgstr "Zu einer Zeile springen" + +#: global.c:114 +msgid "Justify the current paragraph" +msgstr "Paragraph ausrichten" + +#: global.c:115 +msgid "Replace text within the editor" +msgstr "Text im Editor ersetzen" + +#: global.c:116 +msgid "Insert another file into the current one" +msgstr "Datei einfügen" + +#: global.c:117 +msgid "Search for text within the editor" +msgstr "Im Editor nach Text suchen" + +#: global.c:118 +msgid "Move to the previous screen" +msgstr "Zu der vorhergehenden Seite springen" + +#: global.c:119 +msgid "Move to the next screen" +msgstr "Zu der folgenden Seite springen" + +#: global.c:120 +msgid "Cut the current line and store it in the cutbuffer" +msgstr "Zeile ausschneiden und in dir Zwischenablage speichern" + +#: global.c:121 +msgid "Uncut from the cutbuffer into the current line" +msgstr "Aus der Zwischenablage einfügen" + +#: global.c:122 +msgid "Show the posititon of the cursor" +msgstr "Cursoposition anzeigen" + +#: global.c:123 +msgid "Invoke the spell checker (if available)" +msgstr "Rechtschreibprüfung aufrufen (wenn verfügbar)" + +#: global.c:124 +msgid "Move up one line" +msgstr "Zur vorhergehenden Zeile springen" + +#: global.c:125 +msgid "Move down one line" +msgstr "Zur folgenden Zeile springen" + +#: global.c:126 +msgid "Move forward one character" +msgstr "Zum folgenden Zeichen springen" + +#: global.c:127 +msgid "Move back one character" +msgstr "Zum vorhergehenden Zeichen springen" + +#: global.c:128 +msgid "Move to the beginning of the current line" +msgstr "Zum Zeilenanfang springen" + +#: global.c:129 +msgid "Move to the end of the current line" +msgstr "Zum Zeilenende springen" + +#: global.c:130 +msgid "Go to the first line of the file" +msgstr "Zur ersten Zeile springen" + +#: global.c:131 +msgid "Go to the last line of the file" +msgstr "Zur letzten Zeile springen" + +#: global.c:132 +msgid "Refresh (redraw) the current screen" +msgstr "Bildschirm auffrischen" + +#: global.c:133 +msgid "Mark text at the current cursor location" +msgstr "Text an der derzeitigen Cursorposition markieren" + +#: global.c:134 +msgid "Delete the character under the cursor" +msgstr "Zeichen an der Cursorposition löschen" + +#: global.c:136 +msgid "Delete the character to the left of the cursor" +msgstr "Zeichen links vom Cursor löschen" + +#: global.c:137 +msgid "Insert a tab character" +msgstr "Tabulator einfügen" + +#: global.c:138 +msgid "Insert a carriage return at the cursor position" +msgstr "Zeilenumbruch an der Cursorposition einfügen" + +#: global.c:140 +msgid "Make the current search or replace case (in)sensitive" +msgstr "" +"Groß- und Kleinschreibung bei Suche oder Erstzen (nicht) berücksichtigen" + +#: global.c:141 +msgid "Cancel the current function" +msgstr "Funktion abbrechen" + +#: global.c:146 global.c:256 global.c:322 +msgid "Get Help" +msgstr "Hilfe" + +#: global.c:149 global.c:157 +msgid "WriteOut" +msgstr "Speichern" + +#: global.c:153 global.c:311 +msgid "Exit" +msgstr "Beenden" + +#: global.c:161 global.c:252 +msgid "Goto Line" +msgstr "Zu Zeile" + +#: global.c:166 global.c:244 +msgid "Justify" +msgstr "Ausrichten" + +#: global.c:169 global.c:240 +msgid "Replace" +msgstr "Ersetzen" + +#: global.c:173 +msgid "Read File" +msgstr "Datei öffnen" + +#: global.c:177 +msgid "Where Is" +msgstr "Wo ist" + +#: global.c:181 global.c:303 +msgid "Prev Page" +msgstr "Seite zurück" + +#: global.c:185 global.c:307 +msgid "Next Page" +msgstr "Seite vor" + +#: global.c:189 +msgid "Cut Text" +msgstr "Ausschneiden" + +#: global.c:192 +msgid "UnCut Txt" +msgstr "Einfügen" + +#: global.c:196 +msgid "Cur Pos" +msgstr "Cursor" + +#: global.c:200 +msgid "To Spell" +msgstr "Rechtschr." + +#: global.c:204 +msgid "Up" +msgstr "Hoch" + +#: global.c:207 +msgid "Down" +msgstr "Runter" + +#: global.c:210 +msgid "Forward" +msgstr "Vorwärts" + +#: global.c:213 +msgid "Back" +msgstr "Zurück" + +#: global.c:216 +msgid "Home" +msgstr "Pos 1" + +#: global.c:219 +msgid "End" +msgstr "Ende" + +#: global.c:222 +msgid "Refresh" +msgstr "Auffrischen" + +#: global.c:225 +msgid "Mark Text" +msgstr "Text markieren" + +#: global.c:228 +msgid "Delete" +msgstr "Löschen" + +#: global.c:232 +msgid "Backspace" +msgstr "Backspace" + +#: global.c:236 +msgid "Tab" +msgstr "Tab" + +#: global.c:247 +msgid "Enter" +msgstr "Enter" + +#: global.c:260 global.c:277 global.c:293 +msgid "First Line" +msgstr "Erste Zeile" + +#: global.c:263 global.c:280 global.c:296 +msgid "Last Line" +msgstr "Letzte Zeile" + +#: global.c:266 global.c:283 +msgid "Case Sens" +msgstr "GROSZ/klein" + +#: global.c:270 +#, fuzzy +msgid "To Replace" +msgstr "Ersetzen" + +#: global.c:273 global.c:289 global.c:299 global.c:315 global.c:319 +#: global.c:325 winio.c:883 +msgid "Cancel" +msgstr "Abbrechen" + +#: global.c:286 +#, fuzzy +msgid "To Search" +msgstr "Suche%s" + +#: nano.c:114 +msgid "" +"\n" +"Buffer written to 'nano.save'\n" +msgstr "" +"\n" +"Puffer in 'nano.save' geschrieben\n" + +#: nano.c:127 +msgid "nano: malloc: out of memory!" +msgstr "nano: malloc: Kein Speicher verfügbar!" + +#: nano.c:144 +msgid "Key illegal in VIEW mode" +msgstr "Unzulässige Taste im View Modus" + +#: nano.c:185 +msgid "" +" nano help text\n" +"\n" +" The nano editor is designed to emulate the functionality and ease-of-use of " +"the UW Pico text editor. There are four main sections of the editor: The " +"top line shows the program version, the current filename being edited, and " +"whether or not the file has been modified. Next is the main editor window " +"showing the file being edited. The status line is the third line from the " +"bottom and shows important messages. The bottom two lines show the most " +"commonly used shortcuts in the editor.\n" +"\n" +" The notation for shortcuts is as follows: Control-key sequences are notated " +"with a caret (^) symbol. Alt-key sequences are notated with an at (@) " +"symbol. The following keystrokes are available in the main editor window. " +"Optional keys are shown in parentheses:\n" +"\n" +msgstr "" +" nano Hilfe\n" +"\n" +" Nano wurde konzipiert um die Funktionalität und die Benutzerfreundlichkeit " +"des UW Pico Texteditors zu imitieren. Es gibt vier Hauptbereiche: Die " +"Titelzeile zeigt die Version des Programms, den Dateinamen der aktuellen " +"Datei und ob die Datei verändert wurde oder nicht. Das Hauptfenster zeigt " +"die geöffnete Datei. Die Statuszeile (die dritte Zeile von unten) und zeigt " +"wichtige Meldungen. Die untersten zwei Zeilen listet die meistgebrauchten " +"Tastenkombinationen von nano auf.\n" +"\n" +" Tastenkombinationen werden wie folgt abgekürzt: Kombinationen mit der " +"Strg-Taste werden mit einem ^ ausgedrückt, Alt-Taste-Kombinationen mit einem " +"@. Die folgenden Tasten(kombinationen) sind im Hauptfenster verfügbar. " +"Optionale Tasten sind eingeklammert.\n" +"\n" + +#: nano.c:286 +msgid "free_node(): free'd a node, YAY!\n" +msgstr "free_node(): Knoten freigegeben.\n" + +#: nano.c:291 +msgid "free_node(): free'd last node.\n" +msgstr "free_node(): letzter Knoten freigegeben.\n" + +#: nano.c:407 +msgid "read_line: not on first line and prev is NULL" +msgstr "read_line: nicht in der ersten Zeile und prev ist NULL" + +#: nano.c:468 nano.c:482 +#, c-format +msgid "Read %d lines" +msgstr "%d Zeilen gelesen" + +#: nano.c:500 nano.c:1161 nano.c:1179 +#, c-format +msgid "\"%s\" not found" +msgstr "\"%s\" nicht gefunden" + +#. We have a new file +#: nano.c:504 +msgid "New File" +msgstr "Neue Datei" + +#: nano.c:513 +#, c-format +msgid "File \"%s\" is a directory" +msgstr "Datei \"%s\" ist ein Verzeichnis" + +#: nano.c:518 +msgid "Reading File" +msgstr "Lese Datei" + +#: nano.c:531 +msgid "File to insert [from ./] " +msgstr "Datei zum Einfügen [von ./] " + +#: nano.c:546 nano.c:1601 nano.c:1765 nano.c:1916 +msgid "Cancelled" +msgstr "Abgebrochen" + +#: nano.c:556 +msgid "" +"Usage: nano [GNU long option] [option] +LINE \n" +"\n" +msgstr "" +"Aufruf: nano [GNU lange Option] [Option] +ZEILE \n" +"\n" + +#: nano.c:557 +msgid "Option\t\tLong option\t\tMeaning\n" +msgstr "Option\t\tlange Option\t\tBedeutung\n" + +#: nano.c:560 +msgid " -V \t\t--version\t\tPrint version information and exit\n" +msgstr " -V \t\t--version\t\tVersionsinfo ausgeben und beenden\n" + +#: nano.c:562 +msgid " -c \t\t--const\t\t\tConstantly show cursor position\n" +msgstr " -c \t\t--const\t\t\tCursorposition ständig anzeigen\n" + +#: nano.c:564 +msgid " -h \t\t--help\t\t\tShow this message\n" +msgstr " -h \t\t--help\t\t\tDiese Meldung anzeigen\n" + +#: nano.c:566 +msgid " -i \t\t--autoindent\t\tAutomatically indent new lines\n" +msgstr " -i \t\t--autoindent\t\tNeue Zeilen automatisch einrücken\n" + +#: nano.c:568 +msgid " -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:571 +msgid " -m \t\t--mouse\t\t\tEnable mouse\n" +msgstr " -m \t\t--mouse\t\t\tMaus aktivieren\n" + +#: nano.c:576 +msgid "" +" -r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n" +msgstr "" +" -r [#Spalten] \t--fill=[#Spalten]\t\tSpalten auffüllen (Zeilenumbruch bei) " +"#Spalten\n" + +#: nano.c:578 +msgid " -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p\t \t--pico\t\t\tErscheinungsbild von Pico stärker imitieren\n" + +#: nano.c:580 +msgid " -s [prog] \t--speller=[prog]\tEnable alternate speller\n" +msgstr "" +" -s [Programm] \t--speller=[Programm]\tAlternative Rechtschreibprüfung\n" + +#: nano.c:582 +msgid " -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n" +msgstr " -t \t\t--tempfile\t\tBeim Beenden ohne Rückfrage speichern\n" + +#: nano.c:584 +msgid " -v \t\t--view\t\t\tView (read only) mode\n" +msgstr "" +" -v \t\t--view\t\t\tNur zum Lesen öffnen (keine Veränderungen möglich)\n" + +#: nano.c:586 +msgid " -w \t\t--nowrap\t\tDon't wrap long lines\n" +msgstr " -w \t\t--nowrap\t\tLange Zeilen nicht in neue Zeilen umbrechen\n" + +#: nano.c:588 +msgid " -x \t\t--nohelp\t\tDon't show help window\n" +msgstr " -x \t\t--nohelp\t\tHilfe-Fenster nicht anzeigen\n" + +#: nano.c:590 +msgid " -z \t\t--suspend\t\tEnable suspend\n" +msgstr "" +" -z \t\t--suspend\t\tSuspend (anhalten und zurück zur Shell) aktivieren\n" + +#: nano.c:592 +msgid " +LINE\t\t\t\t\tStart at line number LINE\n" +msgstr " +ZEILE\t\t\t\t\tBei Zeile ZEILE beginnen\n" + +#: nano.c:594 +msgid "" +"Usage: nano [option] +LINE \n" +"\n" +msgstr "" +"Aufruf: nano [Option] +ZEILE \n" +"\n" + +#: nano.c:595 +msgid "Option\t\tMeaning\n" +msgstr "Option\t\tBedeutung\n" + +#: nano.c:596 +msgid " -V \t\tPrint version information and exit\n" +msgstr " -V \t\tVersionsinfo ausgeben und beenden\n" + +#: nano.c:597 +msgid " -c \t\tConstantly show cursor position\n" +msgstr " -c \t\tCursorposition ständig anzeigen\n" + +#: nano.c:598 +msgid " -h \t\tShow this message\n" +msgstr " -h \t\tDiese Meldung anzeigen\n" + +#: nano.c:599 +msgid " -i \t\tAutomatically indent new lines\n" +msgstr " -i \t\tNeue Zeilen automatisch einrücken\n" + +#: nano.c:601 +msgid " -l \t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:604 +msgid " -m \t\tEnable mouse\n" +msgstr " -m \t\tMaus aktivieren\n" + +#: nano.c:608 +msgid " -r [#cols] \tSet fill cols to (wrap lines at) #cols\n" +msgstr " -r [#Spalten] \tSpalten auffüllen (Zeilenumbruch bei) #Spalten\n" + +#: nano.c:609 +msgid " -s [prog] \tEnable alternate speller\n" +msgstr " -s [Programm] \tAlternative Rechtschreibprüfung\n" + +#: nano.c:610 +msgid " -p \t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p \t\tErscheinungsbild von Pico stärker imitieren\n" + +#: nano.c:611 +msgid " -t \t\tAuto save on exit, don't prompt\n" +msgstr " -t \t\tBeim Beenden ohne Rückfrage speichern\n" + +#: nano.c:612 +msgid " -v \t\tView (read only) mode\n" +msgstr " -v \t\tNur zum Lesen öffnen (keine Veränderungen möglich)\n" + +#: nano.c:613 +msgid " -w \t\tDon't wrap long lines\n" +msgstr " -w \t\tLange Zeilen nicht in neue Zeilen umbrechen\n" + +#: nano.c:614 +msgid " -x \t\tDon't show help window\n" +msgstr " -x \t\tHilfe-Fenster nicht anzeigen\n" + +#: nano.c:615 +msgid " -z \t\tEnable suspend\n" +msgstr " -z \t\tSuspend (anhalten und zurück zur Shell) aktivieren\n" + +#: nano.c:616 +msgid " +LINE\t\tStart at line number LINE\n" +msgstr " +ZEILE\t\tBei Zeile ZEILE beginnen\n" + +#: nano.c:623 +#, c-format +msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n" +msgstr " nano Version %s von Chris Allegretta (compiliert um %s, %s)\n" + +#: nano.c:625 +msgid " Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" +msgstr " Email: nano@asty.org\tWWW: http://www.asty.org/nano\n" + +#: nano.c:709 +msgid "Mark Set" +msgstr "Markierung gesetzt" + +#: nano.c:714 +msgid "Mark UNset" +msgstr "Markierung gelöscht" + +#: nano.c:1052 +#, c-format +msgid "check_wrap called with inptr->data=\"%s\"\n" +msgstr "check_wrap aufgerufen mit inptr->data=\"%s\"\n" + +#: nano.c:1089 +#, c-format +msgid "Case Sensitive Search%s" +msgstr "Suche mit Unterscheidung von Groß- und Kleinschreibung%s" + +#: nano.c:1090 +#, c-format +msgid "Search%s" +msgstr "Suche%s" + +#: nano.c:1094 +msgid "Search Cancelled" +msgstr "Suche abgebrochen" + +#: nano.c:1175 +msgid "Search Wrapped" +msgstr "Suche in neue Zeile umgebrochen" + +#: nano.c:1225 +#, c-format +msgid "Replaced %d occurences" +msgstr "%d mal Ersetzung vorgenommen" + +#: nano.c:1227 +msgid "Replaced 1 occurence" +msgstr "1 Ersetzung vorgenommen" + +#: nano.c:1245 nano.c:1267 nano.c:1290 +msgid "Replace Cancelled" +msgstr "Ersetzung abgebrochen" + +#: nano.c:1263 +#, c-format +msgid "Replace with [%s]" +msgstr "Ersetzen mit [%s]" + +#. last_search is empty +#: nano.c:1288 +msgid "Replace with" +msgstr "Ersetzen mit" + +#: nano.c:1329 +msgid "Replace this instance?" +msgstr "Ersetzen?" + +#: nano.c:1416 +#, c-format +msgid "current->data now = \"%s\"\n" +msgstr "current->data jetzt = \"%s\"\n" + +#: nano.c:1461 +#, c-format +msgid "After, data = \"%s\"\n" +msgstr "Nachher, data = \"%s\"\n" + +#. Ask for it +#: nano.c:1529 +msgid "Enter line number" +msgstr "Zeilennummer eingeben" + +#: nano.c:1531 +msgid "Aborted" +msgstr "Abgebrochen" + +#: nano.c:1551 +msgid "Come on, be reasonable" +msgstr "Komm schon, sei vernünftig" + +#: nano.c:1556 +#, c-format +msgid "Only %d lines available, skipping to last line" +msgstr "Nur %d Zeilen vorhanden, springe zur letzten Zeile" + +#: nano.c:1613 nano.c:1629 nano.c:1641 nano.c:1658 nano.c:1664 +#, c-format +msgid "Could not open file for writing: %s" +msgstr "Konnte nicht in Datei schreiben: %s" + +#: nano.c:1621 +msgid "Could not open file: Path length exceeded." +msgstr "Konnte Datei nicht öffnen: Pfad zu lang." + +#: nano.c:1646 +#, c-format +msgid "Wrote >%s\n" +msgstr "Schrieb >%s\n" + +#: nano.c:1673 +#, c-format +msgid "Could not close %s: %s" +msgstr "Konnte %s nicht schließen: %s" + +#. Try a rename?? +#: nano.c:1694 nano.c:1705 nano.c:1710 +#, c-format +msgid "Could not open %s for writing: %s" +msgstr "Konnte nicht in %s schreiben: %s" + +#: nano.c:1716 +#, c-format +msgid "Could not set permissions %o on %s: %s" +msgstr "Konnte Rechte %o für %s nicht setzen: %s" + +#: nano.c:1723 +#, c-format +msgid "Wrote %d lines" +msgstr "%d Zeilen geschrieben" + +#: nano.c:1744 +msgid "File Name to write" +msgstr "Dateiname zum speichern" + +#: nano.c:1749 +#, c-format +msgid "filename is %s" +msgstr "Dateiname ist %s" + +#: nano.c:1754 +msgid "File exists, OVERWRITE ?" +msgstr "" + +#: nano.c:1783 +msgid "Error deleting tempfile, ack!" +msgstr "Konnte temporäre Datei nicht löschen" + +#: nano.c:1796 nano.c:1846 +#, c-format +msgid "Could not create a temporary filename: %s" +msgstr "Konnte keine temporäre Datei erzeugen: %s" + +#: nano.c:1818 nano.c:1868 +#, c-format +msgid "Could not invoke spell program \"%s\"" +msgstr "Konnte Rechtschreibprogramm \"%s\" nicht aufrufen" + +#. Why 32512? I dont know! +#: nano.c:1824 nano.c:1874 +msgid "Could not invoke \"ispell\"" +msgstr "Konnte \"ispell\" nicht aufrufen" + +#: nano.c:1836 nano.c:1886 +msgid "Finished checking spelling" +msgstr "Rechtschreibprüfung abgeschlossen" + +#: nano.c:1903 +msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " +msgstr "Veränderten Puffer speichern (\"Nein\" verwirft die Änderungen) ? " + +#: nano.c:2027 +msgid "Cannot resize top win" +msgstr "Kann die Größe des oberen Fensters nicht verändern" + +#: nano.c:2029 +msgid "Cannot move top win" +msgstr "Kann oberes Fenster nicht verschieben" + +#: nano.c:2031 +msgid "Cannot resize edit win" +msgstr "Kann Größe des Bearbeitungsfensters nicht verändern" + +#: nano.c:2033 +msgid "Cannot move edit win" +msgstr "Kann Bearbeitungsfenster nicht verschieben" + +#: nano.c:2035 +msgid "Cannot resize bottom win" +msgstr "Kann Größe des unteren Fensters nicht verändern" + +#: nano.c:2037 +msgid "Cannot move bottom win" +msgstr "Kann unteres Fenster nicht verschieben" + +#: nano.c:2468 +msgid "Main: set up windows\n" +msgstr "Hauptprogramm: Fenster konfigurieren\n" + +#: nano.c:2490 +msgid "Main: bottom win\n" +msgstr "Hauptprogramm: unteres Fenster\n" + +#: nano.c:2496 +msgid "Main: open file\n" +msgstr "Hauptprogramm: Datei öffnen\n" + +#: nano.c:2564 +#, c-format +msgid "I got Alt-[-%c! (%d)\n" +msgstr "Erhielt Alt-[-%c! (%d)\n" + +#: nano.c:2580 +#, c-format +msgid "I got Alt-%c! (%d)\n" +msgstr "Erhielt Alt-%c! (%d)\n" + +#: winio.c:116 +#, c-format +msgid "actual_x for xplus=%d returned %d\n" +msgstr "actual_x für xplus=%d gab %d zurück\n" + +#: winio.c:402 +#, c-format +msgid "input '%c' (%d)\n" +msgstr "Eingabe '%c' (%d)\n" + +#: winio.c:438 +msgid "New Buffer" +msgstr "Neuer Puffer" + +#: winio.c:441 +msgid " File: ..." +msgstr " Datei: ..." + +#: winio.c:449 +msgid "Modified" +msgstr "Verändert" + +#: winio.c:800 +#, c-format +msgid "Moved to (%d, %d) in edit buffer\n" +msgstr "Nach (%d, %d) im Bearbeitungspuffer verschoben\n" + +#: winio.c:811 +#, c-format +msgid "current->data = \"%s\"\n" +msgstr "current->data = \"%s\"\n" + +#: winio.c:854 +#, c-format +msgid "I got \"%s\"\n" +msgstr "Erhielt \"%s\"\n" + +#: winio.c:878 +msgid " Y" +msgstr " J" + +#: winio.c:878 +msgid "Yes" +msgstr "Ja" + +#: winio.c:880 +msgid " A" +msgstr " A" + +#: winio.c:880 +msgid "All" +msgstr "Alle" + +#: winio.c:882 +msgid " N" +msgstr " N" + +#: winio.c:882 +msgid "No" +msgstr "Nein" + +#: winio.c:883 +msgid "^C" +msgstr "^C" + +#: winio.c:1027 +#, c-format +msgid "do_cursorpos: linepct = %f, bytepct = %f\n" +msgstr "do_cursorpos: linepct = %f, bytepct = %f\n" + +#: winio.c:1031 +msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" +msgstr "Zeile %d von %d (%.0f%%), Zeichen %d von %d (%.0f%%)" + +#: winio.c:1157 +msgid "Dumping file buffer to stderr...\n" +msgstr "Gebe Datei Puffer nach stderr aus...\n" + +#: winio.c:1159 +msgid "Dumping cutbuffer to stderr...\n" +msgstr "Gebe Inhalt der Zwischenablage nach stderr aus...\n" + +#: winio.c:1161 +msgid "Dumping a buffer to stderr...\n" +msgstr "Gebe einen Puffer nach stderr aus...\n" + +#~ msgid "nano.save" +#~ msgstr "nano.save" + +#~ msgid "nano: realloc: out of memory!" +#~ msgstr "nano: realloc: Kein Speicher verfügbar!" + +#~ msgid "%s: %s" +#~ msgstr "%s: %s" + +#~ msgid " [%s]" +#~ msgstr " [%s]" + +#~ msgid "$" +#~ msgstr "ATS " + +#~ msgid ".XXXXXX" +#~ msgstr ".XXXXXX" + +#~ msgid "\n" +#~ msgstr "\n" + +#~ msgid "nano." +#~ msgstr "nano." + +#~ msgid "%s %s" +#~ msgstr "%s %s" + +#~ msgid "ispell %s" +#~ msgstr "ispell %s" + +#~ msgid "Justify Complete" +#~ msgstr "Ausrichten abgeschlossen" + +#~ msgid "^%c\t" +#~ msgstr "^%c\t" + +#~ msgid "(F%d)\t" +#~ msgstr "(F%d)\t" + +#~ msgid "\t" +#~ msgstr "\t" + +#~ msgid "(@%c)\t" +#~ msgstr "(@%c)\t" + +#~ msgid "%s\n" +#~ msgstr "%s\n" + +#~ msgid "version" +#~ msgstr "Version" + +#~ msgid "const" +#~ msgstr "const" + +#~ msgid "suspend" +#~ msgstr "suspend" + +#~ msgid "nowrap" +#~ msgstr "nowrap" + +#~ msgid "nohelp" +#~ msgstr "nohelp" + +#~ msgid "help" +#~ msgstr "help" + +#~ msgid "autoindent" +#~ msgstr "autoindent" + +#~ msgid "tempfile" +#~ msgstr "tempfile" + +#~ msgid "speller" +#~ msgstr "speller" + +#~ msgid "fill" +#~ msgstr "fille" + +#~ msgid "mouse" +#~ msgstr "mouse" + +#~ msgid "pico" +#~ msgstr "pico" + +#, fuzzy +#~ msgid "?Vchilmpr:s:tvwxz" +#~ msgstr "?Vchimpr:s:tvwxz" + +#, fuzzy +#~ msgid "h?Vcilmpr:s:tvwxz" +#~ msgstr "h?Vcimpr:s:tvwx" + +#~ msgid "I got %c (%d)!\n" +#~ msgstr "Erhielt %c (%d)!\n" + +#~ msgid "File: " +#~ msgstr "Datei: " + +#~ msgid " %-11s" +#~ msgstr " %-11s" + +#~ msgid "^%c" +#~ msgstr "^%c" + +#~ msgid ": " +#~ msgstr ": " + +#~ msgid "[ " +#~ msgstr "[ " + +#~ msgid " ]" +#~ msgstr " ]" + +#~ msgid "(%ld) %s\n" +#~ msgstr "(%ld) %s\n" + +#~ msgid "Suspend" +#~ msgstr "Suspend" + +#~ msgid "Suspend nano if suspend is enabled" +#~ msgstr "nano anhalten und zur Shell zurückkehren (nur wenn aktiviert)" + +#~ msgid "xplustabs for current_x=%d returned %d\n" +#~ msgstr "xplustabs für current_x=%d gab %d zurück\n" diff --git a/po/es.gmo b/po/es.gmo new file mode 100644 index 0000000000000000000000000000000000000000..2d1ac62fc7327bc5df7dad5001e604d925ad3019 GIT binary patch literal 15558 zcmbW73veA*dB>N$r7#Ie2#*Blv4gNgELnE!JVcyWwiR1JmV_kR4Q^sq_pYS1@7=xG z-D_D6p|lVlZF#kXH-$oYH4PM!nGS8~P)dQOg_hDz%cGroptSCg0VZLlNjpt{|8vgX zt1HV7*wMNF-E+S4`p)-#=R4ogzg~Xc{Q=Lzq!*ALIX?(~431sQ56?xH2Ei|ZU7)i1 zz#ec5xE4GBZU$ci_JI$BgW$h_F99!kRuHTKw}8(B_k-7g4N&bo01knVf&<|Bmj%HK z!Oh?m;1swCoCDSVd%>OHUx4cOqRWHedT=YK{t8g^@Au!|0M*aWK+W%J8Wr7*puP`+ z>%doo>h}TAfL{Wy1iufS13n3=zyI~$8=vj+H-pbOHwbP3Z=n39=Q3yTZtz0zwIEf3 zH-V4^9{|q-KMZz(9|QRdKEuxi;8($`!Eb;n|1a=4;1eKS1Q)|ZwP!%_b2C3G-vesA zRZ#Vgfm8`z@5?{n@nKMWd=z{>_yl+jcnKd`r%j-~XTX<&M?vxHqoC&VD0mV0_n`Rv zT~On`!4^;iP`R@;c&*b|P zp!o0zsB!$M|Nb{n^Z!qfu7jsQ@$>n{)f)s=z7hDQV^Sub; zr}nP^)y{K4{(`IcQTtoLUa$sgeeVY)rw@W!pT7jv-j6|=4E_&<6@g(8n%_3?I`9=B zA{E>R_Jbb*H#`Hq0Yxum6Tc0p@_z7I@BsKy@QvVR@N?h|;D7k&{|rjs{u^Y-K`)bGD8V?W@ixJ8z;}R}*E{|9-+266FgX`H z1!_FQEQ<8x9`GXYt)SNB-QfA)LmnRnFW~$0AWIT_5fuIRLFw0zz%KAY2B&dd1~T>F z2LF8!6u<8S#kW89-#-N}iSe#kT}hyYB`yt`C8-%bx-@?(c!(|G$Hhv&$*ed^dyQ^AM=^UkPd+_kyr3_!ua< zPk|cGXF!%B_$#0PIM~hilc4Ovg$S$Uv|4LBnaT6%JybZhp90SF-SApX55m0vaAyEB)#ebgwC3olWqjqluHO?KN z=w1a%e_jX5PQD#{Huyl2{*c?8rte+fJXd=%8WejQZ%Pk|cu3vYD% z-2^_1@0WoZ?-+O~xX*vjf$Fybs{OZss{bBP<9-N~y#F`+J6w#dVdYH_7s$S{RC9MPx$huLCOC`LvFnXK)MRHfXYvN{yRa< z_x+&w@n@j={R$|4eH#>ie(3Q8D1QG4M0JB_p*+%?Tfr;A1yJ*O4Jf|957d0W465I6 zfwDVKg6hZI?CkP&pyo3V-U_|}d@TbG zUhO`uzF*C|`1c0VFzJ0H@q3(9K9Z|7yh)gCv$Tm?FKM^a0X~Nf(p!9Cl#W_65BEHtAP=p5PMF0n#V*!SgWbT+%L5NO~LT z^`wKOInwWt^n8r;3er_1$=9VM>A^nIy`)!?Mo6fGeLn2*0`P9qout&~$?g~us&8fS zLa=;}@Nyn$59x)ZJ4g{p&nQWK)=3#@6RC^z5NSW@9+IAU(h%uW`rvsD>2mvq{|CO= zzyAh!oqrdM`S;I)FCjgfw4Jm-x}WqBQu(}vmqY%e3MQoY`tL=LZvxklc93Lq^n8+Z z)V{f&^MPOY-_Kc=|I7Y;H`q)1tz~6;{oV4rdwX+kF3QYe78ga7m?Aank}ydJ^6*Hs zt~)U1wzw7znSp_Uz+5{vIzG~+XSxWp!i0sX#Ytq6W_^}6R7wp`bvly%eWt6czyC;- z<#C#Hbxme*QW*bf;$$w(>R~~V36rXcj>ZM;+Dd0fS+UJm(j+e!><(d=6tyLjFQkj6 z(#-NSGmSKl)rXo^g|i@AuzXPT@ljQcYAQhhe9#T7MrIA3p4 zn5?yq2GoJ7{v70W+fzMl<`MHBNy6D$WbCIJQ|ZdQMwelo8*wG2!k+MOWMZ?`FoR+MxY%ZdDgDJpi ziGYzl8Wcjxu-;Vd8Z(A^!>Wd=oCVnt+wze(LQJ~$0j4*L!Yb|7mikzWs$Bt5ow9Jz zHj$*_XDK|6w`nrp7G04!$y%lGsBgn5k|VR4sSLA-Dx{0zm*`Gidd#+xH(_v6ZHb=$ zR&^10fo$gv2WF%m#`I8YXB5E-qF2j-5z z)-iUJMRc_2?lvQCqT(I=D6S)#rBtu`1n@7o+O>IF3kNpop4GmJkmd1PD5%bIQgLv}<(>SW#8JLI3< zC9hdnFOBSan~5dNutidpC<*ImXB4xFYAUL(w_{vfh^U?!=9Z*|n+ViqA$3SZ0 zxj3pa%yA7G4yZpnM$Z(tqINK9Ud8IMqc=B8gP|^(xs{``B}{Bqbvbhgyshr7h;|1F zPHy6QBh6&wOJkf5SWbAtVlnl~Z{^GmFwG0hL%lBHH!Oi|Dl00@g67x>8KoQlK)KE- zgVUzO_M~o0+T6ekXK(W%!!}Z6X|4Zo#C8+i-Heh-1O;mc|B!_$0$wbb&{W7POz&NN z-bllN;aYLVdhChR+P19LjQDAdzqm`kIRiNCI}MK@?AB2GIi0*P17@P(1k+ZwV-=ec zv7x~z6L^tF`A|1{V1>Qhse6!tC9`88W6_7Pg7eI%2u&|+ZLq*q)5Dh2llOH8YkTsw zR)7%Tq#6v*!o3Kb!%Sk%LTYU_BI*ukDA*oW4%?r+5musLdks?+E{03&-Nmf)ShmvY zju7V7JlGX$NwilsU&dJUCJC;y1(v%Ig4vO+^_KnV$docI%ga#jW2?2`3s$z_v)iqp z?9)+_(}#b<3t>ppQJ7U0ddN>v#57rtdKj#8j>TY~CA(RxS{7DnDK&eLHA~&fh8R;5 zVmqV^VYbxL>lKu7as>G>Yh$}NtzFi%FR}S8lc8lDg+5TnU73Mf;Y*YPdAz z3^YS#GDIIRK=VL!v=T*CtjV$tbJU~}W%W3hx0surR2yMAf9&C83fG#2nZf?p7wK*( z3D!fkh64K>85YSo1yW-s|~$?GQ+R#ZWXsiq+VAkcSh5Re<#HVIyI6oUia&)rE|-Jkt|~s zs+yy!Y#&}rLqg_w@q= zi+FCS#8PIhKY-B>@fI2j!OPjj@S~&ouqM6PH#)N4`ia4qSZtZOCybM!WfrwNa5*h2 zP-aMvo27rp0mpjzo-elB+?qhS8d=n+Vffi2v2?w0(wAc~t(~M+b{Jz>xEHJPHf!%V z?Ym6tJh4kIZ`&!YsihUWhX;GS+ro?X19SnSLWiwYu=zNmiOrX=IZ{lT{YuJ&mG z?e64^PZMWJ}n-70NmOfm!4)szk)Wj}%avV+l^_~<|8*h?2Ewy2{^H47K}I+ocp zYRbtEv`&tkqaZJ!%&{^ePt5NI&edxd>s*iN!lkT4x3;oXq2t3G=*jOabLv>{WEc9k|SaUE_Pv!j^#CX%09^xzh!X%+0cQ zx8Q1a)H(&tetR$)&4c}lX>>?}n$d<)jq}5qzBu(wIVo_S-(C`8b#KBi}z^Nu(iJj?J@Wi zgj?N4Ng;^p4>v}5d{D!Ed7F&@ZetUZc2IqQu z`qsDY>B)tGe2pOviiE8yLnfs`YS$w|LQ87`oZ0F@wTj%Z73E~q$U1_y2$xT$+`Vy1rwjp=~XzY_;}$ZQ%M9PA(5(tq7XvvF|9 zz7GyU*gu6um5bRycYXihW~vNr+Ia0CHM_O(_0MEsl5?_8vmtYPnpI=7hiQbB1#|Nu zeQwJY#Hi!wqytG*+(NBnzKIs}&qQH;2%W+x=BK3IGrDJ_J&}zAgWWn+at`aCS!yr? zsrCjeTb#Via+sZO>*(}E|BW|pxv76+n^>bHy4ydJRM_t1r{CB=t6*vw_KmQY#4QXS zeMi{$wiv0+Se+GdU!6^oV_~KWwb0ZaOCkj4sXDY~?Cawr!<-PWwJ(aNo|$%KAb7Oi z$l`jOxiH1!iQx=Qyd;G2%)LO`gu;*fSh^EbXk+842FQnV*A^$zz;gS4YOr zwt|D~Bg5)U^-AiBj~_?O2jf9Ur>N8s9xiJ~Id!O+hlg4b;!~BK93&pK!D5CSDq4J8 z(PB4>q!}F{>|j^G28$K7JA3MtLE~`_9MOCe&PRznFWic_KKnS4;}pN%a@fksY@BiW zYz2>hfoh#WK1Aw{eO}T$Nj|aIzXw zB>Aiem&Jfr29l=~+)WrBf#haAf#WukjH3#pRu3berixpw&YG>DFhOkVu(xB$Z7x(& z0(ClrnKG~(AF*?6*FFp4)dI_?*Aa@V zuzLdDjvu;Sw7(L%9I5#@rVmu-#c?@B(N9BGNGClPrG}TGjZw1!vSw90@+F(a;<-qu3O7jaDT*mU08hn}l~_guC9v zS~4KJ7TgVD%Vm~*>^ihvCTU&fUilo|wM*GiXfkXTu{tR87dYa}B&4_y-sP@9M`Spx z&&DT+@kR;m23Ayihg*C0pQI8u&<7^P^d!0K4Po5Y;FfiuY({*XZaB)d1~OpA%BiUl z4iPG|-4LR|a!JH;io)6OkcM5(+iw%g!r2jVY&;J0RIP~XU{#~luFI{XV-_1Rc?3`o z0kVY6obEb#tq3+lQUKcTb;~Qck#T9!WEOIe@bt833SGy%vj2%gMO5L}hqvvtbv;Xy zRZjzB^2c=Dn3_tQRhr3MEn<2^xZNC1)g+;nGc*?x!kQ(nysd1h9IFP$QYK8x2^fok z%n;a2lbEQfWdox=X?5L*?3B1cX{dT=$!!CKA2@1CA~ZJ;fkRVHz@0o^83#v5d)R*v z-%|y`wfrk1;j{{05%y~8qTzbk8Rd=U2{zo0fcQ+xD1zZ4JDvyIu@Pa$**quYBhlp+ zVP5US{PuyQ9UF(%ofTy(y?!%bcgiV?=ou47q@~d$_KK$9NG;b1oGq)Lr>AP`%jxM# zZSSDMt(lD(Bhx6tdic}Ql#~m%>JZLU=@cV6Q?=Fr_k>Fu_HY}p{iz&HuM*co6Uclj zuW+rGtIWT0sM<#WJ2XoeDHxfB$9&ix#x|M^1g)3n>7&-ITuvsLY3gv}Oqq|}b3I9u zB^4)&I%HuxVqY#73ttxMuDf&+)+%CO)(&Sg+&YPo{#(z%(vGGc07}03|ENZ z>n<;wQ8eGaNf@ow^MZ@Xi* zMwYn-Eef}Po{GSAU|WL)D|jpcL-C2g7AetnJc2ZsBqn~s-w(L=&ijFO-pTg^PT|#B zh9=20XnRvHn#sw>QTo&kimL{#lVmihU69JnDi_}AgSYUyBA||xz#f(8&bqeLZ56cb zhFgZ?w8XY8U&{N6em5;I4LF2m{@y^ZYP@kA37q5fWy5E|jP(_WI_chk0TJ&^xjdNO zJ3Kb}%HbWO-x?3TV?7$bw(iDYrLiwB4xD-N^D8r1k~!P}8CCf!zAk3~cjS|620v#@ z)9nU^%|gX=mw+8YcIqu-9&m|J3C)N%QP?e)W37-YvwLqV-+R0(md$q~5%h+I^NsG9 zw7u&}A!Bz~z+DM(+1Svfa^;$~%A1@)oG5!rYk5}G_S&#&12EnDv2nSPy7v6?lubcr z)lE_evsS0EVtJe^4LDc&U9F)y^>d|CPPy@|!jtBavGu^$l>b1IwZfw-uO?t)+ZuYe zn+pnp9BJ!{!hYQ5Oi{oUg_(}$F;c;_j+G0XH;6piDJWvWIoVo7{!fMfEnsra0&oi< zU$3jnAqBWk{J$9gvEx@s7Zq}nS7fTcNkWc6s}oMLkI69`E6rmt7A@I%m1A@_6;hTd zrZn3;WM!3o7{`)ryHu8`h-g$TB&-Hq`RYUb5}Re2?v&*;oF*|L%S*MtmX{WBs9TFx zYiP@gPj_>nkgbb5TUS3TYiMG+wXpvnBxzk%qD@3G17zH<8S3r1XL_ebrY9%HcaBWC zn+$u2v3GRp&&}AxwAnGdXZz@ct}@zAmG@6ktd^fO72(z^(5TF2E*pcMtTK65h^tga z)ZprBCRA4$6RkZan8Yqw#kMcjLumb9iBsqfRTy@1yEn(r(Y~oG3ww^T(qp*Mu(ue> z(k+JKpt{DeyPvzsSW$6RDmRy4#P6^gm2ac;dT?0cypjgHobR(t6kQybHFLEeGxkbj z`mv514eQjkt~9EsR_#dqI9jvHm4@{yQBirkr@hi}gw8cyM)-4FX@vYImHY3XD*yfS z3tVd8xF7)?R~EIHe@ND`NZUDk5BC})!@E~rY_zCgwKWe46c8Wi4s_&0_&RPlY^)o7 z!B+CS?24n@l20lNI&V1a)rJf||64%gEABY7*@imN`5mRhrLmEi(!R=5v$r1q53pMG AApigX literal 0 HcmV?d00001 diff --git a/po/es.po b/po/es.po new file mode 100644 index 00000000..1248a601 --- /dev/null +++ b/po/es.po @@ -0,0 +1,818 @@ +# Spanish Messages for the nano editor. +# Jordi Mallach January 9, 2000 +# Copyright (C) 2000 Free Software Foundation, Inc. +# Jordi Mallach , 2000. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.9.9\n" +"POT-Creation-Date: 2000-05-31 10:00-0500\n" +"PO-Revision-Date: 2000-06-04 20:21+0200\n" +"Last-Translator: Jordi Mallach \n" +"Language-Team: Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: cut.c:43 +#, c-format +msgid "add_to_cutbuffer called with inptr->data = %s\n" +msgstr "add_to_cutbuffer llamado con inptr->data = %s\n" + +#: cut.c:146 +msgid "Blew away cutbuffer =)\n" +msgstr "Nos hemos cargado el cutbuffer =)\n" + +#: global.c:110 +msgid "Invoke the help menu" +msgstr "Invocar el menú de ayuda" + +#: global.c:111 +msgid "Write the current file to disk" +msgstr "Escribir el fichero actual a disco" + +#: global.c:112 +msgid "Exit from nano" +msgstr "Salir de nano" + +#: global.c:113 +msgid "Goto a specific line number" +msgstr "Ir a un número de línea en concreto" + +#: global.c:114 +msgid "Justify the current paragraph" +msgstr "Justificar el párrafo actual" + +#: global.c:115 +msgid "Replace text within the editor" +msgstr "Reemplazar texto en el editor" + +#: global.c:116 +msgid "Insert another file into the current one" +msgstr "Insertar otro fichero en el actual" + +#: global.c:117 +msgid "Search for text within the editor" +msgstr "Buscar un texto en el editor" + +#: global.c:118 +msgid "Move to the previous screen" +msgstr "Moverse a la página anterior" + +#: global.c:119 +msgid "Move to the next screen" +msgstr "Moverse a la página siguiente" + +#: global.c:120 +msgid "Cut the current line and store it in the cutbuffer" +msgstr "Cortar la línea actual y guardarla en el cutbuffer" + +#: global.c:121 +msgid "Uncut from the cutbuffer into the current line" +msgstr "Pegar el cutbuffer en la línea actual" + +#: global.c:122 +msgid "Show the posititon of the cursor" +msgstr "Mostrar la posición del cursor" + +#: global.c:123 +msgid "Invoke the spell checker (if available)" +msgstr "Invocar el corrector ortográfico (si está disponible)" + +#: global.c:124 +msgid "Move up one line" +msgstr "Moverse una línea hacia arriba" + +#: global.c:125 +msgid "Move down one line" +msgstr "Moverse una línea hacia abajo" + +#: global.c:126 +msgid "Move forward one character" +msgstr "Moverse hacia adelante un carácter" + +#: global.c:127 +msgid "Move back one character" +msgstr "Moverse hacia atrás un carácter" + +#: global.c:128 +msgid "Move to the beginning of the current line" +msgstr "Moverse al principio de la línea actual" + +#: global.c:129 +msgid "Move to the end of the current line" +msgstr "Moverse al final de la línea actual" + +#: global.c:130 +msgid "Go to the first line of the file" +msgstr "Ir a la primera línea del fichero" + +#: global.c:131 +msgid "Go to the last line of the file" +msgstr "Ir a la última línea del fichero" + +#: global.c:132 +msgid "Refresh (redraw) the current screen" +msgstr "Redibujar la pantalla actual" + +#: global.c:133 +msgid "Mark text at the current cursor location" +msgstr "Marcar texto en la posición actual del cursor" + +#: global.c:134 +msgid "Delete the character under the cursor" +msgstr "Borrar el carácter bajo el cursor" + +#: global.c:136 +msgid "Delete the character to the left of the cursor" +msgstr "Borrar el carácter a la izquierda del cursor" + +#: global.c:137 +msgid "Insert a tab character" +msgstr "Insertar un carácter tab" + +#: global.c:138 +msgid "Insert a carriage return at the cursor position" +msgstr "Insertar un retorno de carro en la posición del cursor" + +#: global.c:140 +msgid "Make the current search or replace case (in)sensitive" +msgstr "Hacer que la búsqueda actual sea sensible a mayúsculas" + +#: global.c:141 +msgid "Cancel the current function" +msgstr "Cancelar la función actual" + +#: global.c:146 global.c:256 global.c:322 +msgid "Get Help" +msgstr "Ver Ayuda" + +#: global.c:149 global.c:157 +msgid "WriteOut" +msgstr "Guardar" + +#: global.c:153 global.c:311 +msgid "Exit" +msgstr "Salir" + +#: global.c:161 global.c:252 +msgid "Goto Line" +msgstr "Ir a Línea" + +#: global.c:166 global.c:244 +msgid "Justify" +msgstr "Justificar" + +#: global.c:169 global.c:240 +msgid "Replace" +msgstr "Reemplazar" + +#: global.c:173 +msgid "Read File" +msgstr "L Fichero" + +#: global.c:177 +msgid "Where Is" +msgstr "Buscar" + +#: global.c:181 global.c:303 +msgid "Prev Page" +msgstr "Pag Prev" + +#: global.c:185 global.c:307 +msgid "Next Page" +msgstr "Pag Sig" + +#: global.c:189 +msgid "Cut Text" +msgstr "CortarTxt" + +#: global.c:192 +msgid "UnCut Txt" +msgstr "PegarTxt" + +#: global.c:196 +msgid "Cur Pos" +msgstr "Pos Act" + +#: global.c:200 +msgid "To Spell" +msgstr "Ortografía" + +#: global.c:204 +msgid "Up" +msgstr "Arriba" + +#: global.c:207 +msgid "Down" +msgstr "Abajo" + +#: global.c:210 +msgid "Forward" +msgstr "Adelante" + +#: global.c:213 +msgid "Back" +msgstr "Atrás" + +#: global.c:216 +msgid "Home" +msgstr "Inicio" + +#: global.c:219 +msgid "End" +msgstr "Fin" + +#: global.c:222 +msgid "Refresh" +msgstr "Refrescar" + +#: global.c:225 +msgid "Mark Text" +msgstr "MarcarTxt" + +#: global.c:228 +msgid "Delete" +msgstr "Suprimir" + +#: global.c:232 +msgid "Backspace" +msgstr "Borrar" + +#: global.c:236 +msgid "Tab" +msgstr "Tab" + +#: global.c:247 +msgid "Enter" +msgstr "Enter" + +#: global.c:260 global.c:277 global.c:293 +msgid "First Line" +msgstr "Primera Línea" + +#: global.c:263 global.c:280 global.c:296 +msgid "Last Line" +msgstr "Última Línea" + +#: global.c:266 global.c:283 +msgid "Case Sens" +msgstr "May/Min" + +#: global.c:270 +#, fuzzy +msgid "To Replace" +msgstr "Reemplazar" + +#: global.c:273 global.c:289 global.c:299 global.c:315 global.c:319 +#: global.c:325 winio.c:883 +msgid "Cancel" +msgstr "Cancelar" + +#: global.c:286 +#, fuzzy +msgid "To Search" +msgstr "Buscar%s" + +#: nano.c:114 +msgid "" +"\n" +"Buffer written to 'nano.save'\n" +msgstr "" +"\n" +"Buffer escrito en 'nano.save'\n" + +#: nano.c:127 +msgid "nano: malloc: out of memory!" +msgstr "nano: malloc: memoria agotada!" + +#: nano.c:144 +msgid "Key illegal in VIEW mode" +msgstr "Tecla ilegal en modo VISUALIZACIÓN" + +#: nano.c:185 +msgid "" +" nano help text\n" +"\n" +" The nano editor is designed to emulate the functionality and ease-of-use of " +"the UW Pico text editor. There are four main sections of the editor: The " +"top line shows the program version, the current filename being edited, and " +"whether or not the file has been modified. Next is the main editor window " +"showing the file being edited. The status line is the third line from the " +"bottom and shows important messages. The bottom two lines show the most " +"commonly used shortcuts in the editor.\n" +"\n" +" The notation for shortcuts is as follows: Control-key sequences are notated " +"with a caret (^) symbol. Alt-key sequences are notated with an at (@) " +"symbol. The following keystrokes are available in the main editor window. " +"Optional keys are shown in parentheses:\n" +"\n" +msgstr "" +" texto de ayuda de nano\n" +"\n" +" El editor nano está diseńado para emular la funcionalidad y la facilidad de " +"uso de Pico, el editor de texto de la UW. Hay cuatro secciones en el editor: " +"la línea superior muestra la versión del programa, el nombre del fichero " +"editado y si el fichero ha sido o no modificado. También tenemos la ventana " +"principal de edición, que muestra el fichero que está siendo editado. La " +"línea de estado es la tercera desde abajo y muestra mensajes importantes. " +"Las últimas dos líneas muestran los atajos más usados en el editor.\n" +"\n" +" La notación de los atajos es la siguiente: las secuencias con la tecla " +"Control están anotadas con el símbolo circunflejo (^). Las secuencias con la " +"tecla Alt están anotadas con el símbolo arroba (@). Las siguientes " +"combinaciones están disponibles en la ventana principal. Las teclas " +"opcionales están representadas entre paréntesis:\n" +"\n" + +#: nano.c:286 +msgid "free_node(): free'd a node, YAY!\n" +msgstr "free_node(): liberado un nodo, YEAH!\n" + +#: nano.c:291 +msgid "free_node(): free'd last node.\n" +msgstr "free_node(): liberado el último nodo.\n" + +#: nano.c:407 +msgid "read_line: not on first line and prev is NULL" +msgstr "read_line: no estamos en la primera línea y la anterior es NULL" + +#: nano.c:468 nano.c:482 +#, c-format +msgid "Read %d lines" +msgstr "%d líneas leídas" + +#: nano.c:500 nano.c:1161 nano.c:1179 +#, c-format +msgid "\"%s\" not found" +msgstr "\"%s\" no encontrado" + +#. We have a new file +#: nano.c:504 +msgid "New File" +msgstr "Nuevo Fichero" + +#: nano.c:513 +#, c-format +msgid "File \"%s\" is a directory" +msgstr "Fichero \"%s\" es un directorio" + +#: nano.c:518 +msgid "Reading File" +msgstr "Leyendo Fichero" + +#: nano.c:531 +msgid "File to insert [from ./] " +msgstr "Fichero a insertar [desde ./] " + +#: nano.c:546 nano.c:1601 nano.c:1765 nano.c:1916 +msgid "Cancelled" +msgstr "Cancelado" + +#: nano.c:556 +msgid "" +"Usage: nano [GNU long option] [option] +LINE \n" +"\n" +msgstr "" +"Uso: nano [opción larga GNU] [opción] +LÍNEA \n" +"\n" + +#: nano.c:557 +msgid "Option\t\tLong option\t\tMeaning\n" +msgstr "Opcion\t\tOpcion larga\t\tSignificado\n" + +#: nano.c:560 +msgid " -V \t\t--version\t\tPrint version information and exit\n" +msgstr " -V \t\t--version\t\tImprimir versión y salir\n" + +#: nano.c:562 +msgid " -c \t\t--const\t\t\tConstantly show cursor position\n" +msgstr " -c \t\t--const\t\t\tMostrar siempre la posición del cursor\n" + +#: nano.c:564 +msgid " -h \t\t--help\t\t\tShow this message\n" +msgstr " -h \t\t--help\t\t\tMostrar este mensaje\n" + +#: nano.c:566 +msgid " -i \t\t--autoindent\t\tAutomatically indent new lines\n" +msgstr " -i \t\t--autoindent\t\tIndentar automáticamente nuevas líneas\n" + +#: nano.c:568 +msgid " -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n" +msgstr "" +" -l \t\t--nofollow\t\tNo seguir enlaces simbólicos, sobreescribirlos.\n" + +#: nano.c:571 +msgid " -m \t\t--mouse\t\t\tEnable mouse\n" +msgstr " -m \t\t--mouse\t\t\tHabilitar ratón\n" + +#: nano.c:576 +msgid "" +" -r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n" +msgstr " -r [#cols] \t--fill=[#cols]\t\tRellenar columnas (wrapear en) #cols\n" + +#: nano.c:578 +msgid " -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p\t \t--pico\t\t\tHacer el menú más parecido a Pico\n" + +#: nano.c:580 +msgid " -s [prog] \t--speller=[prog]\tEnable alternate speller\n" +msgstr " -s [prog] \t--speller=[prog]\tHabilitar corrector alternativo\n" + +#: nano.c:582 +msgid " -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n" +msgstr " -t \t\t--tempfile\t\tAutosalvar al salir, sin preguntar\n" + +#: nano.c:584 +msgid " -v \t\t--view\t\t\tView (read only) mode\n" +msgstr " -v \t\t--view\t\t\tModo visualización (sólo lectura)\n" + +#: nano.c:586 +msgid " -w \t\t--nowrap\t\tDon't wrap long lines\n" +msgstr " -w \t\t--nowrap\t\tNo wrapear líneas largas\n" + +#: nano.c:588 +msgid " -x \t\t--nohelp\t\tDon't show help window\n" +msgstr " -x \t\t--nohelp\t\tNo mostrar la ventana de ayuda\n" + +#: nano.c:590 +msgid " -z \t\t--suspend\t\tEnable suspend\n" +msgstr " -z \t\t--suspend\t\tHabilitar suspensión\n" + +#: nano.c:592 +msgid " +LINE\t\t\t\t\tStart at line number LINE\n" +msgstr " +LINE\t\t\t\t\tComenzar en la línea número LÍNEA\n" + +#: nano.c:594 +msgid "" +"Usage: nano [option] +LINE \n" +"\n" +msgstr "" +"Uso: nano [opción] +LÍNEA \n" +"\n" + +#: nano.c:595 +msgid "Option\t\tMeaning\n" +msgstr "Opción\t\tSignificado\n" + +#: nano.c:596 +msgid " -V \t\tPrint version information and exit\n" +msgstr " -V \t\tImprimir información sobre la versión y salir\n" + +#: nano.c:597 +msgid " -c \t\tConstantly show cursor position\n" +msgstr " -c \t\tMostrar constantemente la posición del cursor\n" + +#: nano.c:598 +msgid " -h \t\tShow this message\n" +msgstr " -h \t\tMostrar este mensaje\n" + +#: nano.c:599 +msgid " -i \t\tAutomatically indent new lines\n" +msgstr " -v \t\tIndentar automáticamente nuevas líneas\n" + +#: nano.c:601 +msgid " -l \t\tDon't follow symbolic links, overwrite.\n" +msgstr " -l \t\tNo seguir enlaces simbólicos, sobreescribirlos.\n" + +#: nano.c:604 +msgid " -m \t\tEnable mouse\n" +msgstr " -m \t\tHabilitar ratón\n" + +#: nano.c:608 +msgid " -r [#cols] \tSet fill cols to (wrap lines at) #cols\n" +msgstr " -r [#cols] \tRellenar columnas (wrapear líneas en) #cols\n" + +#: nano.c:609 +msgid " -s [prog] \tEnable alternate speller\n" +msgstr " -s [prog] \tHabilitar corrector alternativo\n" + +#: nano.c:610 +msgid " -p \t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p \t\tHacer el menú más parecido a Pico\n" + +#: nano.c:611 +msgid " -t \t\tAuto save on exit, don't prompt\n" +msgstr " -t \t\tAutosalvar al salir, no preguntar\n" + +#: nano.c:612 +msgid " -v \t\tView (read only) mode\n" +msgstr " -v \t\tModo visualización (sólo lectura)\n" + +#: nano.c:613 +msgid " -w \t\tDon't wrap long lines\n" +msgstr " -w \t\tNo wrapear líneas largas\n" + +#: nano.c:614 +msgid " -x \t\tDon't show help window\n" +msgstr " -x \t\tNo mostrar la ventana de ayuda\n" + +#: nano.c:615 +msgid " -z \t\tEnable suspend\n" +msgstr " -z \t\tHabilitar suspensión\n" + +#: nano.c:616 +msgid " +LINE\t\tStart at line number LINE\n" +msgstr " +LÍNEA\t\tComenzar en la línea número LÍNEA\n" + +#: nano.c:623 +#, c-format +msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n" +msgstr " nano versión %s por Chris Allegretta (compilado %s, %s)\n" + +#: nano.c:625 +msgid " Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" +msgstr " Correo-e: nano@asty.org\tWeb: http://www.asty.org/nano\n" + +#: nano.c:709 +msgid "Mark Set" +msgstr "Marca Establecida" + +#: nano.c:714 +msgid "Mark UNset" +msgstr "Marca Borrada" + +#: nano.c:1052 +#, c-format +msgid "check_wrap called with inptr->data=\"%s\"\n" +msgstr "check_wrap llamada con inptr->data=\"%s\"\n" + +#: nano.c:1089 +#, c-format +msgid "Case Sensitive Search%s" +msgstr "Búsqueda con Mayúsculas/Minúsculas%s" + +#: nano.c:1090 +#, c-format +msgid "Search%s" +msgstr "Buscar%s" + +#: nano.c:1094 +msgid "Search Cancelled" +msgstr "Búsqueda Cancelada" + +#: nano.c:1175 +msgid "Search Wrapped" +msgstr "Búsqueda Recomenzada" + +#: nano.c:1225 +#, c-format +msgid "Replaced %d occurences" +msgstr "%d ocurrencias reemplazadas" + +#: nano.c:1227 +msgid "Replaced 1 occurence" +msgstr "1 ocurrencia reemplazada" + +#: nano.c:1245 nano.c:1267 nano.c:1290 +msgid "Replace Cancelled" +msgstr "Reemplazar Cancelado" + +#: nano.c:1263 +#, c-format +msgid "Replace with [%s]" +msgstr "Reemplazar con [%s]" + +#. last_search is empty +#: nano.c:1288 +msgid "Replace with" +msgstr "Reemplazar con" + +#: nano.c:1329 +msgid "Replace this instance?" +msgstr "Reemplazar esta instancia?" + +#: nano.c:1416 +#, c-format +msgid "current->data now = \"%s\"\n" +msgstr "current->data ahora = \"%d\"\n" + +#: nano.c:1461 +#, c-format +msgid "After, data = \"%s\"\n" +msgstr "Después, data = \"%s\"\n" + +#. Ask for it +#: nano.c:1529 +msgid "Enter line number" +msgstr "Introduce número de línea" + +#: nano.c:1531 +msgid "Aborted" +msgstr "Abortado" + +#: nano.c:1551 +msgid "Come on, be reasonable" +msgstr "Venga ya, se razonable" + +#: nano.c:1556 +#, c-format +msgid "Only %d lines available, skipping to last line" +msgstr "Sólo hay %d líneas, saltando hasta la última" + +#: nano.c:1613 nano.c:1629 nano.c:1641 nano.c:1658 nano.c:1664 +#, c-format +msgid "Could not open file for writing: %s" +msgstr "No pude abrir el fichero para escribir: %s" + +#: nano.c:1621 +msgid "Could not open file: Path length exceeded." +msgstr "El fichero no pudo ser abierto: longitud del path excedida." + +#: nano.c:1646 +#, c-format +msgid "Wrote >%s\n" +msgstr "Escribí >%s\n" + +#: nano.c:1673 +#, c-format +msgid "Could not close %s: %s" +msgstr "No pude cerrar %s: %s" + +#. Try a rename?? +#: nano.c:1694 nano.c:1705 nano.c:1710 +#, c-format +msgid "Could not open %s for writing: %s" +msgstr "No pude abrir %s para escribir: %s" + +#: nano.c:1716 +#, c-format +msgid "Could not set permissions %o on %s: %s" +msgstr "No pude establecer permisos %o en %s: %s" + +#: nano.c:1723 +#, c-format +msgid "Wrote %d lines" +msgstr "%d líneas escritas" + +#: nano.c:1744 +msgid "File Name to write" +msgstr "Nombre de Fichero a escribir" + +#: nano.c:1749 +#, c-format +msgid "filename is %s" +msgstr "filename es %s" + +#: nano.c:1754 +msgid "File exists, OVERWRITE ?" +msgstr "El fichero existe, SOBREESCRIBIR ?" + +#: nano.c:1783 +msgid "Error deleting tempfile, ack!" +msgstr "Error borrando el fichero temporal, ouch!" + +#: nano.c:1796 nano.c:1846 +#, c-format +msgid "Could not create a temporary filename: %s" +msgstr "No pude crear un fichero temporal: %s" + +#: nano.c:1818 nano.c:1868 +#, c-format +msgid "Could not invoke spell program \"%s\"" +msgstr "No se pudo llamar al corrector \"%s\"" + +#. Why 32512? I dont know! +#: nano.c:1824 nano.c:1874 +msgid "Could not invoke \"ispell\"" +msgstr "No pude llamar a \"ispell\"" + +#: nano.c:1836 nano.c:1886 +msgid "Finished checking spelling" +msgstr "Revisión de ortografía finalizada" + +#: nano.c:1903 +msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " +msgstr "Salvar el buffer modificado (RESPONDER \"No\" DESTRUIRÁ LOS CAMBIOS) ?" + +#: nano.c:2027 +msgid "Cannot resize top win" +msgstr "No se puede cambiar el tamańo de la ventana superior" + +#: nano.c:2029 +msgid "Cannot move top win" +msgstr "No se puede mover la ventana superior" + +#: nano.c:2031 +msgid "Cannot resize edit win" +msgstr "No se puede cambiar el tamańo de la ventana de edición" + +#: nano.c:2033 +msgid "Cannot move edit win" +msgstr "No se puede mover la ventana de edición" + +#: nano.c:2035 +msgid "Cannot resize bottom win" +msgstr "No se puede cambiar el tamańo de la ventana inferior" + +#: nano.c:2037 +msgid "Cannot move bottom win" +msgstr "No se puede mover la ventana inferior" + +#: nano.c:2468 +msgid "Main: set up windows\n" +msgstr "Main: configurar las ventanas\n" + +#: nano.c:2490 +msgid "Main: bottom win\n" +msgstr "Main: ventana inferior\n" + +#: nano.c:2496 +msgid "Main: open file\n" +msgstr "Main: abrir fichero\n" + +#: nano.c:2564 +#, c-format +msgid "I got Alt-[-%c! (%d)\n" +msgstr "Pillé Alt-[-%c! (%d)\n" + +#: nano.c:2580 +#, c-format +msgid "I got Alt-%c! (%d)\n" +msgstr "Pillé Alt-%c! (%d)\n" + +#: winio.c:116 +#, c-format +msgid "actual_x for xplus=%d returned %d\n" +msgstr "actual_x para xplus=%d devolvió %d\n" + +#: winio.c:402 +#, c-format +msgid "input '%c' (%d)\n" +msgstr "entrada '%c' (%d)\n" + +#: winio.c:438 +msgid "New Buffer" +msgstr "Nuevo Buffer" + +#: winio.c:441 +msgid " File: ..." +msgstr "Fichero: ..." + +#: winio.c:449 +msgid "Modified" +msgstr "Modificado" + +#: winio.c:800 +#, c-format +msgid "Moved to (%d, %d) in edit buffer\n" +msgstr "Moviendo a (%d, %d) en buffer de edición\n" + +#: winio.c:811 +#, c-format +msgid "current->data = \"%s\"\n" +msgstr "current->data = \"%s\"\n" + +#: winio.c:854 +#, c-format +msgid "I got \"%s\"\n" +msgstr "Pillé \"%s\"\n" + +#: winio.c:878 +msgid " Y" +msgstr " S" + +#: winio.c:878 +msgid "Yes" +msgstr "Sí" + +#: winio.c:880 +msgid " A" +msgstr " T" + +#: winio.c:880 +msgid "All" +msgstr "Todas" + +#: winio.c:882 +msgid " N" +msgstr " N" + +#: winio.c:882 +msgid "No" +msgstr "No" + +#: winio.c:883 +msgid "^C" +msgstr "^C" + +#: winio.c:1027 +#, c-format +msgid "do_cursorpos: linepct = %f, bytepct = %f\n" +msgstr "do_cursorpos: linepct = %f, bytepct = %f\n" + +#: winio.c:1031 +msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" +msgstr "línea %d de %d (%.0f%%), carácter %d de %d (%.0f%%)" + +#: winio.c:1157 +msgid "Dumping file buffer to stderr...\n" +msgstr "Volcando buffer de fichero a stderr...\n" + +#: winio.c:1159 +msgid "Dumping cutbuffer to stderr...\n" +msgstr "Volcando el cutbuffer a stderr...\n" + +#: winio.c:1161 +msgid "Dumping a buffer to stderr...\n" +msgstr "Volcando un buffer a stderr...\n" diff --git a/po/fr.gmo b/po/fr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..0c3f1ec915ac4aeae27f0e05b64b6723242adc8b GIT binary patch literal 9784 zcmb`MZHyh)S;vPolZNkNf7l@O__R!|`osRdOcLd^#%geoK&Bnp)X$cc*Rh0=cLhe9g~ zzyFyt_hr57*cDek`R>l5-0FBD@NJ4*m{& z6n+j$-ao+OFnDMAoEi88x7VTMe+jDpH~sxCeGd5-e1SixDEJGg`F|Cny5Jw-1Mr{V+u`>iDhqxH ze;(d_ZxGxMcSDVP1WG^0q1rD&%_oPF^9f)7S~V2;Tp*rM{npx_=J- zD*Pyv9{w2q5_}D6UB3slKKI@i1pEsQ@ke@@hMG?Z-vzHjJ?E3~7vSe1OB4Jh)cpSz zYQAqmjr%Xizu-Ow^N8RfsP@Oa!8@6Zp8H-XJw6Oof6Uh}`uY$`|JUGA_(>>ve*;;f;B|Ny{s)vE_t07O zGf>Yv1GUbVq2^bI@`onWJUI{46{MzXBhJ zT0GgyVW@R{fj{!UP52~y6<&frfb;MyFSQ6i2cL%DhwA?r!qxv8)N{WC55jN3C*b|N z{k);tGbnxi5tM$u4rQnR4W-}rpajitH`M)U&t>?2?$1G7Aoy)4fBQ6K>4HCmcf(g8 zst8_%^4D)b_4{WizxWo^b9Z4}(&u5Qb-V-*!55+C|0HQ1AC{Q?}20CJ<4`-f}@_xP|u6_gX;vp1!Yg4hSJZUK&{i4ef@W!;WO|Mlpm+Q z{$p^8``?Gs>+8OKl$V!3J_z3i$KYM?VTkI22`IfUK&|g@LOtj65D~#weEl0x^Vr49 zJPh9lkq)g{`#k(@z-ZOg?IStBT#xeM7czf zEj~{f{5{Lfw693uGZf6;{Z{y^_^-9p4>dUZ&~=BhNO_uakRm;5&1466Q<@b0o+{z| zM>emY)?B}jP^5X!u{RruVrWFDD(b)5RY;5>y%@ZCn>9x z^Ay?C66Fddq{s)W-wYQmiu_tW_8evOSkY|S)NG_tp4-^ui5ZK-IGM=8bvrg17;_?O z*-0}oF%g)D=VljXM)X_G!!$QxZdy@nOxhtpT^uZOzGDv#pMFAX)iZl$o~8vT)T(ka}#}5V@gYktb2yurc$R;#zN64_nNv ztTnOSa5~K-Ok>`*gT4u=`gO_mIn{em87;4Y{NSi+8e62 zjVPB&hbr^Lsky34Z5CbMPJ(aPD#KUzrDWDD+gL%4i7eYNt*_OxU^;2bWcQmDYcR7c zaRGzsqSbKPsJ9YE*0M>;U^Sg_oY2Sxk~B;=<;yk>+iVX*J)?L%A*Sq&oRjSxkl|Zg zz5HY~4ckt`1AP(<2YDK6H~hn{^qeJ0K6FkdrFbQRcZb!!{8F){GKjHuMH zX*;{PuzqDva6<3xEEoF@O(RNeJx|ijvSESMP+-+|Zp$j}qByf`*B6^a zCNpvHlA$GzvNfEczGmxJ^cc4$Tm-Xb72_?$~H==xP=*C>EWtXZN_n4&4QN}VV>sKE#z1m<|yA%6|(^+M}<5LUE=Vz8? z7fzbJ3&~z{es*ro9G_V}v$S}@On+!<;pEKnKJ&B*%7`&AVPA2cJ*LC_&+5!m25fWj zMQAzxmarJQh6LSN8|xdjgAhF+M&<+G$GRT^jO|LRl_JQ@T$*G2Vp%g!q(+$ zE&yEXw2JH~y$SS18e6GmGzc4w%XxCS@0dDf(I&NGES)?(@RSen672lovfDCu=yF)gW8QV$VI4&!O(}Q0Ht|TaR@=9q zAP}aglsI%#W1x+8(zH=tQlB&l0vX-5oDetn1Z)Y7%aV#25Htvz%_#N0U4Fo#@2=O02yp*Ql>WHtnYyCw;!brq!0Ar{)IUi5gc)JLYC-<`6)_;rbo# zwnG+Y+df+}j;UrdV$F%XHp3ix2}efY?HwhENGx0)r8>7LWx4ZF!`1!uoPn`Qh%hyTyw$*gjAd)uGtU83a|xCABr%qYjWyY@KxxT0 zbUZCMgt!U&N8Z>zANqfg*2{Rv(A>V?Pn0Un7O`3HrfeK_4t+&xSc5ek*E(wv24Jd0 zDr!n;J$a_LGIun7YihL|Vpca>oO6BWklL>mJ{q>o2LkJyMM8d}fkWvRCk$)OMH$;m zl$D<###@}Q*k>`AqGdS&nFAWKO;6XsY}0=@JzKD*gAv}m;(1C2pk1`E&eSz*$Ib)& zhBG%mBJ4%D&@^rQ?=r#0SQwSrq=wv9$1VAs(pel)mWuDWEKjFqDMdYZZa(vqXLyS@ zXLu~qP8nWTxyx{d$7ijSNYxFd;<#vmPWo-S3}tv{_Jkxq?2kFprg_SS{7j)3S>d!CQ74>yibcytnRIm^H%hmVPPcT_Um6AK%6VZqa>* ziQHm@pU{%k9!kMCn20p8&&9bg%WN%E+H9}mtI4LlZqhI!*(|foVcqZnvdtU#lxw)H zo_1*>oW$fVs9W1MM}#U1CH-;P;ozV#rI|#jw4Z`*-^_G<63VHoOiFc}8`AR_hLc8` zoFOlDM;Btj&Cm4R5LwOe&bo6p}pwB-uHq_@2(qtzbL zN>X>cYK_@ulU&FhBY4wFp8v4GlI}Oxi+oQo*H@<2#aND(yhqyQW%-VpDxJs5|)h34*ZQbNJ5VHa({aL~$*~PyVJ}vIw z52wb%^@Hg#(M4WDhTJ7XwlXF1GIpBT<+D?Bv&&OwW)~NHW;`55s`S{~m)BKQ%Q>r%sRaJ=hsQ@0);DYC1@7zdInvGzKx ztfx^03sP+6WJ7|TPqY24pCZjMIV4-AlS^jd&ou-APXBxyN@7I}0&zxgGu4A}19tQ{ z`nHZtI(+rg>@pcQbIwWF>}f0yC~gBPTW_lFKexrMib<7wdEaPAo!kA_C+=&9sOnNv z=kUh&vMSS7e%|h2y!`(`m=5&gu1wICLRGypti}oN^5}ugykAX@?#?>cg!eA&g173L z@ujbwUR*f7G*hPOGbc_=P0uV%nYo!|pQg{xESy1-ZV zN17^WFVk-ybqp!|aN15%rM%t6TbH`;B*7*5TYL8v?}8=@_?pZ6TpqtzL_>KzDfN1? z*(DJoPE-l~Hc7m`Jg_PAU88>MB);s(L3K;dJILbKWtDuC<^vr`aP>*-_Van7m)o=Y z;YsnUwk5M~MJwIPeHEnR#1?$gT0A>7ySz2WAM9I{UVVLnRPH>AtdL)cc~JQs@-iX;tu8fxN7yEXndT^iMp6^Jf_#w0awk~f8Uc03AL;2 Q*1P&YFoF|Z-M4}N1B7x)4FCWD literal 0 HcmV?d00001 diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 00000000..03340d82 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,830 @@ +# French messages for the nano editor +# Copyright (C) 2000 Free Software Foundation, Inc. +# Pierre Tane , 2000. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 0.8.9\n" +"POT-Creation-Date: 2000-05-31 10:00-0500\n" +"PO-Revision-Date: 2000-03-24 01:32+0100\n" +"Last-Translator: Pierre Tane \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: cut.c:43 +#, c-format +msgid "add_to_cutbuffer called with inptr->data = %s\n" +msgstr "add_to_cutbuffer appelé avec inptr->data = %s\n" + +#: cut.c:146 +msgid "Blew away cutbuffer =)\n" +msgstr "cutbuffer annihilé -)\n" + +#: global.c:110 +msgid "Invoke the help menu" +msgstr "" + +#: global.c:111 +msgid "Write the current file to disk" +msgstr "" + +#: global.c:112 +msgid "Exit from nano" +msgstr "" + +#: global.c:113 +#, fuzzy +msgid "Goto a specific line number" +msgstr "Entrer le numéro de ligne" + +#: global.c:114 +msgid "Justify the current paragraph" +msgstr "" + +#: global.c:115 +msgid "Replace text within the editor" +msgstr "" + +#: global.c:116 +msgid "Insert another file into the current one" +msgstr "" + +#: global.c:117 +msgid "Search for text within the editor" +msgstr "" + +#: global.c:118 +msgid "Move to the previous screen" +msgstr "" + +#: global.c:119 +msgid "Move to the next screen" +msgstr "" + +#: global.c:120 +msgid "Cut the current line and store it in the cutbuffer" +msgstr "" + +#: global.c:121 +msgid "Uncut from the cutbuffer into the current line" +msgstr "" + +#: global.c:122 +msgid "Show the posititon of the cursor" +msgstr "" + +#: global.c:123 +msgid "Invoke the spell checker (if available)" +msgstr "" + +#: global.c:124 +msgid "Move up one line" +msgstr "" + +#: global.c:125 +msgid "Move down one line" +msgstr "" + +#: global.c:126 +msgid "Move forward one character" +msgstr "" + +#: global.c:127 +msgid "Move back one character" +msgstr "" + +#: global.c:128 +msgid "Move to the beginning of the current line" +msgstr "" + +#: global.c:129 +msgid "Move to the end of the current line" +msgstr "" + +#: global.c:130 +msgid "Go to the first line of the file" +msgstr "" + +#: global.c:131 +msgid "Go to the last line of the file" +msgstr "" + +#: global.c:132 +msgid "Refresh (redraw) the current screen" +msgstr "" + +#: global.c:133 +msgid "Mark text at the current cursor location" +msgstr "" + +#: global.c:134 +msgid "Delete the character under the cursor" +msgstr "" + +#: global.c:136 +msgid "Delete the character to the left of the cursor" +msgstr "" + +#: global.c:137 +msgid "Insert a tab character" +msgstr "" + +#: global.c:138 +msgid "Insert a carriage return at the cursor position" +msgstr "" + +#: global.c:140 +msgid "Make the current search or replace case (in)sensitive" +msgstr "" + +#: global.c:141 +msgid "Cancel the current function" +msgstr "" + +#: global.c:146 global.c:256 global.c:322 +msgid "Get Help" +msgstr "" + +#: global.c:149 global.c:157 +msgid "WriteOut" +msgstr "" + +#: global.c:153 global.c:311 +msgid "Exit" +msgstr "" + +#: global.c:161 global.c:252 +msgid "Goto Line" +msgstr "" + +#: global.c:166 global.c:244 +msgid "Justify" +msgstr "" + +#: global.c:169 global.c:240 +#, fuzzy +msgid "Replace" +msgstr "Rempacer par" + +#: global.c:173 +#, fuzzy +msgid "Read File" +msgstr "Lecture du fichier" + +#: global.c:177 +msgid "Where Is" +msgstr "" + +#: global.c:181 global.c:303 +msgid "Prev Page" +msgstr "" + +#: global.c:185 global.c:307 +msgid "Next Page" +msgstr "" + +#: global.c:189 +msgid "Cut Text" +msgstr "" + +#: global.c:192 +msgid "UnCut Txt" +msgstr "" + +#: global.c:196 +msgid "Cur Pos" +msgstr "" + +#: global.c:200 +msgid "To Spell" +msgstr "" + +#: global.c:204 +msgid "Up" +msgstr "" + +#: global.c:207 +msgid "Down" +msgstr "" + +#: global.c:210 +msgid "Forward" +msgstr "" + +#: global.c:213 +msgid "Back" +msgstr "" + +#: global.c:216 +msgid "Home" +msgstr "" + +#: global.c:219 +msgid "End" +msgstr "" + +#: global.c:222 +msgid "Refresh" +msgstr "" + +#: global.c:225 +#, fuzzy +msgid "Mark Text" +msgstr "Marque enregistrée" + +#: global.c:228 +msgid "Delete" +msgstr "" + +#: global.c:232 +msgid "Backspace" +msgstr "" + +#: global.c:236 +msgid "Tab" +msgstr "" + +#: global.c:247 +msgid "Enter" +msgstr "" + +#: global.c:260 global.c:277 global.c:293 +msgid "First Line" +msgstr "" + +#: global.c:263 global.c:280 global.c:296 +msgid "Last Line" +msgstr "" + +#: global.c:266 global.c:283 +msgid "Case Sens" +msgstr "" + +#: global.c:270 +#, fuzzy +msgid "To Replace" +msgstr "Rempacer par" + +#: global.c:273 global.c:289 global.c:299 global.c:315 global.c:319 +#: global.c:325 winio.c:883 +msgid "Cancel" +msgstr "Annuler" + +#: global.c:286 +msgid "To Search" +msgstr "" + +#: nano.c:114 +msgid "" +"\n" +"Buffer written to 'nano.save'\n" +msgstr "" +"\n" +"Buffer écrit dans 'nano.save'\n" + +#: nano.c:127 +msgid "nano: malloc: out of memory!" +msgstr "nano: malloc: plus de mémoire!" + +#: nano.c:144 +msgid "Key illegal in VIEW mode" +msgstr "Touche illégale en mode VISUALISATION" + +#: nano.c:185 +msgid "" +" nano help text\n" +"\n" +" The nano editor is designed to emulate the functionality and ease-of-use of " +"the UW Pico text editor. There are four main sections of the editor: The " +"top line shows the program version, the current filename being edited, and " +"whether or not the file has been modified. Next is the main editor window " +"showing the file being edited. The status line is the third line from the " +"bottom and shows important messages. The bottom two lines show the most " +"commonly used shortcuts in the editor.\n" +"\n" +" The notation for shortcuts is as follows: Control-key sequences are notated " +"with a caret (^) symbol. Alt-key sequences are notated with an at (@) " +"symbol. The following keystrokes are available in the main editor window. " +"Optional keys are shown in parentheses:\n" +"\n" +msgstr "" + +#: nano.c:286 +msgid "free_node(): free'd a node, YAY!\n" +msgstr "free_node(): libération d'un noeud, OUAIS!\n" + +#: nano.c:291 +msgid "free_node(): free'd last node.\n" +msgstr "free_node(): libération du dernier noeud \n" + +#: nano.c:407 +msgid "read_line: not on first line and prev is NULL" +msgstr "" +"read_line: la position actuelle n'est pas la premičre ligne et la précédente " +"est NULL" + +#: nano.c:468 nano.c:482 +#, c-format +msgid "Read %d lines" +msgstr "%d lignes lues" + +#: nano.c:500 nano.c:1161 nano.c:1179 +#, c-format +msgid "\"%s\" not found" +msgstr "\"%s\" non trouvé" + +#. We have a new file +#: nano.c:504 +msgid "New File" +msgstr "Nouveau fichier" + +#: nano.c:513 +#, c-format +msgid "File \"%s\" is a directory" +msgstr "Le fichier \"%s\" est un répertoire" + +#: nano.c:518 +msgid "Reading File" +msgstr "Lecture du fichier" + +#: nano.c:531 +msgid "File to insert [from ./] " +msgstr "Fichier ŕ insérer [depuis ./] " + +#: nano.c:546 nano.c:1601 nano.c:1765 nano.c:1916 +msgid "Cancelled" +msgstr "Annulé" + +#: nano.c:556 +msgid "" +"Usage: nano [GNU long option] [option] +LINE \n" +"\n" +msgstr "" +"Utilisation: nano [option longue GNU] [option] +LIGNE \n" +"\n" + +#: nano.c:557 +msgid "Option\t\tLong option\t\tMeaning\n" +msgstr "Option\t\tOption Longue\t\tSignification\n" + +#: nano.c:560 +msgid " -V \t\t--version\t\tPrint version information and exit\n" +msgstr " -V \t\t--version\t\tAfficher les informations de version et sortir\n" + +#: nano.c:562 +msgid " -c \t\t--const\t\t\tConstantly show cursor position\n" +msgstr " -c \t\t--const\t\t\tAfficher constamment la position du curseur\n" + +#: nano.c:564 +msgid " -h \t\t--help\t\t\tShow this message\n" +msgstr " -h \t\t--help\t\t\tAfficher ce message\n" + +#: nano.c:566 +msgid " -i \t\t--autoindent\t\tAutomatically indent new lines\n" +msgstr "" +" -i \t\t--autoindent\t\tIndenter automatiquement les nouvelles lignes\n" + +#: nano.c:568 +msgid " -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:571 +msgid " -m \t\t--mouse\t\t\tEnable mouse\n" +msgstr " -m \t\t--mouse\t\t\tActiver le support souris\n" + +#: nano.c:576 +msgid "" +" -r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n" +msgstr "" +" -r [#cols] \t--fill=[#cols]\t\tMettre la colonne de fin de ligne ŕ (couper " +"les lignes ŕ) #cols\n" + +#: nano.c:578 +msgid " -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n" +msgstr "" +" -p\t \t--pico\t\t\tRendre les deux lignes du bas plus semblables ŕ Pico\n" + +#: nano.c:580 +msgid " -s [prog] \t--speller=[prog]\tEnable alternate speller\n" +msgstr "" +" -s [prog] \t--speller=[prog]\tActiver un vérificateur orthographique " +"alternatif\n" + +#: nano.c:582 +msgid " -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n" +msgstr "" +" -t \t\t--tempfile\t\tSauver automatiquement ŕ la sortie, sans demander\n" + +#: nano.c:584 +msgid " -v \t\t--view\t\t\tView (read only) mode\n" +msgstr " -v \t\t--view\t\t\tMode Visualisation (lecture seule)\n" + +#: nano.c:586 +msgid " -w \t\t--nowrap\t\tDon't wrap long lines\n" +msgstr " -w \t\t--nowrap\t\tNe pas couper les lignes trop longues\n" + +#: nano.c:588 +msgid " -x \t\t--nohelp\t\tDon't show help window\n" +msgstr " -x \t\t--nohelp\t\tNe pas afficher la fenętre d'aide\n" + +#: nano.c:590 +msgid " -z \t\t--suspend\t\tEnable suspend\n" +msgstr " -z \t\t--suspend\t\tAutoriser la suspension\n" + +#: nano.c:592 +msgid " +LINE\t\t\t\t\tStart at line number LINE\n" +msgstr " +LIGNE\t\t\t\t\tCommencer ŕ la ligne LIGNE\n" + +#: nano.c:594 +msgid "" +"Usage: nano [option] +LINE \n" +"\n" +msgstr "" +"Utilisation: nano [option] +LIGNE \n" +"\n" + +#: nano.c:595 +msgid "Option\t\tMeaning\n" +msgstr "Option\t\tSignification\n" + +#: nano.c:596 +msgid " -V \t\tPrint version information and exit\n" +msgstr " -V \t\tAfficher les informations de version et sortir\n" + +#: nano.c:597 +msgid " -c \t\tConstantly show cursor position\n" +msgstr " -c \t\tAfficher constamment la position du curseur\n" + +#: nano.c:598 +msgid " -h \t\tShow this message\n" +msgstr " -h \t\tAfficher ce message\n" + +#: nano.c:599 +msgid " -i \t\tAutomatically indent new lines\n" +msgstr " -i \t\tIndenter automatiquement les nouvelles lignes\n" + +#: nano.c:601 +msgid " -l \t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:604 +msgid " -m \t\tEnable mouse\n" +msgstr " -m \t\tActiver la souris\n" + +#: nano.c:608 +msgid " -r [#cols] \tSet fill cols to (wrap lines at) #cols\n" +msgstr "" +" -r [#cols] \tMettre la colonne de fin de ligne ŕ (couper les lignes ŕ) " +"#cols\n" + +#: nano.c:609 +msgid " -s [prog] \tEnable alternate speller\n" +msgstr " -s [prog] \tActiver un vérificateur orthographique alternatif\n" + +#: nano.c:610 +msgid " -p \t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p \t\tRendre les 2 lignes du bas plus semblables ŕ Pico\n" + +#: nano.c:611 +msgid " -t \t\tAuto save on exit, don't prompt\n" +msgstr " -t \t\tSauver automatiquement ŕ la sortie, sans demander\n" + +#: nano.c:612 +msgid " -v \t\tView (read only) mode\n" +msgstr " -v \t\tMode Visualisation seule (lecture seule)\n" + +#: nano.c:613 +msgid " -w \t\tDon't wrap long lines\n" +msgstr " -w \t\tNe pas couper les lignes longues\n" + +#: nano.c:614 +msgid " -x \t\tDon't show help window\n" +msgstr " -x \t\tNe pas afficher la fenętre d'aide\n" + +#: nano.c:615 +msgid " -z \t\tEnable suspend\n" +msgstr " -z \t\tAutoriser la suspension\n" + +#: nano.c:616 +msgid " +LINE\t\tStart at line number LINE\n" +msgstr " +LIGNE\t\tDémarrer ŕ la ligne LIGNE\n" + +#: nano.c:623 +#, c-format +msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n" +msgstr " nano version %s de Chris Allegretta (compilée %s, %s)\n" + +#: nano.c:625 +msgid " Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" +msgstr " Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" + +#: nano.c:709 +msgid "Mark Set" +msgstr "Marque enregistrée" + +#: nano.c:714 +msgid "Mark UNset" +msgstr "Marque effacée" + +#: nano.c:1052 +#, c-format +msgid "check_wrap called with inptr->data=\"%s\"\n" +msgstr "check_wrap appelée avec inptr->data=\"%s\"\n" + +#: nano.c:1089 +#, c-format +msgid "Case Sensitive Search%s" +msgstr "Recherche sensible ) la casse%s" + +#: nano.c:1090 +#, c-format +msgid "Search%s" +msgstr "" + +#: nano.c:1094 +msgid "Search Cancelled" +msgstr "Recherche annulée" + +#: nano.c:1175 +msgid "Search Wrapped" +msgstr "La recherche a bouclé" + +#: nano.c:1225 +#, c-format +msgid "Replaced %d occurences" +msgstr "%d occurences remplacées" + +#: nano.c:1227 +msgid "Replaced 1 occurence" +msgstr "1 occurence remplacée" + +#: nano.c:1245 nano.c:1267 nano.c:1290 +msgid "Replace Cancelled" +msgstr "Remplacement annulé" + +#: nano.c:1263 +#, c-format +msgid "Replace with [%s]" +msgstr "Remplacer par [%s]" + +#. last_search is empty +#: nano.c:1288 +msgid "Replace with" +msgstr "Rempacer par" + +#: nano.c:1329 +msgid "Replace this instance?" +msgstr "Remplacer cette occurence?" + +#: nano.c:1416 +#, c-format +msgid "current->data now = \"%s\"\n" +msgstr "current->data vaut maintenant \"%s\"\n" + +#: nano.c:1461 +#, c-format +msgid "After, data = \"%s\"\n" +msgstr "Aprčs, data = \"%s\"\n" + +#. Ask for it +#: nano.c:1529 +msgid "Enter line number" +msgstr "Entrer le numéro de ligne" + +#: nano.c:1531 +msgid "Aborted" +msgstr "Annulé" + +#: nano.c:1551 +msgid "Come on, be reasonable" +msgstr "Allez, soyez raisonnable" + +#: nano.c:1556 +#, c-format +msgid "Only %d lines available, skipping to last line" +msgstr "Seulement %d lignes sont disponibles, saut jusqu'ŕ la derničre ligne" + +#: nano.c:1613 nano.c:1629 nano.c:1641 nano.c:1658 nano.c:1664 +#, c-format +msgid "Could not open file for writing: %s" +msgstr "Impossible d'ouvrir le fichier en écriture: %s" + +#: nano.c:1621 +msgid "Could not open file: Path length exceeded." +msgstr "Impossible d'ouvrir le fichier: la longueur du chemin a été dépassée" + +#: nano.c:1646 +#, c-format +msgid "Wrote >%s\n" +msgstr "Écrit >%s\n" + +#: nano.c:1673 +#, c-format +msgid "Could not close %s: %s" +msgstr "Impossible de fermer %s: %s" + +#. Try a rename?? +#: nano.c:1694 nano.c:1705 nano.c:1710 +#, c-format +msgid "Could not open %s for writing: %s" +msgstr "Impossible d'ouvrir %s en écriture: %s" + +#: nano.c:1716 +#, c-format +msgid "Could not set permissions %o on %s: %s" +msgstr "Impossible de donner les permissions %o ŕ %s: %s" + +#: nano.c:1723 +#, c-format +msgid "Wrote %d lines" +msgstr "%d lignes écrites" + +#: nano.c:1744 +msgid "File Name to write" +msgstr "Nom du fichier dans lequel écrire" + +#: nano.c:1749 +#, c-format +msgid "filename is %s" +msgstr "Le nom du fichier est %s" + +#: nano.c:1754 +msgid "File exists, OVERWRITE ?" +msgstr "" + +#: nano.c:1783 +msgid "Error deleting tempfile, ack!" +msgstr "Erreur lors de l'effacement du fichier temporaire, zut!" + +#: nano.c:1796 nano.c:1846 +#, c-format +msgid "Could not create a temporary filename: %s" +msgstr "Impossible de créer un nom de fichier temporaire: %s" + +#: nano.c:1818 nano.c:1868 +#, c-format +msgid "Could not invoke spell program \"%s\"" +msgstr "Impossible d'invoquer le programme spell \"%s\"" + +#. Why 32512? I dont know! +#: nano.c:1824 nano.c:1874 +msgid "Could not invoke \"ispell\"" +msgstr "Impossible d'invoquer \"ispell\"" + +#: nano.c:1836 nano.c:1886 +msgid "Finished checking spelling" +msgstr "Vérification orthographique terminée" + +#: nano.c:1903 +msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " +msgstr "Sauver le buffer modifié (RÉPONDRE \"No\" EFFACERA LES CHANGEMENTS" + +#: nano.c:2027 +msgid "Cannot resize top win" +msgstr "Impossible de redimensionner la fenętre du haut" + +#: nano.c:2029 +msgid "Cannot move top win" +msgstr "Impossible de bouger la fenętre du haut" + +#: nano.c:2031 +msgid "Cannot resize edit win" +msgstr "Impossible de redimensionner la fenętre d'édition" + +#: nano.c:2033 +msgid "Cannot move edit win" +msgstr "Impossible de bouger la fenętre d'édition" + +#: nano.c:2035 +msgid "Cannot resize bottom win" +msgstr "Impossible de redimensionner la fenętre du bas" + +#: nano.c:2037 +msgid "Cannot move bottom win" +msgstr "Impossible de bouger la fenętre du bas" + +#: nano.c:2468 +msgid "Main: set up windows\n" +msgstr "Main: configuration des fenętres\n" + +#: nano.c:2490 +msgid "Main: bottom win\n" +msgstr "Main: fenętre du bas\n" + +#: nano.c:2496 +msgid "Main: open file\n" +msgstr "Main: ouvrir fichier\n" + +#: nano.c:2564 +#, c-format +msgid "I got Alt-[-%c! (%d)\n" +msgstr "J'ai reçu Alt-[-%c! (%d)\n" + +#: nano.c:2580 +#, c-format +msgid "I got Alt-%c! (%d)\n" +msgstr "J'ai reçu Alt-%c! (%d)\n" + +#: winio.c:116 +#, c-format +msgid "actual_x for xplus=%d returned %d\n" +msgstr "actual_x renvoyé pour xplus=%d\n" + +#: winio.c:402 +#, c-format +msgid "input '%c' (%d)\n" +msgstr "taper '%c' (%d)\n" + +#: winio.c:438 +msgid "New Buffer" +msgstr "Nouveau buffer" + +#: winio.c:441 +msgid " File: ..." +msgstr " Fichier: ..." + +#: winio.c:449 +msgid "Modified" +msgstr "Modifié" + +#: winio.c:800 +#, c-format +msgid "Moved to (%d, %d) in edit buffer\n" +msgstr "Déplacement jusqu'ŕ (%d, %d) dans le buffer d'édition\n" + +#: winio.c:811 +#, c-format +msgid "current->data = \"%s\"\n" +msgstr "current->data = \"%s\"\n" + +#: winio.c:854 +#, c-format +msgid "I got \"%s\"\n" +msgstr "J'ai reçu \"%s\"\n" + +#: winio.c:878 +msgid " Y" +msgstr " O" + +#: winio.c:878 +msgid "Yes" +msgstr "Oui" + +#: winio.c:880 +msgid " A" +msgstr " T" + +#: winio.c:880 +msgid "All" +msgstr "Tous" + +#: winio.c:882 +msgid " N" +msgstr " N" + +#: winio.c:882 +msgid "No" +msgstr "Non" + +#: winio.c:883 +msgid "^C" +msgstr "^C" + +#: winio.c:1027 +#, c-format +msgid "do_cursorpos: linepct = %f, bytepct = %f\n" +msgstr "do_cursorpos: linepct = %f, bytepct = %f\n" + +#: winio.c:1031 +msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" +msgstr "ligne %d sur %d (%.0f%%), caractčre %d sur %d (%.0f%%)" + +#: winio.c:1157 +msgid "Dumping file buffer to stderr...\n" +msgstr "Envoi du buffer fichier sur stderr...\n" + +#: winio.c:1159 +msgid "Dumping cutbuffer to stderr...\n" +msgstr "Envoi du cutbuffer sur stderr...\n" + +#: winio.c:1161 +msgid "Dumping a buffer to stderr...\n" +msgstr "Envoi d'un buffer sur stderr...\n" + +#, fuzzy +#~ msgid "nano: realloc: out of memory!" +#~ msgstr "nano: malloc: plus de mémoire!" + +#, fuzzy +#~ msgid "I got %c (%d)!\n" +#~ msgstr "J'ai reçu Alt-%c! (%d)\n" + +#, fuzzy +#~ msgid "File: " +#~ msgstr " Fichier: ..." + +#~ msgid "xplustabs for current_x=%d returned %d\n" +#~ msgstr "xplustabs renvoyé pour current_x=%d\n" diff --git a/po/it.gmo b/po/it.gmo new file mode 100644 index 0000000000000000000000000000000000000000..2a2cc423a08c2e4ba999f411d1a8c350a6eb28a6 GIT binary patch literal 13438 zcmbW74RBpYb;lP%5+pJS1eXRvVC_ValvuJHC&Y-@&Wo)$N@Q6`vW;<#xq9zPy7;|& zU+%q6vfV(T4bW0b1C&q#0m4V2kj#{RPzK6OnCWz&Oeuv9Q(y)fXwy(W3Y}?(rZDvP z-@EsHNOEHO#`}Kn?$_Ntd-m+vBY*4Cr@h1Qd5H9U(%t79^F8>3e!lqJbFncmgl~n< zfS-T^@Uw6W{4Ts6UT}#q!|)|=42JM(crV-xKMOB|--bKjPoetR`b=X+;VirYz79Sc zz7Jjp{|u_%N8vvB%x4wvI|N_E^P8aF^Es&ckNM}zFD?4N1!`W)Q1xE#pC5#SJbwY| zy+45#Uc$?N1&+a|!ds!{H|d{WY;M3suVITZ4 zyZ}B9FNaUrRODX)pTqMY!%dlH1SW zbKxM3u7nk+^$7j*8{suPe;i6aUxS**&*9VI`MmTxcrnztD^Tlo8`S!(Le1}f_yYI= zD1G@H)O#L*lEZln64f#nLYBz%L$!M$l>DxOn&%G4QkW_Kd;)6xr{MG8+n`kQA*gYF z3Tm7WLkqtE_5Oc{l21RKO3s_0-ZuuN$2UO9w*r}}IRv-ClaL{scf%q0rw|dEZ$jzI zkD=as8H1AESV)%H4fVbwQ1c5QDr+*R{_lo2!26);eHp6%Z$ORzJSNAG%|%f2zY1!; zH}a)*oP}DyyP)d5A8KBof_l$CLdpAIq2zNRh3fZGsP|nCrOyLU>o){7{v%NBTTu1h z0M-5;|NLHf5zilmn)hEojpMWa`4Oo3eh+H>{})Pr&tuc6-FB$*-B9^6Q1V=YyWm|= z@BcKE9()mM9^Zf(|IeU>=QCL8(bZ7-*FcST2h@CaLCvoYCFcZcoF9g&{{^V=eZ@cj z1nPZ{L(R93LiN81s-Mf?7I-;S|GVK3Y(TB&y^y6d4??Za-$3>EW2o`}0!j}z^QHM! z;0`zonUZ+}9DyH%KZE}O`Deali+TMBUd8iIp~i6qo$i7+!|m`j@J9G2Q2jgxrJv8C zGOsqf;Y;9gcny3PRJ*^1OxgT5l>To*NH@VDI0i$gcK7=HulVOn7>xS41MY<@@Ot=Z zDEa&cwD1KO1wHS9WSJOlg>Q%aGY@+{3MIdbFgj0#S3}8X*gqfld?nmTeicfN?}6GM z4|zTeFW~vBQ0x2+D82ZufBqqK^MzXHO$bTzcp=of-R_@rsQJGS%HDn1KcB~ZS=b-#0_O=QB|Kd>!&i)6Yw;h1;Rl?>JQd?}mNwOYj2tPf+swHoOpS zVvri=^ZAk-_e15^p@q5UJ0MGGJ_(-&zYfob--6Q9fART`L+!_3K9O{xX!?!YiTb?SmJ=2x`15P4EQM2di*C; ze^;_tn*S(N`#Ye<5kjrkYayy>J_0q*zw`V)l%4P6kYI_-7N~JdLG^nSYJF<(JXnXS z*M#ctJ}5an44)3a1}}!+hHC#KsQ&)PmtVl3wJw)H&0`eGevbS6mqMq1@DlRh3}si} z12xW1K*{@W;Vk?PlzeZ%2x$N8hpP8-*atJHb$>O~`0s}r*8{%%LCBJrPeSS0ccJw8 zF^GvUSEJO@kK3VzGf?Bc6Fw8Z+CRSqs{i|-_WgUIgMxMa{DQiytZHzv`#yr z@@L_*;9XF1eG63kKZknHH=*{?51`h0GY@;mX}WlH-yh-ol_beoV|x!tpIOqiB+W~oKPce7U(5Fg zNYbq{qzgzVNaaT|d#itVwI`x8ulK)if{4O>0=_fFp%RUu&-O;~~;3NQX$bkZL69jrKNM$)u#;C+#J@ zlk^6XKJO--Pg>OjpEr?Oq|KyTN!_16^bgYW*O1;tdKKx{NRuS#Wu2tYZ;_6Y?j|jg zj*ztP^?5PrD$+RV!=#<0H7}G)l5Fj7lI|sal=O7cJ)|b-AgPa}&+is+ z-yiqCrBBjneZ~ry#PfQ%+y55c;(x#2Q+SZ{RMLtb{O15%AYtCj+eo*QLejHI`dnPV zRN)8x?_Y;El4MU#`8?TzInoRK^FGf@VTJTD($%CpNcvn-z`O(QA>B-xA?b6Rbj7m=Rp^Iqop06dShmGnEL2Fdi_(pp>$Q@ff*c^<|#PwZeE#K~wDtb~L8#@bt> zdN^)JvEcUFsmbYyK7Ho$AkA%%+jOwvY>Q)Gjkd8sJ86-T@LF_$v}PO%TZ<|Iz0R1j(~X6s9#z%R$!x1l5UkcW995?cH;_is z%0ebF5eEzP(7MO6bZuU<&$3v}sG88=KyWg&3rWt{?RCXaX`P04hVqembkd2T$xF_y zW@?XJSxxHMalKpQ9$H_nceR_@C#;q`G3Q~U$rO;Z*3oKHS+rUjz17y-qA`X> z)9JUGoI|x0*YipguCg45fgMW2phmy-)5EMq&8>iHowab)brC0$XQ@1eY?FAYqkpPa zXx0XWr+gp9ZYZj`?WGL6iasZ+l9%e8z4VOhC2JwzxYkxj|E%V!;1#lyTQPQ`5k&QI zD_eDQkmaXGlXR)?NVqU=m-Dgs4&uuawIZQ9tQ#{GVn=J#`78@tpX05npDho-Phj0-kVKD<*?Xs%WZ|KO} z5>!vRudEqVL$f!Ct6|*(vk}S+r5FOc*ov#NL%xi6>X%;BVCR;54T1J#hqWk|lzTGs z#7Vx)OT#QWvr!MeU~L~hyVFY++PN^!=+FPcU^1k+Fi5M*1LP+S>GM{*5L$FFOPnzNVD^{FvQM|OKe^*2AK9@Ss^kmqoHqNydYFeE zMcHzY232%W7E+b#;bLx+#Zt#O>Nc*9601?6iLO?%8k>DB^d2J+*y4@qHOr});sW%y zi>oa^qO+7ck#5+-1bb&9X1v9>vo_v?Fca8C_hlEcif*HtTeUcD@3BJzTZ_`Lig->J z1=FaEhTzV(A`9c1`eo&NVxt+qpF}Eh^YLM2w-tP623x>|1OywElGt_pRmP%+Eia@xDT z_b2=c^xA5)Se)9WOJ#0jgPBRYgfS>AOYyr>&qoHTo9)m*4a3yQJJy|BOf|68AWb9O z6Lx6cN^z<3u0?NqL1wb7p9c#F!z)!g8+){jy0~@4Su5sVny>^BO%^*<`s7Z4Mi{rc zGmDMtq)b0U(V`7jFyV4PhRyA*ERPmXmn;Y9>|>Lmu(_Md=8h0QNj5sDYiAsuoH*jn zJ2NE_J7FFOqIkT^X7-yRr@hb14DHlbc~0SNId8>p2KU;`899sPNW*3w6OJIUWkXRs zoM984C8Sk)ve?V+SI(~PlCSH>dzO5L=AgQs;82JOvx^qfkBIvv=ahK2G8M}Nb zR#6orCLP?UwqK5ga4Cvo>2PQJyD@Y+@ijSYpR`V_$z;_u4C7(|zHKuNS0dcUo-#zK zS+rkN)Am3;IXi2^S}b?g6b7N+OyjiNQW!M-)D|a?*Ug}(W;!tk@nvXPxFQ`z*=npoPOo;xxzJ2}1IZkbND*dvou zQ+D6P-2Cjpqjv9YmFfKxbHjFzHN}~4JM-}wN7$K7rsp4Z(w=38MU8>X`1?`lZBNb# z+0j=WMDxLdnNRGToN{w0cIPF><)N5Ur#KmkjanW->+F$J!$VDTNY}E$NwmlIPam@N zj)EMw#|lk3UffviO|osf`}=!aou$qZjA3XeGjl{2s~$~IH`4xEl$|V!54LiCB-CrG zTJgAh0Lycf1$)I_!x`QR>L*S)N90tq-pY1SyRg}z7P#L8wc3e1IngwcDsyNW}_oAGwzjdHmxwB6g9#-KYiSLkuKN1N50(t$-h!P9wI zKJ^>PLSCIksabjUPk18chB7of&O(OaV2zVc8C&hq%F)d<*r0~n=cxsNKxaTc<{&e0TqW$paIeQEeX`>nFrPkcVDQHyMuh={C$% z6u-oYiz9K@S)SsnacyDy^AZJ-^wQAQLIM?TSGfDP+MRpt zp1_iCc4sT(9^ivZOOXWR!b?w3ygtY@>4Hr`Y6C@^9#OOj#|%ppx5AYmv-Kaw+}qT( z0tUWzF(KE&#iyt&Uqze3%}o)fX*Na{F12vSZKR@;Hj9e5Q^YZytfYa|VkO!j=v2wM zMh2Wk#Gv$Qg{0Qz^#q-?k62>65M){6!%nzNx_#CM13XJHK?gXK{M5+m40_KOD%Xn0@;*_D&_DQR*jYiD{^%VjZOQ=<$8Cqvuk8F#bLL>th z_l#y-U5?PgKtfd?=h!Y-!JfG>t_fCU9C6W^Gj5;aOJ|9U0JB59Tx1F*JRFs^HmJ}W zxsnpL#j69^si>{D;-zJ`Hmd%lm3kvts@`zhocQ1T&Ys}pNd!gB?mS4K8r)1vzf5TgIz2PmzUZm$|i*Ip|P(uN(c6q1`jK;bB2Us`Hp)rt%A;`ExW(JtkU zlSG4voFFZQTv>!bYuY7X%zT(e?1hc1wikja7oKi4*tlkQr&)`MuIrSuRC`^Eb#9}0 zf(BrHarI-$;reU3Y_^ znd%rpRWU$?Gl4-^_f}smsu$z?CF+jj0B{pX6{9VT12)K=*sMIG%#zWb`Bh7s&!{37 z(Bm&Wkv0+mJ-i$r(3>d_e{L*G^(gR=#>x<}P_o@RZMk^Ky_D&rFm|p&8Pc1mM~x^B zj3+Ndv;lvO!>Pj%D?TNkqszb8uxh5i$q*hXoe%=lIxg9LNfUpIrS;*s@(66l^ok0d zTg6!_IHfpSAB53d2q0pxvyLn<_;d7t<3G6og~IL;lq3M>%x0_^)Vh?cuyX0sy~Yn$mwVxvX#iO zIQ%`a;aAIVA|oT7n8N|mm(4;q%NlMCB!;qduvO2`URw6+x~jR&FKHy|KQsj&j#U`yynl*WisOX{?}PHE04ijZ#;86scG%->g(SZm(Rx zdy3rJ>(7>Hp<-UIsU$;ya>p&}j!2)ATB*2dDOT%c|A^cDLu@3@)JND&nD{ty@xT3% z3jpGsn$Axtvk(3)%Ht~blG(c)DU#s>fvA}~S}^yx7WqFD6`Y%|m_uC)<3oV$!=ZhM zl(9e=7H3n+jQ0L7k9Ll0Z+y4SaV$l7%gI{$xp7nwq2zMk6(KBt`;m684CR!1mZXRe z5-d#2oI3*1>f&hC(ze&AQ|P^7?H^}#$`Zn>oCzB?LL&yTD=3{_z0O>8&3Q`8B8KRk zN1}-Sc`jOt6_;m06iVDES8rrvR?Sq1N8Ns(e{_SIDx6%WWu_v(n?EeKf9S;M2(eTP zM&DMo^0!{kMIerK#l<1(s!}MN_uPF{vAfvaC$W)uRrvOMdYYohYoCh%W7$CwyCRtA zcHtQo(2tEpcR|J?p8@G+p`GiOtaQUzX43Ah z9Jpn&a$sV5e$rMBAD);#G(Sn~vD|rGvo0MW@B8xyTeH`BMsCmbion;!gYg$<+4K#K zp~8*_%Tpp)7kI?JaJH5)M{f+*@108h3~jk!a@gZJDb`fP9=%3+2gHRRoih3OW2HL) z*>30?t*^5$Ss8q+BW-7(OT|$DMCP@s4bZ-bn>iPzanUljA6&*tWL*@}&i$Y#3W;N6 z+fm46T?P3=ZO$e@y*G+PVwAA}GSj+}Jy9sKs3|+rQ}dUIMe-M87mKWMOrCoz5`UxP z+&(6kwkOzFkN7`KK~1(u5lOB&M<*(`tqn=GYhjcg*BO(z%4dsA1~LY68+$^N-o0}x w(ObACG`ZNqXY{UPuqHIALp0!`YWWklR2nyh@fQIdds January 9, 2000 +# Copyright (C) 2000 Free Software Foundation, Inc. +# Jordi Mallach , 2000. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.8.7\n" +"POT-Creation-Date: 2000-05-31 10:00-0500\n" +"PO-Revision-Date: 2000-03-03 04:57+0100\n" +"Last-Translator: Daniele Medri \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: cut.c:43 +#, c-format +msgid "add_to_cutbuffer called with inptr->data = %s\n" +msgstr "add_to_cutbuffer chiamato con inptr->data = %s\n" + +#: cut.c:146 +msgid "Blew away cutbuffer =)\n" +msgstr "" + +#: global.c:110 +msgid "Invoke the help menu" +msgstr "Invoca menu aiuti" + +#: global.c:111 +msgid "Write the current file to disk" +msgstr "Salva il file corrente sul disco" + +#: global.c:112 +msgid "Exit from nano" +msgstr "Esci da nano" + +#: global.c:113 +msgid "Goto a specific line number" +msgstr "Vai ad un numero linea specifico" + +#: global.c:114 +msgid "Justify the current paragraph" +msgstr "Giustifica il paragrafo corrente" + +#: global.c:115 +msgid "Replace text within the editor" +msgstr "Sostituisci testo senza editor" + +#: global.c:116 +msgid "Insert another file into the current one" +msgstr "Inserisci un file dentro il corrente" + +#: global.c:117 +msgid "Search for text within the editor" +msgstr "Cerca testo senza editor" + +#: global.c:118 +msgid "Move to the previous screen" +msgstr "Vai alla schermata precedente" + +#: global.c:119 +msgid "Move to the next screen" +msgstr "Vai alla schermata successiva" + +#: global.c:120 +msgid "Cut the current line and store it in the cutbuffer" +msgstr "Taglia la linea corrente e memorizzala nel cutbuffer" + +#: global.c:121 +msgid "Uncut from the cutbuffer into the current line" +msgstr "Uncut dal cutbuffer dentro la linea corrente" + +#: global.c:122 +msgid "Show the posititon of the cursor" +msgstr "Mostra la posizione del cursore" + +#: global.c:123 +msgid "Invoke the spell checker (if available)" +msgstr "Invocar el corrector ortográfico (si está disponible)" + +#: global.c:124 +msgid "Move up one line" +msgstr "Sposta in alto una linea" + +#: global.c:125 +msgid "Move down one line" +msgstr "Sposta in basso una linea" + +#: global.c:126 +msgid "Move forward one character" +msgstr "Sposta avanti un carattere" + +#: global.c:127 +msgid "Move back one character" +msgstr "Sposta indietro un carattere" + +#: global.c:128 +msgid "Move to the beginning of the current line" +msgstr "Sposta all'inizio della linea corrente" + +#: global.c:129 +msgid "Move to the end of the current line" +msgstr "Sposta alla fine delle linea corrente" + +#: global.c:130 +msgid "Go to the first line of the file" +msgstr "Vai alla prima linea del file" + +#: global.c:131 +msgid "Go to the last line of the file" +msgstr "Vai all'ultima linea del file" + +#: global.c:132 +msgid "Refresh (redraw) the current screen" +msgstr "Aggiorna la schermata corrente" + +#: global.c:133 +msgid "Mark text at the current cursor location" +msgstr "Marca testo nella posizione corrente del cursore" + +#: global.c:134 +msgid "Delete the character under the cursor" +msgstr "Elimina i caratteri sotto il cursore" + +#: global.c:136 +msgid "Delete the character to the left of the cursor" +msgstr "Elimina i caratteri a sinistra del cursore" + +#: global.c:137 +msgid "Insert a tab character" +msgstr "Inserisci un carattere tab" + +#: global.c:138 +msgid "Insert a carriage return at the cursor position" +msgstr "Inserisci un ritorno a capo alla posizione del cursore" + +#: global.c:140 +msgid "Make the current search or replace case (in)sensitive" +msgstr "Ricerca/Sostituisci con case (in)sensitive" + +#: global.c:141 +msgid "Cancel the current function" +msgstr "Cancella la funzione corrente" + +#: global.c:146 global.c:256 global.c:322 +msgid "Get Help" +msgstr "Aiuto" + +#: global.c:149 global.c:157 +msgid "WriteOut" +msgstr "Sovrascrivi" + +#: global.c:153 global.c:311 +msgid "Exit" +msgstr "Esci" + +#: global.c:161 global.c:252 +msgid "Goto Line" +msgstr "Vai alla linea" + +#: global.c:166 global.c:244 +msgid "Justify" +msgstr "Giustifica" + +#: global.c:169 global.c:240 +msgid "Replace" +msgstr "Sostituisci" + +#: global.c:173 +msgid "Read File" +msgstr "Leggi file" + +#: global.c:177 +msgid "Where Is" +msgstr "Dov'č" + +#: global.c:181 global.c:303 +msgid "Prev Page" +msgstr "Pag Prec" + +#: global.c:185 global.c:307 +msgid "Next Page" +msgstr "Pag Seg" + +#: global.c:189 +msgid "Cut Text" +msgstr "Taglia" + +#: global.c:192 +msgid "UnCut Txt" +msgstr "UnCut Txt" + +#: global.c:196 +msgid "Cur Pos" +msgstr "Posizione" + +#: global.c:200 +msgid "To Spell" +msgstr "Ortografia" + +#: global.c:204 +msgid "Up" +msgstr "Alza" + +#: global.c:207 +msgid "Down" +msgstr "Abbassa" + +#: global.c:210 +msgid "Forward" +msgstr "Avanti" + +#: global.c:213 +msgid "Back" +msgstr "Indietro" + +#: global.c:216 +msgid "Home" +msgstr "Inizio" + +#: global.c:219 +msgid "End" +msgstr "Fine" + +#: global.c:222 +msgid "Refresh" +msgstr "Aggiorna" + +#: global.c:225 +msgid "Mark Text" +msgstr "Marca testo" + +#: global.c:228 +msgid "Delete" +msgstr "Elimina" + +#: global.c:232 +msgid "Backspace" +msgstr "Backspace" + +#: global.c:236 +msgid "Tab" +msgstr "Tab" + +#: global.c:247 +msgid "Enter" +msgstr "Invio" + +#: global.c:260 global.c:277 global.c:293 +msgid "First Line" +msgstr "Prima linea" + +#: global.c:263 global.c:280 global.c:296 +msgid "Last Line" +msgstr "Ultima linea" + +#: global.c:266 global.c:283 +msgid "Case Sens" +msgstr "Case sens" + +#: global.c:270 +#, fuzzy +msgid "To Replace" +msgstr "Sostituisci" + +#: global.c:273 global.c:289 global.c:299 global.c:315 global.c:319 +#: global.c:325 winio.c:883 +msgid "Cancel" +msgstr "Cancella" + +#: global.c:286 +#, fuzzy +msgid "To Search" +msgstr "Ricerca%s" + +#: nano.c:114 +msgid "" +"\n" +"Buffer written to 'nano.save'\n" +msgstr "" +"\n" +"Buffer scritto su 'nano.save'\n" + +#: nano.c:127 +msgid "nano: malloc: out of memory!" +msgstr "nano: malloc: fuori memoria!" + +#: nano.c:144 +msgid "Key illegal in VIEW mode" +msgstr "Chiave illegale nella modalitŕ VISTA" + +#: nano.c:185 +msgid "" +" nano help text\n" +"\n" +" The nano editor is designed to emulate the functionality and ease-of-use of " +"the UW Pico text editor. There are four main sections of the editor: The " +"top line shows the program version, the current filename being edited, and " +"whether or not the file has been modified. Next is the main editor window " +"showing the file being edited. The status line is the third line from the " +"bottom and shows important messages. The bottom two lines show the most " +"commonly used shortcuts in the editor.\n" +"\n" +" The notation for shortcuts is as follows: Control-key sequences are notated " +"with a caret (^) symbol. Alt-key sequences are notated with an at (@) " +"symbol. The following keystrokes are available in the main editor window. " +"Optional keys are shown in parentheses:\n" +"\n" +msgstr "" + +#: nano.c:286 +msgid "free_node(): free'd a node, YAY!\n" +msgstr "free_node(): liberado un nodo, YEAH!\n" + +#: nano.c:291 +msgid "free_node(): free'd last node.\n" +msgstr "free_node(): liberado el último nodo.\n" + +#: nano.c:407 +msgid "read_line: not on first line and prev is NULL" +msgstr "read_line: no estamos en la primera línea y la anterior es NULL" + +#: nano.c:468 nano.c:482 +#, c-format +msgid "Read %d lines" +msgstr "Leggi %d linee" + +#: nano.c:500 nano.c:1161 nano.c:1179 +#, c-format +msgid "\"%s\" not found" +msgstr "\"%s\" non trovato" + +#. We have a new file +#: nano.c:504 +msgid "New File" +msgstr "Nuovo file" + +#: nano.c:513 +#, c-format +msgid "File \"%s\" is a directory" +msgstr "Il file \"%s\" č una directory" + +#: nano.c:518 +msgid "Reading File" +msgstr "Lettura file" + +#: nano.c:531 +msgid "File to insert [from ./] " +msgstr "File da inserire [da ./] " + +#: nano.c:546 nano.c:1601 nano.c:1765 nano.c:1916 +msgid "Cancelled" +msgstr "Cancellato" + +#: nano.c:556 +msgid "" +"Usage: nano [GNU long option] [option] +LINE \n" +"\n" +msgstr "" +"Utilizzo: nano [GNU opzioni lunghe] [opzioni] +LINEA \n" +"\n" + +#: nano.c:557 +msgid "Option\t\tLong option\t\tMeaning\n" +msgstr "Opzioni\t\tLunghe opzioni\t\tSignificato\n" + +#: nano.c:560 +msgid " -V \t\t--version\t\tPrint version information and exit\n" +msgstr " -V \t\t--versione\t\tStampa informazioni sulla versione ed esci\n" + +#: nano.c:562 +msgid " -c \t\t--const\t\t\tConstantly show cursor position\n" +msgstr " -c \t\t--const\t\t\tMostra sempre la posizione del cursore\n" + +#: nano.c:564 +msgid " -h \t\t--help\t\t\tShow this message\n" +msgstr " -h \t\t--help\t\t\tMostra questo messaggio\n" + +#: nano.c:566 +msgid " -i \t\t--autoindent\t\tAutomatically indent new lines\n" +msgstr " -i \t\t--autoindent\t\tIndentar automáticamente nuevas líneas\n" + +#: nano.c:568 +msgid " -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:571 +msgid " -m \t\t--mouse\t\t\tEnable mouse\n" +msgstr " -m \t\t--mouse\t\t\tAttiva mouse\n" + +#: nano.c:576 +msgid "" +" -r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n" +msgstr " -r [#cols] \t--fill=[#cols]\t\tConfigura riempimento colonne\n" + +#: nano.c:578 +msgid " -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p\t \t--pico\t\t\tCrea in basso 2 linee come l'aspetto di Pico\n" + +#: nano.c:580 +msgid " -s [prog] \t--speller=[prog]\tEnable alternate speller\n" +msgstr " -s [prog] \t--speller=[prog]\tAttiva correttore alternativo\n" + +#: nano.c:582 +msgid " -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n" +msgstr "" +" -t \t\t--tempfile\t\tSalvataggio automatico in uscita senza richiesta\n" + +#: nano.c:584 +msgid " -v \t\t--view\t\t\tView (read only) mode\n" +msgstr " -v \t\t--view\t\t\tVisualizzazione (sola lettura)\n" + +#: nano.c:586 +msgid " -w \t\t--nowrap\t\tDon't wrap long lines\n" +msgstr " -w \t\t--nowrap\t\tNon interrompere linee lunghe\n" + +#: nano.c:588 +msgid " -x \t\t--nohelp\t\tDon't show help window\n" +msgstr " -x \t\t--nohelp\t\tNon mostrare finestra aiuti\n" + +#: nano.c:590 +msgid " -z \t\t--suspend\t\tEnable suspend\n" +msgstr " -z \t\t--suspend\t\tAbilita sospensione\n" + +#: nano.c:592 +msgid " +LINE\t\t\t\t\tStart at line number LINE\n" +msgstr " +LINE\t\t\t\t\tInizia alla linea numero\n" + +#: nano.c:594 +msgid "" +"Usage: nano [option] +LINE \n" +"\n" +msgstr "" +"Uso: nano [opzioni] +LINEA \n" +"\n" + +#: nano.c:595 +msgid "Option\t\tMeaning\n" +msgstr "Opzioni\t\tSignificato\n" + +#: nano.c:596 +msgid " -V \t\tPrint version information and exit\n" +msgstr " -V \t\tStampa informazioni sulla versione ed esci\n" + +#: nano.c:597 +msgid " -c \t\tConstantly show cursor position\n" +msgstr " -c \t\tMostra sempre la posizione del cursore\n" + +#: nano.c:598 +msgid " -h \t\tShow this message\n" +msgstr " -h \t\tMostra questo messaggio\n" + +#: nano.c:599 +msgid " -i \t\tAutomatically indent new lines\n" +msgstr " -v \t\tIndentazione automatica nuove linee\n" + +#: nano.c:601 +msgid " -l \t\tDon't follow symbolic links, overwrite.\n" +msgstr " -l \t\tNon seguire i link simbolici, sovrascrivi.\n" + +#: nano.c:604 +msgid " -m \t\tEnable mouse\n" +msgstr " -m \t\tAttiva mouse\n" + +#: nano.c:608 +msgid " -r [#cols] \tSet fill cols to (wrap lines at) #cols\n" +msgstr " -r [#cols] \tRiempimento colonne (interrompi linee a) #cols\n" + +#: nano.c:609 +msgid " -s [prog] \tEnable alternate speller\n" +msgstr " -s [prog] \tAttiva correttore alternativo\n" + +#: nano.c:610 +msgid " -p \t\tMake bottom 2 lines more Pico-like\n" +msgstr " -p \t\tCrea in basso 2 linee sullo stile di Pico\n" + +#: nano.c:611 +msgid " -t \t\tAuto save on exit, don't prompt\n" +msgstr " -t \t\tSalvataggio automatico in uscita senza avviso\n" + +#: nano.c:612 +msgid " -v \t\tView (read only) mode\n" +msgstr " -v \t\tVisualizza (sola lettura)\n" + +#: nano.c:613 +msgid " -w \t\tDon't wrap long lines\n" +msgstr " -w \t\tNon interrompere linee lunghe\n" + +#: nano.c:614 +msgid " -x \t\tDon't show help window\n" +msgstr " -x \t\tNon mostrare la finestra Aiuti\n" + +#: nano.c:615 +msgid " -z \t\tEnable suspend\n" +msgstr " -z \t\tAttiva sospensione\n" + +#: nano.c:616 +msgid " +LINE\t\tStart at line number LINE\n" +msgstr " +LINEA\t\tInizia alla LINEA numero\n" + +#: nano.c:623 +#, c-format +msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n" +msgstr " nano versione %s di Chris Allegretta (compilato %s, %s\n" + +#: nano.c:625 +msgid " Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" +msgstr "Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" + +#: nano.c:709 +msgid "Mark Set" +msgstr "" + +#: nano.c:714 +msgid "Mark UNset" +msgstr "" + +#: nano.c:1052 +#, c-format +msgid "check_wrap called with inptr->data=\"%s\"\n" +msgstr "check_wrap chiamata con inptr->data=\"%s\"\n" + +#: nano.c:1089 +#, c-format +msgid "Case Sensitive Search%s" +msgstr "Ricerca case sensitive %s" + +#: nano.c:1090 +#, c-format +msgid "Search%s" +msgstr "Ricerca%s" + +#: nano.c:1094 +msgid "Search Cancelled" +msgstr "Ricerca annullata" + +#: nano.c:1175 +msgid "Search Wrapped" +msgstr "Ricerca interrotta" + +#: nano.c:1225 +#, c-format +msgid "Replaced %d occurences" +msgstr "Sostituite %d occorrenze" + +#: nano.c:1227 +msgid "Replaced 1 occurence" +msgstr "Sostituita 1 occorrenza" + +#: nano.c:1245 nano.c:1267 nano.c:1290 +msgid "Replace Cancelled" +msgstr "Sostituzione annullata" + +#: nano.c:1263 +#, c-format +msgid "Replace with [%s]" +msgstr "Sostituisci con [%s]" + +#. last_search is empty +#: nano.c:1288 +msgid "Replace with" +msgstr "Sostituisci con" + +#: nano.c:1329 +msgid "Replace this instance?" +msgstr "Sostituisci questa istanza?" + +#: nano.c:1416 +#, c-format +msgid "current->data now = \"%s\"\n" +msgstr "current->data ora = \"%d\"\n" + +#: nano.c:1461 +#, c-format +msgid "After, data = \"%s\"\n" +msgstr "Dopo, data = \"%s\"\n" + +#. Ask for it +#: nano.c:1529 +msgid "Enter line number" +msgstr "Inserire numero linea" + +#: nano.c:1531 +msgid "Aborted" +msgstr "Operazione fallita" + +#: nano.c:1551 +msgid "Come on, be reasonable" +msgstr "Avanti, sii ragionevole" + +#: nano.c:1556 +#, c-format +msgid "Only %d lines available, skipping to last line" +msgstr "Solo %d linee disponibili, vai all'ultima" + +#: nano.c:1613 nano.c:1629 nano.c:1641 nano.c:1658 nano.c:1664 +#, c-format +msgid "Could not open file for writing: %s" +msgstr "Impossibile aprire il file in scrittura: %s" + +#: nano.c:1621 +msgid "Could not open file: Path length exceeded." +msgstr "Impossibile aprire il file: esagerata lunghezza del percorso." + +#: nano.c:1646 +#, c-format +msgid "Wrote >%s\n" +msgstr "Scrivi >%s\n" + +#: nano.c:1673 +#, c-format +msgid "Could not close %s: %s" +msgstr "Impossibile chiudere %s: %s" + +#. Try a rename?? +#: nano.c:1694 nano.c:1705 nano.c:1710 +#, c-format +msgid "Could not open %s for writing: %s" +msgstr "Impossibile aprire %s in scrittura: %s" + +#: nano.c:1716 +#, c-format +msgid "Could not set permissions %o on %s: %s" +msgstr "Impossibile configurare i permessi di %o su %s: %s" + +#: nano.c:1723 +#, c-format +msgid "Wrote %d lines" +msgstr "Scritte %d linee" + +#: nano.c:1744 +msgid "File Name to write" +msgstr "Salva con nome" + +#: nano.c:1749 +#, c-format +msgid "filename is %s" +msgstr "Il nome file č %s" + +#: nano.c:1754 +msgid "File exists, OVERWRITE ?" +msgstr "File esistente, SOVRASCRIVERE?" + +#: nano.c:1783 +msgid "Error deleting tempfile, ack!" +msgstr "" + +#: nano.c:1796 nano.c:1846 +#, c-format +msgid "Could not create a temporary filename: %s" +msgstr "Impossibile creare un nome file temporaneo: %s" + +#: nano.c:1818 nano.c:1868 +#, c-format +msgid "Could not invoke spell program \"%s\"" +msgstr "Impossibile invocare correttore ortografico \"%s\"" + +#. Why 32512? I dont know! +#: nano.c:1824 nano.c:1874 +msgid "Could not invoke \"ispell\"" +msgstr "Impossibile invocare \"ispell\"" + +#: nano.c:1836 nano.c:1886 +msgid "Finished checking spelling" +msgstr "Controllo ortografico terminato" + +#: nano.c:1903 +msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " +msgstr "" +"Salva il buffer modificato (RISPONDENDO \"No\" ANNULLERETE I CAMBIAMENTI " +"AVVENUTI) ?" + +#: nano.c:2027 +msgid "Cannot resize top win" +msgstr "Impossibile ridimensionare la finestra superiore" + +#: nano.c:2029 +msgid "Cannot move top win" +msgstr "Impossibile spostare la finestra superiore" + +#: nano.c:2031 +msgid "Cannot resize edit win" +msgstr "Impossibile ridimensionare la finestra di modifica" + +#: nano.c:2033 +msgid "Cannot move edit win" +msgstr "Impossibile spostare finestra di modifica" + +#: nano.c:2035 +msgid "Cannot resize bottom win" +msgstr "Impossibile ridimensionare la finestra inferiore" + +#: nano.c:2037 +msgid "Cannot move bottom win" +msgstr "Impossibile spostare la finestra inferiore" + +#: nano.c:2468 +msgid "Main: set up windows\n" +msgstr "Main: configura finestre\n" + +#: nano.c:2490 +msgid "Main: bottom win\n" +msgstr "Main: finestra inferiore\n" + +#: nano.c:2496 +msgid "Main: open file\n" +msgstr "Main: apri file\n" + +#: nano.c:2564 +#, c-format +msgid "I got Alt-[-%c! (%d)\n" +msgstr "Premuto Alt-[-%c! (%d)\n" + +#: nano.c:2580 +#, c-format +msgid "I got Alt-%c! (%d)\n" +msgstr "Premuto Alt-%c! (%d)\n" + +#: winio.c:116 +#, c-format +msgid "actual_x for xplus=%d returned %d\n" +msgstr "actual_x per xplus=%d ha riportato %d\n" + +#: winio.c:402 +#, c-format +msgid "input '%c' (%d)\n" +msgstr "input '%c' (%d)\n" + +#: winio.c:438 +msgid "New Buffer" +msgstr "Nuovo Buffer" + +#: winio.c:441 +msgid " File: ..." +msgstr "File: ..." + +#: winio.c:449 +msgid "Modified" +msgstr "Modificato" + +#: winio.c:800 +#, c-format +msgid "Moved to (%d, %d) in edit buffer\n" +msgstr "Mosso in (%d, %d) nel buffer di modifica\n" + +#: winio.c:811 +#, c-format +msgid "current->data = \"%s\"\n" +msgstr "current->data = \"%s\"\n" + +#: winio.c:854 +#, c-format +msgid "I got \"%s\"\n" +msgstr "Premuto \"%s\"\n" + +#: winio.c:878 +msgid " Y" +msgstr " S" + +#: winio.c:878 +msgid "Yes" +msgstr " Sě" + +#: winio.c:880 +msgid " A" +msgstr " T" + +#: winio.c:880 +msgid "All" +msgstr " Tutti" + +#: winio.c:882 +msgid " N" +msgstr " N" + +#: winio.c:882 +msgid "No" +msgstr " No" + +#: winio.c:883 +msgid "^C" +msgstr "^C" + +#: winio.c:1027 +#, c-format +msgid "do_cursorpos: linepct = %f, bytepct = %f\n" +msgstr "do_cursorpos: linepct = %f, bytepct = %f\n" + +#: winio.c:1031 +msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" +msgstr "linea %d di %d (%.0f%%), carattere %d di %d (%.0f%%)" + +#: winio.c:1157 +msgid "Dumping file buffer to stderr...\n" +msgstr "Copia file buffer sullo stderr...\n" + +#: winio.c:1159 +msgid "Dumping cutbuffer to stderr...\n" +msgstr "Copia cutbuffer sullo stderr...\n" + +#: winio.c:1161 +msgid "Dumping a buffer to stderr...\n" +msgstr "Copia un buffer sullo stderr...\n" + +#, fuzzy +#~ msgid "nano: realloc: out of memory!" +#~ msgstr "nano: malloc: fuori memoria!" + +#, fuzzy +#~ msgid "Justify Complete" +#~ msgstr "Giustifica" + +#, fuzzy +#~ msgid "suspend" +#~ msgstr "Sospendi" + +#, fuzzy +#~ msgid "I got %c (%d)!\n" +#~ msgstr "Premuto Alt-%c! (%d)\n" + +#, fuzzy +#~ msgid "File: " +#~ msgstr "File: ..." + +#~ msgid "Suspend nano if suspend is enabled" +#~ msgstr "Sospendi nano se la sospensione č abilitata" + +#~ msgid "Justify function not yet implemented, and I feel fine" +#~ msgstr "Funzione di giustificazione non ancora implementata e mi sento bene" + +#~ msgid "xplustabs for current_x=%d returned %d\n" +#~ msgstr "xplustabs per current_x=%d ha riportato %d\n" diff --git a/po/nano.pot b/po/nano.pot new file mode 100644 index 00000000..2485181c --- /dev/null +++ b/po/nano.pot @@ -0,0 +1,793 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2000-05-31 10:00-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" + +#: cut.c:43 +#, c-format +msgid "add_to_cutbuffer called with inptr->data = %s\n" +msgstr "" + +#: cut.c:146 +msgid "Blew away cutbuffer =)\n" +msgstr "" + +#: global.c:110 +msgid "Invoke the help menu" +msgstr "" + +#: global.c:111 +msgid "Write the current file to disk" +msgstr "" + +#: global.c:112 +msgid "Exit from nano" +msgstr "" + +#: global.c:113 +msgid "Goto a specific line number" +msgstr "" + +#: global.c:114 +msgid "Justify the current paragraph" +msgstr "" + +#: global.c:115 +msgid "Replace text within the editor" +msgstr "" + +#: global.c:116 +msgid "Insert another file into the current one" +msgstr "" + +#: global.c:117 +msgid "Search for text within the editor" +msgstr "" + +#: global.c:118 +msgid "Move to the previous screen" +msgstr "" + +#: global.c:119 +msgid "Move to the next screen" +msgstr "" + +#: global.c:120 +msgid "Cut the current line and store it in the cutbuffer" +msgstr "" + +#: global.c:121 +msgid "Uncut from the cutbuffer into the current line" +msgstr "" + +#: global.c:122 +msgid "Show the posititon of the cursor" +msgstr "" + +#: global.c:123 +msgid "Invoke the spell checker (if available)" +msgstr "" + +#: global.c:124 +msgid "Move up one line" +msgstr "" + +#: global.c:125 +msgid "Move down one line" +msgstr "" + +#: global.c:126 +msgid "Move forward one character" +msgstr "" + +#: global.c:127 +msgid "Move back one character" +msgstr "" + +#: global.c:128 +msgid "Move to the beginning of the current line" +msgstr "" + +#: global.c:129 +msgid "Move to the end of the current line" +msgstr "" + +#: global.c:130 +msgid "Go to the first line of the file" +msgstr "" + +#: global.c:131 +msgid "Go to the last line of the file" +msgstr "" + +#: global.c:132 +msgid "Refresh (redraw) the current screen" +msgstr "" + +#: global.c:133 +msgid "Mark text at the current cursor location" +msgstr "" + +#: global.c:134 +msgid "Delete the character under the cursor" +msgstr "" + +#: global.c:136 +msgid "Delete the character to the left of the cursor" +msgstr "" + +#: global.c:137 +msgid "Insert a tab character" +msgstr "" + +#: global.c:138 +msgid "Insert a carriage return at the cursor position" +msgstr "" + +#: global.c:140 +msgid "Make the current search or replace case (in)sensitive" +msgstr "" + +#: global.c:141 +msgid "Cancel the current function" +msgstr "" + +#: global.c:146 global.c:256 global.c:322 +msgid "Get Help" +msgstr "" + +#: global.c:149 global.c:157 +msgid "WriteOut" +msgstr "" + +#: global.c:153 global.c:311 +msgid "Exit" +msgstr "" + +#: global.c:161 global.c:252 +msgid "Goto Line" +msgstr "" + +#: global.c:166 global.c:244 +msgid "Justify" +msgstr "" + +#: global.c:169 global.c:240 +msgid "Replace" +msgstr "" + +#: global.c:173 +msgid "Read File" +msgstr "" + +#: global.c:177 +msgid "Where Is" +msgstr "" + +#: global.c:181 global.c:303 +msgid "Prev Page" +msgstr "" + +#: global.c:185 global.c:307 +msgid "Next Page" +msgstr "" + +#: global.c:189 +msgid "Cut Text" +msgstr "" + +#: global.c:192 +msgid "UnCut Txt" +msgstr "" + +#: global.c:196 +msgid "Cur Pos" +msgstr "" + +#: global.c:200 +msgid "To Spell" +msgstr "" + +#: global.c:204 +msgid "Up" +msgstr "" + +#: global.c:207 +msgid "Down" +msgstr "" + +#: global.c:210 +msgid "Forward" +msgstr "" + +#: global.c:213 +msgid "Back" +msgstr "" + +#: global.c:216 +msgid "Home" +msgstr "" + +#: global.c:219 +msgid "End" +msgstr "" + +#: global.c:222 +msgid "Refresh" +msgstr "" + +#: global.c:225 +msgid "Mark Text" +msgstr "" + +#: global.c:228 +msgid "Delete" +msgstr "" + +#: global.c:232 +msgid "Backspace" +msgstr "" + +#: global.c:236 +msgid "Tab" +msgstr "" + +#: global.c:247 +msgid "Enter" +msgstr "" + +#: global.c:260 global.c:277 global.c:293 +msgid "First Line" +msgstr "" + +#: global.c:263 global.c:280 global.c:296 +msgid "Last Line" +msgstr "" + +#: global.c:266 global.c:283 +msgid "Case Sens" +msgstr "" + +#: global.c:270 +msgid "To Replace" +msgstr "" + +#: global.c:273 global.c:289 global.c:299 global.c:315 global.c:319 +#: global.c:325 winio.c:883 +msgid "Cancel" +msgstr "" + +#: global.c:286 +msgid "To Search" +msgstr "" + +#: nano.c:114 +msgid "" +"\n" +"Buffer written to 'nano.save'\n" +msgstr "" + +#: nano.c:127 +msgid "nano: malloc: out of memory!" +msgstr "" + +#: nano.c:144 +msgid "Key illegal in VIEW mode" +msgstr "" + +#: nano.c:185 +msgid "" +" nano help text\n" +"\n" +" The nano editor is designed to emulate the functionality and ease-of-use of " +"the UW Pico text editor. There are four main sections of the editor: The " +"top line shows the program version, the current filename being edited, and " +"whether or not the file has been modified. Next is the main editor window " +"showing the file being edited. The status line is the third line from the " +"bottom and shows important messages. The bottom two lines show the most " +"commonly used shortcuts in the editor.\n" +"\n" +" The notation for shortcuts is as follows: Control-key sequences are notated " +"with a caret (^) symbol. Alt-key sequences are notated with an at (@) " +"symbol. The following keystrokes are available in the main editor window. " +"Optional keys are shown in parentheses:\n" +"\n" +msgstr "" + +#: nano.c:286 +msgid "free_node(): free'd a node, YAY!\n" +msgstr "" + +#: nano.c:291 +msgid "free_node(): free'd last node.\n" +msgstr "" + +#: nano.c:407 +msgid "read_line: not on first line and prev is NULL" +msgstr "" + +#: nano.c:468 nano.c:482 +#, c-format +msgid "Read %d lines" +msgstr "" + +#: nano.c:500 nano.c:1161 nano.c:1179 +#, c-format +msgid "\"%s\" not found" +msgstr "" + +#. We have a new file +#: nano.c:504 +msgid "New File" +msgstr "" + +#: nano.c:513 +#, c-format +msgid "File \"%s\" is a directory" +msgstr "" + +#: nano.c:518 +msgid "Reading File" +msgstr "" + +#: nano.c:531 +msgid "File to insert [from ./] " +msgstr "" + +#: nano.c:546 nano.c:1601 nano.c:1765 nano.c:1916 +msgid "Cancelled" +msgstr "" + +#: nano.c:556 +msgid "" +"Usage: nano [GNU long option] [option] +LINE \n" +"\n" +msgstr "" + +#: nano.c:557 +msgid "Option\t\tLong option\t\tMeaning\n" +msgstr "" + +#: nano.c:560 +msgid " -V \t\t--version\t\tPrint version information and exit\n" +msgstr "" + +#: nano.c:562 +msgid " -c \t\t--const\t\t\tConstantly show cursor position\n" +msgstr "" + +#: nano.c:564 +msgid " -h \t\t--help\t\t\tShow this message\n" +msgstr "" + +#: nano.c:566 +msgid " -i \t\t--autoindent\t\tAutomatically indent new lines\n" +msgstr "" + +#: nano.c:568 +msgid " -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:571 +msgid " -m \t\t--mouse\t\t\tEnable mouse\n" +msgstr "" + +#: nano.c:576 +msgid "" +" -r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n" +msgstr "" + +#: nano.c:578 +msgid " -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n" +msgstr "" + +#: nano.c:580 +msgid " -s [prog] \t--speller=[prog]\tEnable alternate speller\n" +msgstr "" + +#: nano.c:582 +msgid " -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n" +msgstr "" + +#: nano.c:584 +msgid " -v \t\t--view\t\t\tView (read only) mode\n" +msgstr "" + +#: nano.c:586 +msgid " -w \t\t--nowrap\t\tDon't wrap long lines\n" +msgstr "" + +#: nano.c:588 +msgid " -x \t\t--nohelp\t\tDon't show help window\n" +msgstr "" + +#: nano.c:590 +msgid " -z \t\t--suspend\t\tEnable suspend\n" +msgstr "" + +#: nano.c:592 +msgid " +LINE\t\t\t\t\tStart at line number LINE\n" +msgstr "" + +#: nano.c:594 +msgid "" +"Usage: nano [option] +LINE \n" +"\n" +msgstr "" + +#: nano.c:595 +msgid "Option\t\tMeaning\n" +msgstr "" + +#: nano.c:596 +msgid " -V \t\tPrint version information and exit\n" +msgstr "" + +#: nano.c:597 +msgid " -c \t\tConstantly show cursor position\n" +msgstr "" + +#: nano.c:598 +msgid " -h \t\tShow this message\n" +msgstr "" + +#: nano.c:599 +msgid " -i \t\tAutomatically indent new lines\n" +msgstr "" + +#: nano.c:601 +msgid " -l \t\tDon't follow symbolic links, overwrite.\n" +msgstr "" + +#: nano.c:604 +msgid " -m \t\tEnable mouse\n" +msgstr "" + +#: nano.c:608 +msgid " -r [#cols] \tSet fill cols to (wrap lines at) #cols\n" +msgstr "" + +#: nano.c:609 +msgid " -s [prog] \tEnable alternate speller\n" +msgstr "" + +#: nano.c:610 +msgid " -p \t\tMake bottom 2 lines more Pico-like\n" +msgstr "" + +#: nano.c:611 +msgid " -t \t\tAuto save on exit, don't prompt\n" +msgstr "" + +#: nano.c:612 +msgid " -v \t\tView (read only) mode\n" +msgstr "" + +#: nano.c:613 +msgid " -w \t\tDon't wrap long lines\n" +msgstr "" + +#: nano.c:614 +msgid " -x \t\tDon't show help window\n" +msgstr "" + +#: nano.c:615 +msgid " -z \t\tEnable suspend\n" +msgstr "" + +#: nano.c:616 +msgid " +LINE\t\tStart at line number LINE\n" +msgstr "" + +#: nano.c:623 +#, c-format +msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n" +msgstr "" + +#: nano.c:625 +msgid " Email: nano@asty.org\tWeb: http://www.asty.org/nano\n" +msgstr "" + +#: nano.c:709 +msgid "Mark Set" +msgstr "" + +#: nano.c:714 +msgid "Mark UNset" +msgstr "" + +#: nano.c:1052 +#, c-format +msgid "check_wrap called with inptr->data=\"%s\"\n" +msgstr "" + +#: nano.c:1089 +#, c-format +msgid "Case Sensitive Search%s" +msgstr "" + +#: nano.c:1090 +#, c-format +msgid "Search%s" +msgstr "" + +#: nano.c:1094 +msgid "Search Cancelled" +msgstr "" + +#: nano.c:1175 +msgid "Search Wrapped" +msgstr "" + +#: nano.c:1225 +#, c-format +msgid "Replaced %d occurences" +msgstr "" + +#: nano.c:1227 +msgid "Replaced 1 occurence" +msgstr "" + +#: nano.c:1245 nano.c:1267 nano.c:1290 +msgid "Replace Cancelled" +msgstr "" + +#: nano.c:1263 +#, c-format +msgid "Replace with [%s]" +msgstr "" + +#. last_search is empty +#: nano.c:1288 +msgid "Replace with" +msgstr "" + +#: nano.c:1329 +msgid "Replace this instance?" +msgstr "" + +#: nano.c:1416 +#, c-format +msgid "current->data now = \"%s\"\n" +msgstr "" + +#: nano.c:1461 +#, c-format +msgid "After, data = \"%s\"\n" +msgstr "" + +#. Ask for it +#: nano.c:1529 +msgid "Enter line number" +msgstr "" + +#: nano.c:1531 +msgid "Aborted" +msgstr "" + +#: nano.c:1551 +msgid "Come on, be reasonable" +msgstr "" + +#: nano.c:1556 +#, c-format +msgid "Only %d lines available, skipping to last line" +msgstr "" + +#: nano.c:1613 nano.c:1629 nano.c:1641 nano.c:1658 nano.c:1664 +#, c-format +msgid "Could not open file for writing: %s" +msgstr "" + +#: nano.c:1621 +msgid "Could not open file: Path length exceeded." +msgstr "" + +#: nano.c:1646 +#, c-format +msgid "Wrote >%s\n" +msgstr "" + +#: nano.c:1673 +#, c-format +msgid "Could not close %s: %s" +msgstr "" + +#. Try a rename?? +#: nano.c:1694 nano.c:1705 nano.c:1710 +#, c-format +msgid "Could not open %s for writing: %s" +msgstr "" + +#: nano.c:1716 +#, c-format +msgid "Could not set permissions %o on %s: %s" +msgstr "" + +#: nano.c:1723 +#, c-format +msgid "Wrote %d lines" +msgstr "" + +#: nano.c:1744 +msgid "File Name to write" +msgstr "" + +#: nano.c:1749 +#, c-format +msgid "filename is %s" +msgstr "" + +#: nano.c:1754 +msgid "File exists, OVERWRITE ?" +msgstr "" + +#: nano.c:1783 +msgid "Error deleting tempfile, ack!" +msgstr "" + +#: nano.c:1796 nano.c:1846 +#, c-format +msgid "Could not create a temporary filename: %s" +msgstr "" + +#: nano.c:1818 nano.c:1868 +#, c-format +msgid "Could not invoke spell program \"%s\"" +msgstr "" + +#. Why 32512? I dont know! +#: nano.c:1824 nano.c:1874 +msgid "Could not invoke \"ispell\"" +msgstr "" + +#: nano.c:1836 nano.c:1886 +msgid "Finished checking spelling" +msgstr "" + +#: nano.c:1903 +msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " +msgstr "" + +#: nano.c:2027 +msgid "Cannot resize top win" +msgstr "" + +#: nano.c:2029 +msgid "Cannot move top win" +msgstr "" + +#: nano.c:2031 +msgid "Cannot resize edit win" +msgstr "" + +#: nano.c:2033 +msgid "Cannot move edit win" +msgstr "" + +#: nano.c:2035 +msgid "Cannot resize bottom win" +msgstr "" + +#: nano.c:2037 +msgid "Cannot move bottom win" +msgstr "" + +#: nano.c:2468 +msgid "Main: set up windows\n" +msgstr "" + +#: nano.c:2490 +msgid "Main: bottom win\n" +msgstr "" + +#: nano.c:2496 +msgid "Main: open file\n" +msgstr "" + +#: nano.c:2564 +#, c-format +msgid "I got Alt-[-%c! (%d)\n" +msgstr "" + +#: nano.c:2580 +#, c-format +msgid "I got Alt-%c! (%d)\n" +msgstr "" + +#: winio.c:116 +#, c-format +msgid "actual_x for xplus=%d returned %d\n" +msgstr "" + +#: winio.c:402 +#, c-format +msgid "input '%c' (%d)\n" +msgstr "" + +#: winio.c:438 +msgid "New Buffer" +msgstr "" + +#: winio.c:441 +msgid " File: ..." +msgstr "" + +#: winio.c:449 +msgid "Modified" +msgstr "" + +#: winio.c:800 +#, c-format +msgid "Moved to (%d, %d) in edit buffer\n" +msgstr "" + +#: winio.c:811 +#, c-format +msgid "current->data = \"%s\"\n" +msgstr "" + +#: winio.c:854 +#, c-format +msgid "I got \"%s\"\n" +msgstr "" + +#: winio.c:878 +msgid " Y" +msgstr "" + +#: winio.c:878 +msgid "Yes" +msgstr "" + +#: winio.c:880 +msgid " A" +msgstr "" + +#: winio.c:880 +msgid "All" +msgstr "" + +#: winio.c:882 +msgid " N" +msgstr "" + +#: winio.c:882 +msgid "No" +msgstr "" + +#: winio.c:883 +msgid "^C" +msgstr "" + +#: winio.c:1027 +#, c-format +msgid "do_cursorpos: linepct = %f, bytepct = %f\n" +msgstr "" + +#: winio.c:1031 +msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" +msgstr "" + +#: winio.c:1157 +msgid "Dumping file buffer to stderr...\n" +msgstr "" + +#: winio.c:1159 +msgid "Dumping cutbuffer to stderr...\n" +msgstr "" + +#: winio.c:1161 +msgid "Dumping a buffer to stderr...\n" +msgstr "" diff --git a/po/stamp-cat-id b/po/stamp-cat-id new file mode 100644 index 00000000..9788f702 --- /dev/null +++ b/po/stamp-cat-id @@ -0,0 +1 @@ +timestamp diff --git a/proto.h b/proto.h new file mode 100644 index 00000000..157bbad2 --- /dev/null +++ b/proto.h @@ -0,0 +1,103 @@ +/************************************************************************** + * proto.h * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +/* Externs */ + +#include +#include "nano.h" + +extern int center_x, center_y, editwinrows; +extern int current_x, current_y, posible_max, totlines; +extern int placewewant; +extern int mark_beginx, samelinewrap; +extern int totsize, temp_opt; +extern int fill, flags; + +extern WINDOW *edit, *topwin, *bottomwin; +extern char *filename, *answer, *last_search, *last_replace; +extern char *hblank, *help_text; +extern struct stat fileinfo; +extern filestruct *current, *fileage, *edittop, *editbot, *filebot; +extern filestruct *cutbuffer, *mark_beginbuf; +extern shortcut *shortcut_list; +extern shortcut main_list[MAIN_LIST_LEN], whereis_list[WHEREIS_LIST_LEN]; +extern shortcut replace_list[REPLACE_LIST_LEN], goto_list[GOTO_LIST_LEN]; +extern shortcut writefile_list[WRITEFILE_LIST_LEN], help_list[HELP_LIST_LEN]; +extern shortcut spell_list[SPELL_LIST_LEN]; + +/* Programs we want available */ + +char *strcasestr(char *haystack, char *needle); +char *strstrwrapper(char *haystack, char *needle); +int search_init(int replacing); +int renumber(filestruct * fileptr); +int free_filestruct(filestruct * src); +int xplustabs(void); +int do_yesno(int all, int leavecursor, char *msg, ...); +int actual_x(filestruct * fileptr, int xplus); +int strlenpt(char *buf); +int statusq(shortcut s[], int slen, char *def, char *msg, ...); +int write_file(char *name, int tmpfile); +int do_cut_text(void); +int do_uncut_text(void); +int no_help(void); + +void shortcut_init(void); +void lowercase(char *src); +void blank_bottombars(void); +void check_wrap(filestruct * inptr); +void dump_buffer(filestruct * inptr); +void align(char **strp); +void edit_refresh(void); +void edit_update(filestruct * fileptr); +void edit_update_top(filestruct * fileptr); +void edit_update_bot(filestruct * fileptr); +void update_cursor(void); +void delete_node(filestruct * fileptr); +void set_modified(void); +void dump_buffer_reverse(filestruct * inptr); +void reset_cursor(void); +void check_statblank(void); +void update_line(filestruct * fileptr, int index); +void statusbar(char *msg, ...); +void titlebar(void); +void previous_line(void); +void center_cursor(void); +void bottombars(shortcut s[], int slen); +void blank_statusbar_refresh(void); +void *nmalloc (size_t howmuch); +void wrap_reset(void); +void display_main_list(void); +void nano_small_msg(void); + +int do_writeout_void(void), do_exit(void), do_gotoline_void(void); +int do_insertfile(void), do_search(void), page_up(void), page_down(void); +int do_cursorpos(void), do_spell(void); +int do_up(void), do_down (void), do_right(void), do_left (void); +int do_home(void), do_end(void), total_refresh(void), do_mark(void); +int do_delete(void), do_backspace(void), do_tab(void), do_justify(void); +int do_first_line(void), do_last_line(void); +int do_replace(void), do_help(void), do_enter_void(void); + +filestruct *copy_node(filestruct * src); +filestruct *copy_filestruct(filestruct * src); +filestruct *make_new_node(filestruct * prevnode); + + diff --git a/stamp-h.in b/stamp-h.in new file mode 100644 index 00000000..9788f702 --- /dev/null +++ b/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/utils.c b/utils.c new file mode 100644 index 00000000..fa44d80b --- /dev/null +++ b/utils.c @@ -0,0 +1,81 @@ +/************************************************************************** + * utils.c * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +#include +#include +#include + +#include "config.h" +#include "nano.h" +#include "proto.h" + +/* Lower case a string - must be null terminated */ +void lowercase(char *src) +{ + long i = 0; + + while (src[i] != 0) { + src[i] = (char) tolower(src[i]); + i++; + } +} + + +/* I can't believe I have to write this function */ +char *strcasestr(char *haystack, char *needle) +{ + char *localneedle, *localhaystack, *found, *tmp, *tmp2; + + /* Make a copy of the search string and searcgh space */ + localneedle = nmalloc(strlen(needle) + 2); + localhaystack = nmalloc(strlen(haystack) + 2); + + strcpy(localneedle, needle); + strcpy(localhaystack, haystack); + + /* Make them lowercase */ + lowercase(localneedle); + lowercase(localhaystack); + + /* Look for the lowercased substring in the lowercased search space - + return NULL if we didn't find anything */ + if ((found = strstr(localhaystack, localneedle)) == NULL) { + free(localneedle); + free(localhaystack); + return NULL; + } + /* Else return the pointer to the same place in the real search space */ + tmp2 = haystack; + for (tmp = localhaystack; tmp != found; tmp++) + tmp2++; + + free(localneedle); + free(localhaystack); + return tmp2; +} + +char *strstrwrapper(char *haystack, char *needle) +{ + + if (ISSET(CASE_SENSITIVE)) + return strstr(haystack, needle); + else + return strcasestr(haystack, needle); +} diff --git a/winio.c b/winio.c new file mode 100644 index 00000000..3cb92f84 --- /dev/null +++ b/winio.c @@ -0,0 +1,1184 @@ +/************************************************************************** + * winio.c * + * * + * Copyright (C) 1999 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. * + * * + **************************************************************************/ + +#include +#include +#include "config.h" +#include "proto.h" +#include "nano.h" + +#ifndef NANO_SMALL +#include +#define _(string) gettext(string) +#else +#define _(string) (string) +#endif + +static int statblank = 0; /* Number of keystrokes left after + we call statubar() before we + actually blank the statusbar */ +/* Window I/O */ + +int do_first_line(void) +{ + current = fileage; + placewewant = 0; + current_x = 0; + edit_update(current); + return 1; +} + +int do_last_line(void) +{ + current = filebot; + placewewant = 0; + current_x = 0; + edit_update(current); + return 1; +} + +/* Like xplustabs, but for a specifc index of a speficific filestruct */ +int xpt(filestruct * fileptr, int index) +{ + int i, tabs = 0; + + if (fileptr == NULL || fileptr->data == NULL) + return 0; + + for (i = 0; i < index && fileptr->data[i] != 0; i++) { + tabs++; + + if (fileptr->data[i] == NANO_CONTROL_I) { + if (tabs % 8 == 0); + else + tabs += 8 - (tabs % 8); + } else if (fileptr->data[i] & 0x80) + /* Make 8 bit chars only 1 collumn! */ + ; + else if (fileptr->data[i] < 32) + tabs++; + } + + return tabs; +} + + +/* Return the actual place on the screen of current->data[current_x], which + should always be > current_x */ +int xplustabs(void) +{ + return xpt(current, current_x); +} + + +/* Return what current_x should be, given xplustabs() for the line. + Opposite of xplustabs */ +int actual_x(filestruct * fileptr, int xplus) +{ + int i, tot = 0; + + if (fileptr == NULL || fileptr->data == NULL) + return 0; + + for (i = 1; i + tot <= xplus && fileptr->data[i - 1] != 0; i++) + if (fileptr->data[i - 1] == NANO_CONTROL_I) { + if ((i + tot) % 8 == 0) + tot++; + else + tot += 8 - ((i + tot) % 8); + } else if (fileptr->data[i - 1] & 0x80) + tot ++; /* Make 8 bit chars only 1 column (again) */ + else if (fileptr->data[i - 1] < 32) + tot += 2; + + if (fileptr->data[i - 1] != 0) + i--; /* Im sure there's a good reason why this is needed for + it to work, I just cant figure out why =-) */ + +#ifdef DEBUG + fprintf(stderr, _("actual_x for xplus=%d returned %d\n"), xplus, i); +#endif + return i; +} + +/* a strlen with tabs factored in, similar to xplustabs() */ +int strlenpt(char *buf) +{ + int i, tabs = 0; + + if (buf == NULL) + return 0; + + for (i = 0; buf[i] != 0; i++) { + tabs++; + + if (buf[i] == NANO_CONTROL_I) { + if (tabs % 8 == 0); + else + tabs += 8 - (tabs % 8); + } else if (buf[i] & 0x80) + /* Make 8 bit chars only 1 collumn! */ + ; + else if (buf[i] < 32) + tabs++; + } + + return tabs; +} + + +/* resets current_y based on the position of current and puts the cursor at + (current_y, current_x) */ +void reset_cursor(void) +{ + filestruct *ptr = edittop; + int x; + + current_y = 0; + + while (ptr != current && ptr != editbot && ptr->next != NULL) { + ptr = ptr->next; + current_y++; + } + + x = xplustabs(); + if (x <= COLS - 2) + wmove(edit, current_y, x % (COLS - 1)); + else + wmove(edit, current_y, x % (COLS - 7) + 1); + +} + +void blank_bottombars(void) +{ + int i = no_help()? 3 : 1; + + for (; i <= 2; i++) + mvwaddstr(bottomwin, i, 0, hblank); + +} + +void blank_edit(void) +{ + int i; + for (i = 0; i <= editwinrows - 1; i++) + mvwaddstr(edit, i, 0, hblank); + wrefresh(edit); +} + + +void blank_statusbar(void) +{ + mvwaddstr(bottomwin, 0, 0, hblank); +} + +void blank_statusbar_refresh(void) +{ + blank_statusbar(); + wrefresh(bottomwin); +} + +void check_statblank(void) +{ + + if (statblank > 1) + statblank--; + else if (statblank == 1 && !ISSET(CONSTUPDATE)) { + statblank--; + blank_statusbar_refresh(); + } +} + +/* Get the input from the kb, this should only be called from statusq */ +int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x) +{ + int kbinput = 0, j = 0, x = 0, xend; + int x_left = 0; + char inputstr[132], inputbuf[132] = ""; + + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + if (strlen(def) > 0) + waddstr(bottomwin, def); + wrefresh(bottomwin); + + x_left = strlen(buf); + x = strlen(def) + x_left; + + /* Get the input! */ + if (strlen(def) > 0) { + strcpy(answer, def); + strcpy(inputbuf, def); + } + /* Go into raw mode so we can actually get ^C, for example */ + raw(); + + while ((kbinput = wgetch(bottomwin)) != 13) { + for (j = 0; j <= slen - 1; j++) { + if (kbinput == s[j].val) { + noraw(); + cbreak(); + strcpy(answer, ""); + return s[j].val; + } + } + xend = strlen(buf) + strlen(inputbuf); + + switch (kbinput) { + case KEY_HOME: + x = x_left; + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + case KEY_END: + x = x_left + strlen(inputbuf); + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + case KEY_RIGHT: + + if (x < xend) + x++; + wmove(bottomwin, 0, x); + break; + case NANO_CONTROL_D: + if (strlen(inputbuf) > 0 && (x - x_left) != strlen(inputbuf)) { + memmove(inputbuf + (x - x_left), + inputbuf + (x - x_left) + 1, + strlen(inputbuf) - (x - x_left) - 1); + inputbuf[strlen(inputbuf) - 1] = 0; + } + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + case NANO_CONTROL_K: + case NANO_CONTROL_U: + *inputbuf = 0; + x = x_left; + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + case KEY_BACKSPACE: + case KEY_DC: + case 127: + case NANO_CONTROL_H: + if (strlen(inputbuf) > 0) { + if (x == (x_left + strlen(inputbuf))) + inputbuf[strlen(inputbuf) - 1] = 0; + else if (x - x_left) { + memmove(inputbuf + (x - x_left) - 1, + inputbuf + (x - x_left), + strlen(inputbuf) - (x - x_left)); + inputbuf[strlen(inputbuf) - 1] = 0; + } + } + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + case KEY_LEFT: + if (x > strlen(buf)) + x--; + wmove(bottomwin, 0, x); + break; + case KEY_UP: + case KEY_DOWN: + break; + + case 27: + switch (kbinput = wgetch(edit)) { + case 79: + switch (kbinput = wgetch(edit)) { + case 70: + x = x_left + strlen(inputbuf); + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + case 72: + x = x_left; + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + } + break; + case 91: + switch (kbinput = wgetch(edit)) { + case 'C': + if (x < xend) + x++; + wmove(bottomwin, 0, x); + break; + case 'D': + if (x > strlen(buf)) + x--; + wmove(bottomwin, 0, x); + break; + case 49: + x = x_left; + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + goto skip_126; + case 51: + if (strlen(inputbuf) > 0 + && (x - x_left) != strlen(inputbuf)) { + memmove(inputbuf + (x - x_left), + inputbuf + (x - x_left) + 1, + strlen(inputbuf) - (x - x_left) - 1); + inputbuf[strlen(inputbuf) - 1] = 0; + } + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + goto skip_126; + case 52: + x = x_left + strlen(inputbuf); + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + goto skip_126; + skip_126: + nodelay(edit, TRUE); + kbinput = wgetch(edit); + if (kbinput == 126 || kbinput == ERR) + kbinput = -1; + nodelay(edit, FALSE); + break; + } + } + blank_statusbar(); + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + break; + + + default: + if (kbinput < 32) + break; + strcpy(inputstr, inputbuf); + inputstr[x - strlen(buf)] = kbinput; + strcpy(&inputstr[x - strlen(buf) + 1], + &inputbuf[x - strlen(buf)]); + strcpy(inputbuf, inputstr); + x++; + + mvwaddstr(bottomwin, 0, 0, buf); + waddstr(bottomwin, inputbuf); + wmove(bottomwin, 0, x); + +#ifdef DEBUG + fprintf(stderr, _("input \'%c\' (%d)\n"), kbinput, kbinput); +#endif + } + wrefresh(bottomwin); + } + + strncpy(answer, inputbuf, 132); + + noraw(); + cbreak(); + if (!strcmp(answer, "")) + return -2; + else + return 0; +} + +void horizbar(WINDOW * win, int y) +{ + wattron(win, A_REVERSE); + mvwaddstr(win, 0, 0, hblank); + wattroff(win, A_REVERSE); +} + +void titlebar(void) +{ + int namelen, space; + + horizbar(topwin, 0); + wattron(topwin, A_REVERSE); + mvwaddstr(topwin, 0, 3, VERMSG); + + space = COLS - strlen(VERMSG) - strlen(VERSION) - 21; + + namelen = strlen(filename); + + if (!strcmp(filename, "")) + mvwaddstr(topwin, 0, center_x - 6, _("New Buffer")); + else { + if (namelen > space) { + waddstr(topwin, _(" File: ...")); + waddstr(topwin, &filename[namelen - space]); + } else { + mvwaddstr(topwin, 0, center_x - (namelen / 2 + 1), "File: "); + waddstr(topwin, filename); + } + } + if (ISSET(MODIFIED)) + mvwaddstr(topwin, 0, COLS - 10, _("Modified")); + wattroff(topwin, A_REVERSE); + wrefresh(topwin); + reset_cursor(); +} + +void onekey(char *keystroke, char *desc) +{ + char description[80]; + + snprintf(description, 12, " %-11s", desc); + wattron(bottomwin, A_REVERSE); + waddstr(bottomwin, keystroke); + wattroff(bottomwin, A_REVERSE); + waddstr(bottomwin, description); +} + +void clear_bottomwin(void) +{ + if (ISSET(NO_HELP)) + return; + + mvwaddstr(bottomwin, 1, 0, hblank); + mvwaddstr(bottomwin, 2, 0, hblank); + wrefresh(bottomwin); +} + +void bottombars(shortcut s[], int slen) +{ + int i, j, k; + char keystr[10]; + + if (ISSET(NO_HELP)) + return; + + /* Determine how many extra spaces are needed to fill the bottom of the screen */ + k = COLS / 6 - 13; + + clear_bottomwin(); + wmove(bottomwin, 1, 0); + for (i = 0; i <= slen - 1; i += 2) { + sprintf(keystr, "^%c", s[i].val + 64); + onekey(keystr, s[i].desc); + + for (j = 0; j < k; j++) + waddch(bottomwin, ' '); + } + + wmove(bottomwin, 2, 0); + for (i = 1; i <= slen - 1; i += 2) { + sprintf(keystr, "^%c", s[i].val + 64); + onekey(keystr, s[i].desc); + + for (j = 0; j < k; j++) + waddch(bottomwin, ' '); + } + + wrefresh(bottomwin); + +} + +/* If modified is not already set, set it and update titlebar */ +void set_modified(void) +{ + if (!ISSET(MODIFIED)) { + SET(MODIFIED); + titlebar(); + wrefresh(topwin); + } +} + +#ifndef NANO_SMALL +void add_marked_sameline(int begin, int end, filestruct * fileptr, int y) +{ + int col, actual_col = 0, begin_mapped = 0, end_mapped = 0; + + if (current_x > COLS - 2) { + col = (COLS - 7) * (xplustabs() / (COLS - 7)) - 1; + actual_col = actual_x(fileptr, col); + begin_mapped = begin % (COLS - 7) + 1; + end_mapped = end % (COLS - 7) + 1; + } else { + actual_col = 0; + begin_mapped = begin; + end_mapped = end; + } + + if (end > (COLS - 2) && ((begin / (COLS - 7)) != (end / (COLS - 7)))) { + if (current_x == begin) { + mvwaddnstr(edit, y, 0, &fileptr->data[actual_col], + begin_mapped); + wattron(edit, A_REVERSE); + waddnstr(edit, &fileptr->data[begin], COLS - begin_mapped); + wattroff(edit, A_REVERSE); + } else { + wattron(edit, A_REVERSE); + mvwaddnstr(edit, y, 0, &fileptr->data[actual_col], end_mapped); + wattroff(edit, A_REVERSE); + waddnstr(edit, &fileptr->data[end], COLS - end_mapped); + } + } else { + mvwaddnstr(edit, y, 0, &fileptr->data[actual_col], begin_mapped); + wattron(edit, A_REVERSE); + waddnstr(edit, &fileptr->data[begin], end_mapped - begin_mapped); + wattroff(edit, A_REVERSE); + waddnstr(edit, &fileptr->data[end], + COLS - (end_mapped - begin_mapped)); + } +} +#endif + +void edit_add(filestruct * fileptr, int yval, int xval, int start) +{ +#ifndef NANO_SMALL + int col; + + if (ISSET(MARK_ISSET)) { + + /* Our horribly ugly marker code, which needs to be rewritten too :P */ + if ((fileptr->lineno > mark_beginbuf->lineno + && fileptr->lineno > current->lineno) + || (fileptr->lineno < mark_beginbuf->lineno + && fileptr->lineno < current->lineno)) { + + /* We're on a normal, unselected line */ + mvwaddnstr(edit, yval, 0, fileptr->data, COLS); + + if (strlenpt(fileptr->data) > COLS) + mvwaddch(edit, yval, COLS - 1, '$'); + } else { + + /* We're on selected text */ + if (fileptr != mark_beginbuf && fileptr != current) { + wattron(edit, A_REVERSE); + mvwaddnstr(edit, yval, 0, fileptr->data, COLS); + if (strlenpt(fileptr->data) > COLS) + mvwaddch(edit, yval, COLS - 1, '$'); + + wattroff(edit, A_REVERSE); + } + /* Special case, we're still on the same line we started marking */ + else if (fileptr == mark_beginbuf && fileptr == current) { + if (current_x < mark_beginx) { + add_marked_sameline(current_x, mark_beginx, fileptr, + yval); + } else { + add_marked_sameline(mark_beginx, current_x, fileptr, + yval); + } + + } else if (fileptr == mark_beginbuf) { + if (mark_beginbuf->lineno > current->lineno) + wattron(edit, A_REVERSE); + + mvwaddnstr(edit, yval, 0, fileptr->data, mark_beginx); + + if (mark_beginbuf->lineno < current->lineno) + wattron(edit, A_REVERSE); + else + wattroff(edit, A_REVERSE); + + waddnstr(edit, &fileptr->data[mark_beginx], + COLS - xpt(fileptr, mark_beginx)); + + if (strlenpt(fileptr->data) > COLS) + mvwaddch(edit, yval, COLS - 1, '$'); + + if (mark_beginbuf->lineno < current->lineno) + wattroff(edit, A_REVERSE); + + } else if (fileptr == current) { + if (mark_beginbuf->lineno < current->lineno) + wattron(edit, A_REVERSE); + + /* Thank GOD for waddnstr, this can now be much cleaner */ + if (xplustabs() > COLS - 2) { + col = (COLS - 7) * (xplustabs() / (COLS - 7)); + mvwaddnstr(edit, yval, 1, + &fileptr->data[actual_x(current, col)], + current_x % (COLS - 7) + 1); + } else + mvwaddnstr(edit, yval, 0, fileptr->data, current_x); + + if (mark_beginbuf->lineno > current->lineno) + wattron(edit, A_REVERSE); + else + wattroff(edit, A_REVERSE); + + + if (xplustabs() > COLS - 2) { + mvwaddnstr(edit, yval, + xpt(current, + (current_x % (COLS - 7) + 1)), + &fileptr->data[current_x], + COLS - current_x); + } else + mvwaddnstr(edit, yval, xplustabs(), + &fileptr->data[current_x], + COLS - current_x); + + if (strlenpt(fileptr->data) > COLS) + mvwaddch(edit, yval, COLS - 1, '$'); + + if (mark_beginbuf->lineno > current->lineno) + wattroff(edit, A_REVERSE); + + } + } + + } else +#endif + mvwaddnstr(edit, yval, xval, &fileptr->data[start], COLS - xval); + +} + +/* + * Just update one line in the edit buffer + * + * index gives is a place in the string to update starting from. + * Likely args are current_x or 0. + */ +void update_line(filestruct * fileptr, int index) +{ + filestruct *filetmp; + int line = 0, col = 0, actual_col = 0, x; + + for (filetmp = edittop; filetmp != fileptr && filetmp != editbot; + filetmp = filetmp->next) + line++; + + mvwaddstr(edit, line, 0, hblank); + + if (current == fileptr && (x = xpt(current, index)) > COLS - 2) { + + col = (COLS - 7) * (x / (COLS - 7)); + actual_col = actual_x(filetmp, col); + + edit_add(filetmp, line, 1, actual_col); + mvwaddch(edit, line, 0, '$'); + + } else + edit_add(filetmp, line, 0, 0); + + if (strlenpt(&filetmp->data[actual_col]) > COLS) + mvwaddch(edit, line, COLS - 1, '$'); + +} + +void center_cursor(void) +{ + current_y = editwinrows / 2; + wmove(edit, current_y, current_x); +} + +/* Refresh the screen without changing the position of lines */ +void edit_refresh(void) +{ + int lines = 0, i = 0; + filestruct *temp, *hold = current; + + if (current == NULL) + return; + + temp = edittop; + + while (lines <= editwinrows - 1 && lines <= totlines && temp != NULL) { + hold = temp; + update_line(temp, current_x); + temp = temp->next; + lines++; + } + + if (lines <= editwinrows - 1) + while (lines <= editwinrows - 1) { + mvwaddstr(edit, lines, i, hblank); + lines++; + } + if (temp == NULL) + editbot = hold; + else + editbot = temp; +} + +/* + * Nice generic routine to update the edit buffer given a pointer to the + * file struct =) + */ +void edit_update(filestruct * fileptr) +{ + + int lines = 0, i = 0; + filestruct *temp; + + if (fileptr == NULL) + return; + + temp = fileptr; + while (i <= editwinrows / 2 && temp->prev != NULL) { + i++; + temp = temp->prev; + } + edittop = temp; + + while (lines <= editwinrows - 1 && lines <= totlines && temp != NULL + && temp != filebot) { + temp = temp->next; + lines++; + } + editbot = temp; + + edit_refresh(); +} + +/* Now we want to update the screen using this struct as the top of the edit buffer */ +void edit_update_top(filestruct * fileptr) +{ + int i; + filestruct *temp = fileptr; + + if (fileptr->next == NULL || fileptr == NULL) + return; + + i = 0; + while (i <= editwinrows / 2 && temp->next != NULL) { + i++; + temp = temp->next; + } + edit_update(temp); +} + +/* And also for the bottom... */ +void edit_update_bot(filestruct * fileptr) +{ + int i; + filestruct *temp = fileptr; + + i = 0; + while (i <= editwinrows / 2 - 1 && temp->prev != NULL) { + i++; + temp = temp->prev; + } + edit_update(temp); +} + +/* This function updates current based on where current_y is, reset_cursor + does the opposite */ +void update_cursor(void) +{ + int i = 0; + +#ifdef DEBUG + fprintf(stderr, _("Moved to (%d, %d) in edit buffer\n"), current_y, + current_x); +#endif + + current = edittop; + while (i <= current_y - 1 && current->next != NULL) { + current = current->next; + i++; + } + +#ifdef DEBUG + fprintf(stderr, _("current->data = \"%s\"\n"), current->data); +#endif + +} + +/* + * Ask a question on the statusbar. Answer will be stored in answer + * global. Returns -1 on aborted enter, -2 on a blank string, and 0 + * otherwise, the valid shortcut key caught, Def is any editable text we + * want to put up by default. + */ +int statusq(shortcut s[], int slen, char *def, char *msg, ...) +{ + va_list ap; + char foo[133]; + int ret; + + bottombars(s, slen); + + va_start(ap, msg); + vsnprintf(foo, 132, msg, ap); + strncat(foo, ": ", 132); + va_end(ap); + + wattron(bottomwin, A_REVERSE); + ret = nanogetstr(foo, def, s, slen, (strlen(foo) + 3)); + wattroff(bottomwin, A_REVERSE); + + switch (ret) { + + case NANO_FIRSTLINE_KEY: + do_first_line(); + break; + case NANO_LASTLINE_KEY: + do_last_line(); + break; + case NANO_CANCEL_KEY: + return -1; + default: + blank_statusbar_refresh(); + } + +#ifdef DEBUG + fprintf(stderr, _("I got \"%s\"\n"), answer); +#endif + + return ret; +} + +/* + * Ask a simple yes/no question on the statusbar. Returns 1 for Y, 0 for + * N, 2 for All (if all is non-zero when passed in) and -1 for abort (^C) + */ +int do_yesno(int all, int leavecursor, char *msg, ...) +{ + va_list ap; + char foo[133]; + int kbinput, ok = -1; + + /* Write the bottom of the screen */ + clear_bottomwin(); + wattron(bottomwin, A_REVERSE); + blank_statusbar_refresh(); + wattroff(bottomwin, A_REVERSE); + + if (!ISSET(NO_HELP)) { + wmove(bottomwin, 1, 0); + onekey(_(" Y"), _("Yes")); + if (all) + onekey(_(" A"), _("All")); + wmove(bottomwin, 2, 0); + onekey(_(" N"), _("No")); + onekey(_("^C"), _("Cancel")); + } + va_start(ap, msg); + vsnprintf(foo, 132, msg, ap); + va_end(ap); + wattron(bottomwin, A_REVERSE); + mvwaddstr(bottomwin, 0, 0, foo); + wattroff(bottomwin, A_REVERSE); + wrefresh(bottomwin); + + if (leavecursor == 1) + reset_cursor(); + + raw(); + + while (ok == -1) { + kbinput = wgetch(edit); + + switch (kbinput) { + case 'Y': + case 'y': + ok = 1; + break; + case 'N': + case 'n': + ok = 0; + break; + case 'A': + case 'a': + if (all) + ok = 2; + break; + case NANO_CONTROL_C: + ok = -2; + break; + } + } + noraw(); + cbreak(); + + /* Then blank the screen */ + blank_statusbar_refresh(); + + if (ok == -2) + return -1; + else + return ok; +} + +void statusbar(char *msg, ...) +{ + va_list ap; + char foo[133]; + int start_x = 0; + + va_start(ap, msg); + vsnprintf(foo, 132, msg, ap); + va_end(ap); + + start_x = center_x - strlen(foo) / 2 - 1; + + /* Blank out line */ + blank_statusbar(); + + wmove(bottomwin, 0, start_x); + + wattron(bottomwin, A_REVERSE); + + waddstr(bottomwin, "[ "); + waddstr(bottomwin, foo); + waddstr(bottomwin, " ]"); + wattroff(bottomwin, A_REVERSE); + wrefresh(bottomwin); + + if (ISSET(CONSTUPDATE)) + statblank = 1; + else + statblank = 25; +} + +void display_main_list(void) +{ + bottombars(main_list, MAIN_VISIBLE); +} + +int total_refresh(void) +{ + display_main_list(); + clearok(edit, TRUE); + clearok(topwin, TRUE); + clearok(bottomwin, TRUE); + wnoutrefresh(edit); + wnoutrefresh(topwin); + wnoutrefresh(bottomwin); + doupdate(); + clearok(edit, FALSE); + clearok(topwin, FALSE); + clearok(bottomwin, FALSE); + + return 1; +} + +void previous_line(void) +{ + if (current_y > 0) + current_y--; +} + +int do_cursorpos(void) +{ + filestruct *fileptr; + float linepct, bytepct; + int i, tot = 0; + + if (current == NULL || fileage == NULL) + return 0; + + for (fileptr = fileage; fileptr != current && fileptr != NULL; fileptr = fileptr->next) + tot += strlen(fileptr->data) + 1; + + if (fileptr == NULL) + return -1; + + i = tot + current_x;; + + for (fileptr = current->next; fileptr != NULL; fileptr = fileptr->next) + tot += strlen(fileptr->data) + 1; + + /* FIXME - This is gardly elegant */ +/* if (current == fileage && strlen(current->data) == 0) + i = 0; +*/ + + if (totlines > 0) + linepct = 100 * current->lineno / totlines; + else + linepct = 0; + + if (totsize > 0) + bytepct = 100 * i / totsize; + else + bytepct = 0; + +#ifdef DEBUG + fprintf(stderr, _("do_cursorpos: linepct = %f, bytepct = %f\n"), + linepct, bytepct); +#endif + + statusbar(_("line %d of %d (%.0f%%), character %d of %d (%.0f%%)"), + current->lineno, totlines, linepct, i, totsize, bytepct); + reset_cursor(); + return 1; +} + +/* Our broken, non-shortcut list compliant help function. + But hey, it's better than nothing, and it's dynamic! */ +int do_help(void) +{ +#ifndef NANO_SMALL + char *ptr = help_text, *end; + int i, j, row = 0, page = 1, kbinput = 0, no_more = 0; + int no_help_flag = 0; + + blank_edit(); + curs_set(0); + blank_statusbar(); + + if (ISSET(NO_HELP)) { + + no_help_flag = 1; + delwin (bottomwin); + bottomwin = newwin(3, COLS, LINES - 3, 0); + keypad(bottomwin, TRUE); + + editwinrows -= no_help (); + UNSET(NO_HELP); + bottombars(help_list, HELP_LIST_LEN); + } + else + bottombars(help_list, HELP_LIST_LEN); + + do { + ptr = help_text; + switch (kbinput) { + case NANO_NEXTPAGE_KEY: + case NANO_NEXTPAGE_FKEY: + case KEY_NPAGE: + if (!no_more) { + blank_edit(); + page++; + } + break; + case NANO_PREVPAGE_KEY: + case NANO_PREVPAGE_FKEY: + case KEY_PPAGE: + if (page > 1) { + no_more = 0; + blank_edit(); + page--; + } + break; + } + + /* Calculate where in the text we should be based on the page */ + for (i = 1; i < page; i++) { + row = 0; + j = 0; + while (row < editwinrows && *ptr != '\0') { + if (*ptr == '\n' || j == COLS - 5) { + j = 0; + row++; + } + ptr++; + j++; + } + } + + i = 0; + j = 0; + while (i < editwinrows && *ptr != '\0') { + end = ptr; + while (*end != '\n' && *end != '\0' && j != COLS - 5) { + end++; + j++; + } + if (j == COLS - 5) { + + /* Don't print half a word if we've run of of space */ + while (*end != ' ' && *end != '\0') { + end--; + j--; + } + } + mvwaddnstr(edit, i, 0, ptr, j); + j = 0; + i++; + if (*end == '\n') + end++; + ptr = end; + } + if (*ptr == '\0') { + no_more = 1; + continue; + } + } while ((kbinput = wgetch(edit)) != NANO_EXIT_KEY); + + if (no_help_flag) { + werase(bottomwin); + wrefresh(bottomwin); + delwin (bottomwin); + SET(NO_HELP); + bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0); + keypad(bottomwin, TRUE); + editwinrows += no_help(); + } + else + display_main_list(); + + curs_set(1); + edit_refresh(); +#else + nano_small_msg(); +#endif + + return 1; +} + +/* Dump the current file structure to stderr */ +void dump_buffer(filestruct * inptr) +{ +#ifdef DEBUG + filestruct *fileptr; + + if (inptr == fileage) + fprintf(stderr, _("Dumping file buffer to stderr...\n")); + else if (inptr == cutbuffer) + fprintf(stderr, _("Dumping cutbuffer to stderr...\n")); + else + fprintf(stderr, _("Dumping a buffer to stderr...\n")); + + fileptr = inptr; + while (fileptr != NULL) { + fprintf(stderr, "(%ld) %s\n", fileptr->lineno, fileptr->data); + fflush(stderr); + fileptr = fileptr->next; + } +#endif /* DEBUG */ +} + +void dump_buffer_reverse(filestruct * inptr) +{ +#ifdef DEBUG + filestruct *fileptr; + + fileptr = filebot; + while (fileptr != NULL) { + fprintf(stderr, "(%ld) %s\n", fileptr->lineno, fileptr->data); + fflush(stderr); + fileptr = fileptr->prev; + } +#endif /* DEBUG */ +}