fpp.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. struct fppTag {
  41. int tag;
  42. void *data;
  43. };
  44. #ifndef FPP_TRUE
  45. #define FPP_TRUE 1
  46. #endif
  47. #ifndef FPP_FALSE
  48. #define FPP_FALSE 0
  49. #endif
  50. #define NFLAG_BUILTIN 1
  51. #define NFLAG_PREDEFINE 2
  52. /* end of taglist: */
  53. #define FPPTAG_END 0
  54. /* To make the preprocessed output keep the comments: */
  55. #define FPPTAG_KEEPCOMMENTS 1 /* data is FPP_TRUE or FPP_FALSE */
  56. /* To define symbols to the preprocessor: */
  57. #define FPPTAG_DEFINE 2 /* data is the string "symbol" or "symbol=<value>" */
  58. /* To make the preprocessor ignore all non-fatal errors: */
  59. #define FPPTAG_IGNORE_NONFATAL 3 /* data is FPP_TRUE or FPP_FALSE */
  60. /* To add an include directory to the include directory list: */
  61. #define FPPTAG_INCLUDE_DIR 4 /* data is directory name ending with a '/' (on
  62. amiga a ':' is also valid) */
  63. /* To define all machine specific built-in #defines, default is FPP_TRUE: */
  64. #define FPPTAG_BUILTINS 5 /* data is FPP_TRUE or FPP_FALSE */
  65. /* To define predefines like __LINE__, __DATE__, etc. default is FPP_TRUE: */
  66. #define FPPTAG_PREDEFINES 6 /* data is FPP_TRUE or FPP_FALSE */
  67. /* To make fpp leave C++ comments in the output: */
  68. #define FPPTAG_IGNORE_CPLUSPLUS 7 /* data is FPP_TRUE or FPP_FALSE */
  69. /* To define new sizes to #if sizeof: */
  70. #define FPPTAG_SIZEOF_TABLE 8 /* data is sizeof table string */
  71. /* To undefine symbols: */
  72. #define FPPTAG_UNDEFINE 9 /* data is symbol name */
  73. /* Output all #defines: */
  74. #define FPPTAG_OUTPUT_DEFINES 10 /* data is FPP_TRUE or FPP_FALSE */
  75. /* Initial input file name: */
  76. #define FPPTAG_INPUT_NAME 11 /* data is string */
  77. /* Input function: */
  78. #define FPPTAG_INPUT 12 /* data is an input funtion */
  79. /* Output function: */
  80. #define FPPTAG_OUTPUT 13 /* data is an output function */
  81. /* User data, sent in the last argument to the input function: */
  82. #define FPPTAG_USERDATA 14 /* data is user data */
  83. /* Whether to exclude #line instructions in the output, default is FPP_FALSE */
  84. #define FPPTAG_LINE 15 /* data is FPP_TRUE or FPP_FALSE */
  85. /* Error function. This is called when FPP finds any warning/error/fatal: */
  86. #define FPPTAG_ERROR 16 /* data is function pointer to a
  87. "void (*)(void *, char *, va_list)" */
  88. /* Whether to warn for illegal cpp instructions */
  89. #define FPPTAG_WARNILLEGALCPP 17 /* data is boolean, default is FPP_FALSE */
  90. /* Output the 'line' keyword on #line-lines? */
  91. #define FPPTAG_OUTPUTLINE 18 /* data is boolean, default is FPP_TRUE */
  92. /* Output the version information string */
  93. #define FPPTAG_SHOWVERSION 19 /* data is boolean, default is FPP_TRUE */
  94. /* Output all included file names to stderr */
  95. #define FPPTAG_OUTPUTINCLUDES 20 /* data is boolean, default is FPP_FALSE */
  96. /* Display warning if there is any brace, bracket or parentheses unbalance */
  97. #define FPPTAG_OUTPUTBALANCE 21 /* data is boolean, default is FPP_FALSE */
  98. /* Display all whitespaces in the source */
  99. #define FPPTAG_OUTPUTSPACE 22 /* data is boolean, default is FPP_FALSE */
  100. /* Allow nested comments */
  101. #define FPPTAG_NESTED_COMMENTS 23 /* data is boolean, default is FPP_FALSE */
  102. /* Enable warnings at nested comments */
  103. #define FPPTAG_WARN_NESTED_COMMENTS 24 /* data is boolean, default is FPP_FALSE */
  104. /* Enable warnings at missing includes */
  105. #define FPPTAG_WARNMISSINCLUDE 25 /* data is boolean, default is FPP_TRUE */
  106. /* Output the main file */
  107. #define FPPTAG_OUTPUTMAIN 26 /* data is boolean, default is FPP_TRUE */
  108. /* Include file */
  109. #define FPPTAG_INCLUDE_FILE 27 /* data is char pointer */
  110. /* Include macro file */
  111. #define FPPTAG_INCLUDE_MACRO_FILE 28 /* data is char pointer */
  112. /* Evaluate the right part of a concatenate before the concat */
  113. #define FPPTAG_RIGHTCONCAT 29 /* data is boolean, default is FPP_FALSE */
  114. /* Include the specified file at the beginning of each function */
  115. #define FPPTAG_INITFUNC 30 /* data is char pointer or NULL */
  116. /* Define function to be excluded from the "beginning-function-addings" */
  117. #define FPPTAG_EXCLFUNC 31 /* data is char pointer */
  118. /* Enable output of all function names defined in the source */
  119. #define FPPTAG_DISPLAYFUNCTIONS 32
  120. /* Switch on WWW-mode */
  121. #define FPPTAG_WEBMODE 33
  122. /* Depends function: */
  123. #define FPPTAG_DEPENDS 34 /* data is an depends funtion */
  124. /* Allow include "X" (rather than <X>) to search local files, default is FPP_TRUE */
  125. #define FPPTAG_ALLOW_INCLUDE_LOCAL 35
  126. /* Fileopen function. If set, this is called when FPP tries to open a file: */
  127. #define FPPTAG_FILEOPENFUNC 36 /* data is function pointer to a
  128. "FILE* (*)(char * filename, char * mode, void * userdata)", default is NULL */
  129. int fppPreProcess(struct fppTag *);
  130. #ifdef __cplusplus
  131. } // extern "C"
  132. #endif