DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T a

⟦b4c3062e5⟧ TextFile

    Length: 1543 (0x607)
    Types: TextFile
    Names: »ap_s2p.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« 
        └─⟦e5a54fb17⟧ 
            └─⟦this⟧ »pp-5.0/Lib/addr/ap_s2p.c« 

TextFile

/* ap_s2p.c: convert string into major address parts */

# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/addr/RCS/ap_s2p.c,v 5.0 90/09/20 16:04:02 pp Exp Locker: pp $";
# endif

/*
 * $Header: /cs/research/pp/hubris/pp-beta/Lib/addr/RCS/ap_s2p.c,v 5.0 90/09/20 16:04:02 pp Exp Locker: pp $
 *
 * $Log:	ap_s2p.c,v $
 * Revision 5.0  90/09/20  16:04:02  pp
 * rcsforce : 5.0 public release
 * 
 */



#include "util.h"
#include "ap_lex.h"
#include "ap.h"


static char     *s2p_txt;       /* -- hdr_in() passes to alst() -- */




/* ---------------------  Static  Routines  ------------------------------- */


/* -- adrs extracted from component text -- */

static int s2p_in()
{
	/* -- nothing to give it -- */

	if (s2p_txt == NULLCP)
		return (EOF);

	switch (*s2p_txt) {
	case '\0':
	case '\n':
		/* -- end of string, drop on through -- */
		s2p_txt = NULLCP;
		return (0);
	}

	return (*(s2p_txt++));
}




/* ---------------------  Begin  Routines  -------------------------------- */


/* -- One of the main uses of this routine is to replace adrparse.c -- */


char *ap_s2p (str_ptr, tree, group, name, local, domain, route)
char            *str_ptr;
AP_ptr          *tree,
		*group,
		*name,
		*local,
		*domain,
		*route;
{
	s2p_txt = str_ptr;

	*tree = ap_pinit (s2p_in);

	switch (ap_1adr()) {
	case DONE:
		return ((char *) DONE);
	case OK:
		ap_t2p (*tree, group, name, local, domain, route);
		/* -- so they can parse the next chunk -- */
		return (s2p_txt);
	}

	return ((char *) NOTOK);
}