home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / finger / part01 / skip.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-03  |  1.0 KB  |  53 lines

  1. /*
  2.  * skip.c -- skip white and non (July 1987)
  3.  *
  4.  * Copyright (C) 1986, 1990  Philip L. Budne
  5.  *
  6.  * This file is part of "Phil's Finger Program".
  7.  *
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 1, or (at your option)
  11.  * any later version.
  12.  *
  13.  */
  14.  
  15. # ifndef lint
  16. static char *rcsid = "$Id: skip.c,v 3.0 90/07/06 13:11:43 budd Rel $";
  17. # endif /* lint not defined */
  18.  
  19. # include <ctype.h>
  20. # include "finger.h"
  21.  
  22. GLOBAL int skipwhite( cpp )
  23. char **cpp;
  24. {
  25.     register char *cp = *cpp;
  26.     while( *cp != EOS && isspace( *cp ) )
  27.     cp++;
  28.     *cpp = cp;
  29.     if( *cp == EOS )
  30.     return( FALSE );
  31.     else
  32.     return( TRUE );
  33. } /* skipwhite */
  34.  
  35. GLOBAL int skipblack( cpp )
  36. char **cpp;
  37. {
  38.     register char *cp = *cpp;
  39.     while( *cp != EOS && !isspace( *cp ) )
  40.     cp++;
  41.     *cpp = cp;
  42.     if( *cp == EOS )
  43.     return( FALSE );
  44.     else
  45.     return( TRUE );
  46. } /* skipblack */
  47.  
  48. /*
  49.  * Local variables:
  50.  * comment-column: 40
  51.  * End:
  52.  */
  53.