On Thursday, April 3, 2003, at 03:18 PM, matt massie wrote:
#include "sexp.h"
char buf[1024];
char wire[1024];
int
main ( void )
{
register int i;
sexp_t *sx;
int len;
pcont_t *cc = NULL;
/* We'll get the data from a socket */
strcpy( wire,
"(cpu((user4:10.0)(system4:10.0)(nice4:10.0)(idle4:70.0)))");
len = strlen(wire);
fprintf(stderr,"msg size is %d\n", len);
for(i=0; i< 1000000; i++)
{
/* Convert the sexp string... */
cc = cparse_sexp(wire, 1024, cc);
Lots of sex here... Is this legal?
Bad joke :) Seriously now, I like the direction. Putting some form of
standard structure in the wire format is good, better than naive ":"
delimeters that would make recursive structures difficult to read. I
like it.
Federico
Rocks Cluster Group, SDSC, San Diego, CA