|
|
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: R T
Length: 1082 (0x43a)
Types: TextFile
Names: »RemoveProp.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦this⟧ »EUUGD11/euug-87hel/sec1/offconv/RemoveProp.c«
/*
*
* Description
* Remove the named property from a property list.
*
* Output
*
* Input
* Obj Pointer to object structure from which to remove prop.
* PropName Name of property to be removed.
*
* Diagnostics
* Returns 0 if successful, -1 if named property is not found.
*
* Author
* Randi J. Rost
* Digital Equipment Corp.
* Workstation Systems Engineering
* Palo Alto, CA
*
* History
* 17-Nov-86 Created
*
*/
#include <stdio.h>
#include "off.h"
OFFRemoveProperty(Obj, PropName)
OFFObjDesc *Obj; /* Pointer to object */
char *PropName; /* Name of property to be deleted */
{
OFFProperty **ppProp;
OFFProperty *newProp;
OFFProperty *nextProp;
ppProp = &(Obj->FirstProp);
while (*ppProp != NULL)
{
if (strcmp(PropName, (*ppProp)->PropName) != 0)
{
nextProp = (*ppProp)->NextProp;
OFFFreeProperty(*ppProp);
(*ppProp) = nextProp;
return(0);
}
ppProp = &((*ppProp)->NextProp);
}
fprintf(stderr,
"OFFRemoveProperty: specified property not in property list\n");
return(-1);
}