version 1.6, 1999/12/06 00:32:47 |
version 1.7, 2001/07/12 05:17:02 |
|
|
* (one based) |
* (one based) |
*/ |
*/ |
int position(string, ch) |
int position(string, ch) |
reg char *string; |
char *string; |
reg char ch; |
char ch; |
{ |
{ |
reg int i; |
reg int i; |
if (string) |
if (string) |
|
|
return('\0'); |
return('\0'); |
} |
} |
|
|
|
void |
clob_last(string, newstuff) |
clob_last(string, newstuff) |
char *string, newstuff; |
char *string, newstuff; |
{ |
{ |
|
|
static char mod2outcomment[] = MOD2OUTCOMMENT; |
static char mod2outcomment[] = MOD2OUTCOMMENT; |
|
|
struct lang_desc lang_table[] = { |
struct lang_desc lang_table[] = { |
/*INUNKNOWN 0*/ "unknown", cincomment, coutcomment, |
{ /*INUNKNOWN 0*/ "unknown", cincomment, coutcomment }, |
/*INCPP 1*/ "cpp", cincomment, coutcomment, |
{ /*INCPP 1*/ "cpp", cincomment, coutcomment }, |
/*INCC 2*/ "cc", cincomment, coutcomment, |
{ /*INCC 2*/ "cc", cincomment, coutcomment }, |
/*INAS 3*/ "as", ASINCOMMENT, newline, |
{ /*INAS 3*/ "as", ASINCOMMENT, newline }, |
/*INLD 4*/ "ld", cincomment, coutcomment, |
{ /*INLD 4*/ "ld", cincomment, coutcomment }, |
/*INLINT 5*/ "lint", cincomment, coutcomment, |
{ /*INLINT 5*/ "lint", cincomment, coutcomment }, |
/*INF77 6*/ "f77", fincomment, foutcomment, |
{ /*INF77 6*/ "f77", fincomment, foutcomment }, |
/*INPI 7*/ "pi", piincomment, pioutcomment, |
{ /*INPI 7*/ "pi", piincomment, pioutcomment }, |
/*INPC 8*/ "pc", piincomment, pioutcomment, |
{ /*INPC 8*/ "pc", piincomment, pioutcomment }, |
/*INFRANZ 9*/ "franz",lispincomment, newline, |
{ /*INFRANZ 9*/ "franz",lispincomment, newline }, |
/*INLISP 10*/ "lisp", lispincomment, newline, |
{ /*INLISP 10*/ "lisp", lispincomment, newline }, |
/*INVAXIMA 11*/ "vaxima",lispincomment,newline, |
{ /*INVAXIMA 11*/ "vaxima",lispincomment,newline }, |
/*INRATFOR 12*/ "ratfor",fincomment, foutcomment, |
{ /*INRATFOR 12*/ "ratfor",fincomment, foutcomment }, |
/*INLEX 13*/ "lex", cincomment, coutcomment, |
{ /*INLEX 13*/ "lex", cincomment, coutcomment }, |
/*INYACC 14*/ "yacc", cincomment, coutcomment, |
{ /*INYACC 14*/ "yacc", cincomment, coutcomment }, |
/*INAPL 15*/ "apl", ".lm", newline, |
{ /*INAPL 15*/ "apl", ".lm", newline }, |
/*INMAKE 16*/ "make", ASINCOMMENT, newline, |
{ /*INMAKE 16*/ "make", ASINCOMMENT, newline }, |
/*INRI 17*/ "ri", riincomment, rioutcomment, |
{ /*INRI 17*/ "ri", riincomment, rioutcomment }, |
/*INTROFF 18*/ "troff",troffincomment,troffoutcomment, |
{ /*INTROFF 18*/ "troff",troffincomment,troffoutcomment }, |
/*INMOD2 19*/ "mod2", mod2incomment, mod2outcomment, |
{ /*INMOD2 19*/ "mod2", mod2incomment, mod2outcomment }, |
0, 0, 0 |
{ 0, 0, 0 } |
}; |
}; |
|
|
|
void |
printerrors(look_at_subclass, errorc, errorv) |
printerrors(look_at_subclass, errorc, errorv) |
boolean look_at_subclass; |
boolean look_at_subclass; |
int errorc; |
int errorc; |
|
|
} |
} |
} |
} |
|
|
|
void |
wordvprint(fyle, wordc, wordv) |
wordvprint(fyle, wordc, wordv) |
FILE *fyle; |
FILE *fyle; |
int wordc; |
int wordc; |
|
|
* Given a string, parse it into a number of words, and build |
* Given a string, parse it into a number of words, and build |
* a wordc wordv combination pointing into it. |
* a wordc wordv combination pointing into it. |
*/ |
*/ |
|
void |
wordvbuild(string, r_wordc, r_wordv) |
wordvbuild(string, r_wordc, r_wordv) |
char *string; |
char *string; |
int *r_wordc; |
int *r_wordc; |
|
|
for (i = 0; i < wordc; i++){ |
for (i = 0; i < wordc; i++){ |
if (wordv1[i] == 0 || wordv2[i] == 0) |
if (wordv1[i] == 0 || wordv2[i] == 0) |
return(-1); |
return(-1); |
if (back = strcmp(wordv1[i], wordv2[i])){ |
if ((back = strcmp(wordv1[i], wordv2[i]))){ |
return(back); |
return(back); |
} |
} |
} |
} |