|
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«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/rosy/rydsblock.c«
/* rydsblock.c - manage dispatch blocks */ #ifndef lint static char *rcsid = "$Header: /f/osi/rosy/RCS/rydsblock.c,v 6.0 89/03/18 23:42:48 mrose Rel $"; #endif /* * $Header: /f/osi/rosy/RCS/rydsblock.c,v 6.0 89/03/18 23:42:48 mrose Rel $ * * * $Log: rydsblock.c,v $ * Revision 6.0 89/03/18 23:42:48 mrose * Release 5.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); } }