home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / networking / uucp / amigauucpsrc / lib / validuser.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-29  |  428 b   |  31 lines

  1.  
  2. /*
  3.  *  VALIDUSER.C
  4.  *
  5.  *  (C) Copyright 1989-1990 by Matthew Dillon,  All Rights Reserved.
  6.  */
  7.  
  8. #include "stdio.h"
  9. #include "config.h"
  10.  
  11. Prototype int ValidUser(const char *);
  12.  
  13. int
  14. ValidUser(str)
  15. const char *str;
  16. {
  17.     if (*str == '|' || *str == '@')
  18.     return(0);
  19.     while (*str) {
  20.     if (*str < 32 || *str > 126)
  21.         return(0);
  22.     if (*str == ':')
  23.         return(0);
  24.     if (*str == '/')
  25.         return(0);
  26.     ++str;
  27.     }
  28.     return(1);
  29. }
  30.  
  31.