diff options
Diffstat (limited to 'Build/source/texk/detex/detex.l')
-rw-r--r-- | Build/source/texk/detex/detex.l | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/Build/source/texk/detex/detex.l b/Build/source/texk/detex/detex.l index 614439c0c48..8e1752328ac 100644 --- a/Build/source/texk/detex/detex.l +++ b/Build/source/texk/detex/detex.l @@ -59,9 +59,9 @@ char *malloc(); #endif -void SetEnvIgnore(char *sbEnvList); -int BeginEnv(char *sbEnv); -int EndEnv(char *sbEnv); +void SetEnvIgnore(const char *sbEnvList); +int BeginEnv(const char *sbEnv); +int EndEnv(const char *sbEnv); void InputFile(char *sbFile); void IncludeFile(char *sbFile); void AddInclude(char *sbFile); @@ -69,9 +69,9 @@ int InList(char *sbFile); void SetInputPaths(void); int SeparateList(char *sbList, char **rgsbList ,char chSep,int csbMax); FILE * TexOpen(char *sbFile); -char * SafeMalloc(int cch, char *sbMessage); -void Warning(char *sb1, char *sb2); -void ErrorExit(char *sb1); +char * SafeMalloc(int cch, const char *sbMessage); +void Warning(const char *sb1, const char *sb2); +void ErrorExit(const char *sb1); #define LaBEGIN if (fLatex) BEGIN #define CITEBEGIN if (fLatex && !fCite) BEGIN @@ -274,8 +274,8 @@ W [a-zA-Z]+ int main(int cArgs, char *rgsbArgs[]) { - char *pch, *sbEnvList = DEFAULTENV, sbBadOpt[2]; - FILE *TexOpen(); + char *pch, sbBadOpt[2]; + const char *sbEnvList = DEFAULTENV; int fSawFile = 0, iArgs = 1; /* get base name and decide what we are doing, detex or delatex */ @@ -415,7 +415,7 @@ yyless(int n) ******/ void -SetEnvIgnore(char *sbEnvList) +SetEnvIgnore(const char *sbEnvList) { char *sb; @@ -432,7 +432,7 @@ SetEnvIgnore(char *sbEnvList) ******/ int -BeginEnv(char *sbEnv) +BeginEnv(const char *sbEnv) { int i; @@ -450,7 +450,7 @@ BeginEnv(char *sbEnv) ******/ int -EndEnv(char *sbEnv) +EndEnv(const char *sbEnv) { if (!fLatex) return(0); if (strcmp(sbEnv, sbCurrentEnv) == 0) @@ -466,8 +466,6 @@ EndEnv(char *sbEnv) void InputFile(char *sbFile) { - FILE *TexOpen(); - if (!fFollow) return; rgfp[cfp++] = yyin; @@ -485,8 +483,6 @@ InputFile(char *sbFile) void IncludeFile(char *sbFile) { - FILE *TexOpen(); - if (!fFollow) return; if (!InList(sbFile)) @@ -549,7 +545,8 @@ InList(char *sbFile) void SetInputPaths(void) { - char *sb, *sbPaths; + const char *sb; + char *sbPaths; #ifndef WIN32 char *getenv(); #endif @@ -685,7 +682,7 @@ TexOpen(char *sbFile) ******/ char * -SafeMalloc(int cch, char *sbMessage) +SafeMalloc(int cch, const char *sbMessage) { char *sb; @@ -699,7 +696,7 @@ SafeMalloc(int cch, char *sbMessage) ******/ void -Warning(char *sb1, char *sb2) +Warning(const char *sb1, const char *sb2) { (void)fprintf(stderr, "%s: warning: %s %s\n", sbProgName, sb1, sb2); } @@ -710,7 +707,7 @@ Warning(char *sb1, char *sb2) ******/ void -ErrorExit(char *sb1) +ErrorExit(const char *sb1) { (void)fflush(stdout); (void)fprintf(stderr, "%s: error: %s\n", sbProgName, sb1); |