fpp.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /******************************************************************************
  2. * FREXXWARE
  3. * ----------------------------------------------------------------------------
  4. *
  5. * Project: Frexx C Preprocessor
  6. * $Source: /home/user/start/cpp/RCS/fpp.h,v $
  7. * $Revision: 1.5 $
  8. * $Date: 1994/01/24 09:38:45 $
  9. * $Author: start $
  10. * $State: Exp $
  11. * $Locker: start $
  12. *
  13. * ----------------------------------------------------------------------------
  14. * $Log: fpp.h,v $
  15. * Revision 1.5 1994/01/24 09:38:45 start
  16. * Added FPPTAG_RIGHTCONCAT.
  17. *
  18. * Revision 1.4 1993/12/06 13:51:20 start
  19. * A lot of new stuff (too much to mention)
  20. *
  21. * Revision 1.3 1993/11/29 14:01:13 start
  22. * New features added
  23. *
  24. * Revision 1.2 1993/11/11 07:16:39 start
  25. * New stuff
  26. *
  27. * Revision 1.1 1993/11/03 09:15:59 start
  28. * Initial revision
  29. *
  30. *
  31. *****************************************************************************/
  32. /**********************************************************************
  33. *
  34. * fpp.h
  35. *
  36. */
  37. struct fppTag {
  38. int tag;
  39. void *data;
  40. };
  41. #ifndef TRUE
  42. #define TRUE 1
  43. #endif
  44. #ifndef FALSE
  45. #define FALSE 0
  46. #endif
  47. #define NFLAG_BUILTIN 1
  48. #define NFLAG_PREDEFINE 2
  49. /* end of taglist: */
  50. #define FPPTAG_END 0
  51. /* To make the preprocessed output keep the comments: */
  52. #define FPPTAG_KEEPCOMMENTS 1 /* data is TRUE or FALSE */
  53. /* To define symbols to the preprocessor: */
  54. #define FPPTAG_DEFINE 2 /* data is the string "symbol" or "symbol=<value>" */
  55. /* To make the preprocessor ignore all non-fatal errors: */
  56. #define FPPTAG_IGNORE_NONFATAL 3 /* data is TRUE or FALSE */
  57. /* To add an include directory to the include directory list: */
  58. #define FPPTAG_INCLUDE_DIR 4 /* data is directory name ending with a '/' (on
  59. amiga a ':' is also valid) */
  60. /* To define all machine specific built-in #defines, default is TRUE: */
  61. #define FPPTAG_BUILTINS 5 /* data is TRUE or FALSE */
  62. /* To define predefines like __LINE__, __DATE__, etc. default is TRUE: */
  63. #define FPPTAG_PREDEFINES 6 /* data is TRUE or FALSE */
  64. /* To make fpp leave C++ comments in the output: */
  65. #define FPPTAG_IGNORE_CPLUSPLUS 7 /* data is TRUE or FALSE */
  66. /* To define new sizes to #if sizeof: */
  67. #define FPPTAG_SIZEOF_TABLE 8 /* data is sizeof table string */
  68. /* To undefine symbols: */
  69. #define FPPTAG_UNDEFINE 9 /* data is symbol name */
  70. /* Output all #defines: */
  71. #define FPPTAG_OUTPUT_DEFINES 10 /* data is TRUE or FALSE */
  72. /* Initial input file name: */
  73. #define FPPTAG_INPUT_NAME 11 /* data is string */
  74. /* Input function: */
  75. #define FPPTAG_INPUT 12 /* data is an input funtion */
  76. /* Output function: */
  77. #define FPPTAG_OUTPUT 13 /* data is an output function */
  78. /* User data, sent in the last argument to the input function: */
  79. #define FPPTAG_USERDATA 14 /* data is user data */
  80. /* Whether to exclude #line instructions in the output, default is FALSE */
  81. #define FPPTAG_LINE 15 /* data is TRUE or FALSE */
  82. /* Error function. This is called when FPP finds any warning/error/fatal: */
  83. #define FPPTAG_ERROR 16 /* data is function pointer to a
  84. "void (*)(void *, char *, va_list)" */
  85. /* Whether to warn for illegal cpp instructions */
  86. #define FPPTAG_WARNILLEGALCPP 17 /* data is boolean, default is FALSE */
  87. /* Output the 'line' keyword on #line-lines? */
  88. #define FPPTAG_OUTPUTLINE 18 /* data is boolean, default is TRUE */
  89. /* Do not output the version information string */
  90. #define FPPTAG_IGNOREVERSION 19 /* data is boolean, default is FALSE */
  91. /* Output all included file names to stderr */
  92. #define FPPTAG_OUTPUTINCLUDES 20 /* data is boolean, default is FALSE */
  93. /* Display warning if there is any brace, bracket or parentheses unbalance */
  94. #define FPPTAG_OUTPUTBALANCE 21 /* data is boolean, default is FALSE */
  95. /* Display all whitespaces in the source */
  96. #define FPPTAG_OUTPUTSPACE 22 /* data is boolean, default is FALSE */
  97. /* Allow nested comments */
  98. #define FPPTAG_NESTED_COMMENTS 23 /* data is boolean, default is FALSE */
  99. /* Enable warnings at nested comments */
  100. #define FPPTAG_WARN_NESTED_COMMENTS 24 /* data is boolean, default is FALSE */
  101. /* Enable warnings at missing includes */
  102. #define FPPTAG_WARNMISSINCLUDE 25 /* data is boolean, default is TRUE */
  103. /* Output the main file */
  104. #define FPPTAG_OUTPUTMAIN 26 /* data is boolean, default is TRUE */
  105. /* Include file */
  106. #define FPPTAG_INCLUDE_FILE 27 /* data is char pointer */
  107. /* Include macro file */
  108. #define FPPTAG_INCLUDE_MACRO_FILE 28 /* data is char pointer */
  109. /* Evaluate the right part of a concatenate before the concat */
  110. #define FPPTAG_RIGHTCONCAT 29 /* data is boolean, default is FALSE */
  111. /* Include the specified file at the beginning of each function */
  112. #define FPPTAG_INITFUNC 30 /* data is char pointer or NULL */
  113. /* Define function to be excluded from the "beginning-function-addings" */
  114. #define FPPTAG_EXCLFUNC 31 /* data is char pointer */
  115. /* Enable output of all function names defined in the source */
  116. #define FPPTAG_DISPLAYFUNCTIONS 32
  117. /* Switch on WWW-mode */
  118. #define FPPTAG_WEBMODE 33
  119. /* Depends function: */
  120. #define FPPTAG_DEPENDS 34 /* data is an depends funtion */
  121. int fppPreProcess(struct fppTag *);