unifdef.1
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 101 行
1
101 行
.TH unifdef 1 "" "" Unsupported.SH Nameunifdef \- removes ifdef'ed lines.SH Syntax.B unifdef[.B \-c.BI \-D sym.BI \-id sym.BI \-iu sym.B \-l.B \-t.BI \-U sym] ... [ .I file ].SH DescriptionThe .PN unifdefcommand is useful for removing ifdef'ed lines from a file while otherwise leaving the file alone.The .PN unifdefcommand is like a stripped-down C preprocessor:it is smart enough to deal with the nested ifdefs, comments,single and doublequotes of C syntax so that it can do its job, but it doesn't do any including or interpretation of macros.Neither does it strip out comments, though it recognizes and ignores them.Ifdefs involving symbols you don't specify are untouched and copied outalong with their associatedifdef, else, and endif lines.The ifdef, ifndef, else, and endif lines associated with the symbol,.IR sym ,will also be removed.If an ifdef X occurs nested inside another ifdef X, then theinside ifdef is treated as if it were an unrecognized symbol.If the same symbol appears in more than one argument, only the firstoccurrence is significant..PPIf you use ifdefs to delimit non-C lines, such as commentsor code which is under construction,then you must tell.I unifdefwhich symbols are used for that purpose so that it won't try to parsefor quotes and commentsin those ifdef'ed lines..PPThe .PN unifdefcommand copies its output to stdoutand will take its input from stdin if no.I fileargument is given..SH Options.IP \-c 10Causes the operation of.PN unifdefto be complemented.The lines that would have been removed or blankedare retained and vice versa..IP "\-id\fIsym\fP"Specifies that you want the lines inside certain ifdefs to be ignored,but copied out..IP "\-iu\fIsym\fP"Specifies that you want the lines inside certain ifdefs to be ignored,but copied out..IP \-lCauses.PN unifdefto replace removed lines with blank lines instead of deleting them..IP \-tMakes.PN unifdefrefrain from attempting to recognize comments and single and double quotes.This option is for use on plain text (not C code)..IP "\-D\fIsym\fP"Specifies which symbols you want definedand the lines inside those ifdefs will be copied to the output..IP "\-U\fIsym\fP"Specifies which symbols you want undefinedand the lines inside those ifdefs will be removed..SH RestrictionsDoes not know how to deal with \fIcpp\fP constructs such as.br.sp.nf #if defined(X) || defined(Y).fi.SH DiagnosticsPremature EOF, inappropriate else or endif..PPExit status is 0 if output is exact copy of input, 1 if not, 2 if trouble..SH See Alsodiff(1)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?