home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / TOP / USR / SRC / scpp.t.Z / scpp.t / scpp.1 < prev    next >
Text File  |  2009-11-06  |  3KB  |  137 lines

  1. .TH SCPP 1 "28 September 1983"
  2. .SH NAME
  3. scpp \- selective C preprocessor
  4. .SH SYNOPSIS
  5. .B scpp
  6. [
  7. .BI \-M macro
  8. ] [
  9. .BI \-D macro
  10. ] [
  11. .BI \-D macro=def
  12. ] [
  13. .B \-C
  14. ]
  15. .ti +5
  16. [
  17. .BI \-I incdir
  18. ] [
  19. .I file...
  20. ]
  21. .SH DESCRIPTION
  22. .B Scpp
  23. concatenates the input
  24. .I files
  25. (or reads standard-in, if no
  26. .I file
  27. is given),
  28. interprets all references to given macros,
  29. leaving the rest of the
  30. .IR file "(s)"
  31. unaltered,
  32. then writes the result to standard-out.
  33. It is helpful in removing conditionally compiled code or misleading
  34. macros from a file.
  35. .PP
  36. The
  37. .I file
  38. name "\fB-\fP" refers to standard-in.
  39. .PP
  40. The following options are available.
  41. Each option can appear as frequently as desired.
  42. .RS
  43. .TP
  44. .SM \-M
  45. Interpret all references to the given
  46. .I macro.
  47. .I Macro
  48. can be either a single macro name or a whitespace-separated list of
  49. macro names (e.g. -MMAXINT or -M"MAXINT MININT INTWID").
  50. All occurrences of the macro and all instances of the intrinsic macro
  51. \&"defined()" referring to this macro are expanded.
  52. All preprocessor directives referring to this macro (except
  53. .BR #if )
  54. perform their usual function and do not appear in the output.
  55. .B #if
  56. directives are interpreted only if their value is not dependent on macros
  57. which are not to be interpreted.
  58. .TP
  59. .SM \-D
  60. Define the
  61. .I macro
  62. to have the value
  63. .I def,
  64. or "1" if no
  65. .I def
  66. is given.
  67. Unlike the C preprocessor,
  68. .B scpp
  69. does not implicitly define certain macros that describe the environment in
  70. which the code will be running (e.g. "vax" or "unix").
  71. .B \-D
  72. implies
  73. .B \-M.
  74. .TP
  75. .SM \-C
  76. Preserve comments and whitespace in interpreted macro definitions.
  77. Normally, comments and leading and trailing whitespace are stripped from
  78. interpreted macro definitions.
  79. .TP
  80. .SM \-I
  81. Add
  82. .I incdir
  83. to the list of directories to be searched for include files.
  84. .B Scpp
  85. searches directories in the same order as the C preprocessor:
  86. if the include filename is enclosed in double-quotes ("...")
  87. rather than angle-brackets (<...>),
  88. the directory containing the current file being processed;
  89. the directories given by -I, left-to-right;
  90. the standard directory, /usr/include.
  91. .RE
  92. .SH AUTHOR
  93. Brad Needham, Tektronix, Inc.
  94. .SH "SEE ALSO"
  95. cc(1).
  96. .SH BUGS
  97. Very long identifiers (those over 100 characters long) will crash
  98. .B scpp.
  99. .PP
  100. Because
  101. .B scpp
  102. interprets only the given macros, the meaning of some code will change.
  103. E.g. "scpp -MBOO" of
  104. .br
  105.     #define BOO hello,there
  106. .br
  107.     #define twopar(a,b) a b
  108. .br
  109.     twopar(BOO,folks)
  110. .br
  111. will generate
  112. .br
  113.     #define twopar(a,b) a b
  114. .br
  115.     twopar(hello,there,folks)
  116. .br
  117. causing an argument mismatch when the output is compiled.
  118. .PP
  119. Because uninterpreted "#if"s, "ifdef"s, and "ifndef"s, have no effect
  120. on the output, the following example, when processed via "scpp -MLEFT",
  121. will generate an error message complaining about
  122. multiple definitions of "LEFT".
  123. .br
  124.     #ifdef ZULU
  125. .br
  126.     #define LEFT 20
  127. .br
  128.     #else
  129. .br
  130.     #define LEFT 347
  131. .br
  132.     #endif
  133. .PP
  134. The C preprocessor macros "\fB__FILE__\fP" and "\fB__LINE__\fP" have no
  135. special meaning to
  136. .B scpp.
  137.