]>
diplodocus.org Git - nmh/blob - docs/historical/mh-nov-1983/subs/m_getfld.c
6 m_getfld(state
, name
, buf
, bufsz
, iob
)
14 top
: while((c
= getc(iob
)) == '\001' && peekc(iob
) == '\001')
15 while(getc(iob
) != '\n');
26 if(c
== '\n' || c
== '-')
30 if(cp
>= name
+NAMESZ
-1) {
32 fprintf(stderr
, "??Component Name Exceeds %d Chars:\n \"%s\"\n", NAMESZ
-1, name
);
37 if(c
== '\n' || c
< 0) {
39 fprintf(stderr
, "??%s Encountered While Scanning for a colon:\n \"%s\"\n",
40 (c
< 0)? "<eof>":"<end of line>", name
);
51 if((c
= getc(iob
)) < 0)
57 if((c
= peekc(iob
)) != ' ' && c
!= '\t')
58 if(c
== '\001' || c
< 0)
63 return(peekc(iob
) < 0? FLDEOF
:FLDPLUS
);
67 while(getc(iob
) != '\n') ;
69 if((c
= getc(iob
)) == '\001' && peekc(iob
) == '\001')
75 if(c
< 0 || (c
== '\001' && peekc(iob
) == '\001'))
81 return(((c
=peekc(iob
))<0||c
=='\001')?