Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
5.7 KiB

  1. // PROTO.H -- function prototypes
  2. //
  3. // Copyright (c) 1988-1990, Microsoft Corporation. All rights reserved.
  4. //
  5. // Purpose:
  6. // This include file contains global function prototypes for all modules.
  7. //
  8. // Revision History:
  9. // 04-Feb-2000 BTF Ported to Win64
  10. // 15-Nov-1993 JdR Major speed improvements
  11. // 01-Jun-1993 HV Change #ifdef KANJI to _MBCS
  12. // 02-Feb-1990 SB Add open_file() prototype
  13. // 31-Jan-1990 SB Debug version changes
  14. // 08-Dec-1989 SB Changed proto of SPRINTF()
  15. // 04-Dec-1989 SB Changed proto of expandFileNames() to void from void *
  16. // 01-Dec-1989 SB realloc_memory() added #ifdef DEBUG_MEMORY
  17. // 22-Nov-1989 SB free_memory() and mem_status() added #ifdef DEBUG_MEMORY
  18. // 19-Oct-1989 SB added param (searchHandle) to protos of file functions
  19. // 02-Oct-1989 SB setdrive() proto change
  20. // 18-Aug-1989 SB heapdump() gets two parameters
  21. // 05-Jun-1989 SB heapdump() prototype was added
  22. // 22-May-1989 SB added parameter to freeRules()
  23. // 19-Apr-1989 SB getFileName(), getDateTime(), putDateTime() added
  24. // changed FILEINFO to void * in
  25. // findFirst(), findNext(), searchPath(), findRule()
  26. // 05-Apr-1989 SB made all funcs NEAR; Reqd to make all function calls NEAR
  27. // 22-Mar-1989 SB rm unlinkTmpFiles(); add delScriptFiles()
  28. // 09-Mar-1989 SB Changed param from FILEINFO* to FILEINFO** for findRule
  29. // 03-Feb-1989 SB Changed () to (void) for prototypes
  30. // 02-Feb-1989 SB Moved freeUnusedRules() prototype from nmake.c to here and
  31. // renamed as freeRules()
  32. // 05-Dec-1988 SB Added CDECL for functions with var params, ecs_strchr() and
  33. // ecs_strrchr(); deleted proto for exit() - not reqd
  34. // 23-Oct-1988 SB Added putEnvStr()
  35. // 07-Jul-1988 rj Added targetFlag parameter to find and hash
  36. // 06-Jul-1988 rj Added ecs_system declaration
  37. // 28-Jun-1988 rj Added doCmd parameter to execLine
  38. // 23-Jun-1988 rj Added echoCmd parameter to execLine
  39. void displayBanner(void);
  40. void __cdecl makeError(unsigned, unsigned, ...);
  41. void __cdecl makeMessage(unsigned, ...);
  42. UCHAR getToken(unsigned, UCHAR);
  43. int skipWhiteSpace(UCHAR);
  44. int skipBackSlash(int, UCHAR);
  45. void parse(void);
  46. void appendItem(STRINGLIST **, STRINGLIST *);
  47. void prependItem(STRINGLIST **, STRINGLIST *);
  48. STRINGLIST * removeFirstString(STRINGLIST **);
  49. void * allocate(size_t);
  50. void * alloc_stringlist(void);
  51. void * rallocate(size_t);
  52. char * makeString(const char *);
  53. char * makeQuotedString(const char *);
  54. char * reallocString(char * pszTarget, const char *szAppend);
  55. BOOL tagOpen(char *, char *, char *);
  56. void parseCommandLine(unsigned, char **);
  57. void getRestOfLine(char **, size_t *);
  58. BOOL defineMacro(char *, char *, UCHAR);
  59. STRINGLIST * find(char *, unsigned, STRINGLIST **, BOOL);
  60. MACRODEF * findMacro(char *);
  61. void insertMacro(STRINGLIST *);
  62. unsigned hash(char *, unsigned, BOOL);
  63. void prependList(STRINGLIST **, STRINGLIST **);
  64. BOOL findMacroValues(char *, STRINGLIST **, STRINGLIST **, char *, unsigned, unsigned, UCHAR);
  65. BOOL findMacroValuesInRule(RULELIST *, char *, STRINGLIST **);
  66. char * removeMacros(char *);
  67. void delScriptFiles(void);
  68. char * expandMacros(char *, STRINGLIST **);
  69. STRINGLIST * expandWildCards(char *);
  70. void readCommandFile(char *);
  71. void setFlags(char, BOOL);
  72. void showTargets(void);
  73. void showRules(void);
  74. void showMacros(void);
  75. char * findFirst(char*, void *, NMHANDLE*);
  76. char * findNext(void *, NMHANDLE);
  77. int processTree(void);
  78. void expandFileNames(char *, STRINGLIST **, STRINGLIST **);
  79. void sortRules(void);
  80. BOOL isRule(char *);
  81. char * prependPath(const char *, const char *);
  82. char * searchPath(char *, char *, void *, NMHANDLE*);
  83. BOOL putMacro(char *, char *, UCHAR);
  84. int execLine(char *, BOOL, BOOL, BOOL, char **);
  85. RULELIST * findRule(char *, char *, char *, void *);
  86. int lgetc(void);
  87. UCHAR processIncludeFile(char *);
  88. BOOL evalExpr(char *, UCHAR);
  89. int doMake(unsigned, char **, char *);
  90. void freeList(STRINGLIST *);
  91. void freeStringList(STRINGLIST *);
  92. #ifdef _MBCS
  93. int GetTxtChr(FILE*);
  94. int UngetTxtChr (int, FILE *);
  95. #endif
  96. int putEnvStr(char *, char *);
  97. #define PutEnv(x) _putenv(x)
  98. void expandExtmake(char *, char *, char*);
  99. BOOL ZFormat(char *, unsigned, char *, char *);
  100. void printReverseFile(void);
  101. void freeRules(RULELIST *, BOOL);
  102. char * getFileName(void *);
  103. time_t getDateTime(const _finddata_t *);
  104. void putDateTime(_finddata_t *, time_t);
  105. char * getCurDir(void);
  106. void free_memory(void *);
  107. void free_stringlist(STRINGLIST *);
  108. void * realloc_memory(void *, unsigned);
  109. FILE * open_file(char *, char *);
  110. void initMacroTable(MACRODEF *table[]);
  111. void TruncateString(char *, unsigned);
  112. BOOL IsValidMakefile(FILE *fp);
  113. FILE * OpenValidateMakefile(char *name,char *mode);
  114. // from util.c
  115. char * unQuote(char*);
  116. int strcmpiquote(char *, char*);
  117. char ** copyEnviron(char **environ);
  118. void printStats(void);
  119. void curTime(time_t *);
  120. // from charmap.c
  121. void initCharmap(void);
  122. // from print.c
  123. void printDate(unsigned, char*, time_t);
  124. // from build.c
  125. int invokeBuild(char*, UCHAR, time_t *, char *);
  126. void DumpList(STRINGLIST *pList);
  127. // from exec.c
  128. extern int doCommands(char*, STRINGLIST*, STRINGLIST*, UCHAR, char *);
  129. extern int doCommandsEx(STRINGLIST*, STRINGLIST*, STRINGLIST*, UCHAR, char *);
  130. // from rule.c
  131. extern RULELIST * useRule(MAKEOBJECT*, char*, time_t,
  132. STRINGLIST**, STRINGLIST**, int*, time_t *,
  133. char **);