diff options
Diffstat (limited to 'sys/netiso/xebec/sets.c')
-rw-r--r-- | sys/netiso/xebec/sets.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sys/netiso/xebec/sets.c b/sys/netiso/xebec/sets.c index 3bb74ed8d291..6022a894434d 100644 --- a/sys/netiso/xebec/sets.c +++ b/sys/netiso/xebec/sets.c @@ -1,5 +1,5 @@ -/* $Header: sets.c,v 2.3 88/09/19 12:55:30 nhall Exp $ */ -/* $Source: /var/home/tadl/src/argo/xebec/RCS/sets.c,v $ */ +/* $Header: /home/ncvs/src/sys/netiso/xebec/sets.c,v 1.1.1.1 1994/05/24 10:07:45 rgrimes Exp $ */ +/* $Source: /home/ncvs/src/sys/netiso/xebec/sets.c,v $ */ /* * This code is such a kludge that I don't want to put my name on it. * It was a ridiculously fast hack and needs rewriting. @@ -14,9 +14,9 @@ struct Object *CurrentEvent = (struct Object *)0; struct Object *Objtree; struct Object dummy; -/* +/* * define a set w/ type and name - * return a set number + * return a set number */ #undef NULL #define NULL (struct Object *)0 @@ -118,19 +118,19 @@ FILE *f; fprintf(f, "struct %s_event {\n\tint ev_number;\n", &protocol[0]); IFDEBUG(X) /* finish sstring[] & start estring[] */ - fprintf(astringfile, + fprintf(astringfile, "};\n\nchar *%s_estring[] = {\n", protocol); ENDDEBUG } int FirstEventAttribute = 1; -static -insert(o) +static +insert(o) struct Object *o; { struct Object *p = Objtree; - struct Object **q = &Objtree; + struct Object **q = &Objtree; int val=1; @@ -143,7 +143,7 @@ struct Object *o; fprintf(stderr, "No states may be defined after *TRANSITIONS\n"); Exit(-1); } - o->obj_number = Nstates++ ; + o->obj_number = Nstates++ ; if(Nstates > MAXSTATES) { fprintf(stderr, "Too many states\n"); Exit(-1); @@ -153,7 +153,7 @@ struct Object *o; fprintf(astringfile, "\"%s(0x%x)\",\n", o->obj_name, o->obj_number); ENDDEBUG } else { - /* EVENTSET */ + /* EVENTSET */ if( ! states_done ) { fprintf(stderr, "states must precede events\n"); Exit(-1); @@ -168,7 +168,7 @@ struct Object *o; fprintf(Efile, "\n\tunion{\n"); /*} */ FirstEventAttribute = 0; } - fprintf(Efile, + fprintf(Efile, "struct %s %s%s;\n\n", o->obj_struc, EV_PREFIX, o->obj_name); } fprintf(Efile, "#define %s 0x%x\n", o->obj_name, o->obj_number); @@ -215,10 +215,10 @@ struct Object *o; ENDDEBUG } -delete(o) +delete(o) struct Object *o; { - register struct Object *p = o->obj_right; + register struct Object *p = o->obj_right; register struct Object *q; register struct Object *newparent; register struct Object **np_childlink; @@ -262,7 +262,7 @@ struct Object *o; p = o->obj_left; } *np_childlink = p; - if(p) + if(p) p->obj_parent = newparent; IFDEBUG(T) @@ -281,13 +281,13 @@ int keep; IFDEBUG(o) printf("defineset(0x%x,%s, %s)\n", type , adr, keep?"KEEP":"NO_KEEP"); ENDDEBUG - + onew = (struct Object *)Malloc(sizeof (struct Object)); bzero(onew, sizeof(struct Object)); onew->obj_name = adr; onew->obj_kind = OBJ_SET; onew->obj_type = type; - if(keep) + if(keep) insert( onew ); /* address already stashed before calling defineset */ IFDEBUG(o) @@ -321,9 +321,9 @@ char *struc; IFDEBUG(o) printf("defineitem(0x%x, %s at 0x%x, %s)\n", type, adr, adr, struc); ENDDEBUG - + if( onew = lookup( type, adr ) ) { - fprintf(stderr, + fprintf(stderr, "Internal error at defineitem: trying to redefine obj type 0x%x, adr %s\n", type, adr); exit(-1); @@ -349,7 +349,7 @@ char *adr; IFDEBUG(o) printf("member(0x%x, %s)\n", o, adr); ENDDEBUG - + oold = lookup( o->obj_type, adr ); onew = (struct Object *)Malloc(sizeof (struct Object)); @@ -396,7 +396,7 @@ AddCurrentEventName(x) register char **x; { register char *n = EV_PREFIX; ; - + if( CurrentEvent == (struct Object *)0 ) { fprintf(stderr, "No event named! BARF!\n"); Exit(-1); } @@ -429,7 +429,7 @@ dumptree(o,i) fprintf(stdout, "%3d NULL\n", i); } else { dumptree(o->obj_left, i+1); - for(j=0; j<i; j++) + for(j=0; j<i; j++) fputc(' ', stdout); fprintf(stdout, "%3d 0x%x: %s\n", i,o, OBJ_NAME(o)); dumptree(o->obj_right, i+1); @@ -467,6 +467,6 @@ char *pred, *action; fprintf(stdout, " <== "); dumpit(oldstate); dumpit(event); - fprintf(stdout, "\n\t\t%s\n\t\t%s\n", pred?pred:"DEFAULT", + fprintf(stdout, "\n\t\t%s\n\t\t%s\n", pred?pred:"DEFAULT", action); } |