home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / auucp+-1.02 / fuucp_plus_src.lzh / lib / validuser.c < prev   
Encoding:
C/C++ Source or Header  |  1990-11-21  |  534 b   |  33 lines

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