📄 scpp.cat
字号:
SCPP(1) SCPP(1)NNAAMMEE scpp - selective C preprocessorSSYYNNOOPPSSIISS ssccpppp [ --ii_i_n_c_f_i_l_e ] [ --dd_m_a_c_r_o ] [ --DD_m_a_c_r_o ] [ --DD_m_a_c_r_o_=_d_e_f ] [ --CC ] [ --II_i_n_c_d_i_r ] [ _f_i_l_e_._._. ]DDEESSCCRRIIPPTTIIOONN SSccpppp concatenates the input _f_i_l_e_s (or reads standard-in, if no _f_i_l_e is given), interprets all references to given macros, leaving the rest of the _f_i_l_e(s) unaltered, then writes the result to standard-out. It is helpful in removing conditionally compiled code or misleading macros from a file. The _f_i_l_e name "--" refers to standard-in. The following options are available. Each option can appear as frequently as desired. -d Interpret all references to the given _m_a_c_r_o_. _M_a_c_r_o can be either a single macro name or a whitespace-separated list of macro names (e.g. -dMAXINT or -d"MAXINT MININT INTWID"). All occurrences of the macro and all instances of the intrinsic macro "defined()" referring to this macro are expanded. All preprocessor directives referring to this macro (except ##iiff) perform their usual func- tion and do not appear in the output. ##iiff directives are interpreted only if their value is not dependent on macros which are not to be interpreted. -D Define the _m_a_c_r_o to have the value _d_e_f_, or "1" if no _d_e_f is given. Unlike the C pre- processor, ssccpppp does not implicitly define certain macros that describe the environment in which the code will be running (e.g. "vax" or "unix"). --DD implies --dd.. -C Preserve comments and whitespace in inter- preted macro definitions. Normally, com- ments and leading and trailing whitespace are stripped from interpreted macro defini- tions. -I Add _i_n_c_d_i_r to the list of directories to be searched for include files. SSccpppp searches directories in the same order as the C pre- processor: if the include filename is enclosed in double-quotes ("...") rather than angle-brackets (<...>), the directory 28 September 1983 1SCPP(1) SCPP(1) containing the current file being processed; the directories given by -I, left-to-right; the standard directory, /usr/include. -i Process the _f_i_l_e inclusion and leave the included text in the output in place of the original ##iinncclluuddee statement.AAUUTTHHOORR Brad Needham, Tektronix, Inc.SSEEEE AALLSSOO cc(1).BBUUGGSS Very long identifiers (those over 100 characters long) will crash ssccpppp.. Because ssccpppp interprets only the given macros, the meaning of some code will change. E.g. "scpp -dBOO" of #define BOO hello,there #define twopar(a,b) a b twopar(BOO,folks) will generate #define twopar(a,b) a b twopar(hello,there,folks) causing an argument mismatch when the output is compiled. Because uninterpreted "#if"s, "ifdef"s, and "ifndef"s, have no effect on the output, the following example, when processed via "scpp -dLEFT", will generate an error mes- sage complaining about multiple definitions of "LEFT". #ifdef ZULU #define LEFT 20 #else #define LEFT 347 #endif The C preprocessor macros "____FFIILLEE____" and "____LLIINNEE____" have no special meaning to ssccpppp.. 28 September 1983 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -