diff options
author | Antti-Juhani Kaijanaho <ajk@debian.org> | 2006-01-28 21:36:33 +0100 |
---|---|---|
committer | Antti-Juhani Kaijanaho <ajk@debian.org> | 2006-01-28 21:36:33 +0100 |
commit | c7c692f302591a6736aa160c83da9744f794cf35 (patch) | |
tree | 774dbba691ecf0f8b321608d42bd5d060ef45d5b | |
parent | 924fbb490a143dd786f2bcbed8f3b0f3a279c5e0 (diff) | |
download | dctrl-tools-c7c692f302591a6736aa160c83da9744f794cf35.tar.gz |
Import 2.1.0
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | debian/changelog | 16 | ||||
-rw-r--r-- | grep-dctrl.1.cp | 22 | ||||
-rw-r--r-- | grep-dctrl.c | 18 | ||||
-rw-r--r-- | po/README.Translators | 41 | ||||
-rw-r--r-- | po/ca.po | 44 | ||||
-rw-r--r-- | po/fi.po | 45 |
7 files changed, 134 insertions, 54 deletions
@@ -1,2 +1,2 @@ Antti-Juhani Kaijanaho - +Jordi Mallach (Catalan translation, copyright disclaimed)
\ No newline at end of file diff --git a/debian/changelog b/debian/changelog index abd84e9..9d5ca6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +grep-dctrl (2.1.0) unstable; urgency=low + + * Creating a 2.1 maintenance branch - patchlevel added to version number. + * grep-dctrl.c (main): Use C99 %zi and not %i to print out size_t + (size mismatch on 64-bit archs). + Closes: #226569 (printf format problem in grep-dctrl.c) + * grep-dctrl.c (struct arguments, enter_atom, parse_opt), + grep-dctrl.1.cp (DIAGNOSTICS): Treat ')' on command line as a "soft" + '--'; ie. if ')' is followed by a connective, continue predicate, + otherwise finish it. + Closes: #226477 (Misparses a file name following a closing paren as a + pattern) + * Catalan translation updated by Jordi Mallach. + + -- Antti-Juhani Kaijanaho <ajk@debian.org> Tue, 13 Jan 2004 20:14:43 +0200 + grep-dctrl (2.0) unstable; urgency=low * The Polish Release. diff --git a/grep-dctrl.1.cp b/grep-dctrl.1.cp index d958861..1da9032 100644 --- a/grep-dctrl.1.cp +++ b/grep-dctrl.1.cp @@ -1,4 +1,4 @@ -.TH GREP-DCTRL 1 2004-01-03 "Debian Project" "Debian user's manual" +.TH GREP-DCTRL 1 2004-01-13 "Debian Project" "Debian user's manual" \" Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 \" Antti-Juhani Kaijanaho <gaia@iki.fi> \" Permission is granted to make and distribute verbatim copies of @@ -362,13 +362,6 @@ There were more opening than closing parentheses in the given predicate. .IP "no such log level" The argument to -l was invalid. -.IP "unexpected ')' in command line" -There was no opening parenthesis that would match some closing -parenthesis in the command line. -.IP "unexpected end of file" -The input file is broken: it ends before it should. -.IP "unexpected end of line" -The input file is broken: a line ends before it should. .IP "predicate is too complex" The predicate's complexity (the number of atoms and connectives) exceed compile-time limits. @@ -388,6 +381,19 @@ compile-time limit. .IP "too many output fields" The argument to -s had too many field names in it. This number is limited to 256. +.IP "unexpected ')' in command line" +There was no opening parenthesis that would match some closing +parenthesis in the command line. +.IP "unexpected end of file" +The input file is broken: it ends before it should. +.IP "unexpected end of line" +The input file is broken: a line ends before it should. +.IP "Unexpected atom in command line. Did you forget to use a connective?" +There was an atom on the command line where there should not be any. +The most likely reason is that an atom modifier option (such as -F) +follows directly after a closing parenthesis. Adding a connective +(--and, --or) between the parenthesis and the option is often the +correct solution. .SH FILES .IP SYSCONF/grep-dctrl.rc See the next file. diff --git a/grep-dctrl.c b/grep-dctrl.c index ead083e..3fbeffe 100644 --- a/grep-dctrl.c +++ b/grep-dctrl.c @@ -155,6 +155,8 @@ static int debug_optparse = 0; struct arguments { /* Parser state, used when parsing the predicate. */ enum state state; + /* Parser state flag: last token seen was ')' */ + bool just_seen_cparen; /* Top of the parser stack. */ size_t top; /* Number of file names seen. */ @@ -319,14 +321,19 @@ static void finish(struct arguments * args) args->state = STATE_FINISHED; } -#define ENTER_ATOM (enter_atom((args))) +#define ENTER_ATOM (enter_atom((args),(just_seen_cparen))) /* If necessary, enter STATE_ATOM and allocate a new atom, pushing * along with the old state a PUSH instruction for the new atom to the * parser stack. If we are already in STATE_ATOM, reuse the current * atom. */ -static struct atom * enter_atom(struct arguments * args) +static struct atom * enter_atom(struct arguments * args, bool just_seen_cparen) { + if (just_seen_cparen) { + message(L_FATAL, _("Unexpected atom in command line. " + "Did you forget to use a connective?"), 0); + fail(); + } struct atom * rv; if (args->state == STATE_ATOM || args->state == STATE_FINISHED) { assert(args->p.num_atoms > 0); @@ -350,6 +357,8 @@ static struct atom * enter_atom(struct arguments * args) static error_t parse_opt (int key, char * arg, struct argp_state * state) { struct arguments * args = state->input; + bool just_seen_cparen = args->just_seen_cparen; + args->just_seen_cparen = false; struct atom * atom; debug_message("parse_opt", 0); switch (key) { @@ -493,6 +502,7 @@ static error_t parse_opt (int key, char * arg, struct argp_state * state) leave(args, 0); } leave(args, 1); + args->just_seen_cparen = true; break; } if (args->state == STATE_FINISHED) { @@ -506,7 +516,7 @@ static error_t parse_opt (int key, char * arg, struct argp_state * state) args->fname[args->num_fnames++] = s; break; } - if (strcmp(arg, "--") == 0) { FINISH; break; } + if (just_seen_cparen || strcmp(arg, "--") == 0) { FINISH; break; } atom = ENTER_ATOM; if (atom->pat != 0) { FINISH; goto redo; } atom->patlen = strlen(arg); @@ -708,7 +718,7 @@ int main (int argc, char * argv[]) if (fd != STDIN_FILENO) close(fd); } - if (count) printf("%d\n", count); + if (count) printf("%zi\n", count); return errors_reported() ? 2 : found ? 0 : 1; } diff --git a/po/README.Translators b/po/README.Translators new file mode 100644 index 0000000..1fea312 --- /dev/null +++ b/po/README.Translators @@ -0,0 +1,41 @@ + GUIDELINES FOR TRANSLATORS + 2004-01-12 + +Policy +------ + +Please familiarize yourself with the Translation Project +(http://www.iro.umontreal.ca/translation/HTML/index.html) and the +practices of your particular language team, if you haven't already +done that. We do not use the Translation Project's mechanisms, but it +is useful to standardize on terminology and style. + +Please consider signing and submitting a copyright disclaimer for your +translations (see +http://www.iro.umontreal.ca/translation/HTML/disclaim.html). Note +that the effect of a copyright disclaimer is that your translation +work is effectively placed in the public domain. It does NOT transfer +your copyrights to the FSF or anyone else. We do not require a +copyright disclaimer at this time, but we do recommend it. + +Translators should subscribe to dctrl-tools-i18n +(http://lists.alioth.debian.org/mailman/listinfo/dctrl-tools-i18n). +It will contain requests for updates of the translations, and perhaps +occasionally discussion related to internationalization. + + +Technical stuff +--------------- + +You can get an up-to-date .pot file by saying "make pot" in the +distribution root directory (the parent directory of this file). +Running "make po" merges the new pot with the known po files (bringing +the msgids up to date). Do NOT commit the pot to CVS (it is a +generated file and thus does not belong under version control). + +You need to add your language to ../langs.mk for the makefile magic to +work. + +Do not touch the C sources without consulting AJK first. + + @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dctrl-tools\n" "Report-Msgid-Bugs-To: ajk@debian.org\n" -"POT-Creation-Date: 2004-01-06 20:55+0200\n" -"PO-Revision-Date: 2004-01-06 16:37+0100\n" +"POT-Creation-Date: 2004-01-13 00:47+0200\n" +"PO-Revision-Date: 2004-01-13 13:31+0100\n" "Last-Translator: Jordi Mallach <jordi@debian.org>\n" "Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n" "MIME-Version: 1.0\n" @@ -116,77 +116,81 @@ msgstr "Depura l'anàlisi d'opcions." msgid "No output to stdout" msgstr "No mostra res a l'eixida estàndard" -#: grep-dctrl.c:205 grep-dctrl.c:275 grep-dctrl.c:336 predicate.c:39 +#: grep-dctrl.c:207 grep-dctrl.c:277 grep-dctrl.c:343 predicate.c:39 msgid "predicate is too complex" msgstr "el predicat és massa complex" -#: grep-dctrl.c:237 +#: grep-dctrl.c:239 msgid "A pattern is mandatory." msgstr "Es necessita un patró." -#: grep-dctrl.c:296 +#: grep-dctrl.c:298 msgid "syntax error in command line" msgstr "hi ha un error de sintaxi a la línia d'ordres" -#: grep-dctrl.c:313 +#: grep-dctrl.c:315 msgid "missing ')' in command line" msgstr "manca un «)» en la línia d'ordres" -#: grep-dctrl.c:401 +#: grep-dctrl.c:333 +msgid "Unexpected atom in command line. Did you forget to use a connective?" +msgstr "S'ha trobat un àtom inesperat en la línia d'ordres. Heu oblidat utilitzar un connector?" + +#: grep-dctrl.c:410 msgid "no such log level" msgstr "aquest nivell de registre no existeix" -#: grep-dctrl.c:440 grep-dctrl.c:449 +#: grep-dctrl.c:449 grep-dctrl.c:458 msgid "inconsistent atom modifiers" msgstr "els modificadors d'àtom no són consistents" -#: grep-dctrl.c:490 +#: grep-dctrl.c:499 msgid "unexpected ')' in command line" msgstr "s'ha trobat un «)» inesperat a la línia d'ordres" -#: grep-dctrl.c:501 +#: grep-dctrl.c:511 msgid "too many file names" msgstr "hi ha massa noms de fitxers" -#: grep-dctrl.c:589 +#: grep-dctrl.c:599 msgid "a predicate is required" msgstr "es requereix un predicat" -#: grep-dctrl.c:595 +#: grep-dctrl.c:605 msgid "too many output fields" msgstr "hi ha massa camps d'eixida" -#: grep-dctrl.c:599 +#: grep-dctrl.c:609 msgid "Adding \"Description\" to selected output fields because of -d" msgstr "" "S'està afegint «Description» als camps d'eixida seleccionats a causa de -d" -#: grep-dctrl.c:608 +#: grep-dctrl.c:618 msgid "cannot suppress field names when showing whole paragraphs" msgstr "no es pot suprimir els noms de camp quan es mostren paràgrafs sencers" -#: grep-dctrl.c:648 +#: grep-dctrl.c:658 #, c-format msgid "%s: %s: cannot stat: %s\n" msgstr "%s: %s: no es pot fer stat(): %s\n" -#: grep-dctrl.c:657 +#: grep-dctrl.c:667 msgid "is a directory, skipping" msgstr "és un directori, s'està ometent" -#: grep-dctrl.c:658 +#: grep-dctrl.c:668 msgid "is a block device, skipping" msgstr "és un dispositiu de bloc, s'està ometent" -#: grep-dctrl.c:659 +#: grep-dctrl.c:669 msgid "internal error" msgstr "s'ha produït un error intern" -#: grep-dctrl.c:660 +#: grep-dctrl.c:670 msgid "is a socket, skipping" msgstr "és un sòcol, s'està ometent" -#: grep-dctrl.c:661 +#: grep-dctrl.c:671 msgid "unknown file type, skipping" msgstr "el tipus de fitxer és desconegut, s'està ometent" @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dctrl-tools\n" "Report-Msgid-Bugs-To: ajk@debian.org\n" -"POT-Creation-Date: 2004-01-06 20:55+0200\n" -"PO-Revision-Date: 2004-01-06 19:45+0200\n" +"POT-Creation-Date: 2004-01-13 00:47+0200\n" +"PO-Revision-Date: 2004-01-13 00:50+0200\n" "Last-Translator: Antti-Juhani Kaijanaho <ajk@debian.org>\n" "Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n" "MIME-Version: 1.0\n" @@ -114,77 +114,81 @@ msgstr "Testaa valitsimien jäsennyst�." msgid "No output to stdout" msgstr "Älä tulosta mitään vakiotulostevirtaan" -#: grep-dctrl.c:205 grep-dctrl.c:275 grep-dctrl.c:336 predicate.c:39 +#: grep-dctrl.c:207 grep-dctrl.c:277 grep-dctrl.c:343 predicate.c:39 msgid "predicate is too complex" msgstr "predikaatti on liian monimutkainen" -#: grep-dctrl.c:237 +#: grep-dctrl.c:239 msgid "A pattern is mandatory." msgstr "Hakuehto on välttämätön." -#: grep-dctrl.c:296 +#: grep-dctrl.c:298 msgid "syntax error in command line" msgstr "komentorivillä on syntaksivirhe" -#: grep-dctrl.c:313 +#: grep-dctrl.c:315 msgid "missing ')' in command line" msgstr "komentoriviltä puuttuu ')'" -#: grep-dctrl.c:401 +#: grep-dctrl.c:333 +msgid "Unexpected atom in command line. Did you forget to use a connective?" +msgstr "Odottamaton atomi komentorivillä. Unohditko konnektiivin jostain?" + +#: grep-dctrl.c:410 msgid "no such log level" msgstr "ei sellaista seurantatasoa ole" -#: grep-dctrl.c:440 grep-dctrl.c:449 +#: grep-dctrl.c:449 grep-dctrl.c:458 msgid "inconsistent atom modifiers" msgstr "ristitiitaiset atomin määritteet" -#: grep-dctrl.c:490 +#: grep-dctrl.c:499 msgid "unexpected ')' in command line" msgstr "odottamaton ')' komentorivill�" -#: grep-dctrl.c:501 +#: grep-dctrl.c:511 msgid "too many file names" msgstr "liikaa tiedostonimiä" -#: grep-dctrl.c:589 +#: grep-dctrl.c:599 msgid "a predicate is required" msgstr "predikaatti on välttämätön" -#: grep-dctrl.c:595 +#: grep-dctrl.c:605 msgid "too many output fields" msgstr "liikaa tulostettavia kenttiä" -#: grep-dctrl.c:599 +#: grep-dctrl.c:609 msgid "Adding \"Description\" to selected output fields because of -d" msgstr "Merkitsen \"Description\"-kentän tulostettavaksi -d-valitsimen takia" -#: grep-dctrl.c:608 +#: grep-dctrl.c:618 msgid "cannot suppress field names when showing whole paragraphs" msgstr "" "en voi jättää näyttämättä kenttien nimiä, kun näytän kokonaisia tietueita" -#: grep-dctrl.c:648 +#: grep-dctrl.c:658 #, c-format msgid "%s: %s: cannot stat: %s\n" msgstr "%s: %s: stat-kutsu epäonnistui: %s\n" -#: grep-dctrl.c:657 +#: grep-dctrl.c:667 msgid "is a directory, skipping" msgstr "on hakemisto, jätän huomiotta" -#: grep-dctrl.c:658 +#: grep-dctrl.c:668 msgid "is a block device, skipping" msgstr "on lohkolaite, jätän huomiotta" -#: grep-dctrl.c:659 +#: grep-dctrl.c:669 msgid "internal error" msgstr "ohjelman oma virhe" -#: grep-dctrl.c:660 +#: grep-dctrl.c:670 msgid "is a socket, skipping" msgstr "on pistoke, jätän huomiotta" -#: grep-dctrl.c:661 +#: grep-dctrl.c:671 msgid "unknown file type, skipping" msgstr "tuntematon tiedostotyyppi, jätän huomiotta" @@ -223,4 +227,3 @@ msgstr "kyllä, käytän ohjelmannimeä" #: rc.c:133 msgid "default input file" msgstr "oletussyötetiedosto" - |