NEW: devel/unifdef or textproc/unifdef

2013-04-29 Thread Stuart Henderson
Not quite sure which the primary category should be. If devel/ wasn't
chock-full of libraries I'd definitely put it there, but as it is, maybe
textproc/ makes it easier to find... any suggestions? any OKs to import?

-
The unifdef utility selectively processes conditional cpp(1) directives.
It removes from a file both the directives and any additional text that
they specify should be removed, while otherwise leaving the file alone.

It is useful for avoiding distractions when studying code that uses
#ifdef heavily for portability (the original motivation was xterm's pty
handling code), or as a lightweight preprocessor to strip out internal
routines from a public header.

It understands a commonly-used subset of the expression syntax for #if
and #elif lines: integer constants, integer values of symbols defined on
the command line, the defined() operator, the operators !, , , =, =,
==, !=, , ||, and parenthesized expressions.

The unifdef utility understands just enough about C to know when one of
the directives is inactive because it is inside a comment, or affected by
a backslash-continued line.  It spots unusually-formatted preprocessor
directives and knows when the layout is too odd for it to handle.
-




unifdef.tgz
Description: application/tar-gz


Re: NEW: devel/unifdef or textproc/unifdef

2013-04-29 Thread Marc Espie
On Mon, Apr 29, 2013 at 08:49:16PM +0100, Stuart Henderson wrote:
 Not quite sure which the primary category should be. If devel/ wasn't
 chock-full of libraries I'd definitely put it there, but as it is, maybe
 textproc/ makes it easier to find... any suggestions? any OKs to import?

Definitely not.

Why not update src/usr.bin/unifdef instead ?



Re: NEW: devel/unifdef or textproc/unifdef

2013-04-29 Thread Stuart Henderson
On 2013/04/29 22:12, Marc Espie wrote:
 On Mon, Apr 29, 2013 at 08:49:16PM +0100, Stuart Henderson wrote:
  Not quite sure which the primary category should be. If devel/ wasn't
  chock-full of libraries I'd definitely put it there, but as it is, maybe
  textproc/ makes it easier to find... any suggestions? any OKs to import?
 
 Definitely not.
 
 Why not update src/usr.bin/unifdef instead ?
 

ha, I didn't think to look in src/!