|
|
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 f
Length: 2489 (0x9b9)
Types: TextFile
Names: »free.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z«
└─⟦d846658bd⟧
└─⟦this⟧ »osimis/smap/free.c«
/*
* Copyright (c) 1988 University College London
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the Department of Computer Science, University College London.
* The name of the University may not be used to
* endorse or promote products derived from this software without
* specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* routines to free allocated memory */
/*
* By George Pavlou, October 1988
*/
#include <stdio.h>
#include <isode/rosap.h>
#include "msap.h"
#include "microscope.h"
free_attrpairs (attrs)
AttrPairs *attrs;
{
AttrPairs *next = attrs;
for (; next != (AttrPairs *) NULL; ) {
next = (attrs = next) -> Next;
cfree (attrs);
attrs = (AttrPairs *) NULL;
}
}
free_mobjD (mobj)
ManagedObjectS *mobj;
{
switch (mobj->type) {
case M_SYSTEM:
if (mobj->msys != (ManagedSystemS *) NULL) {
cfree(mobj->msys);
mobj->msys = (ManagedSystemS *) NULL;
}
break;
case T_SUBSYS:
if (mobj->tsubsys != (T_LayerSubsystemS *) NULL) {
cfree(mobj->tsubsys);
mobj->tsubsys = (T_LayerSubsystemS *) NULL;
}
break;
case T_ENTITY:
if (mobj->tent != (T_LayerEntityS *) NULL) {
cfree(mobj->tent);
mobj->tent = (T_LayerEntityS *) NULL;
}
break;
case T_EINV:
if (mobj->einv != (T_EntityInvocationS *) NULL) {
cfree(mobj->einv);
mobj->einv = (T_EntityInvocationS *) NULL;
}
break;
case T_CEPT:
if (mobj->cept != (T_ConnectionEndpointS *) NULL) {
cfree(mobj->cept);
mobj->cept = (T_ConnectionEndpointS *) NULL;
}
break;
case C_THLD:
if (mobj->cthld != (C_ThresholdS *) NULL) {
cfree(mobj->cthld);
mobj->cthld = (C_ThresholdS *) NULL;
}
break;
case G_THLD:
if (mobj->gthld != (G_ThresholdS *) NULL) {
cfree(mobj->gthld);
mobj->gthld = (G_ThresholdS *) NULL;
}
break;
case RPCTL:
if (mobj->rpctl != (ReportControlS *) NULL) {
cfree(mobj->rpctl);
mobj->rpctl = (ReportControlS *) NULL;
}
break;
}
}