|
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 r
Length: 1507 (0x5e3) Types: TextFile Names: »rd_adr.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Lib/io/rd_adr.c«
/* rd_adr.c: read a text address struct */ # ifndef lint static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/io/RCS/rd_adr.c,v 5.0 90/09/20 16:06:34 pp Exp Locker: pp $"; # endif /* * $Header: /cs/research/pp/hubris/pp-beta/Lib/io/RCS/rd_adr.c,v 5.0 90/09/20 16:06:34 pp Exp Locker: pp $ * * $Log: rd_adr.c,v $ * Revision 5.0 90/09/20 16:06:34 pp * rcsforce : 5.0 public release * */ #include "head.h" #include "adr.h" #include <sys/file.h> #include <sys/time.h> extern int ad_count; CHAN *ch_nm2struct(); /* --------------------- Begin Routines -------------------------------- */ int rd_adr (fp, justone, base) /* get an addr seq from a file */ FILE *fp; int justone; ADDR **base; { long fp_startln; char *argv[100], buf[BUFSIZ]; int argc, gotone=FALSE, retval; PP_DBG (("Lib/io/rd_adr (fp, %d, base)", justone)); for (;;) { fp_startln = ftell(fp); if (rp_isbad (retval = txt2buf (buf, fp))) { PP_DBG (("Lib/io/rd_adr txt2buf retval (%d - %s)", retval, rp_valstr (retval))); if (retval == RP_EOF && !justone && gotone) return (RP_DONE); return (retval); } if (retval == RP_DONE) return (RP_DONE); if ((argc = str2arg (buf, 100, argv)) == 0) return (RP_PARM); retval = txt2adr (base, fp_startln, argv, argc); PP_DBG (("Lib/io/rd_adr retval (%d)", retval)); if (retval == NOTOK) return (RP_PARM); if (gotone == FALSE) gotone = TRUE; ad_count ++; if (justone) return (RP_OK); } }