|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T o
Length: 2011 (0x7db) Types: TextFile Names: »or_misc.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Lib/or/or_misc.c«
/* or_misc.c: misc or-name handling routines */ # ifndef lint static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/or/RCS/or_misc.c,v 5.0 90/09/20 16:08:14 pp Exp Locker: pp $"; # endif /* * $Header: /cs/research/pp/hubris/pp-beta/Lib/or/RCS/or_misc.c,v 5.0 90/09/20 16:08:14 pp Exp Locker: pp $ * * $Log: or_misc.c,v $ * Revision 5.0 90/09/20 16:08:14 pp * rcsforce : 5.0 public release * */ #include "util.h" #include "table.h" #include "or.h" #include "ap.h" extern char *loc_dom_site; extern char *loc_or; OR_ptr loc_ortree; /* --------------------- Start Routines -------------------------------- */ int or_init() { char tbuf[LINESIZE]; PP_DBG (("Lib/or_init()")); (void) strcpy (tbuf, loc_or); loc_ortree = or_std2or (tbuf); if (loc_ortree == NULLOR) { PP_LOG (LLOG_EXCEPTIONS, ("Lib/or_init: loc_ortree NULL! %s", loc_or)); return NOTOK; } return OK; } /* domain syntax is valid if it contains one or more ASCII chars EXCEPT FOR specials spaces and ctrls */ int or_isdomsyntax (s) register char *s; { PP_DBG (("Lib/or_isdomsyntax('%s')", s)); for (; *s != '\0'; s++) { switch (*s) { case '(': case ')': case '<': case '>': case '@': case ',': case ';': case ':': case '\\': case '"': case '.': case '[': case ']': case ' ': /* --- specials --- */ return FALSE; default: if (!isascii (*s)) return FALSE; if (iscntrl (*s)) return FALSE; break; } } return TRUE; } int or_ddname_chk (key) char *key; { if (lexequ (key, "RFC-822") == 0) return TRUE; if (lexequ (key, "UUCP") == 0) return TRUE; if (lexequ (key, "JNT-MAIL") == 0) return TRUE; return FALSE; } int rfc_space (s) char *s; { int retval = TRUE; for (; *s != '\0'; s++) if (*s != ' ') { retval = FALSE; break; } PP_DBG (("Lib/rfc_space ('%d')", retval)); return retval; }