8#define RECOMMENDED_LEN 100
72 printf(
"warning: probably not a proc ? (%s)\n",
s);
77 printf(
"error: minimal length of a procedure name is 4: %s\n",
s);
89 unsigned char *
pp=
buf;
90 while((*
pp==
' ')||(*
pp==
'\t'))
pp++;
91 ch=
strspn(
pp,
"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
92 if ((ch>1)||(
pp+ch==
p))
99 printf(
"warning: no proc found in the section PROCEDURES ?\n");
123 unsigned char *
pp=
buf;
124 while((*
pp==
' ')||(*
pp==
'\t'))
pp++;
125 ch=
strspn(
pp,
"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
126 if ((ch>1)||(
pp+ch==
p))
132 printf(
"error: seperate keywords by ; but do not have ; after the last keyword\n");
140 if (
buf[0]==
'{')
break;
146 printf(
"texinfo in proc help(%s): >>%s",
s,
buf);
171 printf(
"error: LIBRARY: must be the first section in info\n");
176 printf(
"error: only KEYWORDS/SEE ALSO may follow PROCEDURES\n");
183 printf(
"error: only KEYWORDS/SEE ALSO may follow PROCEDURES\n");
198 printf(
"error: only KEYWORDS/SEE ALSO may follow PROCEDURES\n");
202 unsigned char *
pp=
buf;
205 if ((*
pp!=
' ')&&(*
pp!=
'\t'))
break;
216 printf(
"error: unknown section in library header: %s",
buf);
223 unsigned char *
pp=
buf;
224 while((*
pp==
' ')||(*
pp==
'\t'))
pp++;
225 ch=
strspn(
pp,
"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
226 if ((ch>1)||(
pp+ch==
p))
229 if ((ch!=10)||(
strncmp(
pp,
"REFERENCES",10)!=0))
231 printf(
"error: unknown section in library header: %s",
buf);
235 printf(
"error: only KEYWORDS/SEE ALSO may follow PROCEDURES\n");
248 printf(
"\nSUMMARY OF THE HEADER:\n");
250 printf(
"error: missing/duplicate LIBRARY (%d lines found, should be 1)\n",
have_LIBRARY);
252 printf(
"error: missing/duplicate AUTHOR/AUTHORS (%d lines found, should be 1)\n",
have_AUTHORS);
260 printf(
"hint: avoid NOTE: if not used for a library requirement\n");
264 printf(
"hint: avoid OVERVIEW: for small libraries\n");
269 printf(
"error: other header entries found (illegal ?) :%d lines found, should be 0\n",
have_other);
272 printf(
"warning: %d forced line breaks in %d header lines: @* should be used very rarely!\n",
star_nl,
header);
276 printf(
"warning: %d texinfo commands in %d header lines: should be used very rarely!\n",
texinfo,
header);
297 if (argc!=2) {
printf(
"usage: %s lib-file\n",
argv[0]);
return 1;}
312 unsigned char *
pp=
buf;
315 if ((*
pp!=
' ')&&(*
pp!=
'\t'))
break;
322 while((*
pp)==
' ')
pp++;
331 unsigned char *
pp=
buf;
334 if ((*
pp!=
' ')&&(*
pp!=
'\t'))
break;
341 unsigned char *
pp=
buf;
344 if ((*
pp!=
' ')&&(*
pp!=
'\t'))
break;
351 printf(
"error: use a space between LIB and \"\n");
353 {
printf(
"end of header ? LIB should be in col. 1:>>%s<<\n",
buf); }
359 {
printf(
"end of header ? LIB should be in col. 1:>>%s<<\n",
buf); }
365 {
printf(
"end of header ? proc should be in col. 1:>>%s<<\n",
buf); }
377 printf(
"error: 'static' without 'proc' found\n");
383 unsigned char *
pp=
buf;
385 while(*
pp==
' ')
pp++;
388 printf(
"warning: proc should be in col. 1: line %d:%s",
lines,
buf);
405 printf(
"hint: global proc %s not found in header\n",
pp);
451 printf(
"\nGENERAL SUMMARY:\n");
452 if(
tabs!=0)
printf(
"warning: lib should not contain tabs, >=%d found\n",
tabs);
463 printf(
"error: some lines are in DOS format, some not (%d/%d)\n",
crlf,
lines);
void scan_proc_help(const char *s)
unsigned char proc_found[NUM_PROC]
void scan_keywords(int *l)
unsigned char have_doc[NUM_PROC]
unsigned char have_example[NUM_PROC]
unsigned char buf[LINE_LEN]
unsigned char * proc[NUM_PROC]
const CanonicalForm int s