home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume24 / mkid2 / part01 / getsFF.c < prev    next >
C/C++ Source or Header  |  1991-10-09  |  418b  |  29 lines

  1. /* Copyright (c) 1986, Greg McGary */
  2. static char sccsid[] = "@(#)getsFF.c    1.1 86/10/09";
  3.  
  4. #include    <stdio.h>
  5.  
  6. int getsFF();
  7. void skipFF();
  8.  
  9. int
  10. getsFF(buf0, inFILE)
  11.     char        *buf0;
  12.     register FILE    *inFILE;
  13. {
  14.     register char    *buf = buf0;
  15.  
  16.     while (((*buf++ = getc(inFILE)) & 0xff) != 0xff)
  17.         ;
  18.     return (buf - buf0 - 1);
  19. }
  20.  
  21. void
  22. skipFF(inFILE)
  23.     register FILE    *inFILE;
  24. {
  25.     while ((getc(inFILE) & 0xff) != 0xff)
  26.         ;
  27.     return;
  28. }
  29.