|
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: 1936 (0x790) Types: TextFile Names: »rydsblock.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/rosy/rydsblock.c«
/* rydsblock.c - manage dispatch blocks */ #ifndef lint static char *rcsid = "$Header: /f/osi/rosy/RCS/rydsblock.c,v 7.0 89/11/23 22:21:55 mrose Rel $"; #endif /* * $Header: /f/osi/rosy/RCS/rydsblock.c,v 7.0 89/11/23 22:21:55 mrose Rel $ * * * $Log: rydsblock.c,v $ * Revision 7.0 89/11/23 22:21:55 mrose * Release 6.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ /* LINTLIBRARY */ #include <stdio.h> #include "rosy.h" /* \f DATA */ static int once_only = 0; static struct dspblk dspque; static struct dspblk *DSHead = &dspque; /* \f DISPATCH BLOCKS */ struct dspblk *newdsblk (sd, ryo) int sd; struct RyOperation *ryo; { register struct dspblk *dsb; dsb = (struct dspblk *) calloc (1, sizeof *dsb); if (dsb == NULL) return NULL; dsb -> dsb_fd = sd; dsb -> dsb_ryo = ryo; if (once_only == 0) { DSHead -> dsb_forw = DSHead -> dsb_back = DSHead; once_only++; } insque (dsb, DSHead -> dsb_back); return dsb; } /* \f */ freedsblk (dsb) register struct dspblk *dsb; { if (dsb == NULL) return; remque (dsb); free ((char *) dsb); } /* \f */ struct dspblk *finddsblk (sd, op) register int sd, op; { register struct dspblk *dsb; if (once_only == 0) return NULL; for (dsb = DSHead -> dsb_forw; dsb != DSHead; dsb = dsb -> dsb_forw) if (dsb -> dsb_fd == sd && dsb -> dsb_ryo -> ryo_op == op) return dsb; return NULL; } /* \f */ losedsblk (sd) register int sd; { register struct dspblk *dsb, *ds2; if (once_only == 0) return; for (dsb = DSHead -> dsb_forw; dsb != DSHead; dsb = ds2) { ds2 = dsb -> dsb_forw; if (dsb -> dsb_fd == sd) freedsblk (dsb); } }