unifdef - resolve and remove ifdef'ed lines from C program source
unifdef [-clt] [-Dname] [-Uname] [-iDname] [-iUname] ... [filename]
unifdef removes ifdefed lines from a file while otherwise leaving the file alone. It is smart enough to deal with the nested ifdefs, comments, single and double quotes of C syntax, but it does not do any including or interpretation of macros. Neither does it strip out comments, though it recognizes and ignores them. You specify which symbols you want defined with -D options, and which you want undefined with -U options. Lines within those ifdefs will be copied to the output, or removed, as appropriate. Any ifdef, ifndef, else, and endif lines associated with filename will also be removed.
ifdefs involving symbols you do not specify are untouched and copied out along with their associated ifdef, else, and endiff1 lines.
If an ifdefX occurs nested inside another ifdefX, then the inside ifdef is treated as if it were an unrecognized symbol. If the same symbol appears in more than one argument, only the first occurrence is significant.
unifdef copies its output to the standard output and will take its input from the standard input if no filename argument is given.
The following options are supported:
-c
-l
-t
-Dname
-Uname
-iDname
-iUname
The following exit values are returned:
0
1
See attributes(5) for descriptions of the following attributes:
|
diff(1), attributes(5)
Premature EOF
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |