|
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 u
Length: 1462 (0x5b6) Types: TextFile Names: »ut_dlh.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Lib/pp/ut_dlh.c«
/* ut_dlh.c: utility routines for distribution list history */ # ifndef lint static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/pp/RCS/ut_dlh.c,v 5.0 90/09/20 16:12:36 pp Exp Locker: pp $"; # endif /* * $Header: /cs/research/pp/hubris/pp-beta/Lib/pp/RCS/ut_dlh.c,v 5.0 90/09/20 16:12:36 pp Exp Locker: pp $ * * $Log: ut_dlh.c,v $ * Revision 5.0 90/09/20 16:12:36 pp * rcsforce : 5.0 public release * */ #include "util.h" #include "mta.h" DLHistory *dlh_new (addr, dn, utc) char *addr, *dn; UTC utc; { DLHistory *dlh; dlh = (DLHistory *) smalloc (sizeof *dlh); dlh -> dlh_addr = addr ? strdup (addr) : NULLCP; dlh -> dlh_dn = dn ? strdup (dn) : NULLCP; dlh -> dlh_time = utc ? utcdup(utc) : utcnow (); dlh -> dlh_next = NULL; return dlh; } void dlh_add (base, dlh) DLHistory **base, *dlh; { DLHistory **dlp; for (dlp = base; *dlp; dlp = &(*dlp) -> dlh_next) continue; *dlp = dlh; } DLHistory *dlh_dup (dlh) DLHistory *dlh; { DLHistory *new = NULL; DLHistory *dlp; for (dlp = dlh; dlp; dlp = dlp->dlh_next) { dlh_add (&new, dlh_new (dlp -> dlh_addr, dlp -> dlh_dn, dlp -> dlh_time)); } return new; } void dlh_free (dlh) DLHistory *dlh; { if (dlh == NULL) return; if (dlh -> dlh_next) dlh_free (dlh -> dlh_next); if (dlh -> dlh_addr) free (dlh -> dlh_addr); if (dlh -> dlh_dn) free (dlh -> dlh_dn); if (dlh -> dlh_time) free ((char *) dlh -> dlh_time); free ((char *)dlh); }