summaryrefslogtreecommitdiffstats
path: root/usr.bin/unifdef
Commit message (Collapse)AuthorAgeFilesLines
* Sync program's usage() with manpage's SYNOPSIS.ru2005-05-212-2/+5
|
* Sync with upstream:fanf2005-03-082-52/+96
| | | | | | | | | | | Allow the user to run unifdef without defining any symbols. This is useful in conjunction with the -k flag. Fix a bug in the -s handling code that would have caused out-of-bounds array accesses. Add a -n option to insert #line directives in the output. Ignore comment markers inside string and character literals (bug reported by Amos Shapira <amos.shapira@netregistry.com.au>). More accurate copyright notices.
* Sort sections.ru2005-01-181-14/+14
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Improve expression evaluation debugging output, tidy up the handling offanf2003-07-011-22/+23
| | | | EOF, and improve the commentary about backslash-newline handling.
* Various fixes from upstream, including a bug...fanf2003-06-301-11/+18
| | | | | | | | | | | | | | | | | Fix the usage synopsis. Amend the copyright notice to reflect the fact that there's no Berkeley code left. Fix a typo in a comment, improve the descriptions of the way we use some global variables (relevant to the bug below), and note that division-by-zero has side effects so the current expression evaluator can't be trivially extended to arithmetic in its current design. Avoid hitting an abort(); /* bug */ when in "text mode" (i.e. ignoring comment state) by updating the line parser state properly. PR: 53907
* MAINTAINER line moved to MAINTAINERS file.fanf2003-06-041-2/+0
|
* Make GCC 3.3 happy with rcsid[], sccs[], and copyright[].obrien2003-05-031-3/+3
|
* mdoc(7) police: Scheduled sweep.ru2003-02-241-0/+1
|
* Sync with upstream again:fanf2003-01-203-59/+148
| | | | | | | | | | | | | | * Be less strict about multi-line preprocessor directives (e.g. those with comments hanging off the right-hand end) since they're more of a problem in practise than I expected. Prompted by phk. * Fix the handling of "ignore" symbols. * Style pedantry from OpenBSD and Ted Unangst <tedu@stanford.edu>, including some whitespace fixes and removal of strcpy() (and not including excessively strict KNF enforcement). * Fix some typos and terminological inconsistencies.
* Style fixes: brackets around the argument of return, and removal offanf2003-01-171-36/+36
| | | | | | excess space. Obtained from: OpenBSD
* Add a necessary cast, because ptrdiff_t isn't necessarily the same as int.fanf2003-01-171-1/+1
| | | | Obtained from: OpenBSD
* mdoc(7) police: markup nits.ru2002-12-231-2/+2
|
* Sync with up-stream version, including a number of bug-fixes:fanf2002-12-182-600/+506
| | | | | | | | | | | | | | | | | | | | | | | | | * The partial-evaluation of #elif sequences was broken and the spaghetti logic of its implementation was too hard to understand. I've re-done it using a straight-forward table-driven push-down automaton. * The pre-processor line parser did not allow for all of the weird places that people might put comments, which could have caused it to add syntax-errors to the output by removing a #if line containing the start- or end-marker of a comment. * The lexer didn't need to special-case the handling of string-literals or character-constants, but it did need to learn about line-continuations (backslash-newline). * The input routine was buggy and bit-rotten and trivially replacable with fgets(). I've also made the program static- and const-safe and improved the presentation-order. The formatting of the state-transition tables remains non-stylish. This commit-messsage was brought to you by code-point 45. MFC-after: one-week
* mdoc(7) police: s/nul character/null character/.ru2002-12-041-2/+2
| | | | Approved by: re
* The spec says that unifdefall removes all #ifs, and this now requiresfanf2002-09-241-2/+2
| | | | the -k flag to unifdef.
* The readability is improved by reducing the use of the passive voice.fanf2002-09-241-10/+10
| | | | No changes to the meaning are made.
* It is probably a bad idea to unconditionally process directives withfanf2002-09-242-10/+41
| | | | | | | | | | constant controlling expressions: in particular, removing #if 0 sections is considered "rude". This commit changes the default so that such things are passed through unchanged, and the old behaviour can be had with the -k "kill konsts" flag. Suggested by: markm MFC after: 3 weeks
* Remove local prototypes for main().jmallett2002-08-191-1/+0
|
* Fixed improper SCRIPTS assignment that broke `clean'.ru2002-07-211-1/+1
|
* Character 0 is nul not null.fanf2002-05-301-1/+1
|
* mdoc(7) police: tidy up.ru2002-05-301-43/+37
|
* Sync with upstream version:fanf2002-05-231-67/+88
| | | | | | | | * Ensure we work within the array bounds when parsing command-line options; * Replace h0h0getopt with getopt(3); * Use consistent whitespace style in the function declarations. Revieweded by: dwmalone (mentor)
* Upgrade unifdef:fanf2002-05-154-545/+997
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * It now knows about the existence of #elif which would have caused it to produce incorrect results in some situations. * It can now process #if and #elif lines according to the values of symbols that are specified on the command line. The expression parser is only a simple subset of what C allows but it should be sufficient for most real-world code (it can cope with everything it finds in xterm). * It has an option for printing all of the symbols that might control #if processing. The unifdefall script uses this option along with cpp -dM to strip all #ifs from a file. * It has much larger static limits. * It handles nested #ifs much more completely. There have also been many style improvements: KNF; ANSI function definitions; all global stuff moved to the top of the file; use stdbool instead of h0h0bool; const-correctness; err(3) instead of fprintf(stderr, ...); enum instead of #define; commentary. I used NetBSD's unifdef as the basis of this since it has received the most attention over the years. PR: 37454 Reviewed by: markm, dwmalone Approved by: dwmalone (mentor) MFC after: 3 weeks
* Use `The .Nm utility'charnier2002-04-201-8/+12
|
* remove __Pimp2002-03-221-10/+10
|
* WARNS=2 fixes, use __FBSDID(), kill register keyword.markm2001-12-111-46/+46
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* Include missing header files which define functions for which gcc hasdd2001-06-241-0/+2
| | | | builtins (e.g., exit, strcmp).
* Fix a grammar bogon.schweikh2001-04-261-1/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-1/+4
|
* The last "-iDsym" makes more sense as "-iUsym".obrien2000-10-221-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Main() returns int.charnier1997-08-261-2/+2
|
* Use err(3). Add usage(). Remove progname.charnier1997-08-202-44/+43
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-273-0/+808
OpenPOWER on IntegriCloud