summaryrefslogtreecommitdiff
path: root/grep-dctrl
AgeCommit message (Collapse)AuthorFilesLines
2013-07-10Include config.hIgor Pashev1-0/+3
2012-07-14grep-dctrl: Extract print_para out of main.Antti-Juhani Kaijanaho1-34/+35
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2012-07-14grep-dctrl: Move is_show_field and backup_field to fieldtrieAntti-Juhani Kaijanaho1-14/+6
This gets rid of the silly bit fiddling macros. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2012-06-09lib/fsaf.c and others: Remove mmap support (recognize but ignore --mmap).Antti-Juhani Kaijanaho1-1/+1
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2012-06-08Add -Wextra to non-package builds (and clean up the resulting warnings).Antti-Juhani Kaijanaho1-34/+34
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2012-04-22grep-dctrl: Allow distributing atom modifiers over a parenthesed predicate.Antti-Juhani Kaijanaho1-68/+88
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2012-04-22Move the fields array from parse_prim to a library (strlist).Antti-Juhani Kaijanaho1-36/+37
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2012-04-21Document the predicate parser's grammar in commentsAntti-Juhani Kaijanaho1-1/+31
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-12-18grep-dctrl: Hardcode default input file names.Antti-Juhani Kaijanaho4-275/+22
Until now, grep-dctrl has used a configuration file to determine which input file it should use by default. Originally, this was motivated by a desire not to step too much into the toes of dpkg maintainers - it allowed the fiction that this package doesn't in fact depend on dpkg's internal interfaces. Over the last decade, however, this consideration has became essentially moot, and the status and available files are effectively public interfaces. Now, theoretically, this configurability could be in use by someone. However, the same functionality is available by using shell functions and shell scripts. I twice called for actual use cases for this feature, explicitly threatening to remove this feature if nobody stepped up. Nobody did. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-12-18Remove the old annoying banner code.Antti-Juhani Kaijanaho1-53/+0
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-12-14Bug #652034: Handle multiple instances of the same field gracefully.Antti-Juhani Kaijanaho1-24/+26
For grep-dctrl, this means having -F search for all of the same-name fields disjunctively. The -s option selects all same-name fields for printing. For the other tools, all but the first are ignored. No string changes, so committing to maint-2.20 for release with 2.20.1. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-12-08(en) Runtime strings review by Justin B RyeDavid Prévot2-3/+3
<20111208103543.GA24436@xibalba.demon.co.uk>
2011-12-07Use of Policy compliant relationsDavid Prévot1-2/+2
2011-12-07Consistently avoid use of CS vocabularyDavid Prévot1-12/+12
Since almost all CS vocabulary was removed from manual pages as pointed in #325169, the only remaining parts seems to be in the program messages.
2011-11-27Fix #641255: Output even a zero count (and exit successfully)Antti-Juhani Kaijanaho1-2/+2
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-11-13Partially revert fix for #525525 and add a migration path to itAntti-Juhani Kaijanaho1-4/+16
The original fix for #525525 was a cold-turkey change in behavior. This caused problems and drew objections. Here, the idea is to revert that change and add a migration path to it. An option --ensure-dctrl is added, whose states semantics is to ensure that the output format is in dctrl format. It will be ignored if -n is also given, as that deliberately asks for non-dctrl output. In practical terms, --ensure-dctrl makes the paragraph separator unconditional, as the cold turkey change (in the absence of -n). The idea is that people who prefer the new behaviour can set up shell aliases or other similar mechanisms that use --ensure-dctrl by default. Another option, --compat is added to allow people who dislike the new behaviour to make sure that they continue to receive it. A --compat option will countermand any previous --ensure-dctrl. Thus a user can put it in a shell alias, which will then continue to deliver the old semantics even after --ensure-dctrl is made default. The idea is that eventually --ensure-dctrl will become normal behaviour and the switch becomes a no-op. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-22Fix test 0020Antti-Juhani Kaijanaho1-0/+1
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-22Add some debugging of the lexer/parser.Antti-Juhani Kaijanaho1-41/+57
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-20Rewrite the paragraph logic to use a tree structure.Antti-Juhani Kaijanaho1-68/+37
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-19Move atom parsing from the lexer to the parser.Antti-Juhani Kaijanaho1-212/+229
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-19Move atom into its own lib module.Antti-Juhani Kaijanaho1-2/+3
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-19Clean up some cruftAntti-Juhani Kaijanaho1-27/+0
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-07-28#209134: Print the field name as in the paragraph, not as on command lineAntti-Juhani Kaijanaho1-1/+6
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-07-28#525525: grep-dctrl/grep-dctrl.c: Output a stanza separator unconditionallyAntti-Juhani Kaijanaho1-2/+6
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-07-23Importing 2.18ubuntu1Antti-Juhani Kaijanaho1-9/+9
2010-09-11tbl-dctrl: Figure out the fields from the input if no '-c' is given.Antti-Juhani Kaijanaho1-5/+8
Closes: #596424 reported by myself Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2010-08-08grep-dctrl: Make a help string more comprehensibleAntti-Juhani Kaijanaho1-2/+2
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-12-12Update FSF address in license blurbs all over the source tree.Antti-Juhani Kaijanaho3-10/+9
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-08-08Fix Debian bug #511022.Antti-Juhani Kaijanaho1-0/+1
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-04-16grep-dctrl: add new mode for exact package name matchingStefano Zacchiroli1-0/+10
Add to grep-dctrl the new matching mode --whole-pkg / -w. It behaves as -e (extended regexp matching), but matches over exact package names, thus avoiding sub-package name matching. Closes: #383921 Signed-off-by: Stefano Zacchiroli <zack@debian.org>
2009-01-06Fix #506138 by forbidding such messed up command lines.Antti-Juhani Kaijanaho1-0/+5
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2008-07-05msg.[ch] (and others): allow the message functions to handle format stringsAntti-Juhani Kaijanaho2-42/+43
There are some places in the code where it would simplify both the code and the translations to have message strings be printf-formatted. This change changes the message function interfaces so that they can take a variable number of arguments. This required changes at all call sites. At the same time, the key logic of the message functions is moved out of the headers, leaving only the "shall we output this" test for inlining. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2008-07-05*/*.[ch]: Use the copyright symbol instead of (c) or (C).Antti-Juhani Kaijanaho1-1/+1
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2008-07-05grep-dctrl/rc.c, lib/msg.c: Recode to UTF-8Antti-Juhani Kaijanaho1-1/+1
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2007-12-11grep-dctrl/grep-dctrl.c: don't display a field with an empty valueJon Bernard1-3/+10
Reported by Dan Jacobson <jidanni@jidanni.org> Signed-off-by: Jon Bernard <jbernard@debian.org>
2007-12-06Fix git ignore targetsJon Bernard1-0/+3
Files listed in .gitignore should not list files that are generated in specific subdirectories. Add them in the ".gitignore" file in that subdirectory instead. For example, having "grep-dctrl" in ".gitignore" causes the directory "grep-dctrl" and all of its contents to be ignored, rather than the executable which was intended. Signed-off-by: Jon Bernard <jbernard@debian.org>
2007-11-07#423375: Add a grep-debtags alias for grep-dctrlAntti-Juhani Kaijanaho1-0/+3
We'll need some sort of mechanism for @exec to affect option parsing before we can discharge the other part of the report, cloned as #448277. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2007-08-05Update copyright linesAntti-Juhani Kaijanaho2-14/+3
2007-04-11grep-dctrl/grep-dctrl.c: fix GET_BACKUP_FIELD for (size_t)-1 on machines ↵Antti-Juhani Kaijanaho1-1/+1
where sizeof(int) != sizeof(size_t)
2007-04-08grep-dctrl: new option --invert-show (-I)Antti-Juhani Kaijanaho1-39/+88
Closes: #144174 (please provide a --filter-fields option of some sort) Reported by Yann Dirson <dirson@debian.org> Merged with #264905 (show all fields except FIELD,FIELD,...) Reported by Dan Jacobson <jidanni@jidanni.org>
2006-10-26create lib/, man/ and $(program)/Antti-Juhani Kaijanaho4-0/+1143