|
|
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: 1208 (0x4b8)
Types: TextFile
Names: »ryinit-example.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/doc/manual/ryinit-example.c«
...
static struct dispatch dispatches[] = {
/* real user-supplied routines go here... */
"help", 0, do_help, NULLIFP, NULLIFP, NULLIFP,
"print this information",
"quit", 0, do_quit, NULLIFP, NULLIFP, NULLIFP,
"terminate the association and exit",
NULL
};
/* ARGSUSED */
static int do_help (sd, ds, args, dummy)
int sd;
register struct dispatch *ds;
char **args;
caddr_t *dummy;
{
printf ("\nCommands are:\n");
for (ds = dispatches; ds -> ds_name; ds++)
printf ("%s\t%s\n", ds -> ds_name, ds -> ds_help);
return NOTOK;
}
/* ARGSUSED */
static int do_quit (sd, ds, args, dummy)
int sd;
struct dispatch *ds;
char **args;
caddr_t *dummy;
{
struct AcSAPrelease acrs;
register struct AcSAPrelease *acr = &acrs;
struct AcSAPindication acis;
register struct AcSAPindication *aci = &acis;
register struct AcSAPabort *aca = &aci -> aci_abort;
if (AcRelRequest (sd, ACF_NORMAL, NULLPEP, 0, NOTOK, acr, aci) == NOTOK)
acs_adios (aca, "A-RELEASE.REQUEST");
if (!acr -> acr_affirmative) {
(void) AcUAbortRequest (sd, NULLPEP, 0, aci);
adios (NULLCP, "release rejected by peer: %d", acr -> acr_reason);
}
ACRFREE (acr);
exit (0);
}