simplified the return expression in loadbuf()
This commit is contained in:
parent
c685aa11b5
commit
b9bce39f1e
1 changed files with 9 additions and 13 deletions
|
@ -317,6 +317,8 @@ InsertFile(filnam, table)
|
||||||
}
|
}
|
||||||
#else NOPP
|
#else NOPP
|
||||||
{
|
{
|
||||||
|
LineNumber = 0;
|
||||||
|
FileName = filnam;
|
||||||
#ifdef READ_IN_ONE
|
#ifdef READ_IN_ONE
|
||||||
isize = size;
|
isize = size;
|
||||||
ipp = text;
|
ipp = text;
|
||||||
|
@ -361,10 +363,8 @@ EXPORT int
|
||||||
loadbuf()
|
loadbuf()
|
||||||
{
|
{
|
||||||
#ifndef NOPP
|
#ifndef NOPP
|
||||||
if (!head) {
|
if (!head) /* stack exhausted, EOF on sourcefile */
|
||||||
/* stack exhausted, EOF on sourcefile */
|
|
||||||
return EOI;
|
return EOI;
|
||||||
}
|
|
||||||
#endif NOPP
|
#endif NOPP
|
||||||
|
|
||||||
#ifndef NOPP
|
#ifndef NOPP
|
||||||
|
@ -372,23 +372,18 @@ loadbuf()
|
||||||
#else NOPP
|
#else NOPP
|
||||||
if (ipp < &ibuf[isize])
|
if (ipp < &ibuf[isize])
|
||||||
#endif NOPP
|
#endif NOPP
|
||||||
{
|
return '\0'; /* a genuine '\0' character has been seen */
|
||||||
/* a genuine '\0' character has been seen */
|
|
||||||
return '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef READ_IN_ONE
|
#ifndef READ_IN_ONE
|
||||||
#ifndef NOPP
|
#ifndef NOPP
|
||||||
if ( FilDes != 0
|
if ( FilDes != 0
|
||||||
&& (head->bh_size = readblock(FilDes, head->bh_text)) > 0
|
&& (head->bh_size = readblock(FilDes, head->bh_text)) > 0
|
||||||
) {
|
)
|
||||||
return ipp = &(head->bh_text[1]), *ipp++;
|
return ipp = &(head->bh_text[1]), *ipp++;
|
||||||
}
|
|
||||||
#else NOPP
|
#else NOPP
|
||||||
if (FilDes != 0 && (isize = readblock(FilDes, &ibuf[0])) > 0)
|
if (FilDes != 0 && (isize = readblock(FilDes, &ibuf[0])) > 0)
|
||||||
return ipp = &ibuf[1], *ipp++;
|
return ipp = &ibuf[1], *ipp++;
|
||||||
#endif NOPP
|
#endif NOPP
|
||||||
|
|
||||||
#endif READ_IN_ONE
|
#endif READ_IN_ONE
|
||||||
|
|
||||||
#ifdef NOPP
|
#ifdef NOPP
|
||||||
|
@ -399,11 +394,12 @@ loadbuf()
|
||||||
#endif READ_IN_ONE
|
#endif READ_IN_ONE
|
||||||
#endif NOPP
|
#endif NOPP
|
||||||
|
|
||||||
return
|
|
||||||
#ifndef NOPP
|
#ifndef NOPP
|
||||||
pop_bh() ? (*ipp ? *ipp++ : loadbuf()) :
|
if (pop_bh())
|
||||||
|
return *ipp ? *ipp++ : loadbuf();
|
||||||
#endif NOPP
|
#endif NOPP
|
||||||
(ipp = &"\0\0"[1], EOI);
|
ipp = &"\0\0"[1];
|
||||||
|
return EOI;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some miscellaneous routines : setwdir() and mk_filename()
|
/* Some miscellaneous routines : setwdir() and mk_filename()
|
||||||
|
|
Loading…
Reference in a new issue