ftp.nice.ch/pub/next/unix/audio/cmusic.bs.N.tar.gz#/src/lib/libprocom/SCCS/s.printprop.c

This is s.printprop.c in view mode; [Download] [Up]

h09790
s 00000/00000/00038
d D 1.2 85/11/26 23:02:04 dgl 2 1
c eliminated LOOKED_ALREADY from getheader to cure bug 
c re. trying to add property to stdin if no header exists yet.
e
s 00038/00000/00000
d D 1.1 85/11/25 09:59:11 dgl 1 0
c original version
e
u
U
f i 
t
T
I 1
/* %M%	%I%	(CARL)	%G%	%U% */

#include <stdio.h>
#include <carl/carl.h>
#include <carl/procom.h>

/*
 * printprop - print property list
 * takes:
 * 	proplist - pointer to property structure, possibly linked list
 * 		of properties,
 * 	outp - file descriptor to receive output.
 * returns:
 * 	-1 if proplist is NULL,
 * 	0 otherwise.
 */

printprop(proplist, outp)
	PROP *proplist;
	FILE *outp;
{
	register PROP *p;

	if (proplist == NULL)
		return(-1);

	for (p = proplist; p != NULL; p = p->nextprop) {
		if (p->propname == NULL)
			fprintf(outp, "NULL\t");
		else
			fprintf(outp, "%s\t", p->propname);
		if (p->propval == NULL)
			fprintf(outp, "NULL\n");
		else
			fprintf(outp, "%s\n", p->propval);
	}
	return(0);
}
E 1

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.