Annotation of 43BSDTahoe/usr.bin/struct/1.node.c, revision 1.1.1.1

1.1       root        1: #ifndef lint
                      2: static char sccsid[] = "@(#)1.node.c   4.1     (Berkeley)      2/11/83";
                      3: #endif not lint
                      4: 
                      5: #include <stdio.h>
                      6: #include "def.h"
                      7: #include "1.incl.h"
                      8: 
                      9: makenode(type,addimp,addcom, labe,arcnum,arctype,arclab)
                     10: LOGICAL addimp,addcom;
                     11: int type, arctype[], arcnum;
                     12: long arclab[], labe;
                     13:        {
                     14:        int i;
                     15:        VERT num;
                     16:        
                     17:        ASSERT(arcsper[type] < 0 || arcnum == arcsper[type], makenode);
                     18:        num = create(type,arcnum);
                     19:        
                     20:        if (addimp)  fiximp(num,labe);
                     21:        
                     22:        for (i = 0; i < arcnum; ++i)
                     23:                {
                     24:                if (arctype[i] == -2)
                     25:                        addref(arclab[i],&ARC(num,i));
                     26:                else
                     27:                        ARC(num,i) = arctype[i];
                     28:                }
                     29:        
                     30:        
                     31:        if (hascom[type] )
                     32:                {
                     33:                if (!addcom || endcom < begline)
                     34:                        BEGCOM(num) = UNDEFINED;
                     35:                else
                     36:                        BEGCOM(num) = begchar - rtnbeg;
                     37:                }
                     38:        return(num);
                     39:        }
                     40: 
                     41: 
                     42: 
                     43: 
                     44: 
                     45: fiximp(num,labe)               /* fix implicit links, check nesting */
                     46: VERT num;
                     47: long labe;
                     48:        {
                     49:        fixvalue(implicit, num);                /* set implicit links to this node */
                     50:        clear(implicit);
                     51:        if(labe != implicit) fixvalue(labe, num);
                     52:        }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.