pax_global_header00006660000000000000000000000064143424454620014522gustar00rootroot0000000000000052 comment=6dafc38b42c6d050d2251c9bfc18f7f3c6c7207c spellutils-0.7+debian/000077500000000000000000000000001434244546200150065ustar00rootroot00000000000000spellutils-0.7+debian/.gitignore000066400000000000000000000000201434244546200167660ustar00rootroot00000000000000autom4te.cache/ spellutils-0.7+debian/COPYING000066400000000000000000000430761434244546200160530ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, 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 Appendix: 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., 675 Mass Ave, Cambridge, MA 02139, 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. spellutils-0.7+debian/FILES000066400000000000000000000015531434244546200155770ustar00rootroot00000000000000Files in this package: COPYING GNU General Public License (spellutils is under GPL) README some general information about spellutils NEWS summary of changes in each version of spellutils FILES this file pospell.1 pospell's man page newsbody.1 newsbody's man page configure.ac configure was created from this file by autoconf Makefile.am Makefile.in was created from this file by automake po/* translations to various languages lib.h common sources file for pospell and newsbody lib.c - exec.c - pospell.h sources file for pospell pospell.c - pospell_read.c - pospell_write.c - newsbody.h sources file for newsbody newsbody.c - newsbody_read.c - newsbody_write.c - header.c - spellutils-0.7+debian/Makefile.am000066400000000000000000000006601434244546200170440ustar00rootroot00000000000000SUBDIRS = po AM_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' bin_PROGRAMS = pospell newsbody common = lib.c exec.c lib.h pospell_SOURCES = pospell.c pospell_write.c pospell_read.c pospell.h \ $(common) pospell_LDADD = newsbody_SOURCES = newsbody.c newsbody_write.c newsbody_read.c header.c \ newsbody.h $(common) newsbody_LDADD = man_MANS = pospell.1 newsbody.1 EXTRA_DIST = $(man_MANS) FILES spellutils-0.7+debian/NEWS000066400000000000000000000103711434244546200155070ustar00rootroot00000000000000Spellutils 0.7+debian (2022-12-02) - Authorship: Debian-specific release by Boyuan Yang . - Patch: Incorporate all past Debian patches, mainly about buildsystem. - Build system: Complete revamp using modern autotools. - Build system: Completely drop acconfig.h. - Build system: Drop compatibility patches for non-standard libc. - Po: Add zh_CN translation. - Getopt: Dropped, now need external getopt implementation. Spellutils 0.7 (2000-04-23) - Newsbody and pospell: added a space when printing the version number (-v). - Pospell: remove .po file headers (msgstr strings without corresponding msgid strings) from the spell file. - Pospell: split strings like "one\ttwo" to "one\t" "two". - Pospell: remove the word "msgstr" from the spell file. - Pospell: new option -s to quit if unrecognized items are found in the .po or spell files. - Pospell: new option -l to support multilingual .po files. - lib.c: minor change in write_line(). - Update of documentation and a minor bugfix in the manuals. Spellutils 0.6 (2000-04-19) - Pospell and newsbody are packed together in the spellutils package. - Code specific to message headers moved from lib.c to a new file: header.c. - Corrections of bugs in Makefile.am. - Update of some error texts and the usage texts. - Update of manuals and README. - Newsbody: new option -v to print the version number. ===================== Pospell 0.5 (2000-04-16) - Now uses GNU gettext and GNU automake. - Added Danish translation. Feel free to send more .po files. - New organization of the sources. Files common to pospell and newsbody can now be used unchanged in both programs. Pospell 0.4 (2000-04-12) - Made pospell more tolerant for different formats of the .po file entries; it didn't work right for entries without comment lines or if some lines had leading whitespace. Pospell 0.3 (2000-04-10) - The new -v option didn't work. - The example with ispell in Readme changed (added ispell's -x option). Pospell 0.2 (2000-04-10) - A new option -v to print the version number. - Improved documentation. Pospell 0.1 (2000-04-09) - The initial version. Made by editing the source of the similar program Newsbody 0.1.5 by the same author. ===================== Newsbody 0.1.5 (1999-08-12) - newsbody.c: Some C compilers are reported not to like preceding white space in preprocessor lines, so the white space are removed. - newsbody.c: It seems that getopt() in some systems is declared in stdlib.h, so include both unistd.h and stdlib.h to be sure. - Makefile.in: Now all rules are explicit instead of implicit. Newsbody 0.1.4 (1999-08-09) - configure.in: Don't compile with the -Wall and -pedantic flags unless using gcc. - lib.c: read_header(): Bugfix. next_char was erroneous declared as char, but should be an int. Newsbody 0.1.3 (1999-01-30): - Fixed one more bug: The empty line between header and body would disappear in some cases. Newsbody 0.1.2 (1999-01-29): - Fixed bugs that in some cases could lead to core dumps when handling multiline headers or signatures: The return value from read_line() were ignored two places. Newsbody 0.1.1 (1999-01-17): - Added a man page. - Added the `install' target in Makefile Newsbody 0.1.0 (1999-01-16): - Almost everything is rewritten. More source files. More and smaller functions. Prepare for new bugs! - Header continuation lines are now handled properly - New command line option -f: the called program reads and writes the bodyfile on standard input and standard output - newsfile can be read from standard input and written to standard output - There is no more a limit on the maximal line length - %f is expended everywhere in the program arguments - a literal % in the program arguments can be escaped by %% newsbody 0.0.4 (1998-05-03): - Fixed error in usage text - Bugfix patch from Aaron Schrab : An empty line was inserted in messages without signature if called with -s. - Ignore case in header names with the `-k header' option newsbody 0.0.3 (1998-04-28): - New command line option -h. newsbody 0.0.2 (1997-08-29): - New command line option -k - More uniform error handling - New functions: my_realloc(), error(), clean_up() newsbody 0.0.1 (1997-08-13): newsbody 0.0 (1997-07-19): spellutils-0.7+debian/README000066400000000000000000000126361434244546200156760ustar00rootroot00000000000000THE SPELLUTILS PACKAGE Spellutils is a suite of programs which are used to isolate some parts from various types of files and hand them over to another program which may change the texts; it is typically a spell checker. Afterwards the possibly changed text parts are copied back in place in the original file. THE POSPELL PROGRAM The program pospell will isolate the translations from a .po-file then call some other program which may change the translations (e.g. a spell checker), and eventually copy them back in place in the .po-file. Usage: pospell [-fsv] [-l language] -n pofile -p program [-- [arguments...]] It copies the translation strings of the pofile to a temporary file, called the spellfile, and then calls the program `program' with all the `arguments'. Afterwards the possibly changed strings is copied back into `pofile' and the spellfile is deleted. If you specify `-' as pofile, pospell will read the file from standard input and later write it back to standard output. `%f' in the `program-argument's will be expanded to the name of the temporary body file. `%%' gives a literal `%'. The optional flags mean: -f: The called program is a filter so don't make a temporary file, but pipe the spellfile to its standard input, and later read its standard output. -l language: Only translations with the indicated language code are copied to the spellfile. -s: Quit with an error message if unrecognized items are found in the `pofile' or `spellfile'. -v: Print version and exit. Examples: Check the spelling of the Danish texts in a .po-file with ispell: $ pospell -n da.po -p ispell -- -d dansk -x %f See how the generated spellfile really looks like: $ pospell -n da.po -p less -- %f Check the spelling of the Danish texts in a multilingual .po-file with ispell: $ pospell -l da -n some_program.po -p ispell -- -d dansk -x %f THE NEWSBODY PROGRAM The program newsbody will isolate the body part of a news or email message, then call some other program which may change the body, and eventually merge the headers with the possibly changed body. Command line options exist to also exclude quotes and signature, and to keep certain or all header lines. The program was originally made to be called from slrn's post_filter_hook, but nothing prevents other uses of it. Usage: newsbody [-fhqsv] [-k headername] -n newsfile -p program [-- [arguments...]] It copies the body of the news article in `newsfile' to a temporary file and then calls the program `program' with all the `arguments'. Afterwards the possibly changed body is copied back into 'newsfile' and the temporary file is deleted. If you specify `-' as newsfile, newsbody will read the file from standard input and later write it back to standard output. `%f' in the `program-argument's will be expanded to the name of the temporary body file. `%%' gives a literal `%'. The optional flags mean: -f: The called program is a filter so don't make a temporary file, but pipe the body to its standard input, and later read its standard output. -h: Keep the entire header. This flag can also be used if `newsfile' doesn't have a header at all. -k headername: Keep these header lines in the body file. (Multiple -k flags are allowed). -q: Also remove quotes before filtering the body. Lines starting with `>' are considered quotes. -s: Also remove signature before filtering the body. -v: Print version and exit. Examples: Use newsbody to call ispell from the Mutt mailer, but don't spell check your quotes (they should not be changed) or your signature. Method 1 using Mutt's built-in ispell command: - Make a shell script with this command: newsbody -hqs -n $2 -p ispell -- -x %f - Make Mutt's ispell command call the script by means of this command in your .muttrc: set ispell=path/to/script Method 2 using a filter: - Define this Mutt macro in your .muttrc: macro compose i \ "newsbody -hqs -n - -p ispell -- -x %f" \ "run ispell on the selected part" REQUIREMENTS TO MAKE THE SPELLUTILS PROGRAMS Nothing special besides a C compiler which understands standard ISO C (also called ANSI C), and a make program. I have tried to make the programs as portable as possible. If something have to be done to build or run it on your particular system, please tell me about it. INSTALLATION Spellutils uses GNU autoconf, so these few command should be sufficient to make and install the programs: $ ./configure $ make $ make install You are also highly recommended to install gettext when building the program in order to enable i18n/l10n support. COPYRIGHT AND LICENSE Copyright (C) Byrial Jensen Some included parts are taken from the GNU libc, GNU autoconf, GNU automake and GNU gettext packages: Copyright (C) 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 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. The GNU General Public License is in the COPYING file. AUTHOR Byrial Jensen . Comments, suggestions, and bug reports are welcome. spellutils-0.7+debian/build-aux/000077500000000000000000000000001434244546200167005ustar00rootroot00000000000000spellutils-0.7+debian/build-aux/.placeholder000066400000000000000000000000001434244546200211510ustar00rootroot00000000000000spellutils-0.7+debian/configure.ac000066400000000000000000000015311434244546200172740ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([spellutils],[0.7+debian],[https://tracker.debian.org/pkg/spellutils]) AC_CONFIG_SRCDIR([pospell.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_USE_SYSTEM_EXTENSIONS AM_INIT_AUTOMAKE([subdir-objects foreign]) dnl Checks for programs AC_PROG_CC AC_SEARCH_LIBS([strerror],[cposix]) AC_PROG_INSTALL dnl Checks for header files. dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_TYPE_PID_T dnl internationalization macros AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.21]) dnl Checks for library functions. AC_CHECK_FUNCS([strerror strsignal mkstemp]) AC_CHECK_FUNCS([getopt]) AC_CHECK_FUNCS([strncasecmp]) AC_CONFIG_FILES([Makefile po/Makefile.in]) AC_OUTPUT spellutils-0.7+debian/exec.c000066400000000000000000000076141434244546200161060ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include #include "lib.h" /* Static functions in this file */ /* none ... */ void exec_program (char *argv[]) { pid_t pid; pid = fork (); if (pid == -1) nb_error (E_ERRNO, _("fork")); if (pid == 0) { /* The child */ char *cterm = ctermid (NULL); int fd; #if defined(CHILDLOOP) volatile int w = 1; while (w); #endif if (!isatty (STDIN_FILENO) && cterm && *cterm) { if ((fd = open (cterm, O_RDONLY)) == -1) nb_error (E_CHILD | E_ERRNO, _("open terminal read")); if (dup2 (fd, STDIN_FILENO) == -1) nb_error (E_CHILD | E_ERRNO, _("dup2 stdin")); if (close (fd)) nb_error (E_CHILD | E_ERRNO, _("close extra terminal read fd")); } if (!isatty (STDOUT_FILENO) && cterm && *cterm) { if ((fd = open (cterm, O_WRONLY)) == -1) nb_error (E_CHILD | E_ERRNO, _("open terminal write")); if (dup2 (fd, STDOUT_FILENO) == -1) nb_error (E_CHILD | E_ERRNO, _("dup2 stdout")); if (close (fd)) nb_error (E_CHILD | E_ERRNO, _("close extra terminal write fd")); } execvp (argv[0], argv); nb_error (E_CHILD | E_ERRNO, _("exec %s"), argv[0]); } /* The parent */ /* Do nothing */ } void exec_filter (char *argv[], FILE **out, FILE **in) { int outpipe[2]; /* Where the PARENT writes */ int inpipe[2]; /* Where the PARENT reads */ pid_t pid; #define READ_END 0 #define WRITE_END 1 if (pipe (outpipe) == -1) nb_error (E_ERRNO, _("pipe for output")); if (pipe (inpipe) == -1) nb_error (E_ERRNO, _("pipe for input")); pid = fork (); if (pid == -1) nb_error (E_ERRNO, _("fork")); if (pid == 0) { /* The child */ #if defined(CHILDLOOP) volatile int w = 1; while (w); #endif if (close (outpipe[WRITE_END])) nb_error (E_CHILD | E_ERRNO, _("close write end of output pipe")); if (dup2 (outpipe[READ_END], STDIN_FILENO) == -1) nb_error (E_CHILD | E_ERRNO, _("dup2 stdin")); if (close (outpipe[READ_END])) nb_error (E_CHILD | E_ERRNO, _("close read end of output pipe")); if (close (inpipe[READ_END])) nb_error (E_CHILD | E_ERRNO, _("close read end of input pipe")); if (dup2 (inpipe[WRITE_END], STDOUT_FILENO) == -1) nb_error (E_CHILD | E_ERRNO, _("dup2 stdout")); if (close (inpipe[WRITE_END])) nb_error (E_CHILD | E_ERRNO, _("close write end of input pipe")); execvp (argv[0], argv); nb_error (E_CHILD | E_ERRNO, _("exec %s"), argv[0]); } /* The parent */ if (close (outpipe[READ_END])) nb_error (E_ERRNO, _("close read end of output pipe")); if ((*out = fdopen (outpipe[WRITE_END], "w")) == NULL) nb_error (E_ERRNO, _("fdopen write end of output pipe")); if (close (inpipe[WRITE_END])) nb_error (E_ERRNO, _("close write end of input pipe")); if ((*in = fdopen (inpipe[READ_END], "r")) == NULL) nb_error (E_ERRNO, _("fdopen read end of input pipe")); } int nb_wait () { int status; if (wait (&status) == -1) nb_error (E_ERRNO, _("waiting for child")); return status; } spellutils-0.7+debian/header.c000066400000000000000000000041641434244546200164070ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "newsbody.h" char *read_header (char *header, size_t *len, FILE *file) { int next_char; header = read_line (header, len, file); if (!header) /* We reached EOF */ return header; while (1) { next_char = getc (file); if (next_char == EOF) return header; ungetc (next_char, file); if (next_char != ' ' && next_char != '\t') return header; /* The current header is continued on the next line */ { char *cont = nb_malloc (256); size_t contlen = 256; int space_needed; cont = read_line (cont, &contlen, file); if (!cont) { /* This cannot happen - we have at least the ungetted char to read */ nb_error (0, _("internal error while reading a header continuation")); } space_needed = strlen (header) + strlen (cont) + 1; if (space_needed > *len) { header = nb_realloc (header, space_needed); *len = space_needed; } strcat (header, cont); free (cont); } } } int keep_this_header (char *header, struct keep_lines *keep) { struct keep_lines *k; int len; for (k = keep ; k != NULL ; k = k->next) { len = strlen (k->header); if ((strncasecmp (header, k->header, len) == 0) && (header[len] == ':')) return 1; } return 0; } spellutils-0.7+debian/lib.c000066400000000000000000000113031434244546200157160ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include #include "lib.h" void *nb_realloc (void *ptr, size_t size) { if (!ptr) return nb_malloc (size); ptr = realloc (ptr, size); if (!ptr && size ) nb_error (0, _("could not allocate memory")); return ptr; } void *nb_malloc (size_t size) { void *p = malloc (size); if (!p) nb_error (0, _("could not allocate memory")); return p; } char *read_line (char *line, size_t *len, FILE *file) { char *buf; size_t offset; if (*len < 256 || line == NULL) { line = nb_realloc (line, 1024); *len = 1024; } buf = line; offset = 0; while (1) { if (fgets (buf, *len - offset, file) == NULL) { if (ferror (file)) nb_error (E_ERRNO, _("reading file")); free (line); *len = 0; return NULL; } buf += strlen (buf); if (*(buf- 1) == '\n') return line; /* We got a full line */ offset = buf - line; if (*len < offset + 256) { /* grow the buffer */ *len += 1024; line = nb_realloc (line, *len); buf = line + offset; } } } void write_line (char *line, FILE *file) { if (fputs (line, file) == EOF) nb_error (E_ERRNO, _("writing file")); } FILE *open_read (const char *filename) { FILE *fp = fopen (filename, "r"); if (!fp) nb_error (E_ERRNO, _("open %s for reading"), filename); return fp; } FILE *open_write (const char *filename) { FILE *fp = fopen (filename, "w"); if (!fp) nb_error (E_ERRNO, _("open %s for writing"), filename); return fp; } void nb_close (FILE *file) { if (fclose (file)) nb_error (E_ERRNO, _("closing file")); } char *nb_tmpnam () { #ifdef HAVE_MKSTEMP char *name = nb_malloc (_POSIX_PATH_MAX); strcpy (name, "/tmp/newsbodyXXXXXX"); if (mkstemp(name) == -1) { nb_error (E_ERRNO, _("making temporary filename")); return name; } #else char *name = tmpnam (nb_malloc (_POSIX_PATH_MAX)); if (!name) nb_error (E_ERRNO, _("making temporary filename")); #endif return name; } void nb_unlink (const char *filename) { if (unlink (filename) == -1) nb_error (E_ERRNO, _("unlink %s"), filename); } void nb_rename (const char *oldpath, const char *newpath) { if (rename (oldpath, newpath) == 0) return; if (errno != EXDEV) nb_error (E_ERRNO, _("rename %s %s"), oldpath, newpath); /* The files are not on the same filesystem so we need to copy it */ { FILE *in = open_read (oldpath); FILE *out = open_write (newpath); struct stat stat; char *buf; size_t blocksize; size_t size; size_t chunk; if (fstat (fileno (in), &stat)) nb_error (E_ERRNO, _("stat %s"), newpath); size = stat.st_size; blocksize = stat.st_blksize; buf = nb_malloc (blocksize); while (size > 0) { chunk = (size > blocksize) ? blocksize : size; if (fread (buf, 1, chunk, in) != chunk) nb_error (E_ERRNO, _("read from %s"), oldpath); if (fwrite (buf, 1, chunk, out) != chunk) nb_error (E_ERRNO, _("write to %s"), newpath); size -= chunk; } free (buf); nb_unlink (oldpath); } } static void dump_stack () { #if 0 char s[160]; sprintf (s, "/bin/echo \"attach %d\\nwhere\\ndetach\\nquit\\n\" |" "gdb -silent %s", getpid(), Name); system (s); putchar ('\n'); #endif } void nb_error (int flags, char *format, ...) { va_list ap; int saved_errno = errno; fprintf (stderr, "%s: %s: ", Name, (flags & E_CHILD) ? _("error in child process") : _("error")); va_start (ap, format); vfprintf (stderr, format, ap); va_end (ap); if (flags & E_ERRNO) { #ifdef HAVE_STRERROR fprintf (stderr, ": %s", strerror (saved_errno)); #else fprintf (stderr, _(", errno = %d"), saved_errno); #endif } fputs (".\n", stderr); dump_stack (); if (flags & E_CHILD) _exit (128); else exit (1); } spellutils-0.7+debian/lib.h000066400000000000000000000033031434244546200157240ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #ifdef ENABLE_NLS #include #define _(String) gettext (String) #else #define _(String) (String) #endif #ifndef NAME_DECLARED extern const char *Name; #endif /* Functions in lib.c */ void *nb_realloc (void *ptr, size_t size); void *nb_malloc (size_t size); char *read_line (char *line, size_t *len, FILE *file); void write_line (char *line, FILE *file); FILE *open_read (const char *filename); FILE *open_write (const char *filename); void nb_close (FILE *file); char *nb_tmpnam (void); void nb_unlink (const char *filename); void nb_rename (const char *oldpath, const char *newpath); void nb_error (int flags, char *format, ...); /* Functions in exec.c */ void exec_program (char *argv[]); void exec_filter (char *argv[], FILE **out, FILE **in); int nb_wait (void); /* Flags to nb_error */ #define E_ERRNO (1) /* Use errno */ #define E_CHILD (1<<1) /* Call from a child process */ spellutils-0.7+debian/m4/000077500000000000000000000000001434244546200153265ustar00rootroot00000000000000spellutils-0.7+debian/m4/.placeholder000066400000000000000000000000001434244546200175770ustar00rootroot00000000000000spellutils-0.7+debian/newsbody.1000066400000000000000000000034201434244546200167210ustar00rootroot00000000000000.TH newsbody 1 "APRIL 2000" Unix "User Manuals" .SH NAME newsbody \- Run a program on the body of a mail or news message .SH SYNOPSIS .B newsbody [-fhqsv] [-k .I headername .B ] -n .I message .B -p .I program .B [-- [ .I arguments... .B ]] .SH DESCRIPTION .B newsbody copies the body of a news or email article in .I message to a temporary file (called the .IR bodyfile ) and then calls .I program with its .IR arguments . .I program is supposed to somehow change the .IR bodyfile . It can for instance be a spell checker. Afterwards the possibly changed body is remerged with the headers and copied back into the .IR message . .PP If .I message is specified as .I \- then .B newsbody will act as a filter, i.e. standard input and standard output will be used. .PP .B %f in the .I arguments will be expanded to the name of the .IR bodyfile , or .B \- if the -f option is used. Use .B %% for a real % character. .SH OPTIONS .IP -f The called program is a filter so don't make a temporary file, but pipe the body to its standard input and read it back from its standard output. .IP -h Keep the entire header. This flag can also be used if .I newsfile doesn't have a header at all. .IP -q Also remove quotes before filtering the body. Lines starting with > are considered quotes. .IP -s Also remove signature before filtering the body. .IP -k\ headername Keep these header lines in the bodyfile. Multiple -k flags are allowed. .IP -v Print the version and exit. .SH FILES .B newsbody uses one or two temporary files with names given by the .BR mkstemp (3) or the .BR tmpnam (3) function. .SH BUGS If some system call gives an unexpected error .B newsbody will stop immediately with an error message leaving its temporary files. .SH AUTHOR Byrial Jensen .SH SEE ALSO .BR pospell (1). spellutils-0.7+debian/newsbody.c000066400000000000000000000201161434244546200170040ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" /* Include config.h first as it may include definitions like _GNU_SOURCE which * affect what system headers may define and declare. */ #endif #include #include #include const char *Name = "newsbody"; #define NAME_DECLARED #include "newsbody.h" #ifdef HAVE_GETOPT /* * Systems which have the getopt function should declare it in * unistd.h, but the declaration is reported to be in unistd.h * in an AIX system. * It should be safe to include both to be sure... */ #include #include #else #include "getopt.h" #endif /* Static functions in this file */ static void parse_commandline (int argc, char *argv[]); static void usage (void); static void expand_argv (char *argv[], char *filename); static void check_child (void); /* These variables are set by parse_commandline() and used by main() */ static char *newsfile_name = NULL; static char *program = NULL; static struct keep_lines *keep = NULL; static int remove_header = 1; static int remove_quote = 0; static int remove_sig = 0; static int filter = 0; static int printversion = 0; static char **new_argv; int main (int argc, char *argv[]) { int use_stdin = 0; FILE *newsfile; FILE *newsfile_copy; char *bodyfile_name = NULL; FILE *bodyfile_r; FILE *bodyfile_w; char *mergefile_name = NULL; FILE *mergefile; #if defined(MAINLOOP) volatile int w = 1; while (w); #endif parse_commandline (argc, argv); if (printversion) { printf ("%s (" PACKAGE ") " VERSION "\n", Name); return 0; } if (!strcmp (newsfile_name, "-")) { use_stdin = 1; newsfile_name = nb_tmpnam (); newsfile_copy = open_write (newsfile_name); newsfile = stdin; mergefile = stdout; } else { newsfile_copy = NULL; newsfile = open_read (newsfile_name); mergefile_name = nb_tmpnam (); mergefile = open_write (mergefile_name); } if (filter) { expand_argv (new_argv, "-"); exec_filter (new_argv, &bodyfile_w, &bodyfile_r); writebody (newsfile, newsfile_copy, bodyfile_w, remove_header, remove_quote, remove_sig, keep); newsfile = open_read (newsfile_name); readbody (newsfile, bodyfile_r, mergefile, remove_header, remove_quote, remove_sig, keep); check_child (); } else { bodyfile_name = nb_tmpnam (); bodyfile_w = open_write (bodyfile_name); expand_argv (new_argv, bodyfile_name); writebody (newsfile, newsfile_copy, bodyfile_w, remove_header, remove_quote, remove_sig, keep); exec_program (new_argv); check_child (); newsfile = open_read (newsfile_name); bodyfile_r = open_read (bodyfile_name); readbody (newsfile, bodyfile_r, mergefile, remove_header, remove_quote, remove_sig, keep); } if (use_stdin) nb_unlink (newsfile_name); else nb_rename (mergefile_name, newsfile_name); if (!filter) nb_unlink (bodyfile_name); return 0; } static void parse_commandline (int argc, char *argv[]) { int option; struct keep_lines *k; char **ap; do { option = getopt (argc, argv, "qsfhn:p:k:v"); switch (option) { case 'q': remove_quote = 1; break; case 's': remove_sig = 1; break; case 'f': filter = 1; break; case 'h': remove_header = 0; break; case 'n': newsfile_name = optarg; break; case 'p': program = optarg; break; case 'k': k = nb_malloc (sizeof (struct keep_lines)); k->header = optarg; k->next = keep; keep = k; break; case 'v': printversion = 1; return; /* no more checking needed */ case ':': /* option with missing parameter */ case '?': /* unknown option */ usage (); case EOF: /* no more options */ break; default: /* all possible cases should have been stated */ nb_error (0, _("getopt returned impossible value: %d ('%c')"), option, option); } } while (option != EOF); if (newsfile_name == NULL || program == NULL) usage (); new_argv = nb_malloc ((argc - optind + 2) * sizeof (char *)); new_argv[0] = program; argv += optind; ap = new_argv + 1; while ((*(ap ++) = *(argv ++)) != NULL) ; } static void usage() { fputs (_("Usage: newsbody [-fhqsv] [-k headername] -n message -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies the body of the e-mail or usenet message in `message'\n" "to a temporary file (the `bodyfile') and then calls the program\n" "`program' (e.g. a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed `bodyfile' is copied back into\n" "the `message'.\n" "\n" "If `message' is specified as `-', newsbody will use its\n" "standard input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `bodyfile'. Use `%%' for a real `%' character.\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `bodyfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -h: keep the entire header. This flag should also be used\n" " if 'message' doesn't have a header at all.\n" " -k headername: keep these header lines in the `bodyfile'.\n" " (Multiple -k flags are allowed).\n" " -q: Also remove quotes from the `bodyfile'.\n" " Lines starting with `>' are considered quotes.\n" " -s: Also remove signature from the `bodyfile'.\n" " The signature is all lines from the first signature separator\n" " (i.e. `-- ') to the bottom of the message.\n" " -v: Print version and exit.\n"), stderr); exit (1); } static void expand_argv (char *argv[], char *filename) { char *argument; char *new_argument; char *c; int offset; while ((argument = *(++ argv)) != NULL) { offset = 0; while ((c = strchr (argument + offset, '%')) != NULL) { switch (*(c + 1)) { case 'f': /* We have a menory leak here when a argument have more than one %f, * but I don't care because this seldom happens and when it does not * much memory will be wasted */ new_argument = nb_malloc (strlen (argument) + strlen (filename) - 1); *c = 0; strcpy (new_argument, argument); strcat (new_argument, filename); offset = strlen (new_argument); argument = strcat (new_argument, c + 2); break; case '%': c ++; offset = c - argument; do *(c - 1) = *c; while (*(c ++)); break; default: offset = c + 1 - argument; } } *argv = argument; } } static void check_child () { int status = nb_wait (); if (WIFSIGNALED (status)) { #ifdef HAVE_STRSIGNAL nb_error (0, _("%s died with signal \"%s\""), program, strsignal (WTERMSIG (status))); #else nb_error (0, _("%s died with signal no. %d"), program, WTERMSIG (status)); #endif } else if (WIFEXITED (status)) { status = WEXITSTATUS (status); if (status == 128) nb_error (0, _("child process couldn't execute %s"), program); else if (status) nb_error (0, _("%s returned failure exit code %d"), program, status); } else nb_error (0, _("impossible status from child process: %x"), status); } spellutils-0.7+debian/newsbody.h000066400000000000000000000026251434244546200170160ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ struct keep_lines { char *header; struct keep_lines *next; }; #include "lib.h" /* Functions in newsbody_write.c */ void writebody (FILE *newsfile, FILE *newsfile_copy, FILE *bodyfile, int remove_header, int remove_quote, int remove_sig, struct keep_lines *keep); /* Functions in newsbody_read.c */ void readbody (FILE *newsfile, FILE *bodyfile, FILE *mergefile, int remove_header, int remove_quote, int remove_sig, struct keep_lines *keep); /* Functions in header.c */ char *read_header (char *header, size_t *len, FILE *file); int keep_this_header (char *header, struct keep_lines *keep); spellutils-0.7+debian/newsbody_read.c000066400000000000000000000062451434244546200200060ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "newsbody.h" /* Static functions in this file */ static void do_header (FILE *newsfile, FILE *bodyfile, FILE *mergefile, struct keep_lines *keep); static void do_body (FILE *newsfile, FILE *bodyfile, FILE *mergefile, int remove_quote, int remove_sig); void readbody (FILE *newsfile, FILE *bodyfile, FILE *mergefile, int remove_header, int remove_quote, int remove_sig, struct keep_lines *keep) { if (remove_header) do_header (newsfile, bodyfile, mergefile, keep); do_body (newsfile, bodyfile, mergefile, remove_quote, remove_sig); nb_close (newsfile); nb_close (bodyfile); nb_close (mergefile); } static void do_header (FILE *newsfile, FILE *bodyfile, FILE *mergefile, struct keep_lines *keep) { char *header = NULL; size_t len = 0; int kept_headers = 0; int bodyfile_eoh = 0; while (1) { header = read_header (header, &len, newsfile); if ((!header) || (*header == '\n')) break; if (keep_this_header (header, keep)) { kept_headers = 1; if (!bodyfile_eoh) { header = read_header (header, &len, bodyfile); if ((!header) || *header == '\n') bodyfile_eoh = 1; else write_line (header, mergefile); } } else write_line (header, mergefile); } if (kept_headers) { if (!bodyfile_eoh) { while ((header = read_header (header, &len, bodyfile)) != NULL && *header != '\n') { write_line (header, mergefile); } } } write_line ("\n", mergefile); if (header) free (header); } static void do_body (FILE *newsfile, FILE *bodyfile, FILE *mergefile, int remove_quote, int remove_sig) { char *line = NULL; size_t len = 0; while ((line = read_line (line, &len, bodyfile)) != NULL) { if (remove_quote && *line == '>') { do { line = read_line (line, &len, newsfile); if (!line) nb_error (0, _("found marker for a removed line in the body file,\n" "but cannot find a corresponding line in the message file")); } while (*line != '>'); } write_line (line, mergefile); } if (remove_sig) { do line = read_line (line, &len, newsfile); while (line && strcmp (line, "-- \n")); while (line) { write_line (line, mergefile); line = read_line (line, &len, newsfile); } } } spellutils-0.7+debian/newsbody_write.c000066400000000000000000000060121434244546200202150ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "newsbody.h" /* Static functions in this file: */ static void do_header (FILE *newsfile, FILE *newsfile_copy, FILE *bodyfile, struct keep_lines *keep); static void do_body (FILE *newsfile, FILE *newsfile_copy, FILE *bodyfile, int remove_quote, int remove_sig); void writebody (FILE *newsfile, FILE *newsfile_copy, FILE *bodyfile, int remove_header, int remove_quote, int remove_sig, struct keep_lines *keep) { if (remove_header) do_header (newsfile, newsfile_copy, bodyfile, keep); do_body (newsfile, newsfile_copy, bodyfile, remove_quote, remove_sig); if (newsfile != stdin) nb_close (newsfile); if (newsfile_copy) nb_close (newsfile_copy); nb_close (bodyfile); } static void do_header (FILE *newsfile, FILE *newsfile_copy, FILE *bodyfile, struct keep_lines *keep) { char *header = NULL; size_t len = 0; int header_lines_kept = 0; while (1) { header = read_header (header, &len, newsfile); if (!header) /* We have reached EOF on newsfile, i.e. it has no body. * Maybe its better to abort with an error message? */ return; if (newsfile_copy) write_line (header, newsfile_copy); if (*header == '\n') break; if (keep_this_header (header, keep)) { write_line (header, bodyfile); header_lines_kept = 1; } } if (header_lines_kept) write_line (header, bodyfile); free (header); } static void do_body (FILE *newsfile, FILE *newsfile_copy, FILE *bodyfile, int remove_quote, int remove_sig) { char *line = NULL; size_t len = 0; while (1) { line = read_line (line, &len, newsfile); if (!line) return; if (remove_sig && strcmp (line, "-- \n") == 0) break; if (newsfile_copy) write_line (line, newsfile_copy); if (remove_quote && *line == '>') { line[1] = '\n'; line[2] = '\0'; } write_line (line, bodyfile); } /* This point is only reached when a signature delimeter is found */ if (newsfile_copy) { /* Write the signature to newsfile_copy */ while (line) { write_line (line, newsfile_copy); line = read_line (line, &len, newsfile); } } } spellutils-0.7+debian/po/000077500000000000000000000000001434244546200154245ustar00rootroot00000000000000spellutils-0.7+debian/po/LINGUAS000066400000000000000000000000141434244546200164440ustar00rootroot00000000000000da de zh_CN spellutils-0.7+debian/po/Makefile.in.in000066400000000000000000000461631434244546200201100ustar00rootroot00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-2000 Ulrich Drepper # Copyright (C) 2000-2020 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # # Origin: gettext-0.21 GETTEXT_MACRO_VERSION = 0.20 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SED = @SED@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ # When building gettext-tools, we prefer to use the built programs # rather than installed programs. However, we can't do that when we # are cross compiling. CROSS_COMPILING = @CROSS_COMPILING@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot POFILESDEPS_yes = $(POFILESDEPS_) POFILESDEPS_no = POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) DISTFILESDEPS_ = update-po DISTFILESDEPS_yes = $(DISTFILESDEPS_) DISTFILESDEPS_no = DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) # Makevars gets inserted here. (Don't remove this line!) all: all-@USE_NLS@ .SUFFIXES: .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update # The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. # The GNU Coding Standards say in # : # "GNU distributions usually contain some files which are not source files # ... . Since these files normally appear in the source directory, they # should always appear in the source directory, not in the build directory. # So Makefile rules to update them should put the updated files in the # source directory." # Therefore we put these files in the source directory, not the build directory. # During .po -> .gmo conversion, take into account the most recent changes to # the .pot file. This eliminates the need to update the .po files when the # .pot file has changed, which would be troublesome if the .po files are put # under version control. $(GMOFILES): $(srcdir)/$(DOMAIN).pot .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ cd $(srcdir) && \ rm -f $${lang}.gmo && \ $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ mv t-$${lang}.gmo $${lang}.gmo && \ rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all-yes: $(srcdir)/stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. CHECK_MACRO_VERSION = \ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). # $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS # have been loosely updated. Its purpose is that when a developer or translator # checks out the package from a version control system, and the $(DOMAIN).pot # file is not under version control, "make" will update the $(DOMAIN).pot and # the $(CATALOGS), but subsequent invocations of "make" will do nothing. This # timestamp would not be necessary if updating the $(CATALOGS) would always # touch them; however, the rule for $(POFILES) has been designed to not touch # files that don't need to be changed. $(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch $(srcdir)/stamp-po" && \ echo timestamp > $(srcdir)/stamp-poT && \ mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ else \ LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ else \ package_gnu=no; \ fi; \ }; \ if test "$$package_gnu" = "yes"; then \ package_prefix='GNU '; \ else \ package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot-header; then \ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ rm -f $(DOMAIN).1po \ || exit 1; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(POFILESDEPS) @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: install-dvi install-ps install-pdf install-html: mostlyclean: rm -f remove-potcdate.sed rm -f $(srcdir)/stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES 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 $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(srcdir)/stamp-po $(DISTFILES) @dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ else \ case $(XGETTEXT) in \ :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ esac; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # 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: spellutils-0.7+debian/po/Makevars000066400000000000000000000067571434244546200171370ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # # Copyright (C) 2003-2019 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation gives # unlimited permission to use, copy, distribute, and modify it. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This tells whether or not to prepend "GNU " prefix to the package # name that gets inserted into the header of the $(DOMAIN).pot file. # Possible values are "yes", "no", or empty. If it is empty, try to # detect it automatically by scanning the files in $(top_srcdir) for # "GNU packagename" string. PACKAGE_GNU = no # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' # context. Possible values are "yes" and "no". Set this to yes if the # package uses functions taking also a message context, like pgettext(), or # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. USE_MSGCTXT = no # These options get passed to msgmerge. # Useful options are in particular: # --previous to keep previous msgids of translated messages, # --quiet to reduce the verbosity. MSGMERGE_OPTIONS = # These options get passed to msginit. # If you want to disable line wrapping when writing PO files, add # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and # MSGINIT_OPTIONS. MSGINIT_OPTIONS = # This tells whether or not to regenerate a PO file when $(DOMAIN).pot # has changed. Possible values are "yes" and "no". Set this to no if # the POT file is checked in the repository and the version control # program ignores timestamps. PO_DEPENDS_ON_POT = yes # This tells whether or not to forcibly update $(DOMAIN).pot and # regenerate PO files on "make dist". Possible values are "yes" and # "no". Set this to no if the POT file and PO files are maintained # externally. DIST_DEPENDS_ON_UPDATE_PO = yes spellutils-0.7+debian/po/POTFILES.in000066400000000000000000000002231434244546200171760ustar00rootroot00000000000000# List of source files containing translatable strings. pospell.c pospell_write.c pospell_read.c newsbody.c newsbody_read.c header.c lib.c exec.c spellutils-0.7+debian/po/da.po000066400000000000000000000307501434244546200163550ustar00rootroot00000000000000# Dansk oversttelse af pospell # Byrial Jensen . # msgid "" msgstr "" "Project-Id-Version: spellutils 0.6\n" "Report-Msgid-Bugs-To: https://tracker.debian.org/pkg/spellutils\n" "POT-Creation-Date: 2022-12-02 13:41-0500\n" "PO-Revision-Date: 2000-04-19 08:00+0200\n" "Last-Translator: Byrial Jensen \n" "Language-Team: SSLUG locale mailing list \n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: pospell.c:162 msgid "only one -l option is allowed" msgstr "kun t -l-tilvalg er tilladt" #: pospell.c:185 newsbody.c:192 #, c-format msgid "getopt returned impossible value: %d ('%c')" msgstr "getopt returnede umulig vrdi: %d ('%c')" #: pospell.c:206 #, fuzzy, c-format #| msgid "" #| "Usage: pospell [-fsv] [-l language] -n pofile -p program\n" #| " [-- [program-arguments...]]\n" #| "\n" #| "Copies all translated strings from `pofile' to a temporary\n" #| "file (the `spellfile') and then calls the program `program'\n" #| "(typically a spell checker) with all `program-arguments'.\n" #| "Afterwards the possibly changed translation is copied back\n" #| "into the `pofile'.\n" #| "\n" #| "If `pofile' is specified as `-', pospell will use its standard\n" #| "input and standard output.\n" #| "\n" #| "`%f' in the `program arguments' will be expanded to the name of\n" #| "the `spellfile'. Use `%%' for a real `%' character.\n" #| "\n" #| "The flags mean:\n" #| " -f: The called program is a filter so don't make a temporary\n" #| " file, but pipe `spellfile' to the standard input of the\n" #| " `program' and later read it back from its standard output.\n" #| " -l language: Only translations with the indicated language code\n" #| " are copied to the `spellfile'.\n" #| " -s: quit with an error message if the `pofile' or `spellfile'\n" #| " have unrecognized formats.\n" #| " -v: Print version and exit.\n" msgid "" "Usage: pospell [-fsv] [-l language] -n pofile -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies all translated strings from `pofile' to a temporary\n" "file (the `spellfile') and then calls the program `program'\n" "(typically a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed translation is copied back\n" "into the `pofile'.\n" "\n" "If `pofile' is specified as `-', pospell will use its standard\n" "input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `spellfile'. Escape single percent sign with two characters\n" "(%%).\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `spellfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -l language: Only translations with the indicated language code\n" " are copied to the `spellfile'.\n" " -s: quit with an error message if the `pofile' or `spellfile'\n" " have unrecognized formats.\n" " -v: Print version and exit.\n" msgstr "" "Brug: pospell [-fsv] [-l sprog] -n pofil -p program\n" " [-- [program-argumenter...]]\n" "\n" "Kopierer alle oversatte tekster fra 'pofil' til en kladdefil\n" "('stavefilen') og kalder s programmet 'program' (typisk et\n" "stavekontrolprogram) med alle 'program-argumenter'.\n" "Bagefter bliver den mske ndrede oversttelse kopieret tilbage\n" "til 'pofilen'.\n" "\n" "Hvis 'pofil' er angivet som '-', vil pospell bruge standard-ind\n" "og standard-ud.\n" "\n" "'%f' in 'program-argumenterne' vil blive erstattet med navnet p\n" "'stavefilen'. Brug %% for angive et rigtigt % -tegn.\n" "\n" "Tilvalgene betyder:\n" " -f: Det kaldte program er et filter, s opret ikke en kladdefil,\n" " men led oversttelserne til dets standard-ind, og ls dem\n" " siden tilbage fra dets standard-ud.\n" " -l sprog: Kun oversttelser med den indikerede sprogkode kopieres\n" " til 'stavefilen'.\n" " -s: Slut af med en fejlmeddelelse hvis 'pofilen' eller 'stavefilen'\n" " har uigenkendelige formater.\n" " -v: Udskriv version og afslut.\n" #: pospell.c:284 newsbody.c:294 #, c-format msgid "%s died with signal \"%s\"" msgstr "%s dde med signalet \"%s\"" #: pospell.c:287 newsbody.c:297 #, c-format msgid "%s died with signal no. %d" msgstr "%s dde med signal nr. %d" #: pospell.c:294 newsbody.c:304 #, c-format msgid "child process couldn't execute %s" msgstr "barneprocess kunne ikke udfre %s" #: pospell.c:296 newsbody.c:306 #, c-format msgid "%s returned failure exit code %d" msgstr "%s returnerede fejlafslutningskode %d" #: pospell.c:299 newsbody.c:309 #, c-format msgid "impossible status from child process: %x" msgstr "umulig status fra barneproces: %x" #: pospell_write.c:141 #, c-format msgid "" "I don't understand this line in the .po file:\n" "%s" msgstr "" "jeg forstr ikke denne linje i .po-filen:\n" "%s" #: pospell_read.c:67 msgid "" "found marker for a removed item in the spell file,\n" "but cannot find a corresponding item in the po file" msgstr "" "fandt en markr for et fjernet element i stavefilen,\n" "men kan ikke finde et tilsvarende element i pofilen" #: pospell_read.c:124 #, c-format msgid "" "found line with unknown content in the spell file:\n" "%s" msgstr "" "fandt en linje med ukendt indhold i stavefilen:\n" "%s" #: newsbody.c:212 #, fuzzy, c-format #| msgid "" #| "Usage: newsbody [-fhqsv] [-k headername] -n message -p program\n" #| " [-- [program-arguments...]]\n" #| "\n" #| "Copies the body of the e-mail or usenet message in `message'\n" #| "to a temporary file (the `bodyfile') and then calls the program\n" #| "`program' (e.g. a spell checker) with all `program-arguments'.\n" #| "Afterwards the possibly changed `bodyfile' is copied back into\n" #| "the `message'.\n" #| "\n" #| "If `message' is specified as `-', newsbody will use its\n" #| "standard input and standard output.\n" #| "\n" #| "`%f' in the `program arguments' will be expanded to the name of\n" #| "the `bodyfile'. Use `%%' for a real `%' character.\n" #| "\n" #| "The flags mean:\n" #| " -f: The called program is a filter so don't make a temporary\n" #| " file, but pipe `bodyfile' to the standard input of the\n" #| " `program' and later read it back from its standard output.\n" #| " -h: keep the entire header. This flag should also be used\n" #| " if 'message' doesn't have a header at all.\n" #| " -k headername: keep these header lines in the `bodyfile'.\n" #| " (Multiple -k flags are allowed).\n" #| " -q: Also remove quotes from the `bodyfile'.\n" #| " Lines starting with `>' are considered quotes.\n" #| " -s: Also remove signature from the `bodyfile'.\n" #| " The signature is all lines from the first signature separator\n" #| " (i.e. `-- ') to the bottom of the message.\n" #| " -v: Print version and exit.\n" msgid "" "Usage: newsbody [-fhqsv] [-k headername] -n message -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies the body of the e-mail or usenet message in `message'\n" "to a temporary file (the `bodyfile') and then calls the program\n" "`program' (e.g. a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed `bodyfile' is copied back into\n" "the `message'.\n" "\n" "If `message' is specified as `-', newsbody will use its\n" "standard input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `bodyfile'. Use `%%' for a real `%' character.\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `bodyfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -h: keep the entire header. This flag should also be used\n" " if 'message' doesn't have a header at all.\n" " -k headername: keep these header lines in the `bodyfile'.\n" " (Multiple -k flags are allowed).\n" " -q: Also remove quotes from the `bodyfile'.\n" " Lines starting with `>' are considered quotes.\n" " -s: Also remove signature from the `bodyfile'.\n" " The signature is all lines from the first signature separator\n" " (i.e. `-- ') to the bottom of the message.\n" " -v: Print version and exit.\n" msgstr "" "Brug: newsbody [-fhqsv] [-k brevhovednavn] -n brev -p program\n" " [-- [program-argumenter...]]\n" "\n" "Kopierer brevkroppen fra en e-post- eller usenet-besked, 'brevet',\n" "til en kladdefil ('brevkropfilen') og kalder s programmet 'program'\n" "(f.eks. et stavekontrolprogram) med alle 'program-argumenter'.\n" "Bagefter bliver den mske ndrede 'brevkropfil' kopieret tilbage til\n" "'brevet'.\n" "\n" "Hvis 'brev' er angivet som '-', vil newsbody bruge standard-ind\n" "og standard-ud.\n" "\n" "'%f' i 'program-argumenterne' vil blive erstattet med navnet p\n" "'brevkropfilen'. Brug '%%' for angive et rigtigt '%'-tegn.\n" "\n" "Tilvalgene betyder:\n" " -f: Det kaldte program er et filter, s opret ikke en kladdefil,\n" " men led 'brevkropfilen' til dets standard-ind, og ls dem\n" " siden tilbage fra dets standard-ud.\n" " -h: Behold hele brevhovedet. Dette tilvalg skal ogs bruges hvis\n" " 'brevet' slet ikke har noget brevhoved.\n" " -k brevhovednavn: Behold denne slags brevhoveder i 'brevkropfilen'.\n" " (Flere -k-tilvalg er tilladt).\n" " -q: Fjern ogs alle citatlinjer, dvs. linjer som begynder med tegnet '>',\n" " fra 'brevkropfilen'\n" " -s: Fjern ogs signaturen fra 'brevkropfilen'.\n" " Signaturen er alle linjer fra den frste signaturadskiller\n" " (dvs. '-- ') til slutningen af brevet.\n" " -v: Udskriv version og afslut.\n" #: newsbody_read.c:109 msgid "" "found marker for a removed line in the body file,\n" "but cannot find a corresponding line in the message file" msgstr "" "fandt en markr for en fjernet linje i brevkropfilen,\n" "men kan ikke finde en tilsvarende linje i brevfilen" #: header.c:53 msgid "internal error while reading a header continuation" msgstr "programfejl ved lsning af brevhovedfortsttelseslinje" #: lib.c:37 lib.c:47 msgid "could not allocate memory" msgstr "kunne ikke f hukommelse" #: lib.c:70 msgid "reading file" msgstr "lsning af fil" #: lib.c:95 msgid "writing file" msgstr "skrivning af fil" #: lib.c:103 #, c-format msgid "open %s for reading" msgstr "bning af %s til lsning" #: lib.c:112 #, c-format msgid "open %s for writing" msgstr "bning af %s til skrivning" #: lib.c:119 msgid "closing file" msgstr "lukning af fil" #: lib.c:128 lib.c:135 msgid "making temporary filename" msgstr "konstruktion af navn p kladdefil" #: lib.c:144 #, c-format msgid "unlink %s" msgstr "sletning af %s" #: lib.c:152 #, c-format msgid "rename %s %s" msgstr "omdbning af %s til %s" #: lib.c:165 #, c-format msgid "stat %s" msgstr "lsning af filstatus for %s" #: lib.c:174 #, c-format msgid "read from %s" msgstr "lsning fra %s" #: lib.c:176 #, c-format msgid "write to %s" msgstr "skrivning til %s" #: lib.c:204 msgid "error in child process" msgstr "fejl i barneproces" #: lib.c:204 msgid "error" msgstr "fejl" #: lib.c:215 #, c-format msgid ", errno = %d" msgstr ", fejlnr. = %d" #: exec.c:38 exec.c:93 msgid "fork" msgstr "afgrening (fork)" #: exec.c:54 msgid "open terminal read" msgstr "bning af terminal til lsning" #: exec.c:56 exec.c:106 msgid "dup2 stdin" msgstr "kopiering af fildeskriptor til standard-ind" #: exec.c:58 msgid "close extra terminal read fd" msgstr "lukning af ekstra fildeskriptor til terminallsning" #: exec.c:63 msgid "open terminal write" msgstr "bning af terminal til skrivning" #: exec.c:65 exec.c:113 msgid "dup2 stdout" msgstr "kopiering af fildeskriptor til standard-ud" #: exec.c:67 msgid "close extra terminal write fd" msgstr "lukning af ekstra fildeskriptor til terminalskrivning" #: exec.c:70 exec.c:118 #, c-format msgid "exec %s" msgstr "udfr %s" #: exec.c:87 msgid "pipe for output" msgstr "oprettelse af ledning til uddata" #: exec.c:89 msgid "pipe for input" msgstr "oprettelse af ledning til inddata" #: exec.c:104 msgid "close write end of output pipe" msgstr "lukning af skriveenden af uddataledning" #: exec.c:108 exec.c:123 msgid "close read end of output pipe" msgstr "lukning af lseenden af uddataledning" #: exec.c:111 msgid "close read end of input pipe" msgstr "lukning af lseenden af inddataledning" #: exec.c:115 exec.c:128 msgid "close write end of input pipe" msgstr "lukning af skriveenden af inddataledning" #: exec.c:125 msgid "fdopen write end of output pipe" msgstr "bning af skriveenden af uddataledning" #: exec.c:130 msgid "fdopen read end of input pipe" msgstr "bning af lseenden af inddataledning" #: exec.c:138 msgid "waiting for child" msgstr "venten p barn" spellutils-0.7+debian/po/de.po000066400000000000000000000174641434244546200163700ustar00rootroot00000000000000# Translation of spellutils to German # Copyright (C) 1998-2000 Byrial Jensen. # This file is distributed under the same license as the spellutils package. # Chris Leick , 2010. # msgid "" msgstr "" "Project-Id-Version: spellutils 0.7-5\n" "Report-Msgid-Bugs-To: https://tracker.debian.org/pkg/spellutils\n" "POT-Creation-Date: 2022-12-02 13:41-0500\n" "PO-Revision-Date: 2010-01-14 19:36+GMT\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: pospell.c:162 msgid "only one -l option is allowed" msgstr "nur eine -l-Option ist erlaubt" #: pospell.c:185 newsbody.c:192 #, c-format msgid "getopt returned impossible value: %d ('%c')" msgstr "getopt gab unmöglichen Wert zurück: %d (»%c«)" #: pospell.c:206 #, c-format msgid "" "Usage: pospell [-fsv] [-l language] -n pofile -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies all translated strings from `pofile' to a temporary\n" "file (the `spellfile') and then calls the program `program'\n" "(typically a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed translation is copied back\n" "into the `pofile'.\n" "\n" "If `pofile' is specified as `-', pospell will use its standard\n" "input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `spellfile'. Escape single percent sign with two characters\n" "(%%).\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `spellfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -l language: Only translations with the indicated language code\n" " are copied to the `spellfile'.\n" " -s: quit with an error message if the `pofile' or `spellfile'\n" " have unrecognized formats.\n" " -v: Print version and exit.\n" msgstr "" #: pospell.c:284 newsbody.c:294 #, c-format msgid "%s died with signal \"%s\"" msgstr "%s mit Signal »%s« beendet" #: pospell.c:287 newsbody.c:297 #, c-format msgid "%s died with signal no. %d" msgstr "%s mit Signal Nr. %d beendet" #: pospell.c:294 newsbody.c:304 #, c-format msgid "child process couldn't execute %s" msgstr "Kindprozess kann %s nicht ausführen" #: pospell.c:296 newsbody.c:306 #, c-format msgid "%s returned failure exit code %d" msgstr "%s gab Fehlercode %d zurück" #: pospell.c:299 newsbody.c:309 #, c-format msgid "impossible status from child process: %x" msgstr "unmöglicher Status von Kindprozess: %x" #: pospell_write.c:141 #, c-format msgid "" "I don't understand this line in the .po file:\n" "%s" msgstr "" "Diese Zeile in der .po-Datei ist unverständlich:\n" "%s" #: pospell_read.c:67 msgid "" "found marker for a removed item in the spell file,\n" "but cannot find a corresponding item in the po file" msgstr "" "für ein entferntes Element wurde in der Rechtschreibdatei eine\n" "Kennzeichnung gefunden, es kann aber kein entsprechendes Element in der\n" "po-Datei gefunden werden" #: pospell_read.c:124 #, c-format msgid "" "found line with unknown content in the spell file:\n" "%s" msgstr "" "in der Rechtschreibdatei wurde eine Zeile mit unbekanntem Inhalt gefunden:\n" "%s" # FIXME s/-k/-k:/ #: newsbody.c:212 #, c-format msgid "" "Usage: newsbody [-fhqsv] [-k headername] -n message -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies the body of the e-mail or usenet message in `message'\n" "to a temporary file (the `bodyfile') and then calls the program\n" "`program' (e.g. a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed `bodyfile' is copied back into\n" "the `message'.\n" "\n" "If `message' is specified as `-', newsbody will use its\n" "standard input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `bodyfile'. Use `%%' for a real `%' character.\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `bodyfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -h: keep the entire header. This flag should also be used\n" " if 'message' doesn't have a header at all.\n" " -k headername: keep these header lines in the `bodyfile'.\n" " (Multiple -k flags are allowed).\n" " -q: Also remove quotes from the `bodyfile'.\n" " Lines starting with `>' are considered quotes.\n" " -s: Also remove signature from the `bodyfile'.\n" " The signature is all lines from the first signature separator\n" " (i.e. `-- ') to the bottom of the message.\n" " -v: Print version and exit.\n" msgstr "" #: newsbody_read.c:109 msgid "" "found marker for a removed line in the body file,\n" "but cannot find a corresponding line in the message file" msgstr "" "für eine entfernte Zeile wurde in der Nachrichtentextdatei eine\n" "Kennzeichnung gefunden, es kann aber keine entsprechende Zeile in der\n" "Nachrichtendatei gefunden werden" #: header.c:53 msgid "internal error while reading a header continuation" msgstr "interner Fehler beim Lesen einer Kopfzeilenfortsetzung" #: lib.c:37 lib.c:47 msgid "could not allocate memory" msgstr "Speicher konnte nicht angefordert werden" #: lib.c:70 msgid "reading file" msgstr "Datei wird gelesen" #: lib.c:95 msgid "writing file" msgstr "Datei wird geschrieben" #: lib.c:103 #, c-format msgid "open %s for reading" msgstr "%s wird zum Lesen geöffnet" #: lib.c:112 #, c-format msgid "open %s for writing" msgstr "%s wird zum Schreiben geöffnet" #: lib.c:119 msgid "closing file" msgstr "Datei wird geschlossen" #: lib.c:128 lib.c:135 msgid "making temporary filename" msgstr "temporärer Dateiname wird erstellt" #: lib.c:144 #, c-format msgid "unlink %s" msgstr "%s wird gelöscht" #: lib.c:152 #, c-format msgid "rename %s %s" msgstr "%s wird in %s umbenannt" #: lib.c:165 #, c-format msgid "stat %s" msgstr "%s wird mit stat abgefragt" #: lib.c:174 #, fuzzy, c-format #| msgid "read from <%s>" msgid "read from %s" msgstr "von %s lesen" #: lib.c:176 #, fuzzy, c-format #| msgid "write to <%s>" msgid "write to %s" msgstr "auf %s schreiben" #: lib.c:204 msgid "error in child process" msgstr "Fehler im Kindprozess" #: lib.c:204 msgid "error" msgstr "Fehler" #: lib.c:215 #, c-format msgid ", errno = %d" msgstr ", Fehlernummer »errno« = %d" #: exec.c:38 exec.c:93 msgid "fork" msgstr "fork" #: exec.c:54 msgid "open terminal read" msgstr "Terminal zum Lesen öffnen" #: exec.c:56 exec.c:106 msgid "dup2 stdin" msgstr "dup2 stdin" #: exec.c:58 msgid "close extra terminal read fd" msgstr "zusätzlichen Terminal-Lese-fd schließen" #: exec.c:63 msgid "open terminal write" msgstr "Terminal zum Schreiben öffnen" #: exec.c:65 exec.c:113 msgid "dup2 stdout" msgstr "dup2 stdout" #: exec.c:67 msgid "close extra terminal write fd" msgstr "zusätzlichen Terminal-Schreib-fd schließen" #: exec.c:70 exec.c:118 #, c-format msgid "exec %s" msgstr "%s wird ausgeführt" #: exec.c:87 msgid "pipe for output" msgstr "Ausgabe-Pipe" #: exec.c:89 msgid "pipe for input" msgstr "Eingabe-Pipe" #: exec.c:104 msgid "close write end of output pipe" msgstr "Schreibende der Ausgabe-Pipe schließen" #: exec.c:108 exec.c:123 msgid "close read end of output pipe" msgstr "Leseende der Ausgabe-Pipe schließen" #: exec.c:111 msgid "close read end of input pipe" msgstr "Leseende der Eingabe-Pipe schließen" #: exec.c:115 exec.c:128 msgid "close write end of input pipe" msgstr "Schreibende der Eingabe-Pipe schließen" #: exec.c:125 msgid "fdopen write end of output pipe" msgstr "fdopen auf Schreibende der Ausgabe-Pipe" #: exec.c:130 msgid "fdopen read end of input pipe" msgstr "fdopen auf Leseende der Eingabe-Pipe" #: exec.c:138 msgid "waiting for child" msgstr "auf Kindprozess warten" spellutils-0.7+debian/po/spellutils.pot000066400000000000000000000142331434244546200203530ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the spellutils package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: spellutils 0.7+debian\n" "Report-Msgid-Bugs-To: https://tracker.debian.org/pkg/spellutils\n" "POT-Creation-Date: 2022-12-02 13:41-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: pospell.c:162 msgid "only one -l option is allowed" msgstr "" #: pospell.c:185 newsbody.c:192 #, c-format msgid "getopt returned impossible value: %d ('%c')" msgstr "" #: pospell.c:206 #, c-format msgid "" "Usage: pospell [-fsv] [-l language] -n pofile -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies all translated strings from `pofile' to a temporary\n" "file (the `spellfile') and then calls the program `program'\n" "(typically a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed translation is copied back\n" "into the `pofile'.\n" "\n" "If `pofile' is specified as `-', pospell will use its standard\n" "input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `spellfile'. Escape single percent sign with two characters\n" "(%%).\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `spellfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -l language: Only translations with the indicated language code\n" " are copied to the `spellfile'.\n" " -s: quit with an error message if the `pofile' or `spellfile'\n" " have unrecognized formats.\n" " -v: Print version and exit.\n" msgstr "" #: pospell.c:284 newsbody.c:294 #, c-format msgid "%s died with signal \"%s\"" msgstr "" #: pospell.c:287 newsbody.c:297 #, c-format msgid "%s died with signal no. %d" msgstr "" #: pospell.c:294 newsbody.c:304 #, c-format msgid "child process couldn't execute %s" msgstr "" #: pospell.c:296 newsbody.c:306 #, c-format msgid "%s returned failure exit code %d" msgstr "" #: pospell.c:299 newsbody.c:309 #, c-format msgid "impossible status from child process: %x" msgstr "" #: pospell_write.c:141 #, c-format msgid "" "I don't understand this line in the .po file:\n" "%s" msgstr "" #: pospell_read.c:67 msgid "" "found marker for a removed item in the spell file,\n" "but cannot find a corresponding item in the po file" msgstr "" #: pospell_read.c:124 #, c-format msgid "" "found line with unknown content in the spell file:\n" "%s" msgstr "" #: newsbody.c:212 #, c-format msgid "" "Usage: newsbody [-fhqsv] [-k headername] -n message -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies the body of the e-mail or usenet message in `message'\n" "to a temporary file (the `bodyfile') and then calls the program\n" "`program' (e.g. a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed `bodyfile' is copied back into\n" "the `message'.\n" "\n" "If `message' is specified as `-', newsbody will use its\n" "standard input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `bodyfile'. Use `%%' for a real `%' character.\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `bodyfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -h: keep the entire header. This flag should also be used\n" " if 'message' doesn't have a header at all.\n" " -k headername: keep these header lines in the `bodyfile'.\n" " (Multiple -k flags are allowed).\n" " -q: Also remove quotes from the `bodyfile'.\n" " Lines starting with `>' are considered quotes.\n" " -s: Also remove signature from the `bodyfile'.\n" " The signature is all lines from the first signature separator\n" " (i.e. `-- ') to the bottom of the message.\n" " -v: Print version and exit.\n" msgstr "" #: newsbody_read.c:109 msgid "" "found marker for a removed line in the body file,\n" "but cannot find a corresponding line in the message file" msgstr "" #: header.c:53 msgid "internal error while reading a header continuation" msgstr "" #: lib.c:37 lib.c:47 msgid "could not allocate memory" msgstr "" #: lib.c:70 msgid "reading file" msgstr "" #: lib.c:95 msgid "writing file" msgstr "" #: lib.c:103 #, c-format msgid "open %s for reading" msgstr "" #: lib.c:112 #, c-format msgid "open %s for writing" msgstr "" #: lib.c:119 msgid "closing file" msgstr "" #: lib.c:128 lib.c:135 msgid "making temporary filename" msgstr "" #: lib.c:144 #, c-format msgid "unlink %s" msgstr "" #: lib.c:152 #, c-format msgid "rename %s %s" msgstr "" #: lib.c:165 #, c-format msgid "stat %s" msgstr "" #: lib.c:174 #, c-format msgid "read from %s" msgstr "" #: lib.c:176 #, c-format msgid "write to %s" msgstr "" #: lib.c:204 msgid "error in child process" msgstr "" #: lib.c:204 msgid "error" msgstr "" #: lib.c:215 #, c-format msgid ", errno = %d" msgstr "" #: exec.c:38 exec.c:93 msgid "fork" msgstr "" #: exec.c:54 msgid "open terminal read" msgstr "" #: exec.c:56 exec.c:106 msgid "dup2 stdin" msgstr "" #: exec.c:58 msgid "close extra terminal read fd" msgstr "" #: exec.c:63 msgid "open terminal write" msgstr "" #: exec.c:65 exec.c:113 msgid "dup2 stdout" msgstr "" #: exec.c:67 msgid "close extra terminal write fd" msgstr "" #: exec.c:70 exec.c:118 #, c-format msgid "exec %s" msgstr "" #: exec.c:87 msgid "pipe for output" msgstr "" #: exec.c:89 msgid "pipe for input" msgstr "" #: exec.c:104 msgid "close write end of output pipe" msgstr "" #: exec.c:108 exec.c:123 msgid "close read end of output pipe" msgstr "" #: exec.c:111 msgid "close read end of input pipe" msgstr "" #: exec.c:115 exec.c:128 msgid "close write end of input pipe" msgstr "" #: exec.c:125 msgid "fdopen write end of output pipe" msgstr "" #: exec.c:130 msgid "fdopen read end of input pipe" msgstr "" #: exec.c:138 msgid "waiting for child" msgstr "" spellutils-0.7+debian/po/zh_CN.po000066400000000000000000000174351434244546200167770ustar00rootroot00000000000000# Chinese translations for spellutils package # spellutils 软件包的简体中文翻译. # Copyright (C) 2022 Free Software Foundation, Inc. # This file is distributed under the same license as the spellutils package. # Boyuan Yang , 2022. # msgid "" msgstr "" "Project-Id-Version: spellutils 0.7+debian\n" "Report-Msgid-Bugs-To: https://tracker.debian.org/pkg/spellutils\n" "POT-Creation-Date: 2022-12-02 13:41-0500\n" "PO-Revision-Date: 2022-12-02 13:42-0500\n" "Last-Translator: Boyuan Yang <073plan@gmail.com>\n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.2\n" #: pospell.c:162 msgid "only one -l option is allowed" msgstr "只允许一个 -l 选项" #: pospell.c:185 newsbody.c:192 #, c-format msgid "getopt returned impossible value: %d ('%c')" msgstr "getopt 返回不可能出现的值:%d ('%c')" #: pospell.c:206 #, c-format msgid "Usage: pospell [-fsv] [-l language] -n pofile -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies all translated strings from `pofile' to a temporary\n" "file (the `spellfile') and then calls the program `program'\n" "(typically a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed translation is copied back\n" "into the `pofile'.\n" "\n" "If `pofile' is specified as `-', pospell will use its standard\n" "input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `spellfile'. Escape single percent sign with two characters\n" "(%%).\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `spellfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -l language: Only translations with the indicated language code\n" " are copied to the `spellfile'.\n" " -s: quit with an error message if the `pofile' or `spellfile'\n" " have unrecognized formats.\n" " -v: Print version and exit.\n" msgstr "用法:pospell [-fsv] [-l 语言] -n po文件 -p 程序\n" " [-- [程序参数...]]\n" "\n" "将所有来自指定“po文件”的已翻译的字符串复制到临时文件\n" "(“spell文件”)中,然后调用指定的“程序”(通常为拼写\n" "检查工具)并使用给出的“程序参数”。\n" "在此之后,将可能被修改的翻译复制回“po文件”中。\n" "\n" "如果指定的“po文件”是“-”,那么 pospell 将会使用其标准\n" "输入和标准输出。\n" "\n" "在“程序参数”中出现的“%f”将扩展成“spell文件”的\n" "名称。请将单个百分号符号改用两个符号进行转义(%%)。\n" "\n" "参数的含义:\n" " -f: 所调用的程序是一个过滤器因而不创建临时文件,而是采取将\n" " “spell文件”通过管道输入给定“程序”的标准输入,并稍后\n" " 从其对应标准输出读回内容的工作方式。\n" " -l 语言: 只将带有指定的语言代码的翻译复制到“spell文件”中。\n" " -s: 如果“po文件”或“spell文件”有无法识别的格式则提示错误\n" " 消息并退出。\n" " -v: 打印版本号并退出。\n" #: pospell.c:284 newsbody.c:294 #, c-format msgid "%s died with signal \"%s\"" msgstr "" #: pospell.c:287 newsbody.c:297 #, c-format msgid "%s died with signal no. %d" msgstr "" #: pospell.c:294 newsbody.c:304 #, c-format msgid "child process couldn't execute %s" msgstr "子进程无法执行 %s" #: pospell.c:296 newsbody.c:306 #, c-format msgid "%s returned failure exit code %d" msgstr "%s 返回失败退出代码 %d" #: pospell.c:299 newsbody.c:309 #, c-format msgid "impossible status from child process: %x" msgstr "来自子进程的不可能的状态:%x" #: pospell_write.c:141 #, c-format msgid "I don't understand this line in the .po file:\n" "%s" msgstr "我不理解 .po 文件中的这一行:\n" "%s" #: pospell_read.c:67 msgid "found marker for a removed item in the spell file,\n" "but cannot find a corresponding item in the po file" msgstr "" #: pospell_read.c:124 #, c-format msgid "found line with unknown content in the spell file:\n" "%s" msgstr "在 spell 文件中找到含有未知内容的行:\n" "%s" #: newsbody.c:212 #, c-format msgid "Usage: newsbody [-fhqsv] [-k headername] -n message -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies the body of the e-mail or usenet message in `message'\n" "to a temporary file (the `bodyfile') and then calls the program\n" "`program' (e.g. a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed `bodyfile' is copied back into\n" "the `message'.\n" "\n" "If `message' is specified as `-', newsbody will use its\n" "standard input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `bodyfile'. Use `%%' for a real `%' character.\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `bodyfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -h: keep the entire header. This flag should also be used\n" " if 'message' doesn't have a header at all.\n" " -k headername: keep these header lines in the `bodyfile'.\n" " (Multiple -k flags are allowed).\n" " -q: Also remove quotes from the `bodyfile'.\n" " Lines starting with `>' are considered quotes.\n" " -s: Also remove signature from the `bodyfile'.\n" " The signature is all lines from the first signature separator\n" " (i.e. `-- ') to the bottom of the message.\n" " -v: Print version and exit.\n" msgstr "" #: newsbody_read.c:109 msgid "found marker for a removed line in the body file,\n" "but cannot find a corresponding line in the message file" msgstr "" #: header.c:53 msgid "internal error while reading a header continuation" msgstr "" #: lib.c:37 lib.c:47 msgid "could not allocate memory" msgstr "无法分配内存" #: lib.c:70 msgid "reading file" msgstr "" #: lib.c:95 msgid "writing file" msgstr "" #: lib.c:103 #, c-format msgid "open %s for reading" msgstr "" #: lib.c:112 #, c-format msgid "open %s for writing" msgstr "" #: lib.c:119 msgid "closing file" msgstr "" #: lib.c:128 lib.c:135 msgid "making temporary filename" msgstr "" #: lib.c:144 #, c-format msgid "unlink %s" msgstr "" #: lib.c:152 #, c-format msgid "rename %s %s" msgstr "" #: lib.c:165 #, c-format msgid "stat %s" msgstr "" #: lib.c:174 #, c-format msgid "read from %s" msgstr "" #: lib.c:176 #, c-format msgid "write to %s" msgstr "" #: lib.c:204 msgid "error in child process" msgstr "子进程中出现错误" #: lib.c:204 msgid "error" msgstr "错误" #: lib.c:215 #, c-format msgid ", errno = %d" msgstr "" #: exec.c:38 exec.c:93 msgid "fork" msgstr "" #: exec.c:54 msgid "open terminal read" msgstr "" #: exec.c:56 exec.c:106 msgid "dup2 stdin" msgstr "" #: exec.c:58 msgid "close extra terminal read fd" msgstr "" #: exec.c:63 msgid "open terminal write" msgstr "" #: exec.c:65 exec.c:113 msgid "dup2 stdout" msgstr "dup2 标准输出" #: exec.c:67 msgid "close extra terminal write fd" msgstr "" #: exec.c:70 exec.c:118 #, c-format msgid "exec %s" msgstr "" #: exec.c:87 msgid "pipe for output" msgstr "" #: exec.c:89 msgid "pipe for input" msgstr "" #: exec.c:104 msgid "close write end of output pipe" msgstr "" #: exec.c:108 exec.c:123 msgid "close read end of output pipe" msgstr "" #: exec.c:111 msgid "close read end of input pipe" msgstr "" #: exec.c:115 exec.c:128 msgid "close write end of input pipe" msgstr "" #: exec.c:125 msgid "fdopen write end of output pipe" msgstr "" #: exec.c:130 msgid "fdopen read end of input pipe" msgstr "" #: exec.c:138 msgid "waiting for child" msgstr "正在等待子进程" spellutils-0.7+debian/pospell.1000066400000000000000000000052721434244546200165540ustar00rootroot00000000000000.TH pospell 1 "APRIL 2000" Unix "User Manuals" .SH NAME pospell \- Run a program on the translation strings of a .po-file .SH SYNOPSIS .B pospell [-l .I language .B ] [-fsv] .B -n .I pofile .B -p .I program .B [-- [ .I arguments... .B ]] .SH DESCRIPTION .B pospell copies the translations from the .I pofile to a temporary file (called the .IR spellfile ) and then calls .I program with its .IR arguments . .I program is supposed to somehow change the .IR spellfile . It is typically a spell checker. Afterwards the possibly changed translations in .I spellfile is copied back into the .IR pofile . .PP If .I pofile is specified as .I \- then .B pospell will act as a filter, i.e. standard input and standard output will be used. .PP .B %f in the .I arguments will be expanded to the name of the .IR spellfile , or .B \- if the -f option is used. Use .B %% for a real % character. All comment lines in the .I pofile are replaced with lines with "#" as the only character in the .IR spellfile . The msgid strings with original text in the .I pofile are replaced with lines with ">" and "]" as the only characters in the .IR spellfile . The msgstr strings with file headers (i.e. strings without corresponding msgid strings) are replaced with lines with ")" and "]" as the only characters in the .IR spellfile . Don't change or remove these lines from the .I spellfile - they are used when the .I spellfile and the .I pofile are merged together after running the .IR program . The normal msgstr strings are copied to the .I spellfile with some changes: 1) The word msgstr and everything else before the string is replaced by a "+" character. 2) Strings with C escape sequences followed by a letter like "one\\ttwo" are split to parts like "one\\t" "two". 3) Leading whitespace in continuation lines is removed. The changes of kind 1) and 2) are undone when the .I spellfile is copied back into the .IR pofile , but removed whitespace will not be restored. .SH OPTIONS .IP -f The called program is a filter so don't make a temporary file, but pipe the .I spellfile to its standard input and read it back from its standard output. .IP -l\ language Only translations with the indicated language code are copied to the .IR spellfile . .IP -s Quit with an error message if unrecognized items are found in the .I pofile or .IR spellfile . .IP -v Print the version and exit. .SH FILES .B pospell uses one or two temporary files with names given by the .BR mkstemp (3) or the .BR tmpnam (3) function. .SH BUGS If some system call gives an unexpected error .B pospell will stop immediately with an error message leaving its temporary files. .SH AUTHOR Byrial Jensen .SH SEE ALSO The GNU gettext utilities. .BR newsbody (1). spellutils-0.7+debian/pospell.c000066400000000000000000000170121434244546200166310ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" /* Include config.h first as it may include definitions like _GNU_SOURCE which * affect what system headers may define and declare. */ #endif #include #include #include const char *Name = "pospell"; #define NAME_DECLARED #include "pospell.h" #ifdef HAVE_GETOPT /* * Systems which have the getopt function should declare it in * unistd.h, but the declaration is reported to be in unistd.h * in an AIX system. * It should be safe to include both to be sure... */ #include #include #else #include "getopt.h" #endif #include /* Static functions in this file */ static void parse_commandline (int argc, char *argv[]); static void usage (void); static void expand_argv (char *argv[], char *filename); static void check_child (void); /* These variables are set by parse_commandline() and used by main() */ static char *newsfile_name = NULL; static char *program = NULL; static int filter = 0; static int printversion = 0; static int strict = 0; static char *lang = NULL; static char **new_argv; int main (int argc, char *argv[]) { int use_stdin = 0; FILE *newsfile; FILE *newsfile_copy; char *bodyfile_name = NULL; FILE *bodyfile_r; FILE *bodyfile_w; char *mergefile_name = NULL; FILE *mergefile; #if defined(MAINLOOP) volatile int w = 1; while (w); #endif setlocale (LC_ALL, ""); #ifdef ENABLE_NLS bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif parse_commandline (argc, argv); if (printversion) { printf ("%s (" PACKAGE ") " VERSION "\n", Name); return 0; } if (!strcmp (newsfile_name, "-")) { use_stdin = 1; newsfile_name = nb_tmpnam (); newsfile_copy = open_write (newsfile_name); newsfile = stdin; mergefile = stdout; } else { newsfile_copy = NULL; newsfile = open_read (newsfile_name); mergefile_name = nb_tmpnam (); mergefile = open_write (mergefile_name); } if (filter) { expand_argv (new_argv, "-"); exec_filter (new_argv, &bodyfile_w, &bodyfile_r); writebody (newsfile, newsfile_copy, bodyfile_w, strict, lang); newsfile = open_read (newsfile_name); readbody (newsfile, bodyfile_r, mergefile, strict); check_child (); } else { bodyfile_name = nb_tmpnam (); bodyfile_w = open_write (bodyfile_name); expand_argv (new_argv, bodyfile_name); writebody (newsfile, newsfile_copy, bodyfile_w, strict, lang); exec_program (new_argv); check_child (); newsfile = open_read (newsfile_name); bodyfile_r = open_read (bodyfile_name); readbody (newsfile, bodyfile_r, mergefile, strict); } if (use_stdin) nb_unlink (newsfile_name); else nb_rename (mergefile_name, newsfile_name); if (!filter) nb_unlink (bodyfile_name); return 0; } static void parse_commandline (int argc, char *argv[]) { int option; char **ap; do { option = getopt (argc, argv, "fl:n:p:sv"); switch (option) { case 'f': filter = 1; break; case 'l': if (lang) nb_error (0, _("only one -l option is allowed")); lang = optarg; break; case 'n': newsfile_name = optarg; break; case 'p': program = optarg; break; case 's': strict = 1; break; case 'v': printversion = 1; return; /* no more checking needed */ case ':': /* option with missing parameter */ case '?': /* unknown option */ usage (); case EOF: /* no more options */ break; default: /* all possible cases should have been stated */ nb_error (0, _("getopt returned impossible value: %d ('%c')"), option, option); } } while (option != EOF); if (newsfile_name == NULL || program == NULL) usage (); new_argv = nb_malloc ((argc - optind + 2) * sizeof (char *)); new_argv[0] = program; argv += optind; ap = new_argv + 1; while ((*(ap ++) = *(argv ++)) != NULL) ; } static void usage() { fputs ( _("Usage: pospell [-fsv] [-l language] -n pofile -p program\n" " [-- [program-arguments...]]\n" "\n" "Copies all translated strings from `pofile' to a temporary\n" "file (the `spellfile') and then calls the program `program'\n" "(typically a spell checker) with all `program-arguments'.\n" "Afterwards the possibly changed translation is copied back\n" "into the `pofile'.\n" "\n" "If `pofile' is specified as `-', pospell will use its standard\n" "input and standard output.\n" "\n" "`%f' in the `program arguments' will be expanded to the name of\n" "the `spellfile'. Escape single percent sign with two characters\n" "(%%).\n" "\n" "The flags mean:\n" " -f: The called program is a filter so don't make a temporary\n" " file, but pipe `spellfile' to the standard input of the\n" " `program' and later read it back from its standard output.\n" " -l language: Only translations with the indicated language code\n" " are copied to the `spellfile'.\n" " -s: quit with an error message if the `pofile' or `spellfile'\n" " have unrecognized formats.\n" " -v: Print version and exit.\n"), stderr); exit (1); } static void expand_argv (char *argv[], char *filename) { char *argument; char *new_argument; char *c; int offset; while ((argument = *(++ argv)) != NULL) { offset = 0; while ((c = strchr (argument + offset, '%')) != NULL) { switch (*(c + 1)) { case 'f': /* We have a menory leak here when a argument have more than one %f, * but I don't care because this seldom happens and when it does not * much memory will be wasted */ new_argument = nb_malloc (strlen (argument) + strlen (filename) - 1); *c = 0; strcpy (new_argument, argument); strcat (new_argument, filename); offset = strlen (new_argument); argument = strcat (new_argument, c + 2); break; case '%': c ++; offset = c - argument; do *(c - 1) = *c; while (*(c ++)); break; default: offset = c + 1 - argument; } } *argv = argument; } } static void check_child () { int status = nb_wait (); if (WIFSIGNALED (status)) { #ifdef HAVE_STRSIGNAL nb_error (0, _("%s died with signal \"%s\""), program, strsignal (WTERMSIG (status))); #else nb_error (0, _("%s died with signal no. %d"), program, WTERMSIG (status)); #endif } else if (WIFEXITED (status)) { status = WEXITSTATUS (status); if (status == 128) nb_error (0, _("child process couldn't execute %s"), program); else if (status) nb_error (0, _("%s returned failure exit code %d"), program, status); } else nb_error (0, _("impossible status from child process: %x"), status); } spellutils-0.7+debian/pospell.h000066400000000000000000000020541434244546200166360ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "lib.h" /* Functions in pospell_write.c */ void writebody (FILE *pofile, FILE *pofile_copy, FILE *spellfile, int strict, char *lang); /* Functions in pospell_read.c */ void readbody (FILE *pofile, FILE *spellfile, FILE *mergefile, int strict); spellutils-0.7+debian/pospell_read.c000066400000000000000000000066541434244546200176360ustar00rootroot00000000000000/* * Copyright (C) 2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "pospell.h" /* Static functions in this file */ static void do_body (FILE *pofile, FILE *spellfile, FILE *mergefile, int strict); static void unsplit (char *src, char *dest); void readbody (FILE *pofile, FILE *spellfile, FILE *mergefile, int strict) { do_body (pofile, spellfile, mergefile, strict); nb_close (pofile); nb_close (spellfile); nb_close (mergefile); } static void do_body (FILE *pofile, FILE *spellfile, FILE *mergefile, int strict) { char *line = NULL; char *poline = NULL; size_t len = 0; size_t poline_len = 0; char type; char *c; while ((line = read_line (line, &len, spellfile)) != NULL) { if (poline_len < len) { /* Need room to call unsplit() */ poline_len = len; poline = nb_realloc (poline, poline_len); } if (*line == '#' || *line == '>' || *line == ')' || *line == ']' || *line == '+') { type = *line; while (1) { poline = read_line (poline, &poline_len, pofile); if (!line) nb_error (0, _("found marker for a removed item in the spell file,\n" "but cannot find a corresponding item in the po file")); for (c = poline ; *c == ' ' || *c == '\t' ; c++) ; if (type == '#') { if (*c == '#') break; } else if (type == '>') { if (strncmp (c, "msgid", 5) == 0) break; } else if (type == ')' || type == '+') { if (strncmp (c, "msgstr", 6) == 0) break; } else /* type == ']' */ { if (*c == '"') break; } } if (type == '+') { char *q = strchr (c, '"'); if (q) *q = '\0'; else c[strlen (c) - 1] = '\0'; /* Removes \n from string */ write_line (poline, mergefile); unsplit (line, poline); } write_line (poline, mergefile); } else if (*line == '"') { unsplit (line, poline); write_line (poline, mergefile); } else if (*line == '\n') write_line (line, mergefile); else if (*line == '?' && !strict) { if (line[1] == '\n') write_line (line + 1, mergefile); else write_line (line + 2, mergefile); } else { line[strlen (line) - 1] = '\0'; nb_error (0, _("found line with unknown content in the spell file:\n" "%s"), line); } } } /* * Remove leading text and unsplit splitted source strings */ static void unsplit (char *src, char *dest) { while (*src && *src != '"') src++; while ((*(dest++) = *(src++))) { if (*src == '\\') { *(dest++) = *(src++); if (*src) continue; else break; } if (src[0] == '"' && src[1] == ' ' && src[2] == '"') src += 3; } } spellutils-0.7+debian/pospell_write.c000066400000000000000000000077101434244546200200470ustar00rootroot00000000000000/* * Copyright (C) 1998-2000 Byrial Jensen * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include "pospell.h" /* Static functions in this file: */ static void do_body (FILE *pofile, FILE *pofile_copy, FILE *spellfile, int strict, char *lang); static void split (char *src, char *dest); void writebody (FILE *pofile, FILE *pofile_copy, FILE *spellfile, int strict, char *lang) { do_body (pofile, pofile_copy, spellfile, strict, lang); if (pofile != stdin) nb_close (pofile); if (pofile_copy) nb_close (pofile_copy); nb_close (spellfile); } static void do_body (FILE *pofile, FILE *pofile_copy, FILE *spellfile, int strict, char *lang) { char *line = NULL; char *split_line = NULL; size_t len = 0; size_t split_line_len = 0; int in_msgid = 0; int msgid_have_content = 0; int right_language = 0; int in_msgstr = 0; char *c; char marker[3] = "\0\n\0"; while (1) { line = read_line (line, &len, pofile); if (!line) { if (split_line) free (split_line); return; } if (pofile_copy) write_line (line, pofile_copy); if (len * 2 > split_line_len) { /* make room to call split() */ split_line_len = len * 2; split_line = nb_realloc (split_line, split_line_len); } for (c = line ; *c == ' ' || *c == '\t' ; c++) ; if (*c == '#') { marker[0] = '#'; } else if (!strncmp (c, "msgid", 5)) { char *q = strchr (c, '"'); in_msgid = 1; msgid_have_content = (q && *(q + 1) != '"') ? 1 : 0; in_msgstr = 0; marker[0] = '>'; } else if (in_msgid && *c == '"') { msgid_have_content = 1; marker[0] = ']'; } else if (!strncmp (c, "msgstr", 6)) { in_msgstr = 1; in_msgid = 0; right_language = 1; if (lang) { char *q = strstr (c + 6, lang); if (!q || q > strchr (c + 6, '"')) right_language = 0; } if (msgid_have_content && right_language) { split (c, split_line); write_line ("+ ", spellfile); write_line (split_line, spellfile); } else { marker[0] = ')'; } } else if (in_msgstr && *c == '"') { if (msgid_have_content && right_language) { split (c, split_line); write_line (split_line, spellfile); } else { marker[0] = ']'; } } else if (*c == '\n') { write_line (c, spellfile); } else { if (strict) { c[strlen (c) - 1] = '\0'; nb_error (0, _("I don't understand this line in the .po file:\n" "%s"), line); } write_line ("? ", spellfile); write_line (line, spellfile); } if (marker[0]) { write_line (marker, spellfile); marker[0] = 0; } } } /* * Remove leading text and split the source string after C escape sequences * followed by a letter. */ static void split (char *src, char *dest) { char c; while (*src && *src != '"') src++; while ((c = *(dest++) = *(src++))) { if (c == '\\') { c = *(dest++) = *(src++); if (!c) break; if (c >= 'a' && c <= 'v' && isalpha (*src)) { *(dest++) = '"'; *(dest++) = ' '; *(dest++) = '"'; } } } }