home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / wattcp.zip / ISSTRING.C < prev    next >
C/C++ Source or Header  |  1992-04-23  |  386b  |  19 lines

  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <string.h>
  4.  
  5. int isstring( char *string, unsigned stringlen )
  6. {
  7.     if ( (unsigned) strlen( string ) > stringlen - 1 ) return( 0 );
  8.  
  9.     while ( *string ) {
  10.         if ( !isprint( *string++ )) {
  11.             string--;
  12.             if ( !isspace( *string++ ))
  13.                 return( 0 );
  14.         }
  15.     }
  16.     return( 1 );
  17. }
  18.  
  19.