diff --git a/NRswitchg.c b/NRswitchg.c index 074e583..767099d 100644 --- a/NRswitchg.c +++ b/NRswitchg.c @@ -69,7 +69,7 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,dolabel,quiet; + booleann badargs,dolabel,quiet; int j,m,n,v,argnum; int codetype,outcode; graph *g; diff --git a/addedgeg.c b/addedgeg.c index e9e0962..9af6b47 100644 --- a/addedgeg.c +++ b/addedgeg.c @@ -80,8 +80,8 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,dolabel,quiet,Dswitch; - boolean bswitch,tswitch,fswitch,Fswitch,zswitch; + booleann badargs,dolabel,quiet,Dswitch; + booleann bswitch,tswitch,fswitch,Fswitch,zswitch; int mincycle; int i,j,m,n,v,w,argnum; int codetype,outcode; @@ -94,11 +94,11 @@ main(int argc, char *argv[]) #if MAXN graph h[MAXN*MAXM]; int deg[MAXN],dist[MAXN]; - boolean okdist[MAXN+1]; + booleann okdist[MAXN+1]; #else DYNALLSTAT(graph,h,h_sz); DYNALLSTAT(int,deg,deg_sz); - DYNALLSTAT(boolean,okdist,okdist_sz); + DYNALLSTAT(booleann,okdist,okdist_sz); DYNALLSTAT(int,dist,dist_sz); #endif @@ -204,7 +204,7 @@ main(int argc, char *argv[]) #if !MAXN DYNALLOC1(int,deg,deg_sz,n,"addedgeg"); - DYNALLOC1(boolean,okdist,okdist_sz,n+1,"addedgeg"); + DYNALLOC1(booleann,okdist,okdist_sz,n+1,"addedgeg"); DYNALLOC1(int,dist,dist_sz,n,"addedgeg"); #endif diff --git a/amtog.c b/amtog.c index 1880f9a..34c3c59 100644 --- a/amtog.c +++ b/amtog.c @@ -44,10 +44,10 @@ main(int argc, char *argv[]) int argnum,i,j,outcode,val; int unsym0,unsym1,loop0; char *arg,sw,ochar; - boolean badargs; - boolean nswitch,sswitch,gswitch,hswitch,qswitch; - boolean warn,loop,unsymm,compl,triangle,tournament; - boolean zswitch,oswitch,nowarn; + booleann badargs; + booleann nswitch,sswitch,gswitch,hswitch,qswitch; + booleann warn,loop,unsymm,compl,triangle,tournament; + booleann zswitch,oswitch,nowarn; char *infilename,*outfilename; FILE *infile,*outfile; nauty_counter nin; diff --git a/assembleg.c b/assembleg.c index 2eec8a4..e68751e 100644 --- a/assembleg.c +++ b/assembleg.c @@ -86,7 +86,7 @@ readinputs(FILE *f, int imin, int imax) size_t tablesize; graph *g; int m,n; - boolean digraph; + booleann digraph; if ((gin = malloc(sizeof(graphptr)*10000)) == NULL || (size = malloc(sizeof(int)*10000)) == NULL) @@ -124,7 +124,7 @@ readinputs(FILE *f, int imin, int imax) static void assemble(graph *g, int nmin, int nmax, int sofar, int lastpos, - boolean writeconn, FILE *outfile) + booleann writeconn, FILE *outfile) /* Recursively add one more graph */ { int pos,newsize; @@ -157,9 +157,9 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet; - boolean nswitch,cswitch,iswitch; - boolean digraph; + booleann badargs,quiet; + booleann nswitch,cswitch,iswitch; + booleann digraph; int j,m,n,argnum; int codetype; graph *g; diff --git a/biplabg.c b/biplabg.c index 7ef6661..8307f68 100644 --- a/biplabg.c +++ b/biplabg.c @@ -19,7 +19,7 @@ /**************************************************************************/ -static boolean +static booleann biplabel(graph *g, int m, int n, graph *h) /* h := bipartite labelling of g; else return FALSE */ { @@ -53,7 +53,7 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet; + booleann badargs,quiet; int j,m,n,argnum; int codetype,outcode; graph *g; diff --git a/blisstog.c b/blisstog.c index f0ee117..17f393b 100644 --- a/blisstog.c +++ b/blisstog.c @@ -29,7 +29,7 @@ nextchar(FILE *f) else return s[0]; } -static boolean +static booleann readblissgraph(FILE *f, sparsegraph *g) /* Reads a graph from Bliss format into a sparse graph */ { @@ -139,7 +139,7 @@ main(int argc, char *argv[]) int j,firstarg; SG_DECL(g); size_t flen; - boolean ispipe; + booleann ispipe; int nmin,nmax; char zcmd[515]; diff --git a/catg.c b/catg.c index d7176f1..8d2e27c 100644 --- a/catg.c +++ b/catg.c @@ -99,8 +99,8 @@ main(int argc, char *argv[]) FILE *infile; int nfiles,i,j; char *arg,sw; - boolean vswitch,xswitch; - boolean badargs; + booleann vswitch,xswitch; + booleann badargs; char buff[1024]; size_t nr; DYNALLSTAT(char*,filename,filename_sz); diff --git a/checks6.c b/checks6.c index 06eccc8..d33a065 100644 --- a/checks6.c +++ b/checks6.c @@ -17,7 +17,7 @@ /***********************************************************************/ -static boolean +static booleann seemsbad(char *s) /* Check graph string for apparent problem, if so, correct it */ { @@ -135,9 +135,9 @@ main(int argc, char *argv[]) long nin,nerr; int argnum,j; char *arg,sw,*s; - boolean pswitch; - boolean wswitch; - boolean badargs; + booleann pswitch; + booleann wswitch; + booleann badargs; long pval1,pval2,maxin; HELP; PUTVERSION; diff --git a/complg.c b/complg.c index 0945019..3ee856d 100644 --- a/complg.c +++ b/complg.c @@ -24,7 +24,7 @@ /**************************************************************************/ static void -compl(graph *g, int m, int n, graph *h, boolean comploops) +compl(graph *g, int m, int n, graph *h, booleann comploops) /* h := complement of g */ { int i,j; @@ -58,8 +58,8 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean also,dolabel,badargs,restricted,Restricted,quiet; - boolean digraph,Lswitch; + booleann also,dolabel,badargs,restricted,Restricted,quiet; + booleann digraph,Lswitch; int j,m,n,argnum; int codetype,outcode; graph *g; diff --git a/converseg.c b/converseg.c index 2ebd6f1..c1ef35e 100644 --- a/converseg.c +++ b/converseg.c @@ -40,8 +40,8 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet; - boolean digraph; + booleann badargs,quiet; + booleann digraph; int j,m,n,argnum; int codetype,outcode; graph *g; diff --git a/copyg.c b/copyg.c index b829a02..9a630d0 100644 --- a/copyg.c +++ b/copyg.c @@ -52,8 +52,8 @@ (1) In a separate file numleaves.c (present in the package), write a procedure with prototype matching - boolean - numleaves(graph *g, boolean digraph, long Qlo, long Qhi, int m, int n); + booleann + numleaves(graph *g, booleann digraph, long Qlo, long Qhi, int m, int n); It should return a nonzero value if g has between Qlo and Qhi leaves, and return 0 otherwise. The values of Qlo and Qhi are obtained from the -Q switch, with missing lower bound -NOLIMIT and missing upper @@ -83,8 +83,8 @@ #include "gtools.h" #ifdef FILTER -extern boolean -FILTER(graph *g, boolean digraph, long Qlo, long Qhi, int m, int n); +extern booleann +FILTER(graph *g, booleann digraph, long Qlo, long Qhi, int m, int n); #ifdef SUMMARY extern void SUMMARY(void); #endif @@ -103,9 +103,9 @@ main(int argc, char *argv[]) nauty_counter nout; int argnum,j,nprev,mprev; char *arg,sw; - boolean sswitch,fswitch,pswitch,qswitch,gswitch; - boolean hswitch,xswitch,iswitch,Iswitch,zswitch; - boolean badargs,digraph,vswitch,Qswitch; + booleann sswitch,fswitch,pswitch,qswitch,gswitch; + booleann hswitch,xswitch,iswitch,Iswitch,zswitch; + booleann badargs,digraph,vswitch,Qswitch; long Qlo,Qhi; long pval1,pval2,maxin,refresh,inclines; double t0,t1; diff --git a/cubhamg.c b/cubhamg.c index 299fe70..88aad05 100644 --- a/cubhamg.c +++ b/cubhamg.c @@ -990,7 +990,7 @@ hasin(cubgraph cub, int n, int ne, int *x0, int *x1, int limit) /* test if cub has "in" property */ { edgevec v1,v2,initclass,outclass; - boolean done[MAXNE]; + booleann done[MAXNE]; int i,ii; int nbad; @@ -1028,7 +1028,7 @@ hasin(cubgraph cub, int n, int ne, int *x0, int *x1, int limit) /**************************************************************************/ -static boolean +static booleann eplus(cubgraph acub, int n, int ne, int x, int y, int *pwhy) { cubgraph cub; @@ -1126,12 +1126,12 @@ eplus(cubgraph acub, int n, int ne, int x, int y, int *pwhy) static int hase34(cubgraph cub, - int n, int ne, int *x0, int *x1, int *why, boolean plus, int limit) + int n, int ne, int *x0, int *x1, int *why, booleann plus, int limit) /* test if cub has "e34" property */ { edgevec v1,v2,initclass,outclass; int ea[4*MAXNE],eb[4*MAXNE],ec[4*MAXNE]; - boolean done[4*MAXNE]; + booleann done[4*MAXNE]; int count[MAXNE]; int i,ii; int vi,nbad,pluswhy; @@ -1217,7 +1217,7 @@ oldhasout(cubgraph cub, int n, int ne, int *x0, int *x1, int limit) /* test if cub has "out" property */ { edgevec v1,v2,initclass,outclass; - boolean done[MAXNE]; + booleann done[MAXNE]; int i,ii; int nbad; @@ -1324,7 +1324,7 @@ hasout(cubgraph cub, int n, int ne, int weight, int *x0, int *x1, int limit) /**************************************************************************/ -static boolean +static booleann biconnected_cub(cubgraph cub, int n) /* test whether cub is biconnected */ { @@ -1382,7 +1382,7 @@ biconnected_cub(cubgraph cub, int n) /**************************************************************************/ -static boolean +static booleann biconnected_cub_v(cubgraph cub, int vv, int n) /* test whether cub-vv is biconnected */ { @@ -1442,7 +1442,7 @@ biconnected_cub_v(cubgraph cub, int vv, int n) /**************************************************************************/ -static boolean +static booleann biconnected_v(graph *g, int vv, int m, int n) /* test whether g-vv is biconnected */ /* version for arbitrary sizes */ @@ -1512,7 +1512,7 @@ biconnected_v(graph *g, int vv, int m, int n) /**************************************************************************/ -static boolean +static booleann triconnected_cub(cubgraph cub, int n) /* test whether triconnected; awfully inefficient */ { @@ -1528,7 +1528,7 @@ triconnected_cub(cubgraph cub, int n) /**************************************************************************/ -static boolean +static booleann gtocub(graph *g, int m, int n, cubgraph cub, int *pne) /* Convert nauty-format graph into cubgraph. Returns FALSE if there * are any vertices of degree 4 or more. @@ -1562,7 +1562,7 @@ gtocub(graph *g, int m, int n, cubgraph cub, int *pne) /**************************************************************************/ -static boolean +static booleann sgtocub(sparsegraph *sg, cubgraph cub, int *pne) /* Convert sparse-format graph into cubgraph. Returns FALSE if there * are any vertices of degree 4 or more. @@ -1598,8 +1598,8 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile,*msgfile; - boolean badargs,biconn,triconn,fragment; - boolean in,out,inin,inout,e34,e34plus,testing; + booleann badargs,biconn,triconn,fragment; + booleann in,out,inin,inout,e34,e34plus,testing; nauty_counter numread,noncub,nonham,nonconn,numto; int ch,weight,m,n,ne,i,namesgot,nl; int nbad,limit,x0[BADLIM],x1[BADLIM],y0[BADLIM],y1[BADLIM]; diff --git a/deledgeg.c b/deledgeg.c index 4e69863..a287fad 100644 --- a/deledgeg.c +++ b/deledgeg.c @@ -23,8 +23,8 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,dolabel,quiet,dswitch; - boolean digraph; + booleann badargs,dolabel,quiet,dswitch; + booleann digraph; int i,j,m,n,v,w,argnum; int codetype,outcode; graph *g,*gq; @@ -32,7 +32,7 @@ main(int argc, char *argv[]) char *arg,sw; setword *gv,*gw; int mindeg,actmindeg,degv; - boolean zswitch; + booleann zswitch; double t; #if MAXN graph h[MAXN*MAXM]; diff --git a/delptg.c b/delptg.c index 8c1c05d..5f26bab 100644 --- a/delptg.c +++ b/delptg.c @@ -22,7 +22,7 @@ static FILE *outfile; static nauty_counter nout; static int outcode; -static boolean digraph,dolabel; +static booleann digraph,dolabel; /**************************************************************************/ @@ -86,7 +86,7 @@ writeone(graph *g, int m, int n, int *del, int ndel) /**************************************************************************/ static void -search(int level, int ndel, int *del, graph *g, int m, int n, boolean *degok) +search(int level, int ndel, int *del, graph *g, int m, int n, booleann *degok) { int i; @@ -111,7 +111,7 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile; - boolean badargs,quiet,dswitch,nswitch; + booleann badargs,quiet,dswitch,nswitch; int i,j,m,n,v,argnum; int ndel; int codetype; @@ -123,11 +123,11 @@ main(int argc, char *argv[]) int degv; double t; #if MAXN - boolean degok[MAXN]; - boolean del[MAXN]; + booleann degok[MAXN]; + booleann del[MAXN]; #else - DYNALLSTAT(boolean,degok,degok_sz); - DYNALLSTAT(boolean,del,del_sz); + DYNALLSTAT(booleann,degok,degok_sz); + DYNALLSTAT(booleann,del,del_sz); #endif HELP; PUTVERSION; @@ -235,7 +235,7 @@ main(int argc, char *argv[]) } #if !MAXN - DYNALLOC1(boolean,degok,degok_sz,n,"delptg"); + DYNALLOC1(booleann,degok,degok_sz,n,"delptg"); DYNALLOC1(int,del,del_sz,n,"delptg"); #endif diff --git a/directg.c b/directg.c index fbec429..eba403c 100644 --- a/directg.c +++ b/directg.c @@ -44,14 +44,14 @@ static int edgeno[MAXNV][MAXNV]; static set x[MAXME]; static int ix[2*MAXNE],nix; -static boolean first; +static booleann first; static int me; static int lastreject[MAXNV]; -static boolean lastrejok; +static booleann lastrejok; static int rejectlevel; static unsigned long groupsize; static unsigned long newgroupsize; -static boolean Gswitch,Vswitch,ntgroup,ntisol,digraph6; +static booleann Gswitch,Vswitch,ntgroup,ntisol,digraph6; static int splitlevel,splitmod,splitres,splitcount; static unsigned long splitcases; @@ -136,7 +136,7 @@ writeautom(int *p, int n) /**************************************************************************/ -static boolean +static booleann ismax(int *p, int n) /* test if x^p <= x */ { @@ -200,7 +200,7 @@ static int trythisone(grouprec *group, int ne, int n) { int i,k; - boolean accept; + booleann accept; graph g[WORDSIZE]; first = TRUE; @@ -289,7 +289,7 @@ trythisone(grouprec *group, int ne, int n) static int scan(int level, int ne, int minarcs, int maxarcs, int sofar, - boolean oriented, grouprec *group, int n) + booleann oriented, grouprec *group, int n) /* Main recursive scan; returns the level to return to. */ { int k,retlev; @@ -384,7 +384,7 @@ scan(int level, int ne, int minarcs, int maxarcs, int sofar, static void direct(graph *g, int nfixed, long minarcs, long maxarcs, - boolean oriented, int m, int n) + booleann oriented, int m, int n) { static DEFAULTOPTIONS_GRAPH(options); statsblk stats; @@ -532,8 +532,8 @@ main(int argc, char *argv[]) int m,n,codetype; int argnum,j,nfixed; char *arg,sw; - boolean badargs; - boolean Tswitch,uswitch,eswitch,qswitch,oswitch,fswitch,sswitch; + booleann badargs; + booleann Tswitch,uswitch,eswitch,qswitch,oswitch,fswitch,sswitch; long minarcs,maxarcs; double t; char *infilename,*outfilename; diff --git a/dreadnaut.c b/dreadnaut.c index c5a232d..7ab24a9 100644 --- a/dreadnaut.c +++ b/dreadnaut.c @@ -181,7 +181,7 @@ static int curfile; static FILE *fileptr[MAXIFILES]; static FILE *outfile; static char def_ext[] = DEFEXT; -static boolean firstpath; /* used in usernode() */ +static booleann firstpath; /* used in usernode() */ DEFAULTOPTIONS_TRACES(traces_opts); static TracesStats traces_stats; @@ -242,7 +242,7 @@ extern int CANONPROC(graph*,int*,graph*,int,int,int,int); #define INVARPROC NULL #define INVARPROCNAME "none" #else -extern void INVARPROC(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void INVARPROC(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); #define INVARPROCNAME "user-defined" #endif @@ -250,15 +250,15 @@ extern void INVARPROC(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); #define INVARPROC_SG NULL #define INVARPROCNAME_SG "none" #else -extern void INVARPROC_SG(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void INVARPROC_SG(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); #define INVARPROCNAME_SG "user-defined" #endif static struct invarrec { - void (*entrypoint)(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + void (*entrypoint)(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); char *name; - void (*entrypoint_sg)(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + void (*entrypoint_sg)(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); char *name_sg; } invarproc[] = {{INVARPROC, INVARPROCNAME, INVARPROC_SG, INVARPROCNAME_SG}, @@ -288,7 +288,7 @@ static void usernode(graph*,int*,int*,int,int,int,int,int,int); static void userlevel(int*,int*,int,int*,statsblk*,int,int,int,int,int,int); static int usercanon(graph*,int*,graph*,int,int,int,int); -static boolean options_writeautoms,options_writemarkers, +static booleann options_writeautoms,options_writemarkers, options_digraph,options_getcanon,options_linelength; static int options_invarproc,options_mininvarlevel,options_maxinvarlevel, options_invararg,options_tc_level,options_cartesian; @@ -378,12 +378,12 @@ int main(int argc, char *argv[]) { int m,n,newm,newn; - boolean gvalid,ovalid,cvalid,pvalid,minus,prompt,doquot; - boolean gvalid_sg,cvalid_sg; + booleann gvalid,ovalid,cvalid,pvalid,minus,prompt,doquot; + booleann gvalid_sg,cvalid_sg; int i,j,k,worksize,numcells,savednc,refcode,umask,qinvar; int oldorg,oldmode; int maxsize,cell1,cell2; - boolean ranreg,same; + booleann ranreg,same; char *s1,*s2; int c,d; unsigned long uli; @@ -396,7 +396,7 @@ main(int argc, char *argv[]) long zseed; permnode *generators; char *ap,*parameters; - boolean flushing; + booleann flushing; HELP; PUTVERSION; diff --git a/dretodot.c b/dretodot.c index 108f3fa..4c5f4af 100644 --- a/dretodot.c +++ b/dretodot.c @@ -254,8 +254,8 @@ main(int argc, char *argv[]) size_t j1, e_count; int argnum, initorg, cell, numCol, modcode, vtx, refcode, MaxV, MaxE; char *arg, sw; - boolean badargs, make_ranks, too_big; - boolean rswitch, dswitch, mswitch, nswitch, oswitch, iswitch, xswitch, Sswitch, gswitch, fswitch, vswitch, rswitch1, Eswitch, Vswitch; + booleann badargs, make_ranks, too_big; + booleann rswitch, dswitch, mswitch, nswitch, oswitch, iswitch, xswitch, Sswitch, gswitch, fswitch, vswitch, rswitch1, Eswitch, Vswitch; char *infilename, *outfilename, *drefilename; FILE *infile, *outfile, *drefile; nauty_counter nin; diff --git a/dretog.c b/dretog.c index 7b8d448..07025c9 100644 --- a/dretog.c +++ b/dretog.c @@ -41,8 +41,8 @@ main(int argc, char *argv[]) int m,n,c; int argnum,j,outcode,initorg; char *arg,sw; - boolean badargs,prompt,digraph; - boolean zswitch,sswitch,gswitch,oswitch,nswitch,hswitch,qswitch; + booleann badargs,prompt,digraph; + booleann zswitch,sswitch,gswitch,oswitch,nswitch,hswitch,qswitch; char *infilename,*outfilename; FILE *infile,*outfile; nauty_counter nin; diff --git a/edgetransg.c b/edgetransg.c index 75413d7..3c49f4c 100644 --- a/edgetransg.c +++ b/edgetransg.c @@ -136,11 +136,11 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet; - boolean vswitch,Vswitch; - boolean eswitch,Eswitch; - boolean aswitch,Aswitch; - boolean isvt,iset,isat; + booleann badargs,quiet; + booleann vswitch,Vswitch; + booleann eswitch,Eswitch; + booleann aswitch,Aswitch; + booleann isvt,iset,isat; int i,j,norbs,argnum; int codetype,outcode; sparsegraph g,h; diff --git a/genbg.c b/genbg.c index be296c5..539b0a5 100644 --- a/genbg.c +++ b/genbg.c @@ -108,7 +108,7 @@ OUTPROC feature. format, and n1,n2 are the numbers of vertices on each side. Your procedure can be in a separate file so long as it is linked with genbg. The global variables nooutput, nautyformat and canonise - (all type boolean) can be used to test for the presence of the + (all type booleann) can be used to test for the presence of the flags -u, -n and -l, respectively. For backward compatibility, it is possible to instead define OUTPROC1 to @@ -170,19 +170,19 @@ extern void SUMMARY(nauty_counter,double); #endif static FILE *outfile; /* file for output graphs */ -static boolean connec; /* presence of -c */ -static boolean verbose; /* presence of -v */ -static boolean simple; /* presence of -z */ -boolean nautyformat; /* presence of -n */ -boolean nooutput; /* presence of -u */ -boolean canonise; /* presence of -l */ -boolean graph6; /* presence of -g */ -boolean sparse6; /* presence of -s */ -boolean greout; /* presence of -a */ -boolean quiet; /* presence of -q */ -boolean footfree; /* presence of -F */ -boolean cutfree; /* presence of -L */ -boolean antichain; /* presence of -A */ +static booleann connec; /* presence of -c */ +static booleann verbose; /* presence of -v */ +static booleann simple; /* presence of -z */ +booleann nautyformat; /* presence of -n */ +booleann nooutput; /* presence of -u */ +booleann canonise; /* presence of -l */ +booleann graph6; /* presence of -g */ +booleann sparse6; /* presence of -s */ +booleann greout; /* presence of -a */ +booleann quiet; /* presence of -q */ +booleann footfree; /* presence of -F */ +booleann cutfree; /* presence of -L */ +booleann antichain; /* presence of -A */ int class1size; /* same as n1 */ int mincommon; /* -1 or value of -Y */ int maxcommon; /* -1 or value of -Z */ @@ -404,7 +404,7 @@ fragments(int *x, int nx, int *frag, int *nfrag) { int allx,i,j,v; int vbit,nw,w[MAXN]; - boolean done; + booleann done; allx = 0; for (i = 0; i < nx; ++i) allx |= x[i]; @@ -445,7 +445,7 @@ fragments(int *x, int nx, int *frag, int *nfrag) /*********************************************************************/ -static boolean +static booleann isconnected(graph *g, int n) /* test if g is connected */ { @@ -469,7 +469,7 @@ isconnected(graph *g, int n) /**************************************************************************/ -static boolean +static booleann distinvar(graph *g, int *invar, int n1, int n2) /* make distance invariant/ exit immediately FALSE if n-1 not maximal else exit TRUE @@ -660,7 +660,7 @@ userautomproc(int count, int *p, int *orbits, int numorbits, static void refinex(graph *g, int *lab, int *ptn, int level, int *numcells, - int *count, set *active, boolean goodret, + int *count, set *active, booleann goodret, int *code, int m, int n) { int i,c1,c2,labc1; @@ -830,8 +830,8 @@ makecanon(graph *g, graph *gcan, int n1, int n2) /**************************************************************************/ -static boolean -accept1(graph *g, int n2, int x, graph *gx, int *deg, boolean *rigid) +static booleann +accept1(graph *g, int n2, int x, graph *gx, int *deg, booleann *rigid) /* decide if n2 in theta(g+x) -- version for n2+1 < maxn2 */ { int i,n; @@ -943,8 +943,8 @@ accept1(graph *g, int n2, int x, graph *gx, int *deg, boolean *rigid) /**************************************************************************/ -static boolean -accept2(graph *g, int n2, int x, graph *gx, int *deg, boolean nuniq) +static booleann +accept2(graph *g, int n2, int x, graph *gx, int *deg, booleann nuniq) /* decide if n in theta(g+x) -- version for n+1 == maxn */ { int i,n; @@ -1184,7 +1184,7 @@ xbnds(int n2, int ne, int dmax) /**************************************************************************/ static void -genextend(graph *g, int n2, int *deg, int ne, boolean rigid, int xlb, int xub) +genextend(graph *g, int n2, int *deg, int ne, booleann rigid, int xlb, int xub) /* extend from n2 to n2+1 */ { int x,y,d; @@ -1193,11 +1193,11 @@ genextend(graph *g, int n2, int *deg, int ne, boolean rigid, int xlb, int xub) int xlbx,xubx,n; graph gx[MAXN]; int degx[MAXN]; - boolean rigidx; + booleann rigidx; int dneed,need,nfeet,hideg,deg1,ft[MAXN],nfrag,frag[MAXN]; #ifdef INSTRUMENT - boolean haschild; + booleann haschild; haschild = FALSE; ++nodes[n2]; @@ -1404,7 +1404,7 @@ int main(int argc, char *argv[]) { char *arg; - boolean badargs,gotD,gote,gotf,gotmr,gotY,gotZ,gotd,gotX; + booleann badargs,gotD,gote,gotf,gotmr,gotY,gotZ,gotd,gotX; long Dval1,Dval2; long dval1,dval2; int i,j,imin,imax,argnum,sw; diff --git a/geng.c b/geng.c index bf5de1d..c88d993 100644 --- a/geng.c +++ b/geng.c @@ -146,7 +146,7 @@ OUTPROC feature. nauty format, and n is the number of vertices. Your procedure can be in a separate file so long as it is linked with geng. The global variables sparse6, graph6, quiet, nooutput, nautyformat, - yformat and canonise (all type boolean) can be used to test + yformat and canonise (all type booleann) can be used to test for the presence of the flags -s, -g, -q, -u, -n, -y and -l, respectively. If -l is present, the group size and similar details can be found in the global variable nauty_stats. @@ -409,19 +409,19 @@ static void (*outproc)(FILE*,graph*,int); static FILE *outfile; /* file for output graphs */ static int connec; /* 1 for -c, 2 for -C, 0 for neither */ -static boolean bipartite; /* presence of -b */ -static boolean trianglefree; /* presence of -t */ -static boolean squarefree; /* presence of -f */ -static boolean savemem; /* presence of -m */ -static boolean verbose; /* presence of -v */ -boolean nautyformat; /* presence of -n */ -boolean yformat; /* presence of -y */ -boolean graph6; /* presence of -g */ -boolean sparse6; /* presence of -s */ -boolean nooutput; /* presence of -u */ -boolean canonise; /* presence of -l */ -boolean quiet; /* presence of -q */ -boolean header; /* presence of -h */ +static booleann bipartite; /* presence of -b */ +static booleann trianglefree; /* presence of -t */ +static booleann squarefree; /* presence of -f */ +static booleann savemem; /* presence of -m */ +static booleann verbose; /* presence of -v */ +booleann nautyformat; /* presence of -n */ +booleann yformat; /* presence of -y */ +booleann graph6; /* presence of -g */ +booleann sparse6; /* presence of -s */ +booleann nooutput; /* presence of -u */ +booleann canonise; /* presence of -l */ +booleann quiet; /* presence of -q */ +booleann header; /* presence of -h */ statsblk nauty_stats; static int mindeg,maxdeg,maxn,mine,maxe,mod,res; #define PRUNEMULT 50 /* bigger -> more even split at greater cost */ @@ -612,7 +612,7 @@ writenauty(FILE *f, graph *g, int n) /*********************************************************************/ -static boolean +static booleann isconnected(graph *g, int n) /* test if g is connected */ { @@ -636,7 +636,7 @@ isconnected(graph *g, int n) /**********************************************************************/ -static boolean +static booleann isbiconnected(graph *g, int n) /* test if g is biconnected */ { @@ -699,7 +699,7 @@ gcomplement(graph *g, graph *gc, int n) /**********************************************************************/ -static boolean +static booleann distinvar(graph *g, int *invar, int n) /* make distance invariant return FALSE if n-1 not maximal else return TRUE */ @@ -945,7 +945,7 @@ arith(xword a, xword b, xword c) /**************************************************************************/ static void -makeleveldata(boolean restricted) +makeleveldata(booleann restricted) /* make the level data for each level */ { long h; @@ -1183,7 +1183,7 @@ userautomprocb(int count, int *p, int *orbits, static void refinex(graph *g, int *lab, int *ptn, int level, int *numcells, - int *count, set *active, boolean goodret, int *code, int m, int n) + int *count, set *active, booleann goodret, int *code, int m, int n) { int i,c1,c2,labc1; setword x,lact; @@ -1334,8 +1334,8 @@ makecanon(graph *g, graph *gcan, int n) /**************************************************************************/ -static boolean -accept1(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid) +static booleann +accept1(graph *g, int n, xword x, graph *gx, int *deg, booleann *rigid) /* decide if n in theta(g+x) - version for n+1 < maxn */ { int i; @@ -1430,8 +1430,8 @@ accept1(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid) /**************************************************************************/ -static boolean -accept1b(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid, +static booleann +accept1b(graph *g, int n, xword x, graph *gx, int *deg, booleann *rigid, void (*makeh)(graph*,xword*,int)) /* decide if n in theta(g+x) -- version for n+1 < maxn */ { @@ -1548,8 +1548,8 @@ accept1b(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid, /**************************************************************************/ -static boolean -accept2(graph *g, int n, xword x, graph *gx, int *deg, boolean nuniq) +static booleann +accept2(graph *g, int n, xword x, graph *gx, int *deg, booleann nuniq) /* decide if n in theta(g+x) -- version for n+1 == maxn */ { int i; @@ -1565,7 +1565,7 @@ accept2(graph *g, int n, xword x, graph *gx, int *deg, boolean nuniq) statsblk stats; static DEFAULTOPTIONS_GRAPH(options); setword workspace[50]; - boolean cheapacc; + booleann cheapacc; #ifdef INSTRUMENT ++a2calls; @@ -1797,7 +1797,7 @@ xbnds(int n, int ne, int dmax) /**************************************************************************/ static void -spaextend(graph *g, int n, int *deg, int ne, boolean rigid, +spaextend(graph *g, int n, int *deg, int ne, booleann rigid, int xlb, int xub, void (*makeh)(graph*,xword*,int)) /* extend from n to n+1 -- version for restricted graphs */ { @@ -1807,10 +1807,10 @@ spaextend(graph *g, int n, int *deg, int ne, boolean rigid, graph gx[MAXN]; xword *xx,ixx; int degx[MAXN]; - boolean rigidx; + booleann rigidx; #ifdef INSTRUMENT - boolean haschild; + booleann haschild; haschild = FALSE; if (rigid) ++rigidnodes[n]; @@ -1914,7 +1914,7 @@ spaextend(graph *g, int n, int *deg, int ne, boolean rigid, /**************************************************************************/ static void -genextend(graph *g, int n, int *deg, int ne, boolean rigid, int xlb, int xub) +genextend(graph *g, int n, int *deg, int ne, booleann rigid, int xlb, int xub) /* extend from n to n+1 -- version for general graphs */ { xword x,d,dlow; @@ -1924,10 +1924,10 @@ genextend(graph *g, int n, int *deg, int ne, boolean rigid, int xlb, int xub) int xlbx,xubx; graph gx[MAXN]; int degx[MAXN]; - boolean rigidx; + booleann rigidx; #ifdef INSTRUMENT - boolean haschild; + booleann haschild; haschild = FALSE; if (rigid) ++rigidnodes[n]; @@ -2036,8 +2036,8 @@ main(int argc, char *argv[]) #endif { char *arg; - boolean badargs,gote,gotmr,gotf,gotd,gotD,gotx,gotX; - boolean secret,connec1,connec2,safe,sparse; + booleann badargs,gote,gotmr,gotf,gotd,gotD,gotx,gotX; + booleann secret,connec1,connec2,safe,sparse; char *outfilename,sw; int i,j,argnum; graph g[1]; diff --git a/genquarticg.c b/genquarticg.c index 50803cc..7dcf2fe 100644 --- a/genquarticg.c +++ b/genquarticg.c @@ -62,14 +62,14 @@ res/mod : only generate subset res out of subsets 0..mod-1\n\ static FILE *outfile; /* file for output graphs */ static char *outfilename; -boolean nooutput; /* presence of -u */ -boolean graph6; /* presence of -g */ -boolean sparse6; /* presence of -s */ -boolean header; /* presence of -h */ +booleann nooutput; /* presence of -u */ +booleann graph6; /* presence of -g */ +booleann sparse6; /* presence of -s */ +booleann header; /* presence of -h */ static int connec; /* 1 for -c, 2 for -C, 0 for neither */ -boolean connec1; /* presence of -c */ -boolean connec2; /* presence of -C */ -boolean canonise; /* presence of -l */ //???????? +booleann connec1; /* presence of -c */ +booleann connec2; /* presence of -C */ +booleann canonise; /* presence of -l */ //???????? typedef struct @@ -111,12 +111,12 @@ pairstruct *pepair; dovistruct *pdovi; edgestruct *pedge; setword active; -boolean goodret; +booleann goodret; static int nmax, m, code, numcells, mod, res, splitlevel, splitcount; //TMP static splitlevel,splitcount,mod,res; ??????TMP? -static void extend(int, graph *, edgestruct *, pairstruct *, int, int * , int *, setword *, int *, boolean ); +static void extend(int, graph *, edgestruct *, pairstruct *, int, int * , int *, setword *, int *, booleann ); static int init_refinex( int *, int *, int *, set *, int); -static void refinex( graph *, int *, int *, int , int *, int *, set *, boolean , int *, int , int ); +static void refinex( graph *, int *, int *, int , int *, int *, set *, booleann , int *, int , int ); static UPROC userautom1(); static UPROC userautom2(); static UPROC userautom3(); @@ -150,7 +150,7 @@ nullwrite(FILE *f, graph *g, int n) /***********************************************************************/ -static boolean +static booleann isconnected(graph *g, int n) /* test if g is connected with vertices 0,1.., n-1 */ { @@ -174,7 +174,7 @@ isconnected(graph *g, int n) /**********************************************************************/ -static boolean +static booleann isbiconnected(graph *g, int n) /* test if g is biconnected */ { @@ -229,7 +229,7 @@ isbiconnected(graph *g, int n) static void extend(int n, graph *g, edgestruct *edge, pairstruct *epair, int numpair, - int *epairorbit, int *multar, setword *zar, int *col00w, boolean connectflag) + int *epairorbit, int *multar, setword *zar, int *col00w, booleann connectflag) { int vm1, vm2, vm3, vm4, vt1, vt2, vt3, vt4, c, b, mcol1, tcol, got_one, i, j, numpair1, numdovi, maxdovi, i1, j1, i2, j2, @@ -247,7 +247,7 @@ extend(int n, graph *g, edgestruct *edge, pairstruct *epair, int numpair, dovistruct dovi[3*MAXN]; dovistruct dovimax; register setword gi1, gi2, gj1, gj2; - boolean conf; + booleann conf; ///////////////////////////////////////////////////////////////////////// if( n == splitlevel ) @@ -1159,7 +1159,7 @@ init_refinex( int *clr, int *lb, int *p, set *active, int n) *****************************************************************************/ static void refinex(graph *g, int *lab, int *ptn, int level, int *numcells, int *count, - set *active, boolean goodret, int *code, int m, int n) + set *active, booleann goodret, int *code, int m, int n) { int i, c1, c2, labc1, split1, split2, cell1, cell2, cnt, bmin, bmax; int workperm[MAXN], bucket[MAXN+2]; @@ -1304,7 +1304,7 @@ int main(int argc, char *argv[]) graph g[MAXN]; double timebefore, timeafter; setword zar[MAXN]; - boolean badargs, gotf, gotmr, quiet; + booleann badargs, gotf, gotmr, quiet; char *arg; char msg[201]; diff --git a/genrang.c b/genrang.c index b688a71..a2ce6fe 100644 --- a/genrang.c +++ b/genrang.c @@ -78,7 +78,7 @@ perminvar(graph *g, int *perm, int m, int n) /**************************************************************************/ static void -gcomplement(graph *g, boolean loopstoo, int m, int n) +gcomplement(graph *g, booleann loopstoo, int m, int n) /* Replace g by its complement */ { int i,j; @@ -144,7 +144,7 @@ gcomplement_bip(graph *g, int m, int n1, int n2) /**************************************************************************/ static void -ranedges(long e, boolean loopsok, graph *g, int m, int n) +ranedges(long e, booleann loopsok, graph *g, int m, int n) /* Random graph with n vertices and e edges */ { unsigned long ln,li,nc2,ned,sofar; @@ -261,7 +261,7 @@ grandtourn_bip(graph *g, int m, int n1, int n2) /**************************************************************************/ static void -grandgraph(graph *g, boolean digraph, boolean loopsok, +grandgraph(graph *g, booleann digraph, booleann loopsok, int p1, int p2, int m, int n) /* Random graph with probability p1/p2 */ { @@ -293,7 +293,7 @@ grandgraph(graph *g, boolean digraph, boolean loopsok, /**************************************************************************/ static void -grandgraph_bip(graph *g, boolean digraph, +grandgraph_bip(graph *g, booleann digraph, int p1, int p2, int m, int n1, int n2) /* Random bipartite graph with probability p1/p2 */ { @@ -326,7 +326,7 @@ grandgraph_bip(graph *g, boolean digraph, /**************************************************************************/ static void -ranarcs(long e, boolean loopsok, graph *g, int m, int n) +ranarcs(long e, booleann loopsok, graph *g, int m, int n) /* Random digraph graph with n vertices and e edges */ { unsigned long ln,li,nn,ned,sofar; @@ -368,7 +368,7 @@ makeranreg(int *cub, int degree, int multmax, int loopmax, int n) The length of cub had better be at least degree*n */ { long i,j,k,v,w,nn,mult; - boolean ok; + booleann ok; #if MAXN int deg[MAXN],p[MAXLREG*MAXN]; #else @@ -438,7 +438,7 @@ rundmodel(int *cub, int degree, int n) long iters,fails; size_t i,j,navail; int *cubi,*cubj,vi,vj,k; - boolean ok; + booleann ok; #if MAXN int deg[MAXN],avail[MAXN*MAXLREG]; #else @@ -618,10 +618,10 @@ dmodel_sg(int degree, sparsegraph *sg, int n) long k0,nde; #if MAXN int cub[MAXLREG*MAXN]; - boolean adj[MAXN]; + booleann adj[MAXN]; #else DYNALLSTAT(int,cub,cub_sz); - DYNALLSTAT(boolean,adj,adj_sz); + DYNALLSTAT(booleann,adj,adj_sz); #endif SG_ALLOC(*sg,n,degree*n,"dmodel_sg"); @@ -651,7 +651,7 @@ dmodel_sg(int degree, sparsegraph *sg, int n) comdeg = n - degree - 1; #if !MAXN DYNALLOC1(int,cub,cub_sz,comdeg*n,"dmodel_sg"); - DYNALLOC1(boolean,adj,adj_sz,n,"dmodel_sg"); + DYNALLOC1(booleann,adj,adj_sz,n,"dmodel_sg"); #endif rundmodel(cub,comdeg,n); @@ -684,7 +684,7 @@ rundmodel_bip(int *cub, int deg1, int deg2, int n1, int n2) long iters,fails; size_t i,j,k,navail,ne; int *cubi,*cubj,vi,vj,n; - boolean ok; + booleann ok; #if MAXN int deg[MAXN],avail[MAXN*MAXLREG]; #else @@ -760,10 +760,10 @@ dmodel_bip_sg(int deg1, sparsegraph *sg, int n1, int n2) size_t j,k0,nde,ne,comne; #if MAXN int cub[MAXLREG*MAXN]; - boolean adj[MAXN]; + booleann adj[MAXN]; #else DYNALLSTAT(int,cub,cub_sz); - DYNALLSTAT(boolean,adj,adj_sz); + DYNALLSTAT(booleann,adj,adj_sz); #endif n = n1 + n2; @@ -810,7 +810,7 @@ dmodel_bip_sg(int deg1, sparsegraph *sg, int n1, int n2) comne = n1*(size_t)comdeg1; #if !MAXN DYNALLOC1(int,cub,cub_sz,2*comne,"dmodel_bip_sg"); - DYNALLOC1(boolean,adj,adj_sz,n,"dmodel_bip_sg"); + DYNALLOC1(booleann,adj,adj_sz,n,"dmodel_bip_sg"); #endif rundmodel_bip(cub,comdeg1,comdeg2,n1,n2); @@ -963,17 +963,17 @@ main(int argc, char *argv[]) int m,n,n1,n2,codetype; int argnum,j; char *arg,sw; - boolean badargs; - boolean gswitch,sswitch,qswitch,Sswitch,Rswitch,lswitch,tswitch; - boolean aswitch,P1switch,P2switch,eswitch,rswitch,mswitch,dswitch; - boolean Tswitch; + booleann badargs; + booleann gswitch,sswitch,qswitch,Sswitch,Rswitch,lswitch,tswitch; + booleann aswitch,P1switch,P2switch,eswitch,rswitch,mswitch,dswitch; + booleann Tswitch; long numgraphs,nout,P1value,P2value,evalue,rvalue; nauty_counter ln,nc2; int Svalue,loopmax,multmax; static FILE *outfile; char *outfilename; sparsegraph sg; - boolean usesparse,digraph,bipartite; + booleann usesparse,digraph,bipartite; #if MAXN graph g[MAXM*1L*MAXN]; diff --git a/genspecialg.c b/genspecialg.c index 97a9ef3..d8e9b47 100644 --- a/genspecialg.c +++ b/genspecialg.c @@ -65,7 +65,7 @@ preparemarks(size_t nn) /**************************************************************************/ static void -writedread(FILE *f, sparsegraph *sg, boolean digraph) +writedread(FILE *f, sparsegraph *sg, booleann digraph) /* Write in dreadnaut format */ { size_t *v; @@ -166,7 +166,7 @@ vnumber(long *dimen, int *index, int ndimen) /**************************************************************************/ static void -makepath(long n, boolean digraph, sparsegraph *sg) +makepath(long n, booleann digraph, sparsegraph *sg) { int *d,*e,i; size_t *v,k; @@ -217,7 +217,7 @@ makepath(long n, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makecycle(long n, boolean digraph, sparsegraph *sg) +makecycle(long n, booleann digraph, sparsegraph *sg) { int *d,*e,i; size_t *v; @@ -274,7 +274,7 @@ makecycle(long n, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makeflowersnark(long k, boolean digraph, sparsegraph *sg) +makeflowersnark(long k, booleann digraph, sparsegraph *sg) /* Flower snark on 4*k vertices, no digraph variant * * The flower snark Jn can be constructed with the following process : @@ -352,7 +352,7 @@ makeflowersnark(long k, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makeJohnson(long n, long k, boolean digraph, sparsegraph *sg) +makeJohnson(long n, long k, booleann digraph, sparsegraph *sg) { size_t *v; int *d,*e,*ep,nv,deg,i,j,s,t,u; @@ -413,7 +413,7 @@ makeJohnson(long n, long k, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makecomplete(long n, boolean digraph, sparsegraph *sg) +makecomplete(long n, booleann digraph, sparsegraph *sg) { int *d,*e,i,j; size_t *v,k; @@ -456,7 +456,7 @@ makecomplete(long n, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makeempty(long n, boolean digraph, sparsegraph *sg) +makeempty(long n, booleann digraph, sparsegraph *sg) { int *d,*e,i; size_t *v; @@ -497,7 +497,7 @@ makeempty(long n, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makehypercube(long deg, boolean digraph, sparsegraph *sg) +makehypercube(long deg, booleann digraph, sparsegraph *sg) { int *d,*e,i,j; size_t *v,k,nv; @@ -526,11 +526,11 @@ makehypercube(long deg, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -maketheta(long *len, int npaths, boolean digraph, sparsegraph *sg) +maketheta(long *len, int npaths, booleann digraph, sparsegraph *sg) { int i,j,k,n,ntemp,*d,*e; size_t *v,ne,etemp; - boolean hasone; + booleann hasone; hasone = FALSE; n = 2; @@ -613,11 +613,11 @@ maketheta(long *len, int npaths, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makegrid(long *dim, int ndim, boolean digraph, sparsegraph *sg) +makegrid(long *dim, int ndim, booleann digraph, sparsegraph *sg) { int *d,*e,i,j,deg,n,oldn; size_t *v,k; - boolean closed[30]; + booleann closed[30]; int index[30]; n = 1; @@ -703,7 +703,7 @@ makegrid(long *dim, int ndim, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makecirculant(long n, long *conn, int nconn, boolean digraph, sparsegraph *sg) +makecirculant(long n, long *conn, int nconn, booleann digraph, sparsegraph *sg) { int *d,*e,i,j,deg; size_t *v,k; @@ -760,7 +760,7 @@ makecirculant(long n, long *conn, int nconn, boolean digraph, sparsegraph *sg) /**************************************************************************/ static void -makegenpetersen(long n1, long n2, boolean digraph, sparsegraph *sg) +makegenpetersen(long n1, long n2, booleann digraph, sparsegraph *sg) { int *d,*e,i,n; size_t *v,k; @@ -804,7 +804,7 @@ makegenpetersen(long n1, long n2, boolean digraph, sparsegraph *sg) static void makecompletebipartite(long n1, long n2, - long matching, boolean digraph, sparsegraph *sg) + long matching, booleann digraph, sparsegraph *sg) { int *d,*e,i,j,jmissing,n; size_t *v,k; @@ -869,10 +869,10 @@ main(int argc, char *argv[]) int codetype; int argnum,j; char *arg,sw; - boolean badargs,quiet; - boolean Cswitch,Pswitch,gswitch,sswitch,zswitch,Jswitch,dswitch; - boolean pswitch,cswitch,eswitch,kswitch,bswitch,Qswitch,Gswitch; - boolean fswitch,Tswitch,verbose,havegraph,dreadnaut; + booleann badargs,quiet; + booleann Cswitch,Pswitch,gswitch,sswitch,zswitch,Jswitch,dswitch; + booleann pswitch,cswitch,eswitch,kswitch,bswitch,Qswitch,Gswitch; + booleann fswitch,Tswitch,verbose,havegraph,dreadnaut; long size; static FILE *outfile; char *outfilename; diff --git a/gentourng.c b/gentourng.c index 76f6e14..c98d638 100644 --- a/gentourng.c +++ b/gentourng.c @@ -80,7 +80,7 @@ OUTPROC feature. f is a stream open for writing, g is the graph in nauty format, and n is the number of vertices. Your procedure can be in a separate file so long as it is linked with gentourng. The global - variables nooutput, and canonise (all type boolean) can be + variables nooutput, and canonise (all type booleann) can be used to test for the presence of the flags -u and -l, respectively. If -l is present, the group size and similar details can be found in the global variable nauty_stats. @@ -189,16 +189,16 @@ static void (*outproc)(FILE*,graph*,int); static FILE *outfile; /* file for output graphs */ static int connec; /* 1 for -c, 0 for not */ -boolean graph6; /* presence of -g */ -boolean digraph6; /* presence of -z */ -boolean sparse6; /* presence of -s */ -boolean nooutput; /* presence of -u */ -boolean canonise; /* presence of -l */ -boolean quiet; /* presence of -q */ -boolean header; /* presence of -h */ +booleann graph6; /* presence of -g */ +booleann digraph6; /* presence of -z */ +booleann sparse6; /* presence of -s */ +booleann nooutput; /* presence of -u */ +booleann canonise; /* presence of -l */ +booleann quiet; /* presence of -q */ +booleann header; /* presence of -h */ statsblk nauty_stats; static int mindeg,maxdeg,maxn,mod,res; -static boolean regular; +static booleann regular; #define PRUNEMULT 20 /* bigger -> more even split at greater cost */ static int min_splitlevel,odometer,splitlevel,multiplicity; static graph gcan[MAXN]; @@ -341,7 +341,7 @@ nullwrite(FILE *f, graph *g, int n) /***********************************************************************/ -static boolean +static booleann isstrong(graph *g, int n) /* test if tournament g is strongly-connected * This code is strictly for tournaments only. @@ -549,7 +549,7 @@ userautomproc(int count, int *p, int *orbits, static void refinex(graph *g, int *lab, int *ptn, int level, int *numcells, - int *count, set *active, boolean goodret, int *code, int m, int n) + int *count, set *active, booleann goodret, int *code, int m, int n) { int i,c1,c2,labc1; setword x,lact; @@ -702,8 +702,8 @@ makecanon(graph *g, graph *gcan, int n) /**************************************************************************/ -static boolean -accept1(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid) +static booleann +accept1(graph *g, int n, xword x, graph *gx, int *deg, booleann *rigid) /* decide if n in theta(g+x) - version for n+1 < maxn */ { int i; @@ -803,7 +803,7 @@ accept1(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid) /**************************************************************************/ -static boolean +static booleann hitinvar(graph *g, int *invar, int n) /* make hitting invariant * return FALSE if n-1 not maximal else return TRUE */ @@ -831,8 +831,8 @@ hitinvar(graph *g, int *invar, int n) /**************************************************************************/ -static boolean -accept2(graph *g, int n, xword x, graph *gx, int *deg, boolean nuniq) +static booleann +accept2(graph *g, int n, xword x, graph *gx, int *deg, booleann nuniq) /* decide if n in theta(g+x) -- version for n+1 == maxn */ { int i; @@ -847,7 +847,7 @@ accept2(graph *g, int n, xword x, graph *gx, int *deg, boolean nuniq) statsblk stats; static DEFAULTOPTIONS_GRAPH(options); setword workspace[50]; - boolean cheapacc; + booleann cheapacc; #ifdef INSTRUMENT ++a2calls; @@ -1018,7 +1018,7 @@ accept2(graph *g, int n, xword x, graph *gx, int *deg, boolean nuniq) /**************************************************************************/ static void -genextend(graph *g, int n, int *deg, boolean rigid) +genextend(graph *g, int n, int *deg, booleann rigid) /* extend from n to n+1 -- version for general graphs */ { xword x,dlow,dhigh,dcrit; @@ -1028,11 +1028,11 @@ genextend(graph *g, int n, int *deg, boolean rigid) int xlb,xub,xlbx,xubx; graph gx[MAXN]; int degx[MAXN]; - boolean rigidx; - boolean subconnec; + booleann rigidx; + booleann subconnec; #ifdef INSTRUMENT - boolean haschild; + booleann haschild; haschild = FALSE; if (rigid) ++rigidnodes[n]; @@ -1182,8 +1182,8 @@ main(int argc, char *argv[]) #endif { char *arg; - boolean badargs,gotd,gotD,gotf,gotmr; - boolean secret,connec1; + booleann badargs,gotd,gotD,gotf,gotmr; + booleann secret,connec1; char *outfilename,sw; int i,j,argnum; graph g[1]; diff --git a/gentreeg.c b/gentreeg.c index a71ecf5..4299239 100644 --- a/gentreeg.c +++ b/gentreeg.c @@ -292,7 +292,7 @@ WriteIt(int level) (*outproc)(outfile,par,nv); } -static boolean +static booleann good( int p, int h, int t ) { if (p==2 && mindiam<=2 && t==0) return TRUE; if (t == 1) { @@ -407,8 +407,8 @@ main(int argc, char *argv[]) #endif { char *arg; - boolean badargs,uswitch,sswitch,pswitch,lswitch,Zswitch; - boolean qswitch,Dswitch,gotmr,gotf; + booleann badargs,uswitch,sswitch,pswitch,lswitch,Zswitch; + booleann qswitch,Dswitch,gotmr,gotf; long Z1,Z2; char *outfilename,sw; int i,j,argnum; diff --git a/gtnauty.c b/gtnauty.c index a10f370..39f592d 100644 --- a/gtnauty.c +++ b/gtnauty.c @@ -13,7 +13,7 @@ #include "gtools.h" /* which includes naututil.h, nausparse.h, stdio.h */ -static boolean issymm; +static booleann issymm; static set *g0; static int gm; static int fuzz2[] = {006532,070236,035523,062437}; @@ -119,7 +119,7 @@ setlabptnfmt(char *fmt, int *lab, int *ptn, set *active, int m, int n) /**************************************************************************/ -static boolean +static booleann hasloops(graph *g, int m, int n) /* Test for loops */ { @@ -132,7 +132,7 @@ hasloops(graph *g, int m, int n) return FALSE; } -static boolean +static booleann hasloops_sg(sparsegraph *sg) { size_t *v,vi,j; @@ -151,7 +151,7 @@ hasloops_sg(sparsegraph *sg) } void -fcanonise(graph *g, int m, int n, graph *h, char *fmt, boolean digraph) +fcanonise(graph *g, int m, int n, graph *h, char *fmt, booleann digraph) /* canonise g under format fmt; result in h. fmt is either NULL (for no vertex classification) or is a string with char-valued colours for the vertices. If it ends early, it @@ -229,8 +229,8 @@ fcanonise(graph *g, int m, int n, graph *h, char *fmt, boolean digraph) void fcanonise_inv(graph *g, int m, int n, graph *h, char *fmt, void (*invarproc)(graph*,int*,int*,int,int,int,int*,int, - boolean,int,int), int mininvarlevel, int maxinvarlevel, - int invararg, boolean digraph) + booleann,int,int), int mininvarlevel, int maxinvarlevel, + int invararg, booleann digraph) /* Canonise g under format fmt; result in h. fmt is either NULL (for no vertex classification) or is a string with char-valued colours for the vertices. If it ends early, it @@ -315,8 +315,8 @@ fcanonise_inv(graph *g, int m, int n, graph *h, char *fmt, void fcanonise_inv_sg(sparsegraph *g, int m, int n, sparsegraph *h, char *fmt, void (*invarproc)(graph*,int*,int*,int,int,int,int*,int, - boolean,int,int), int mininvarlevel, int maxinvarlevel, - int invararg, boolean digraph) + booleann,int,int), int mininvarlevel, int maxinvarlevel, + int invararg, booleann digraph) /* canonise g under format fmt; result in h. fmt is either NULL (for no vertex classification) or is a string with char-valued colours for the vertices. If it ends early, it @@ -424,7 +424,7 @@ fgroup(graph *g, int m, int n, char *fmt, int *orbits, int *numorbits) int i,j; int orbrep; int numcells,code; - boolean digraph; + booleann digraph; statsblk stats; static DEFAULTOPTIONS_GRAPH(options); @@ -500,7 +500,7 @@ fgroup(graph *g, int m, int n, char *fmt, int *orbits, int *numorbits) void fgroup_inv(graph *g, int m, int n, char *fmt, int *orbits, int *numorbits, void (*invarproc)(graph*,int*,int*,int,int,int,int*,int, - boolean,int,int), int mininvarlevel, int maxinvarlevel, int invararg) + booleann,int,int), int mininvarlevel, int maxinvarlevel, int invararg) /* Find the orbits of undirected graph g stabilised by format fmt. The orbits are put into orbits[] and the number of them into *numorbits fmt is either NULL (for no vertex classification) or is a string @@ -523,7 +523,7 @@ fgroup_inv(graph *g, int m, int n, char *fmt, int *orbits, int *numorbits, #endif int i,j; int orbrep; - boolean digraph; + booleann digraph; int numcells,code; statsblk stats; static DEFAULTOPTIONS_GRAPH(options); diff --git a/gtools.c b/gtools.c index 0c6c65d..08dc6d4 100644 --- a/gtools.c +++ b/gtools.c @@ -12,7 +12,7 @@ #endif TLS_ATTR size_t ogf_linelen; -TLS_ATTR boolean is_pipe; +TLS_ATTR booleann is_pipe; #if HAVE_FSEEKO #define FSEEK_VER fseeko @@ -29,8 +29,13 @@ extern int fseek(FILE*,long,int); #endif #if !POPEN_DEC +#ifdef _WIN32 +#include +extern FILE *_popen(const char*,const char*); +#else extern FILE *popen(const char*,const char*); #endif +#endif /* Version 1.1: Fixed sparse6 input for powers of 2. May 9, 1998 @@ -104,7 +109,7 @@ opengraphfile(char *filename, int *codetype, int assumefixed, long position) int c,bl,firstc; long i,l; OFF_T_VER pos,pos1,pos2; - boolean bad_header; + booleann bad_header; is_pipe = FALSE; @@ -124,7 +129,11 @@ opengraphfile(char *filename, int *codetype, int assumefixed, long position) #else filename += 4; while (*filename == ' ') ++filename; - f = popen(filename,"r"); +#ifdef _WIN32 + f = _popen(filename,"r"); +#else + f = popen(filename,"r"); +#endif #endif assumefixed = FALSE; is_pipe = TRUE; @@ -528,7 +537,7 @@ stringcounts(char *s, int *pn, size_t *pe) char *p; int i,j,k,x,nb,v,n,need; size_t count; - boolean done; + booleann done; n = graphsize(s); *pn = n; @@ -617,7 +626,7 @@ stringtograph(char *s, graph *g, int m) int n,i,j,k,v,x,nb,need; size_t ii; set *gi,*gj; - boolean done; + booleann done; n = graphsize(s); if (n == 0) return; @@ -760,7 +769,7 @@ stringtograph_inc(char *s, graph *g, int m, int n,i,j,k,v,x,nb,need; size_t ii; set *gi,*gj; - boolean done; + booleann done; if (s[0] == ';' && !prevg) gt_abort(">E stringtograph_inc missing prior graph\n"); @@ -901,7 +910,7 @@ stringtograph_inc(char *s, graph *g, int m, /***********************************************************************/ graph* /* read graph into nauty format */ -readgg(FILE *f, graph *g, int reqm, int *pm, int *pn, boolean *digraph) +readgg(FILE *f, graph *g, int reqm, int *pm, int *pn, booleann *digraph) /* graph6, digraph6 and sparse6 formats are supported f = an open file g = place to put the answer (NULL for dynamic allocation) @@ -969,6 +978,78 @@ readgg(FILE *f, graph *g, int reqm, int *pm, int *pn, boolean *digraph) return g; } +/***********************************************************************/ +graph* /* read graph into nauty format, and allocate enough memory for the species nodes */ +readggcrn(FILE *f, graph *g, int reqm, int *pm, int *pn, booleann *digraph, int speciesCount) +/* graph6, digraph6 and sparse6 formats are supported + f = an open file + g = place to put the answer (NULL for dynamic allocation) + reqm = the requested value of m (0 => compute from n) + *pm = the actual value of m + *pn = the value of n + *digraph = whether the input is a digraph +*/ +{ + char *s,*p; + int m,n; + + if ((readg_line = gtools_getline(f)) == NULL) return NULL; + + s = readg_line; + if (s[0] == ':') + { + readg_code = SPARSE6; + *digraph = FALSE; + p = s + 1; + } + else if (s[0] == '&') + { + readg_code = DIGRAPH6; + *digraph = TRUE; + p = s + 1; + } + else + { + readg_code = GRAPH6; + *digraph = FALSE; + p = s; + } + + while (*p >= BIAS6 && *p <= MAXBYTE) + ++p; + if (*p == '\0') + gt_abort(">E readgg: missing newline\n"); + else if (*p != '\n') + gt_abort(">E readgg: illegal character\n"); + + n = graphsize(s); + if (readg_code == GRAPH6 && p - s != G6LEN(n)) + gt_abort(">E readgg: truncated graph6 line\n"); + if (readg_code == DIGRAPH6 && p - s != D6LEN(n)) + gt_abort(">E readgg: truncated digraph6 line\n"); + + if (reqm > 0 && TIMESWORDSIZE(reqm) < n) + gt_abort(">E readgg: reqm too small\n"); + else if (reqm > 0) + m = reqm; + else + // TODO: add speciesCount when calculating the size of m (the size of the adjacency matrix in multiples of WORDSIZE) + m = (n + speciesCount + WORDSIZE - 1) / WORDSIZE; + + // TODO: allocate extra nodes for the species nodes in the encoding (i.e. ALLOCS(n+speciesCount, m*sizeof(graph)) + if (g == NULL) + { + if ((g = (graph*)ALLOCS(n + speciesCount,m*sizeof(graph))) == NULL) + gt_abort(">E readgg: malloc failed\n"); + } + + *pn = n; + *pm = m; + + stringtograph(s,g,m); + return g; +} + /***********************************************************************/ graph* /* read undirected graph into nauty format */ @@ -983,7 +1064,7 @@ readg(FILE *f, graph *g, int reqm, int *pm, int *pn) Only allows undirected graphs. */ { - boolean digraph; + booleann digraph; graph *gg; gg = readgg(f,g,reqm,pm,pn,&digraph); @@ -1051,7 +1132,7 @@ checkgline(char *s) graph* /* read graph into nauty format */ readgg_inc(FILE *f, graph *g, int reqm, int *pm, int *pn, - graph *prevg, int prevm, int prevn, boolean *digraph) + graph *prevg, int prevm, int prevn, booleann *digraph) /* graph6, digraph6 and sparse6 formats are supported f = an open file g = place to put the answer (NULL for dynamic allocation) @@ -1155,7 +1236,7 @@ readg_inc(FILE *f, graph *g, int reqm, int *pm, int *pn, input is a sparse6 increment. */ { - boolean digraph; + booleann digraph; graph *gg; gg = readgg_inc(f,g,reqm,pm,pn,prevg,prevm,prevn,&digraph); @@ -1180,7 +1261,7 @@ stringtosparsegraph(char *s, sparsegraph *sg, int *nloops) int *d,*e; size_t *v; int loops; - boolean done; + booleann done; n = graphsize(s); @@ -1446,7 +1527,7 @@ stringtosparsegraph(char *s, sparsegraph *sg, int *nloops) /***********************************************************************/ sparsegraph* /* read graph into sparsegraph format */ -read_sgg_loops(FILE *f, sparsegraph *sg, int *nloops, boolean *digraph) +read_sgg_loops(FILE *f, sparsegraph *sg, int *nloops, booleann *digraph) /* graph6, digraph6 and sparse6 formats are supported * f = an open file * sg = place to put the answer (NULL for dynamic allocation) @@ -1520,7 +1601,7 @@ read_sg_loops(FILE *f, sparsegraph *sg, int *nloops) */ { sparsegraph *sgg; - boolean digraph; + booleann digraph; sgg = read_sgg_loops(f,sg,nloops,&digraph); if (!sgg) return NULL; @@ -1541,7 +1622,7 @@ read_sg(FILE *f, sparsegraph *sg) { int loops; sparsegraph *sgg; - boolean digraph; + booleann digraph; sgg = read_sgg_loops(f,sg,&loops,&digraph); if (!sgg) return NULL; @@ -2445,7 +2526,7 @@ writelast(FILE *f) int longvalue(char **ps, long *l) { - boolean neg,pos; + booleann neg,pos; long sofar,last; char *s; @@ -2490,7 +2571,7 @@ longvalue(char **ps, long *l) int doublevalue(char **ps, double *l) { - boolean neg,pos; + booleann neg,pos; double sofar,weight; char *s; @@ -2592,7 +2673,7 @@ arg_double(char **ps, double *val, char *id) /************************************************************************/ -boolean +booleann strhaschar(char *s, int c) /* Check if s contains c. Saves the bother of figuring out whether strchr() is available, or index() or whatever. */ diff --git a/gtools.h b/gtools.h index 2362e1e..a765e40 100644 --- a/gtools.h +++ b/gtools.h @@ -14,27 +14,27 @@ used, it is necessary to check they are correct. #define HAVE_ERRNO_H 1 /* exists */ #define HAVE_PERROR 1 /* perror() exists */ -#define HAVE_PIPE 1 /* pipe() exists */ -#define HAVE_WAIT 1 /* wait() exists */ -#define HAVE_WAIT_H 1 /* exists */ +#define HAVE_PIPE 0 /* pipe() exists */ +#define HAVE_WAIT 0 /* wait() exists */ +#define HAVE_WAIT_H 0 /* exists */ #define HAVE_POPEN 1 /* popen() and pclose() exist */ -#define POPEN_DEC 1 /* popen() is declared in stdio.h */ +#define POPEN_DEC 0 /* popen() is declared in stdio.h */ #define FTELL_DEC 1 /* ftell() is declared in stdio.h */ #define FDOPEN_DEC 1 /* fdopen() is declared in stdio.h */ #define SORTPROG "sort" /* name of sort program */ #define SORT_NEWKEY 1 /* if -k is supported */ #define HAVE_PID_T 1 /* pid_t is defined */ #define PUTENV_DEC 1 /* putenv() is declared in stdlib.h */ -#define SETENV_DEC 1 /* setenv() is declared in stdlib.h */ +#define SETENV_DEC 0 /* setenv() is declared in stdlib.h */ #define HAVE_PUTENV 1 /* putenv() exists */ -#define HAVE_SETENV 1 /* setenv() exists */ -#define HAVE_FORK 1 /* fork() exists */ -#define HAVE_PTHREADS 0 /* Posix threads exist */ +#define HAVE_SETENV 0 /* setenv() exists */ +#define HAVE_FORK 0 /* fork() exists */ +#define HAVE_PTHREADS 1 /* Posix threads exist */ #define HAVE_PTHREAD_H 1 /* exists */ #define HAVE_SIGNAL_H 1 /* exists */ #define HAVE_FSEEKO 1 /* fseeko() and ftello() exist */ -#define HAVE_SIGACTION 1 /* sigaction() exists */ -#define HAVE_SIGPROCMASK 1 /* sigprocmask() exists */ +#define HAVE_SIGACTION 0 /* sigaction() exists */ +#define HAVE_SIGPROCMASK 0 /* sigprocmask() exists */ #define ALLOW_INTERRUPT 1 /* no --disable-interrupt */ /* ++++++ This file is automatically generated, don't edit it by hand! ++++++ */ @@ -77,6 +77,10 @@ extern int errno; #include #endif +#ifdef _WIN32 +#include "stddef.h" +#endif + #if HAVE_PERROR #define ABORT(msg) do {if (errno != 0) perror(msg); exit(1);} while(0) #else @@ -225,7 +229,7 @@ extern "C" { #endif extern void gtools_check(int,int,int,int); -extern FILE *opengraphfile(char*,int*,boolean,long); +extern FILE *opengraphfile(char*,int*,booleann,long); extern void writeline(FILE*,char*); extern char *gtools_getline(FILE*); /* formerly getline() */ extern int graphsize(char*); @@ -235,9 +239,10 @@ extern void stringtograph(char*,graph*,int); extern void stringtograph_inc(char*,graph*,int,graph*,int); extern size_t edgecount(char*); extern int checkgline(char*); -extern graph *readgg(FILE*,graph*,int,int*,int*,boolean*); +extern graph *readgg(FILE*,graph*,int,int*,int*,booleann*); +extern graph *readggcrn(FILE*,graph*,int,int*,int*,booleann*,int); extern graph *readg(FILE*,graph*,int,int*,int*); -extern graph *readgg_inc(FILE*,graph*,int,int*,int*,graph*,int,int,boolean*); +extern graph *readgg_inc(FILE*,graph*,int,int*,int*,graph*,int,int,booleann*); extern graph *readg_inc(FILE*,graph*,int,int*,int*,graph*,int,int); extern char *ntog6(graph*,int,int); extern char *ntos6(graph*,int,int); @@ -257,7 +262,7 @@ extern void writepc_sg(FILE*,sparsegraph*); extern void stringtosparsegraph(char*,sparsegraph*,int*); extern sparsegraph *read_sg(FILE*,sparsegraph*); extern sparsegraph *read_sg_loops(FILE*,sparsegraph*,int*); -extern sparsegraph *read_sgg_loops(FILE*,sparsegraph*,int*,boolean*); +extern sparsegraph *read_sgg_loops(FILE*,sparsegraph*,int*,booleann*); extern sparsegraph *readpc_sg(FILE*,sparsegraph*); extern sparsegraph *readpcle_sg(FILE*,sparsegraph*); extern char *getecline(FILE*); @@ -275,27 +280,27 @@ extern void arg_sequence_min(char**,char*,long*,int,int,int*,char*); extern void writerange(FILE*,int,long,long); extern void gt_abort(const char*); extern char *stringcopy(char*); -extern boolean strhaschar(char*,int); +extern booleann strhaschar(char*,int); -extern void fcanonise(graph*,int,int,graph*,char*,boolean); +extern void fcanonise(graph*,int,int,graph*,char*,booleann); extern void fcanonise_inv (graph*,int,int,graph*,char*,void(*)(graph*,int*,int*,int, - int,int,int*,int,boolean,int,int),int,int,int,boolean); + int,int,int*,int,booleann,int,int),int,int,int,booleann); extern void fcanonise_inv_sg (sparsegraph*,int,int,sparsegraph*,char*,void(*)(graph*,int*,int*, - int,int,int,int*,int,boolean,int,int),int,int,int,boolean); + int,int,int,int*,int,booleann,int,int),int,int,int,booleann); extern void setlabptn(int*,int*,int*,int); extern void fgroup(graph*,int,int,char*,int*,int*); extern void fgroup_inv (graph*,int,int,char*,int*,int*,void(*)(graph*,int*,int*,int, - int,int,int*,int,boolean,int,int),int,int,int); + int,int,int*,int,booleann,int,int),int,int,int); extern int istransitive(graph*,int,int,graph*); extern void tg_canonise(graph*,graph*,int,int); extern TLS_ATTR int readg_code; extern TLS_ATTR char *readg_line; extern TLS_ATTR size_t ogf_linelen; -extern TLS_ATTR boolean is_pipe; +extern TLS_ATTR booleann is_pipe; #ifdef __cplusplus } diff --git a/gutil1.c b/gutil1.c index c6b0475..41e6dc5 100644 --- a/gutil1.c +++ b/gutil1.c @@ -7,7 +7,7 @@ void degstats(graph *g, int m, int n, unsigned long *edges, int *mindeg, - int *mincount, int *maxdeg, int *maxcount, boolean *eulerian) + int *mincount, int *maxdeg, int *maxcount, booleann *eulerian) /* Compute degree-related graph properties. *edges = number of edges *mindeg, *mincount = minimum degree and how many there are @@ -124,11 +124,11 @@ degstats3(graph *g, int m, int n, unsigned long *edges, int *mindeg, /**************************************************************************/ void -degstats2(graph *g, boolean digraph, int m, int n, +degstats2(graph *g, booleann digraph, int m, int n, unsigned long *edges, int *loops, int *minindeg, int *minincount, int *maxindeg, int *maxincount, int *minoutdeg, int *minoutcount, int *maxoutdeg, int *maxoutcount, - boolean *eulerian) + booleann *eulerian) /* Compute degree-related graph properties. *edges = number of edges (including loops), directed edges for digraphs *loops = number of loops @@ -304,7 +304,7 @@ degstats2(graph *g, boolean digraph, int m, int n, /*********************************************************************/ -boolean +booleann isconnected1(graph *g, int n) /* test if g is connected (m=1) */ { @@ -328,7 +328,7 @@ isconnected1(graph *g, int n) /**************************************************************************/ -boolean +booleann isconnected(graph *g, int m, int n) /* Test if g is connected */ { @@ -375,7 +375,7 @@ isconnected(graph *g, int m, int n) /**************************************************************************/ -boolean +booleann issubconnected(graph *g, set *sub, int m, int n) /* Test if the subset of g induced by sub is connected. Empty is connected. */ /* Note that the value for empty subgraphs disagrees with isconnected() */ @@ -429,7 +429,7 @@ issubconnected(graph *g, set *sub, int m, int n) /**********************************************************************/ -boolean +booleann isbiconnected1(graph *g, int n) /* Test if g is biconnected; version for m=1. */ { @@ -478,7 +478,7 @@ isbiconnected1(graph *g, int n) } /**********************************************************************/ -boolean +booleann isbiconnected(graph *g, int m, int n) /* test if g is biconnected */ { @@ -540,7 +540,7 @@ isbiconnected(graph *g, int m, int n) /**************************************************************************/ -boolean +booleann twocolouring(graph *g, int *colour, int m, int n) /* If g is bipartite, set colour[*] to 0 or 1 to indicate an example of 2-colouring and return TRUE. Otherwise return FALSE. @@ -625,7 +625,7 @@ twocolouring(graph *g, int *colour, int m, int n) /**************************************************************************/ -boolean +booleann isbipartite(graph *g, int m, int n) /* Test if g is bipartite */ { @@ -649,7 +649,7 @@ bipartiteside(graph *g, int m, int n) some 2-coluring. Note that this is not isomorphism-invariant if g is disconnected. */ { - boolean isbip; + booleann isbip; int i,sz; #if MAXN int colour[MAXN]; diff --git a/gutil2.c b/gutil2.c index 91a61fe..c055135 100644 --- a/gutil2.c +++ b/gutil2.c @@ -348,7 +348,7 @@ contract1(graph *g, graph *h, int v, int w, int n) /**************************************************************************/ static TLS_ATTR int knm[18][16]; /* knm[n,m] = conncontent(K_n - m*K_2) */ -static TLS_ATTR boolean knm_computed = FALSE; +static TLS_ATTR booleann knm_computed = FALSE; int conncontent(graph *g, int m, int n) @@ -504,7 +504,7 @@ conncontent(graph *g, int m, int n) return v1 - v2; } -boolean +booleann stronglyconnected(graph *g, int m, int n) /* test if digraph g is strongly connected */ { diff --git a/gutils.h b/gutils.h index 9574aa3..996857b 100644 --- a/gutils.h +++ b/gutils.h @@ -5,23 +5,23 @@ extern "C" { #endif extern void degstats(graph*,int,int, - unsigned long*,int*,int*,int*,int*,boolean*); -extern void degstats2(graph*,boolean,int,int,unsigned long*,int*l, - int*,int*,int*,int*, int*, int*,int*,int*, boolean*); + unsigned long*,int*,int*,int*,int*,booleann*); +extern void degstats2(graph*,booleann,int,int,unsigned long*,int*l, + int*,int*,int*,int*, int*, int*,int*,int*, booleann*); extern void degstats3(graph*,int,int, unsigned long*,int*,int*,int*,int*,int*); extern void diamstats(graph*,int,int,int*,int*); extern void find_dist(graph*,int,int,int,int*); extern void find_dist2(graph*,int,int,int,int,int*); extern int girth(graph*,int,int); -extern boolean isbiconnected1(graph*,int); -extern boolean isbiconnected(graph*,int,int); -extern boolean isbipartite(graph*,int,int); +extern booleann isbiconnected1(graph*,int); +extern booleann isbiconnected(graph*,int,int); +extern booleann isbipartite(graph*,int,int); extern int bipartiteside(graph*,int,int); -extern boolean twocolouring(graph*,int*,int,int); -extern boolean isconnected1(graph*,int); -extern boolean isconnected(graph*,int,int); -extern boolean issubconnected(graph*,set*,int,int); +extern booleann twocolouring(graph*,int*,int,int); +extern booleann isconnected1(graph*,int); +extern booleann isconnected(graph*,int,int); +extern booleann issubconnected(graph*,set*,int,int); extern long maxcliques(graph*,int,int); extern int maxcliquesize(graph*,int,int); extern int maxindsetsize(graph*,int,int); @@ -41,7 +41,7 @@ extern long numtriangles(graph*,int,int); extern long numdirtriangles(graph*,int,int); extern void delete1(graph*,graph*,int,int); extern int conncontent(graph*,int,int); -extern boolean stronglyconnected(graph*,int,int); +extern booleann stronglyconnected(graph*,int,int); /* extern int diameter_sg(sparsegraph*,int*,int*); */ diff --git a/hamheuristic.c b/hamheuristic.c index ddaeaf6..a0f04f4 100644 --- a/hamheuristic.c +++ b/hamheuristic.c @@ -37,7 +37,7 @@ static long seed = 314159265; /**************************************************************************/ static int -hamheur(sparsegraph *sg, boolean pathok, unsigned long limit, int *cyc) +hamheur(sparsegraph *sg, booleann pathok, unsigned long limit, int *cyc) /* Try up to limit, fill cyc if YES and cyc!=NULL */ /* For payjok = TRUE, return when a hamiltonian path is found */ { @@ -49,7 +49,7 @@ hamheur(sparsegraph *sg, boolean pathok, unsigned long limit, int *cyc) int n,*e,*d,len,d0,*e0,d1,*e1,dx,*ex; int i,ix,x,j,w,vext,exts; unsigned long count; - boolean left,cycle; + booleann left,cycle; long ran; SG_VDE(sg,v,d,e); @@ -254,8 +254,8 @@ main(int argc, char *argv[]) int n,codetype; int argnum,i,j,outcode,tvalue; char *arg,sw; - boolean badargs; - boolean pswitch,sswitch,gswitch,qswitch,Lswitch,tswitch,vswitch,uswitch; + booleann badargs; + booleann pswitch,sswitch,gswitch,qswitch,Lswitch,tswitch,vswitch,uswitch; long Lvalue; double t; char *infilename,*outfilename; diff --git a/labelg.c b/labelg.c index af2a262..54e7ef9 100644 --- a/labelg.c +++ b/labelg.c @@ -61,9 +61,9 @@ static struct invarrec { void (*entrypoint)(graph*,int*,int*,int,int,int,int*, - int,boolean,int,int); + int,booleann,int,int); void (*entrypoint_sg)(graph*,int*,int*,int,int,int,int*, - int,boolean,int,int); + int,booleann,int,int); char *name; } invarproc[] = {{NULL, NULL, "none"}, @@ -101,11 +101,11 @@ main(int argc, char *argv[]) int m,n,codetype; int argnum,j,outcode; char *arg,sw,*fmt; - boolean badargs,digraph; - boolean sswitch,gswitch,qswitch,fswitch,Oswitch; - boolean iswitch,Iswitch,Kswitch,Mswitch,Sswitch; - boolean uswitch,tswitch,Cswitch,Wswitch,zswitch; - boolean dooutput; + booleann badargs,digraph; + booleann sswitch,gswitch,qswitch,fswitch,Oswitch; + booleann iswitch,Iswitch,Kswitch,Mswitch,Sswitch; + booleann uswitch,tswitch,Cswitch,Wswitch,zswitch; + booleann dooutput; int tabsize,outinvar; int inv,mininvarlevel,maxinvarlevel,invararg; long minil,maxil; diff --git a/linegraphg.c b/linegraphg.c index 4734a57..35689ac 100644 --- a/linegraphg.c +++ b/linegraphg.c @@ -210,7 +210,7 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet,tswitch; + booleann badargs,quiet,tswitch; int j,argnum; int codetype,outcode; sparsegraph g,h; diff --git a/listg.c b/listg.c index f37d790..78a271f 100644 --- a/listg.c +++ b/listg.c @@ -70,11 +70,11 @@ extern int labelorg; static void putsetx(FILE *f, set *set1, int *curlenp, int linelength, int m, - boolean compress, int start) + booleann compress, int start) { int slen,j1,j2; char s[40]; - boolean first; + booleann first; first = TRUE; j1 = start; @@ -126,7 +126,7 @@ putsetx(FILE *f, set *set1, int *curlenp, int linelength, int m, *****************************************************************************/ static void -putgraphx(FILE *f, graph *g, int linelength, boolean triang, int m, int n) +putgraphx(FILE *f, graph *g, int linelength, booleann triang, int m, int n) { int i,curlen; set *pg; @@ -143,8 +143,8 @@ putgraphx(FILE *f, graph *g, int linelength, boolean triang, int m, int n) /***************************************************************************/ static void -putedges(FILE *f, graph *g, boolean ptn, int linelength, - boolean digraph, int m, int n) +putedges(FILE *f, graph *g, booleann ptn, int linelength, + booleann digraph, int m, int n) /* Write list of edges, preceded by the numbers of vertices and edges and optionally by "1" if "ptn" is TRUE. Use labelorg */ { @@ -213,7 +213,7 @@ putHCP(FILE *f, graph *g, int m, int n) /***************************************************************************/ static void -putcgraph(FILE *f, graph *g, int linelength, boolean digraph, int m, int n) +putcgraph(FILE *f, graph *g, int linelength, booleann digraph, int m, int n) /* write compressed form, using labelorg */ { int i,curlen,j0; @@ -253,7 +253,7 @@ putcgraph(FILE *f, graph *g, int linelength, boolean digraph, int m, int n) /**************************************************************************/ static void -putve(FILE *f, unsigned long id, graph *g, boolean digraph, int m, int n) +putve(FILE *f, unsigned long id, graph *g, booleann digraph, int m, int n) /* Write the numbers of vertices and edges */ { unsigned long ne; @@ -275,7 +275,7 @@ putGRAPE(FILE *f, graph *g, int m, int n) { int i,j; setword *pg; - boolean first; + booleann first; fprintf(f, "rec( isGraph:=true, order:=%d, group:=Group([],()),\n",n); @@ -326,7 +326,7 @@ putdotty(FILE *f, graph *g, unsigned long id, char *extras, int m, int n) /**************************************************************************/ static void -putbliss(FILE *f, unsigned long id, boolean qswitch, graph *g, int m, int n) +putbliss(FILE *f, unsigned long id, booleann qswitch, graph *g, int m, int n) /* Write the graph in Bliss format, according to * http://www.tcs.hut.fi/Software/bliss/fileformat.shtml */ { @@ -351,13 +351,13 @@ putbliss(FILE *f, unsigned long id, boolean qswitch, graph *g, int m, int n) /**************************************************************************/ static void -putam(FILE *f, graph *g, int linelength, boolean space, - boolean triang, int m, int n) +putam(FILE *f, graph *g, int linelength, booleann space, + booleann triang, int m, int n) /* write adjacency matrix */ { set *gi; int i,j; - boolean first; + booleann first; for (i = 0, gi = (set*)g; i < n - (triang!=0); ++i, gi += m) { @@ -376,12 +376,12 @@ putam(FILE *f, graph *g, int linelength, boolean space, /**************************************************************************/ static void -putMagma(FILE *outfile, graph *g, int linelength, boolean digraph, +putMagma(FILE *outfile, graph *g, int linelength, booleann digraph, int m, int n, long index) { int i,j,j0; set *gi; - boolean first; + booleann first; fprintf(outfile,"g%ld := %s<%d|[\n", index,(digraph?"Digraph":"Graph"),n); @@ -410,7 +410,7 @@ putMaple(FILE *outfile, graph *g, int linelength, int m, int n, long index) { int i,j; set *gi; - boolean first; + booleann first; #if MAPLE_MATRIX fprintf(outfile,"f%ld := Matrix(%d,%d,[\n",index,n,n); @@ -473,7 +473,7 @@ putLaplacianMaple(FILE *outfile, graph *g, int linelength, { int i,j,d; set *gi; - boolean first; + booleann first; #if MAPLE_MATRIX fprintf(outfile,"f%ld := Matrix(%d,%d,[\n",index,n,n); @@ -515,14 +515,14 @@ main(int argc, char *argv[]) int m,n,codetype; int argnum,j,nprev,mprev; char *arg,sw; - boolean badargs,first,digraph; + booleann badargs,first,digraph; unsigned long maxin; long pval1,pval2; - boolean fswitch,pswitch,cswitch,dswitch; - boolean aswitch,lswitch,oswitch,Fswitch; - boolean Aswitch,eswitch,tswitch,qswitch; - boolean sswitch,Mswitch,Wswitch,Lswitch,Eswitch; - boolean bswitch,Gswitch,yswitch,Yswitch,Hswitch; + booleann fswitch,pswitch,cswitch,dswitch; + booleann aswitch,lswitch,oswitch,Fswitch; + booleann Aswitch,eswitch,tswitch,qswitch; + booleann sswitch,Mswitch,Wswitch,Lswitch,Eswitch; + booleann bswitch,Gswitch,yswitch,Yswitch,Hswitch; int linelength; char *infilename,*outfilename,*yarg; diff --git a/makefile b/makefile index 187ec8d..196acef 100644 --- a/makefile +++ b/makefile @@ -1,36 +1,562 @@ -# initial stub makefile for nauty -# Use configure to create the real makefile +# makefile for nauty 2.7 +# makefile. Generated from makefile.in by configure. -SHELL = /bin/sh +SHELL=/bin/sh +CC=gcc +CFLAGS= -O4 -mpopcnt -march=native +SAFECFLAGS= -O4 +LDFLAGS= +THREADLIB=-lpthread +LOK=1 # 0 if no 64-bit integers +TESTPROGS=dreadtest dreadtestS dreadtestS1 dreadtest4K dreadtest1 dreadtestW dreadtestW1 dreadtestL1 dreadtestL +EXEEXT=.exe +AR?=ar + +SMALL=-DMAXN=WORDSIZE +S1=-DMAXN=WORDSIZE -DWORDSIZE=16 +W1=-DMAXN=WORDSIZE -DWORDSIZE=32 +L1=-DMAXN=WORDSIZE -DWORDSIZE=64 +S=-DWORDSIZE=16 +W=-DWORDSIZE=32 +L=-DWORDSIZE=64 + +CCOBJ=${CC} -c ${CFLAGS} -o $@ +GTOOLSH=gtools.h nauty.h naututil.h nausparse.h naurng.h + +# ++++++ This file is automatically generated, don't edit it by hand! ++++++ all : nauty gtools ; -nauty : dreadnaut dreadnautB ; - -gtools : copyg listg labelg dretog amtog geng complg shortg showg NRswitchg \ - addedgeg deledgeg countg pickg genrang newedgeg catg genbg directg ; - -dreadnaut : message ; -dreadnautB : message ; -copyg : message ; -listg : message ; -labelg : message ; -dretog : message ; -amtog : message ; -geng : message ; -complg : message ; -shortg : message ; -showg : message ; -NRswitchg : message ; -addedgeg : message ; -deledgeg : message ; -countg : message ; -pickg : message ; -genrang : message ; -newedgeg : message ; -catg : message ; -genbg : message ; -directg : message ; - -message : - cat config.txt +nauty : dreadnaut nauty.a nauty1.a nautyW.a nautyW1.a nautyL.a nautyL1.a; + +gtools : copyg listg labelg dretog amtog geng complg showg NRswitchg \ + biplabg addedgeg deledgeg countg pickg genrang newedgeg catg genbg \ + directg gentreeg genquarticg underlyingg assembleg gengL \ + ranlabg multig planarg gentourng linegraphg watercluster2 dretodot \ + subdivideg vcolg delptg cubhamg twohamg hamheuristic converseg \ + genspecialg edgetransg genbgL ; + +NAUTYO=nauty.o nautil.o nausparse.o naugraph.o schreier.o naurng.o +NAUTY1O=nauty1.o nautil1.o nausparse.o naugraph1.o schreier.o naurng.o +NAUTYSO=nautyS.o nautilS.o nausparseS.o naugraphS.o schreierS.o naurng.o +NAUTYS1O=nautyS1.o nautilS1.o nausparseS.o naugraphS1.o schreierS.o naurng.o +NAUTYWO=nautyW.o nautilW.o nausparseW.o naugraphW.o schreierW.o naurng.o +NAUTYW1O=nautyW1.o nautilW1.o nausparseW.o naugraphW1.o schreierW.o naurng.o +NAUTYLO=nautyL.o nautilL.o nausparseL.o naugraphL.o schreierL.o naurng.o +NAUTYL1O=nautyL1.o nautilL1.o nausparseL.o naugraphL1.o schreierL.o naurng.o + +nauty.o: nauty.h schreier.h nauty.c + ${CCOBJ} nauty.c +nauty1.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${SMALL} nauty.c +nautyS.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${S} nauty.c +nautyS1.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${S1} nauty.c +nautyW.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${W} nauty.c +nautyW1.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${W1} nauty.c +nautyL.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${L} nauty.c +nautyL1.o: nauty.h schreier.h nauty.c + ${CCOBJ} ${L1} nauty.c + +nautil.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} nautil.c +nautil1.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${SMALL} nautil.c +nautilS.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${S} nautil.c +nautilS1.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${S1} nautil.c +nautilW.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${W} nautil.c +nautilW1.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${W1} nautil.c +nautilL.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${L} nautil.c +nautilL1.o: nauty.h nautil.c sorttemplates.c + ${CCOBJ} ${L1} nautil.c + +naugraph.o: nauty.h naugraph.c + ${CCOBJ} naugraph.c +naugraph1.o: nauty.h naugraph.c + ${CCOBJ} ${SMALL} naugraph.c +naugraphS.o: nauty.h naugraph.c + ${CCOBJ} ${S} naugraph.c +naugraphS1.o: nauty.h naugraph.c + ${CCOBJ} ${S1} naugraph.c +naugraphW.o: nauty.h naugraph.c + ${CCOBJ} ${W} naugraph.c +naugraphW1.o: nauty.h naugraph.c + ${CCOBJ} ${W1} naugraph.c +naugraphL.o: nauty.h naugraph.c + ${CCOBJ} ${L} naugraph.c +naugraphL1.o: nauty.h naugraph.c + ${CCOBJ} ${L1} naugraph.c + +naututil.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} naututil.c +naututil1.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${SMALL} naututil.c +naututilS.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${S} naututil.c +naututilS1.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${S1} naututil.c +naututilW.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${W} naututil.c +naututilW1.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${W1} naututil.c +naututilL.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${L} naututil.c +naututilL1.o: nauty.h naututil.h nausparse.h naututil.c + ${CCOBJ} ${L1} naututil.c + +nautinv.o: nauty.h naututil.h nautinv.c + ${CCOBJ} nautinv.c +nautinv1.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${SMALL} nautinv.c +nautinvS.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${S} nautinv.c +nautinvS1.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${S1} nautinv.c +nautinvW.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${W} nautinv.c +nautinvW1.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${W1} nautinv.c +nautinvL.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${L} nautinv.c +nautinvL1.o: nauty.h naututil.h nautinv.c + ${CCOBJ} ${L1} nautinv.c + +schreier.o : nauty.h naurng.h schreier.h schreier.c + ${CCOBJ} schreier.c +schreierS.o : nauty.h naurng.h schreier.h schreier.c + ${CCOBJ} ${S} schreier.c +schreierW.o : nauty.h naurng.h schreier.h schreier.c + ${CCOBJ} ${W} schreier.c +schreierL.o : nauty.h naurng.h schreier.h schreier.c + ${CCOBJ} ${L} schreier.c + +nausparse.o : nauty.h nausparse.h nausparse.c sorttemplates.c + ${CCOBJ} nausparse.c +nausparseS.o: nauty.h nausparse.h nausparse.c sorttemplates.c + ${CCOBJ} ${S} nausparse.c +nausparseW.o: nauty.h nausparse.h nausparse.c sorttemplates.c + ${CCOBJ} ${W} nausparse.c +nausparseL.o: nauty.h nausparse.h nausparse.c sorttemplates.c + ${CCOBJ} ${L} nausparse.c + +traces.o : nauty.h naurng.h schreier.h traces.h nausparse.h traces.c + ${CCOBJ} traces.c +tracesS.o : nauty.h naurng.h schreier.h traces.h nausparse.h traces.c + ${CCOBJ} ${S} traces.c +tracesW.o : nauty.h naurng.h schreier.h traces.h nausparse.h traces.c + ${CCOBJ} ${W} traces.c +tracesL.o : nauty.h naurng.h schreier.h traces.h nausparse.h traces.c + ${CCOBJ} ${L} traces.c + +gtools.o : ${GTOOLSH} gtools.c + ${CCOBJ} gtools.c +gtoolsS.o : ${GTOOLSH} gtools.c + ${CCOBJ} ${S} gtools.c +gtoolsW.o : ${GTOOLSH} gtools.c + ${CCOBJ} ${W} gtools.c +gtoolsL.o : ${GTOOLSH} gtools.c + ${CCOBJ} ${L} gtools.c + +nautaux.o: nautaux.h nauty.h naututil.h nautaux.c + ${CCOBJ} nautaux.c +nautauxS.o: nautaux.h nauty.h naututil.h nautaux.c + ${CCOBJ} ${S} nautaux.c +nautauxW.o: nautaux.h nauty.h naututil.h nautaux.c + ${CCOBJ} ${W} nautaux.c +nautauxL.o: nautaux.h nauty.h naututil.h nautaux.c + ${CCOBJ} ${L} nautaux.c + +gtnauty.o : ${GTOOLSH} gtnauty.c sorttemplates.c + ${CCOBJ} gtnauty.c +gtnautyL1.o : ${GTOOLSH} gtnauty.c sorttemplates.c + ${CCOBJ} ${L1} gtnauty.c +gtnautyW1.o : ${GTOOLSH} gtnauty.c sorttemplates.c + ${CCOBJ} ${W1} gtnauty.c +gtnautyL.o : ${GTOOLSH} gtnauty.c sorttemplates.c + ${CCOBJ} ${L} gtnauty.c +gtnautyW.o : ${GTOOLSH} gtnauty.c sorttemplates.c + ${CCOBJ} ${W} gtnauty.c + +naurng.o: naurng.c nauty.h + ${CCOBJ} naurng.c +rng.o: rng.c nauty.h + ${CCOBJ} rng.c + +dreadnaut: dreadnaut.c naututil.o nautinv.o traces.o gtools.o ${NAUTYO} + ${CC} -o dreadnaut ${SAFECFLAGS} dreadnaut.c naututil.o \ + nautinv.o gtools.o traces.o ${NAUTYO} ${LDFLAGS} +dreadnautL: dreadnaut.c naututilL.o nautyL.o nautilL.o nautinvL.o \ + nausparseL.o naugraphL.o naurng.o schreierL.o tracesL.o gtoolsL.o + ${CC} -o dreadnautL ${SAFECFLAGS} ${L} dreadnaut.c naututilL.o \ + nautyL.o nautilL.o nautinvL.o naugraphL.o naurng.o gtoolsL.o \ + nausparseL.o schreierL.o tracesL.o ${LDFLAGS} +dreadnaut1: dreadnaut.c naututil1.o nauty1.o nautil1.o nautinv1.o \ + nausparse.o naugraph1.o naurng.o schreier.o traces.o gtools.o + ${CC} -o dreadnaut1 ${SAFECFLAGS} ${SMALL} dreadnaut.c naututil1.o \ + nauty1.o nautil1.o nautinv1.o naugraph1.o naurng.o gtools.o \ + nausparse.o schreier.o traces.o ${LDFLAGS} + +nauty.a: ${NAUTYO} traces.o gtools.o naututil.o nautinv.o \ + gutil1.o gutil2.o gtnauty.o naugroup.o nautycliquer.o + rm -f nauty.a + ${AR} crs nauty.a ${NAUTYO} traces.o gtools.o naututil.o \ + nautinv.o gutil1.o gutil2.o gtnauty.o naugroup.o \ + naurng.o schreier.o nautycliquer.o + +nauty1.a: ${NAUTY1O} traces.o gtools.o naututil1.o nautinv1.o \ + gutil1.o gutil2.o gtnauty.o naugroup.o nautycliquer.o + rm -f nauty1.a + ${AR} crs nauty1.a ${NAUTY1O} traces.o gtools.o naututil1.o \ + nautinv1.o gutil1.o gutil2.o gtnauty.o naugroup.o nautycliquer.o + +nautyW.a: ${NAUTYWO} traces.o gtoolsW.o naututilW.o nautinvW.o \ + gutil1W.o gutil2W.o gtnautyW.o naugroupW.o nautycliquerW.o + rm -f nautyW.a + ${AR} crs nautyW.a ${NAUTYWO} traces.o gtoolsW.o naututilW.o \ + nautinvW.o gutil1W.o gutil2W.o gtnautyW.o naugroupW.o nautycliquerW.o + +nautyW1.a: ${NAUTYW1O} traces.o gtoolsW.o naututilW1.o nautinvW1.o \ + gutil1W1.o gutil2W1.o gtnautyW1.o naugroupW.o nautycliquerW.o + rm -f nautyW1.a + ${AR} crs nautyW1.a ${NAUTYW1O} traces.o gtoolsW.o naututilW1.o \ + nautinvW1.o gutil1W1.o gutil2W1.o gtnautyW1.o naugroupW.o nautycliquerW.o + +nautyL.a: ${NAUTYLO} traces.o gtoolsL.o naututilL.o nautinvL.o \ + gutil1L.o gutil2L.o gtnautyL.o naugroupL.o nautycliquerL.o + rm -f nautyL.a + ${AR} crs nautyL.a ${NAUTYLO} traces.o gtoolsL.o naututilL.o \ + nautinvL.o gutil1L.o gutil2L.o gtnautyL.o naugroupL.o nautycliquerL.o + +nautyL1.a: ${NAUTYL1O} traces.o gtoolsL.o naututilL1.o nautinvL1.o \ + gutil1L1.o gutil2L1.o gtnautyL1.o naugroupL.o nautycliquerL.o + rm -f nautyL1.a + ${AR} crs nautyL1.a ${NAUTYL1O} traces.o gtoolsL.o naututilL1.o \ + nautinvL1.o gutil1L1.o gutil2L1.o gtnautyL1.o naugroupL.o nautycliquerL.o + +clean: + rm -f *.o config.log config.cache config.status nauty*.a + rm -f dreadtest${EXEEXT} dreadtestL${EXEEXT} \ + dreadtestW${EXEEXT} \ + dreadtestS${EXEEXT} dreadtestS1${EXEEXT} \ + dreadtest4K${EXEEXT} dreadtest1${EXEEXT} \ + dreadtestL1${EXEEXT} dreadtestW1${EXEEXT} + +gutil1.o : ${GTOOLSH} gutils.h gutil1.c + ${CCOBJ} gutil1.c +gutil2.o : ${GTOOLSH} gutils.h gutil2.c + ${CCOBJ} gutil2.c +gutil1W1.o : ${GTOOLSH} gutils.h gutil1.c + ${CCOBJ} ${W1} gutil1.c +gutil2W1.o : ${GTOOLSH} gutils.h gutil2.c + ${CCOBJ} ${W1} gutil2.c +gutil1L1.o : ${GTOOLSH} gutils.h gutil1.c + ${CCOBJ} ${L1} gutil1.c +gutil2L1.o : ${GTOOLSH} gutils.h gutil2.c + ${CCOBJ} ${L1} gutil2.c +gutil1W.o : ${GTOOLSH} gutils.h gutil1.c + ${CCOBJ} ${W} gutil1.c +gutil2W.o : ${GTOOLSH} gutils.h gutil2.c + ${CCOBJ} ${W} gutil2.c +gutil1L.o : ${GTOOLSH} gutils.h gutil1.c + ${CCOBJ} ${L} gutil1.c +gutil2L.o : ${GTOOLSH} gutils.h gutil2.c + ${CCOBJ} ${L} gutil2.c + +catg : ${GTOOLSH} catg.c gtools.o + ${CC} -o catg ${CFLAGS} catg.c gtools.o ${LDFLAGS} + +copyg : ${GTOOLSH} copyg.c gtools.o + ${CC} -o copyg ${CFLAGS} copyg.c gtools.o ${LDFLAGS} + +genspecialg : ${GTOOLSH} genspecialg.c ${NAUTYO} gtools.o + ${CC} -o genspecialg ${CFLAGS} genspecialg.c ${NAUTYO} gtools.o ${LDFLAGS} + +listg : ${GTOOLSH} listg.c gtools.o nautil.o + ${CC} -o listg ${CFLAGS} listg.c gtools.o nautil.o ${LDFLAGS} + +labelg : ${GTOOLSH} naututil.h labelg.c gtools.o gtnauty.o ${NAUTYO} \ + nautinv.o nausparse.h gutils.h gutil2.o traces.h traces.o naututil.o + ${CC} -o labelg ${SAFECFLAGS} labelg.c gtools.o gtnauty.o naututil.o \ + nautinv.o gutil2.o traces.o ${NAUTYO} ${LDFLAGS} + +shortg : ${GTOOLSH} shortg.c gtools.o gtnauty.o ${NAUTYO} \ + nausparse.h gutils.h gutil2.o nautinv.h nautinv.o traces.o + ${CC} -o shortg ${CFLAGS} shortg.c gtools.o gtnauty.o nautinv.o \ + ${NAUTYO} gutil2.o traces.o ${LDFLAGS} + +dretog : ${GTOOLSH} dretog.c naututil.o gtools.o ${NAUTYO} + ${CC} -o dretog ${CFLAGS} dretog.c naututil.o gtools.o \ + ${NAUTYO} ${LDFLAGS} + +dretodot : ${GTOOLSH} dretodot.c naututil.o gtools.o \ + traces.o traces.h ${NAUTYO} + ${CC} -o dretodot ${CFLAGS} dretodot.c naututil.o gtools.o \ + traces.o ${NAUTYO} ${LDFLAGS} -lm + +amtog : ${GTOOLSH} amtog.c gtools.o ${NAUTYO} + ${CC} -o amtog ${CFLAGS} amtog.c gtools.o ${NAUTYO} ${LDFLAGS} + +genbg : ${GTOOLSH} genbg.c gtoolsW.o nautyW1.o nautilW1.o naugraphW1.o \ + schreierW.o naurng.o + ${CC} -o genbg ${CFLAGS} ${W1} genbg.c gtoolsW.o schreierW.o \ + nautyW1.o nautilW1.o naugraphW1.o naurng.o ${LDFLAGS} + +genbgL : ${GTOOLSH} genbg.c gtoolsL.o nautyL1.o nautilL1.o naugraphL1.o \ + schreierL.o naurng.o + ${CC} -o genbgL ${CFLAGS} ${L1} -DMAXN1=30 genbg.c gtoolsL.o \ + schreierL.o naurng.o nautyL1.o nautilL1.o naugraphL1.o ${LDFLAGS} + +geng : ${GTOOLSH} geng.c gtoolsW.o nautyW1.o nautilW1.o naugraphW1.o schreier.o naurng.o + ${CC} -o geng ${CFLAGS} ${W1} geng.c gtoolsW.o nautyW1.o \ + nautilW1.o naugraphW1.o schreier.o naurng.o ${LDFLAGS} + +gengL : ${GTOOLSH} geng.c gtoolsL.o nautyL1.o nautilL1.o naugraphL1.o schreier.o naurng.o + ${CC} -o gengL ${CFLAGS} ${L1} geng.c gtoolsL.o nautyL1.o \ + nautilL1.o naugraphL1.o schreier.o naurng.o ${LDFLAGS} + +gentourng : ${GTOOLSH} gentourng.c gtoolsW.o nautyW1.o nautilW1.o \ + naugraphW1.o schreier.o naurng.o + ${CC} -o gentourng ${CFLAGS} -DMAXN=24 $W gentourng.c gtoolsW.o nautyW1.o \ + nautilW1.o naugraphW1.o schreier.o naurng.o ${LDFLAGS} + +genquarticg : ${GTOOLSH} genquarticg.c gtoolsL.o nautyL1.o nautilL1.o \ + naugraphL1.o schreierL.o naurng.o quarticirred28.h + ${CC} -o genquarticg ${CFLAGS} genquarticg.c gtoolsL.o nautyL1.o \ + nautilL1.o naugraphL1.o schreierL.o naurng.o ${LDFLAGS} + +gentreeg : gentreeg.c gtools.o nauty.h gtools.h + ${CC} -o gentreeg ${CFLAGS} gentreeg.c gtools.o + +genrang : ${GTOOLSH} genrang.c gtools.o naututil.o ${NAUTYO} + ${CC} -o genrang ${CFLAGS} genrang.c \ + gtools.o naututil.o ${NAUTYO} ${LDFLAGS} + +complg : ${GTOOLSH} complg.c gtools.o gtnauty.o ${NAUTYO} + ${CC} -o complg ${CFLAGS} complg.c gtools.o gtnauty.o \ + ${NAUTYO} ${LDFLAGS} + +cubhamg : ${GTOOLSH} cubhamg.c gtools.o ${NAUTYO} + ${CC} -o cubhamg ${CFLAGS} cubhamg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +twohamg : ${GTOOLSH} twohamg.c gtools.o ${NAUTYO} + ${CC} -o twohamg ${CFLAGS} twohamg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +hamheuristic : ${GTOOLSH} hamheuristic.c gtools.o ${NAUTYO} + ${CC} -o hamheuristic ${CFLAGS} hamheuristic.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +converseg : ${GTOOLSH} converseg.c gtools.o ${NAUTYO} + ${CC} -o converseg ${CFLAGS} converseg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +assembleg : ${GTOOLSH} assembleg.c gtools.o ${NAUTYO} + ${CC} -o assembleg ${CFLAGS} assembleg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +underlyingg : ${GTOOLSH} underlyingg.c gtools.o ${NAUTYO} + ${CC} -o underlyingg ${CFLAGS} underlyingg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +linegraphg : ${GTOOLSH} linegraphg.c gtools.o ${NAUTYO} + ${CC} -o linegraphg ${CFLAGS} linegraphg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +subdivideg : ${GTOOLSH} subdivideg.c gtools.o ${NAUTYO} + ${CC} -o subdivideg ${CFLAGS} subdivideg.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +vcolg : ${GTOOLSH} vcolg.c gtools.o ${NAUTYO} naugroup.o gtnauty.o \ + nautinv.o naututil.o naugroup.h + ${CC} -o vcolg ${CFLAGS} vcolg.c gtnauty.o naututil.o \ + nautinv.o gtools.o naugroup.o ${NAUTYO} ${LDFLAGS} + +edgetransg : ${GTOOLSH} edgetransg.c gtools.o ${NAUTYO} naugroup.o \ + gtnauty.o naututil.o nautinv.o naugroup.h + ${CC} -o edgetransg ${CFLAGS} edgetransg.c gtnauty.o naututil.o \ + nautinv.o gtools.o naugroup.o ${NAUTYO} ${LDFLAGS} + +biplabg : ${GTOOLSH} gutils.h biplabg.c gtools.o gutil1.o ${NAUTYO} + ${CC} -o biplabg ${CFLAGS} biplabg.c \ + gtools.o gutil1.o ${NAUTYO} ${LDFLAGS} + +ranlabg : ${GTOOLSH} ranlabg.c gtools.o ${NAUTYO} + ${CC} -o ranlabg ${CFLAGS} ranlabg.c gtools.o ${NAUTYO} ${LDFLAGS} + +NRswitchg : ${GTOOLSH} NRswitchg.c gtools.o gtnauty.o ${NAUTYO} + ${CC} -o NRswitchg ${CFLAGS} NRswitchg.c gtools.o gtnauty.o \ + ${NAUTYO} ${LDFLAGS} + +deledgeg : ${GTOOLSH} deledgeg.c gtools.o gtnauty.o ${NAUTYO} + ${CC} -o deledgeg ${CFLAGS} deledgeg.c gtools.o gtnauty.o \ + ${NAUTYO} ${LDFLAGS} + +delptg : ${GTOOLSH} delptg.c gtools.o gtnauty.o ${NAUTYO} + ${CC} -o delptg ${CFLAGS} delptg.c gtools.o gtnauty.o \ + ${NAUTYO} ${LDFLAGS} + +addedgeg : ${GTOOLSH} gutils.h addedgeg.c gtools.o gtnauty.o gutil1.o ${NAUTYO} + ${CC} -o addedgeg ${CFLAGS} addedgeg.c gtools.o gtnauty.o \ + gutil1.o ${NAUTYO} ${LDFLAGS} + +newedgeg : ${GTOOLSH} gutils.h newedgeg.c gtools.o gtnauty.o ${NAUTYO} + ${CC} -o newedgeg ${CFLAGS} newedgeg.c gtools.o gtnauty.o \ + ${NAUTYO} ${LDFLAGS} + +pickg : ${GTOOLSH} gutils.h testg.c splay.c ${NAUTYO} nautycliquer.h \ + gtools.o gtnauty.o gutil1.o gutil2.o nautinv.o nautycliquer.o + ${CC} -o pickg ${SAFECFLAGS} testg.c gtools.o gtnauty.o gutil1.o \ + gutil2.o nautinv.o nautycliquer.o ${NAUTYO} ${LDFLAGS} + +countg : ${GTOOLSH} gutils.h testg.c splay.c ${NAUTYO} nautycliquer.h \ + gtools.o gtnauty.o gutil1.o gutil2.o nautinv.o nautycliquer.o + ${CC} -o countg ${SAFECFLAGS} testg.c gtools.o gtnauty.o gutil1.o \ + gutil2.o nautinv.o nautycliquer.o ${NAUTYO} ${LDFLAGS} + +directg : ${GTOOLSH} naugroup.h directg.c gtools.o naugroup.o ${NAUTYO} + ${CC} -o directg ${CFLAGS} directg.c gtools.o \ + ${NAUTYO} naugroup.o ${LDFLAGS} + +multig : ${GTOOLSH} naugroup.h multig.c gtools.o naugroup.o ${NAUTYO} + ${CC} -o multig ${CFLAGS} multig.c gtools.o \ + ${NAUTYO} naugroup.o ${LDFLAGS} + +planarg : ${GTOOLSH} planarg.c gtools.o planarity.c + ${CC} -o planarg ${CFLAGS} \ + planarg.c planarity.c gtools.o ${LDFLAGS} + +watercluster2 : ${GTOOLSH} nauty.h watercluster2.c gtoolsW.o ${NAUTYW1O} + ${CC} -o watercluster2 ${CFLAGS} ${W1} watercluster2.c \ + gtoolsW.o ${NAUTYW1O} ${LDFLAGS} + +showg : showg.c + ${CC} -o showg ${CFLAGS} showg.c ${LDFLAGS} + +readg : showg + echo "*** readg is now called showg ***" + +sumlines : sumlines.c + ${CC} -o sumlines ${CFLAGS} sumlines.c ${LDFLAGS} -lgmp + +blisstog : ${GTOOLSH} blisstog.c gtools.o ${NAUTYO} + ${CC} -o blisstog ${CFLAGS} blisstog.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +bliss2dre : ${GTOOLSH} bliss2dre.c gtools.o ${NAUTYO} + ${CC} -o bliss2dre ${CFLAGS} bliss2dre.c gtools.o \ + ${NAUTYO} ${LDFLAGS} + +testlabelling : testlabelling.c nauty.h nauty.a + ${CC} -o testlabelling -g testlabelling.c traces.c nauty.a ${LDFLAGS} + +naugroup.o : nauty.h naugroup.h naugroup.c + ${CCOBJ} naugroup.c +naugroupW.o : nauty.h naugroup.h naugroup.c + ${CCOBJ} ${W} naugroup.c +naugroupL.o : nauty.h naugroup.h naugroup.c + ${CCOBJ} ${L} naugroup.c + +nautycliquer.o : nauty.h nautycliquer.c nautycliquer.h + ${CCOBJ} nautycliquer.c +nautycliquerW.o : nauty.h naugroup.h naugroup.c nautycliquer.c nautycliquer.h + ${CCOBJ} ${W} nautycliquer.c +nautycliquerL.o : nauty.h naugroup.h naugroup.c nautycliquer.c nautycliquer.h + ${CCOBJ} ${L} nautycliquer.c + +nautyex1 : nauty.h nautyex1.c nauty.a + ${CC} -o nautyex1 ${CFLAGS} nautyex1.c nauty.a ${LDFLAGS} +nautyex2 : nauty.h nautyex2.c ${NAUTYO} + ${CC} -o nautyex2 ${CFLAGS} nautyex2.c nauty.a ${LDFLAGS} +nautyex3 : nauty.h nautyex3.c nauty.a + ${CC} -o nautyex3 ${CFLAGS} nautyex3.c nauty.a ${LDFLAGS} +nautyex4 : nauty.h nausparse.h nautyex4.c nauty.a + ${CC} -o nautyex4 ${CFLAGS} nautyex4.c nauty.a ${LDFLAGS} +nautyex5 : nauty.h nausparse.h nautyex5.c nauty.a + ${CC} -o nautyex5 ${CFLAGS} nautyex5.c nauty.a ${LDFLAGS} +nautyex6 : nauty.h nautyex6.c nauty.a + ${CC} -o nautyex6 ${CFLAGS} nautyex6.c nauty.a ${LDFLAGS} +nautyex7 : nauty.h nautyex7.c traces.h nauty.a + ${CC} -o nautyex7 ${CFLAGS} nautyex7.c nauty.a ${LDFLAGS} +nautyex8 : nauty.h nausparse.h nautyex8.c nauty.a + ${CC} -o nautyex8 ${CFLAGS} nautyex8.c nauty.a ${LDFLAGS} +nautyex9 : nauty.h nautyex9.c nauty.a + ${CC} -o nautyex9 ${CFLAGS} nautyex9.c nauty.a ${LDFLAGS} +nautyex10 : nauty.h nautyex10.c nauty.a + ${CC} -o nautyex10 ${CFLAGS} nautyex10.c nauty.a ${LDFLAGS} + +testprogs: ${TESTPROGS} ; + +checks: nauty gtools naucompare ${TESTPROGS} + ./runalltests + +check: checks ; + +naucompare : naucompare.c + ${CC} -o naucompare ${CFLAGS} naucompare.c ${LDFLAGS} + +dreadtest: dreadnaut.c nautinv.o ${NAUTYO} naututil.o traces.o gtools.o + ${CC} -o dreadtest ${SAFECFLAGS} -DDREADTEST dreadnaut.c \ + nautinv.o naututil.o traces.o gtools.o ${NAUTYO} ${LDFLAGS} +dreadtest1: dreadnaut.c nautinv1.o ${NAUTY1O} naututil1.o traces.o gtools.o + ${CC} -o dreadtest1 ${SAFECFLAGS} ${SMALL} -DDREADTEST dreadnaut.c \ + nautinv1.o naututil1.o traces.o gtools.o ${NAUTY1O} ${LDFLAGS} +dreadtestS: dreadnaut.c nautinvS.o ${NAUTYSO} naututilS.o tracesS.o gtoolsS.o + ${CC} -o dreadtestS ${SAFECFLAGS} ${S} -DDREADTEST dreadnaut.c \ + nautinvS.o naututilS.o tracesS.o gtoolsS.o ${NAUTYSO} ${LDFLAGS} +dreadtestS1: dreadnaut.c nautinvS1.o ${NAUTYS1O} naututilS1.o \ + tracesS.o gtoolsS.o + ${CC} -o dreadtestS1 ${SAFECFLAGS} ${S1} -DDREADTEST dreadnaut.c \ + nautinvS1.o naututilS1.o tracesS.o gtoolsS.o ${NAUTYS1O} ${LDFLAGS} +dreadtestW: dreadnaut.c nautinvW.o ${NAUTYWO} naututilW.o tracesW.o gtoolsW.o + ${CC} -o dreadtestW ${SAFECFLAGS} ${W} -DDREADTEST dreadnaut.c \ + nautinvW.o naututilW.o tracesW.o gtoolsW.o ${NAUTYWO} ${LDFLAGS} +dreadtestW1: dreadnaut.c nautinvW1.o ${NAUTYW1O} naututilW1.o \ + tracesW.o gtoolsW.o + ${CC} -o dreadtestW1 ${SAFECFLAGS} ${W1} -DDREADTEST dreadnaut.c \ + nautinvW1.o naututilW1.o tracesW.o gtoolsW.o ${NAUTYW1O} ${LDFLAGS} +dreadtestL: dreadnaut.c nautinvL.o ${NAUTYLO} naututilL.o tracesL.o gtoolsL.o + ${CC} -o dreadtestL ${SAFECFLAGS} ${L} -DDREADTEST dreadnaut.c \ + nautinvL.o naututilL.o tracesL.o gtoolsL.o ${NAUTYLO} ${LDFLAGS} +dreadtestL1: dreadnaut.c nautinvL1.o ${NAUTYL1O} naututilL1.o \ + tracesL.o gtoolsL.o + ${CC} -o dreadtestL1 ${SAFECFLAGS} ${L1} -DDREADTEST dreadnaut.c \ + nautinvL1.o naututilL1.o tracesL.o gtoolsL.o ${NAUTYL1O} ${LDFLAGS} +dreadtest4K: dreadnaut.c nausparse.c schreier.c naututil.c nauty.c \ + nautil.c nautinv.c naugraph.c naurng.o gtools.c traces.c + ${CC} -o dreadtest4K ${SAFECFLAGS} -DMAXN=4096 -DDREADTEST \ + dreadnaut.c naututil.c nauty.c nautil.c nautinv.c \ + naugraph.c nausparse.c naurng.o schreier.c gtools.c \ + traces.c ${LDFLAGS} + +checks6: checks6.c ${GTOOLSH} gtools.o + ${CC} -o checks6 ${SAFECFLAGS} checks6.c gtools.o + +bigs: gtnauty.o gutil2.o nausparse.o nautil.o naututil.o gtools.o \ + naugraph.o nautaux.o nautinv.o nauty.o schreier.o + rm -f gtnautyB.o gutil2B.o nausparseB.o nautilB.o naututilB.o \ + gtoolsB.o naugraphB.o nautauxB.o nautinvB.o nautyB.o + cp gtnauty.o gtnautyB.o + cp gutil2.o gutil2B.o + cp nausparse.o nausparseB.o + cp nautil.o nautilB.o + cp naututil.o naututilB.o + cp gtools.o gtoolsB.o + cp naugraph.o naugraphB.o + cp nautaux.o nautauxB.o + cp nautinv.o nautinvB.o + cp nauty.o nautyB.o + cp schreier.o schreierB.o + +gencrn: gencrn.c gtnauty.c gtools.c naugraph.c naugroup.c naurng.c nausparse.c nautil.c nautinv.c naututil.c nauty.c schreier.c naututil.h + +# ++++++ This file is automatically generated, don't edit it by hand! ++++++ diff --git a/multig.c b/multig.c index eb09903..6b5629c 100644 --- a/multig.c +++ b/multig.c @@ -44,12 +44,12 @@ static int edgeno[MAXNV][MAXNV]; static int lastlev[MAXNE]; static int ix[MAXNE+MAXNV],nix; -static boolean first; +static booleann first; static int lastreject[MAXNV]; -static boolean lastrejok; +static booleann lastrejok; static unsigned long groupsize; static unsigned long newgroupsize; -static boolean Gswitch,Tswitch,Aswitch,Bswitch; +static booleann Gswitch,Tswitch,Aswitch,Bswitch; static int Brows; #define GROUPTEST_NOT @@ -119,7 +119,7 @@ writeautom(int *p, int n) /**************************************************************************/ -static boolean +static booleann ismax(int *p, int n) /* test if x^p <= x */ { @@ -198,11 +198,11 @@ printam(FILE *f, int n, int ne, int *ix) static void trythisone(grouprec *group, - boolean lswitch, int *deg, int maxdeg, int ne, int n) + booleann lswitch, int *deg, int maxdeg, int ne, int n) /* Try one solution, accept if minimal. */ { int i,ne2; - boolean accept; + booleann accept; nix = ne; newgroupsize = 1; @@ -347,7 +347,7 @@ scan_lp(int level, int ne, long minedges, long maxedges, long sofar, int left; long min,max,k; int x1,x2; - boolean odd,even; + booleann odd,even; if (level == ne) { @@ -446,7 +446,7 @@ scan_reg(int level, int ne, long minedges, long maxedges, long sofar, static void multi(graph *g, int nfixed, long minedges, long maxedges, long maxmult, - int maxdeg, boolean lswitch, int m, int n) + int maxdeg, booleann lswitch, int m, int n) { static DEFAULTOPTIONS_GRAPH(options); statsblk stats; @@ -458,7 +458,7 @@ multi(graph *g, int nfixed, long minedges, long maxedges, long maxmult, int lab[MAXNV],ptn[MAXNV],orbits[MAXNV],deg[MAXNV]; int delta[MAXNV],def[MAXNV]; set active[(MAXNV+WORDSIZE-1)/WORDSIZE]; - boolean isreg; + booleann isreg; #ifdef PATHCOUNTS ++count0; @@ -618,9 +618,9 @@ main(int argc, char *argv[]) int m,n,codetype; int argnum,j,nfixed,maxdeg,regdeg,ldeg; char *arg,sw; - boolean badargs; - boolean fswitch,uswitch,eswitch,qswitch,mswitch,Dswitch; - boolean lswitch,rswitch; + booleann badargs; + booleann fswitch,uswitch,eswitch,qswitch,mswitch,Dswitch; + booleann lswitch,rswitch; long minedges,maxedges,maxmult; double t; char *infilename,*outfilename; diff --git a/naugraph.c b/naugraph.c index 6dcd204..77dd04d 100644 --- a/naugraph.c +++ b/naugraph.c @@ -63,8 +63,8 @@ static TLS_ATTR set dnwork[40*MAXM]; * * *****************************************************************************/ -boolean -isautom(graph *g, int *perm, boolean digraph, int m, int n) +booleann +isautom(graph *g, int *perm, booleann digraph, int m, int n) { set *pg; int pos; @@ -489,8 +489,8 @@ refine1(graph *g, int *lab, int *ptn, int level, int *numcells, * * *****************************************************************************/ -boolean -cheapautom(int *ptn, int level, boolean digraph, int n) +booleann +cheapautom(int *ptn, int level, booleann digraph, int n) { int i,k,nnt; @@ -615,7 +615,7 @@ bestcell(graph *g, int *lab, int *ptn, int level, int tc_level, int m, int n) int targetcell(graph *g, int *lab, int *ptn, int level, int tc_level, - boolean digraph, int hint, int m, int n) + booleann digraph, int hint, int m, int n) { int i; diff --git a/naugroup.c b/naugroup.c index 59a1a7b..4cbdbf5 100644 --- a/naugroup.c +++ b/naugroup.c @@ -83,7 +83,7 @@ freepermrec(permrec *p, int n) /**************************************************************************/ grouprec * -groupptr(boolean cutloose) +groupptr(booleann cutloose) /* Give the address of the group structure, cutting it loose if requested. */ { @@ -275,7 +275,7 @@ makecosetreps(grouprec *grp) /**************************************************************************/ int -permcycles(int *p, int n, int *len, boolean sort) +permcycles(int *p, int n, int *len, booleann sort) /* Puts in len[0..] the cycle lengths of p. If sort, sort them. Return the number of cycles. */ { diff --git a/naugroup.h b/naugroup.h index a43c262..eec9a33 100644 --- a/naugroup.h +++ b/naugroup.h @@ -38,13 +38,13 @@ extern "C" { #endif extern void freepermrec(permrec*, int); -extern grouprec *groupptr(boolean); +extern grouprec *groupptr(booleann); extern permrec *newpermrec(int); extern void groupautomproc(int,int*,int*,int,int,int); extern void grouplevelproc(int*,int*,int,int*,statsblk*,int,int,int,int,int,int); extern void makecosetreps(grouprec*); -extern int permcycles(int*,int,int*,boolean); +extern int permcycles(int*,int,int*,booleann); extern void allgroup(grouprec*,void(*)(int*,int)); extern int allgroup2(grouprec*,void(*)(int*,int,int*)); extern int allgroup3(grouprec*,void(*)(int*,int,int*,void*),void*); diff --git a/nausparse.c b/nausparse.c index 4a0eae7..030f17a 100644 --- a/nausparse.c +++ b/nausparse.c @@ -147,8 +147,8 @@ preparemarks2(size_t nn) * * *****************************************************************************/ -boolean -isautom_sg(graph *g, int *p, boolean digraph, int m, int n) +booleann +isautom_sg(graph *g, int *p, booleann digraph, int m, int n) { int *d,*e; size_t *v; @@ -182,7 +182,7 @@ isautom_sg(graph *g, int *p, boolean digraph, int m, int n) * * *****************************************************************************/ -boolean +booleann aresame_sg(sparsegraph *g1, sparsegraph *g2) { int *d1,*e1; @@ -643,7 +643,7 @@ refine_sg(graph *g, int *lab, int *ptn, int level, int *numcells, int size,bigsize,bigpos; int nactive,hitcells; int lj,di,splitv; - boolean trivsplit; + booleann trivsplit; size_t *v,vi,ii; SG_VDE(g,v,d,e); @@ -1129,8 +1129,8 @@ refine_sg(graph *g, int *lab, int *ptn, int level, int *numcells, * * *****************************************************************************/ -boolean -cheapautom_sg(int *ptn, int level, boolean digraph, int n) +booleann +cheapautom_sg(int *ptn, int level, booleann digraph, int n) { int i,k,nnt; @@ -1267,7 +1267,7 @@ bestcell_sg(graph *g, int *lab, int *ptn, int level, int targetcell_sg(graph *g, int *lab, int *ptn, int level, int tc_level, - boolean digraph, int hint, int m, int n) + booleann digraph, int hint, int m, int n) { int i; @@ -1321,7 +1321,7 @@ sortlists_sg(sparsegraph *g) *****************************************************************************/ void -put_sg(FILE *f, sparsegraph *sg, boolean digraph, int linelength) +put_sg(FILE *f, sparsegraph *sg, booleann digraph, int linelength) { int *d,*e; int n,di; @@ -1527,7 +1527,7 @@ nauty_to_sg(graph *g, sparsegraph *sg, int m, int n) void distances_sg(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int *d,*e; int i,k,dlim,wt; @@ -1536,7 +1536,7 @@ distances_sg(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, int head,tail; long longcode; size_t *v,vi,j; - boolean success; + booleann success; SG_VDE(g,v,d,e); @@ -1616,7 +1616,7 @@ distances_sg(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void adjacencies_sg(graph *g, int *lab, int *ptn, int level, int numcells, - int tvpos, int *invar, int invararg, boolean digraph, + int tvpos, int *invar, int invararg, booleann digraph, int m, int n) { int *d,*e; diff --git a/nausparse.h b/nausparse.h index 128d8ca..b9611c1 100644 --- a/nausparse.h +++ b/nausparse.h @@ -89,9 +89,9 @@ extern "C" { extern dispatchvec dispatch_sparse; -extern int targetcell_sg(graph*,int*,int*,int,int,boolean,int,int,int); -extern boolean cheapautom_sg(int*,int,boolean,int); -extern boolean isautom_sg(graph*,int*,boolean,int,int); +extern int targetcell_sg(graph*,int*,int*,int,int,booleann,int,int,int); +extern booleann cheapautom_sg(int*,int,booleann,int); +extern booleann isautom_sg(graph*,int*,booleann,int,int); extern void refine_sg(graph*,int*,int*,int,int*,int*,set*,int*,int,int); extern int testcanlab_sg(graph*,graph*,int*,int*,int,int); extern void updatecan_sg(graph*,graph*,int*,int,int,int); @@ -108,8 +108,8 @@ extern void nausparse_check(int,int,int,int); extern sparsegraph *nauty_to_sg(graph*,sparsegraph*,int,int); extern graph* sg_to_nauty(sparsegraph*,graph*,int,int*); extern void sortlists_sg(sparsegraph*); -extern boolean aresame_sg(sparsegraph*,sparsegraph*); -extern void put_sg(FILE*,sparsegraph*,boolean,int); +extern booleann aresame_sg(sparsegraph*,sparsegraph*); +extern void put_sg(FILE*,sparsegraph*,booleann,int); extern sparsegraph *copy_sg(sparsegraph*,sparsegraph*); extern void distvals(sparsegraph*,int,int*,int); @@ -117,11 +117,11 @@ extern void sparsenauty(sparsegraph*g,int*,int*,int*, optionblk*,statsblk*,sparsegraph*); extern void - adjacencies_sg(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + adjacencies_sg(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); extern void - distances_sg(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + distances_sg(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); extern void - distances_sg(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + distances_sg(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); #ifdef __cplusplus } diff --git a/nautaux.c b/nautaux.c index f8792c0..4ee67fb 100644 --- a/nautaux.c +++ b/nautaux.c @@ -104,12 +104,12 @@ ptncode(graph *g, int *lab, int *ptn, int level, int m, int n) * * *****************************************************************************/ -boolean +booleann equitable(graph *g, int *lab, int *ptn, int level, int m, int n) { int i; int v1,v2,nc,inter,cellend; - boolean ok; + booleann ok; /* find all cells: put starts in workperm[0..n] */ diff --git a/nauthread1.c b/nauthread1.c index c15d2e7..efe7660 100644 --- a/nauthread1.c +++ b/nauthread1.c @@ -17,7 +17,7 @@ typedef struct { int n; - boolean writeautoms; + booleann writeautoms; } params; /* Used to pass parameters to the thread */ static void* diff --git a/nauthread2.c b/nauthread2.c index 89b74b3..b8fde8d 100644 --- a/nauthread2.c +++ b/nauthread2.c @@ -18,7 +18,7 @@ typedef struct { int n; - boolean writeautoms; + booleann writeautoms; } params; /* Used to pass parameters to the thread */ static void* diff --git a/nautil.c b/nautil.c index deed788..2ee2a62 100644 --- a/nautil.c +++ b/nautil.c @@ -298,7 +298,7 @@ orbjoin(int *orbits, int *map, int n) *****************************************************************************/ void -writeperm(FILE *f, int *perm, boolean cartesian, int linelength, int n) +writeperm(FILE *f, int *perm, booleann cartesian, int linelength, int n) { int i,k,l,curlen,intlen; char s[30]; @@ -479,14 +479,14 @@ doref(graph *g, int *lab, int *ptn, int level, int *numcells, int *qinvar, int *invar, set *active, int *code, void (*refproc)(graph*,int*,int*,int,int*,int*,set*,int*,int,int), void (*invarproc)(graph*,int*,int*,int,int,int,int*, - int,boolean,int,int), + int,booleann,int,int), int mininvarlev, int maxinvarlev, int invararg, - boolean digraph, int m, int n) + booleann digraph, int m, int n) { int pw; int i,cell1,cell2,nc,tvpos,minlev,maxlev; long longcode; - boolean same; + booleann same; #if !MAXN DYNALLOC1(int,workperm,workperm_sz,n,"doref"); @@ -560,9 +560,9 @@ doref(graph *g, int *lab, int *ptn, int level, int *numcells, void maketargetcell(graph *g, int *lab, int *ptn, int level, set *tcell, - int *tcellsize, int *cellpos, int tc_level, boolean digraph, + int *tcellsize, int *cellpos, int tc_level, booleann digraph, int hint, - int (*targetcell)(graph*,int*,int*,int,int,boolean,int,int,int), + int (*targetcell)(graph*,int*,int*,int,int,booleann,int,int,int), int m, int n) { int i,j,k; diff --git a/nautinv.c b/nautinv.c index ac9d489..b9a6cea 100644 --- a/nautinv.c +++ b/nautinv.c @@ -187,7 +187,7 @@ DYNALLSTAT(set,wss,wss_sz); void twopaths(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,v,w; int wt; @@ -233,7 +233,7 @@ twopaths(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void quadruples(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -312,7 +312,7 @@ quadruples(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void triples(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -380,14 +380,14 @@ triples(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void adjtriang(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int j,pc; setword sw; set *gi; int wt; int i,v1,v2; - boolean v1v2; + booleann v1v2; set *gv1,*gv2; #if !MAXN @@ -506,7 +506,7 @@ getbigcells(int *ptn, int level, int minsize, int *bigcells, void celltrips(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -574,7 +574,7 @@ celltrips(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void cellquads(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -650,7 +650,7 @@ cellquads(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void cellquins(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -762,7 +762,7 @@ uniqinter(set *s1, set *s2, int m) void cellfano2(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -911,7 +911,7 @@ setnbhd(graph *g, int m, int n, set *w, set *wn) void cellfano(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,pc; setword sw; @@ -1021,13 +1021,13 @@ cellfano(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void distances(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i; set *gw; int wt; int d,dlim,cell1,cell2,iv,v,w; - boolean success; + booleann success; #if !MAXN DYNALLOC1(set,workset,workset_sz,m,"distances"); @@ -1098,7 +1098,7 @@ distances(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void indsets(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i; int wt; @@ -1173,7 +1173,7 @@ indsets(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void cliques(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i; int wt; @@ -1249,7 +1249,7 @@ cliques(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void cellcliq(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i; int wt; @@ -1345,7 +1345,7 @@ cellcliq(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void cellind(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i; int wt; @@ -1440,7 +1440,7 @@ cellind(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, void adjacencies(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,v,w; int vwt,wwt; @@ -1704,7 +1704,7 @@ semirefine(graph *g, int *lab, int *ptn, int level, int *numcells, void refinvar(graph *g, int *lab, int *ptn, int level, int numcells, int tvpos, - int *invar, int invararg, boolean digraph, int m, int n) + int *invar, int invararg, booleann digraph, int m, int n) { int i,j; int wt; diff --git a/nautinv.h b/nautinv.h index 87c7715..d6fc099 100644 --- a/nautinv.h +++ b/nautinv.h @@ -16,27 +16,27 @@ extern "C" { #endif -extern void adjacencies(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void adjtriang(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void cellcliq(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void cellfano(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void cellfano2(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void cellind(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void cellquads(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void cellquins(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void celltrips(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void adjacencies(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void adjtriang(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void cellcliq(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void cellfano(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void cellfano2(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void cellind(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void cellquads(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void cellquins(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void celltrips(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); extern void cellstarts(int*,int,set*,int,int); -extern void cliques(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void distances(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void cliques(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void distances(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); extern void getbigcells(int*,int,int,int*,int*,int*,int); -extern void indsets(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void indsets(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); extern void nautinv_check(int,int,int,int); extern void nautinv_freedyn(void); -extern void quadruples(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void refinvar(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void quadruples(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void refinvar(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); extern void setnbhd(graph*,int,int,set*,set*); -extern void triples(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); -extern void twopaths(graph*,int*,int*,int,int,int,int*,int,boolean,int,int); +extern void triples(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); +extern void twopaths(graph*,int*,int*,int,int,int,int*,int,booleann,int,int); #ifdef __cplusplus } #endif diff --git a/naututil.c b/naututil.c index 3d7d9ff..02b3f69 100644 --- a/naututil.c +++ b/naututil.c @@ -192,7 +192,7 @@ setsize(set *set1, int m) void flushline(FILE *f) { - boolean msg; + booleann msg; int c; msg = FALSE; @@ -217,7 +217,7 @@ flushline(FILE *f) * * *****************************************************************************/ -boolean +booleann readinteger(FILE *f, int *p) { int c,ans,minus; @@ -254,7 +254,7 @@ readinteger(FILE *f, int *p) * * *****************************************************************************/ -boolean +booleann readinteger_sl(FILE *f, int *p) { int c,ans,minus; @@ -295,7 +295,7 @@ readinteger_sl(FILE *f, int *p) * * *****************************************************************************/ -boolean +booleann readstring(FILE *f, char *s, int slen) { int c; @@ -390,7 +390,7 @@ getint_sl(FILE *f) void putset(FILE *f, set *set1, int *curlenp, int linelength, - int m, boolean compress) + int m, booleann compress) { int slen,j1,j2; char s[40]; @@ -435,11 +435,11 @@ putset(FILE *f, set *set1, int *curlenp, int linelength, void putset_firstbold(FILE *f, set *set1, int *curlenp, int linelength, - int m, boolean compress) + int m, booleann compress) { int slen,slen1,j1,j2; char s[50],c; - boolean bold; + booleann bold; bold = TRUE; j1 = -1; @@ -505,13 +505,13 @@ putset_firstbold(FILE *f, set *set1, int *curlenp, int linelength, *****************************************************************************/ void -readgraph(FILE *f, graph *g, boolean digraph, boolean prompt, - boolean edit, int linelength, int m, int n) +readgraph(FILE *f, graph *g, booleann digraph, booleann prompt, + booleann edit, int linelength, int m, int n) { int v,c; int curlen,w; graph *gv; - boolean neg; + booleann neg; if (!edit) for (v = 0, gv = g; v < n; ++v, gv += M) EMPTYSET(gv,m); @@ -615,7 +615,7 @@ ranreg_sg(sparsegraph *sg, int degree, int n) */ { long i,k,v,w; - boolean ok; + booleann ok; int *dd,*ee; size_t *vv,nde,j; @@ -695,11 +695,11 @@ ranreg_sg(sparsegraph *sg, int degree, int n) *****************************************************************************/ void -readgraph_sg(FILE *f, sparsegraph *sg, boolean digraph, boolean prompt, +readgraph_sg(FILE *f, sparsegraph *sg, booleann digraph, booleann prompt, int linelength, int n) { int i,j,k,vv,ww,c; - boolean neg,done; + booleann neg,done; int *d,*e,*evi; echunk *ec,*ecnext,*ec_end; size_t ned,*v,iec,iec_end; @@ -922,11 +922,11 @@ readgraph_sg(FILE *f, sparsegraph *sg, boolean digraph, boolean prompt, *****************************************************************************/ void -readgraph_swg(FILE *f, sparsegraph *sg, boolean digraph, boolean prompt, +readgraph_swg(FILE *f, sparsegraph *sg, booleann digraph, booleann prompt, int linelength, int n) { int i,j,k,vv,ww,c; - boolean neg,done; + booleann neg,done; int *d,*e,*evi; echunkw *ec,*ecnext,*ec_end; size_t ned,*v,iec,iec_end; @@ -1749,7 +1749,7 @@ putcanon_sg(FILE *f, int *canonlab, sparsegraph *canong, int linelength) *****************************************************************************/ void -readptn(FILE *f, int *lab, int *ptn, int *numcells, boolean prompt, int n) +readptn(FILE *f, int *lab, int *ptn, int *numcells, booleann prompt, int n) { int i,j; int c,v1,v2,m; @@ -2132,7 +2132,7 @@ hash(set *setarray, long length, int key) *****************************************************************************/ void -readperm(FILE *f, int *perm, boolean prompt, int n) +readperm(FILE *f, int *perm, booleann prompt, int n) { int nv; @@ -2151,7 +2151,7 @@ readperm(FILE *f, int *perm, boolean prompt, int n) *****************************************************************************/ void -readvperm(FILE *f, int *perm, boolean prompt, int n, int *nv) +readvperm(FILE *f, int *perm, booleann prompt, int n, int *nv) { int i; int m,c,v1,v2; @@ -2759,7 +2759,7 @@ mathon(graph *g1, int m1, int n1, graph *g2, int m2, int n2) *****************************************************************************/ void -rangraph(graph *g, boolean digraph, int invprob, int m, int n) +rangraph(graph *g, booleann digraph, int invprob, int m, int n) { int i,j; long li; @@ -2793,7 +2793,7 @@ rangraph(graph *g, boolean digraph, int invprob, int m, int n) *****************************************************************************/ void -rangraph2(graph *g, boolean digraph, int p1, int p2, int m, int n) +rangraph2(graph *g, booleann digraph, int p1, int p2, int m, int n) { int i,j; long li; @@ -2824,7 +2824,7 @@ rangraph2(graph *g, boolean digraph, int p1, int p2, int m, int n) *****************************************************************************/ void -rangraph2_sg(sparsegraph *sg, boolean digraph, int p1, int p2, int n) +rangraph2_sg(sparsegraph *sg, booleann digraph, int p1, int p2, int n) { int i,j,k; int *dd,*ee; @@ -3086,7 +3086,7 @@ putdegseq_sg(FILE *f, sparsegraph *sg, int linelength) void complement(graph *g, int m, int n) { - boolean loops; + booleann loops; int i,j; graph *gp; diff --git a/naututil.h b/naututil.h index 8f8117b..73fc2f6 100644 --- a/naututil.h +++ b/naututil.h @@ -11,9 +11,9 @@ used, it is necessary to check they are correct. /* Check whether various headers are available */ #define HAVE_ISATTY 1 /* if isatty() is available */ -#define HAVE_TIMES 1 /* if times() is available */ +#define HAVE_TIMES 0 /* if times() is available */ #define HAVE_TIME 1 /* if time() is available */ -#define HAVE_GETRUSAGE 1 /* if getrusage() is available */ +#define HAVE_GETRUSAGE 0 /* if getrusage() is available */ #define HAVE_GETTIMEOFDAY 1 /* if gettimeofday() */ /*==================================================================*/ @@ -160,22 +160,22 @@ extern void putorbitsplus(FILE*,int*,int,int); extern void putptn(FILE*,int*,int*,int,int,int); extern void putquotient(FILE*,graph*,int*,int*,int,int,int,int); extern void putquotient_sg(FILE*,sparsegraph*,int*,int*,int,int); -extern void putset(FILE*,set*,int*,int,int,boolean); -extern void putset_firstbold(FILE*,set*,int*,int,int,boolean); -extern void rangraph(graph*,boolean,int,int,int); -extern void rangraph2(graph*,boolean,int,int,int,int); -extern void rangraph2_sg(sparsegraph*,boolean,int,int,int); +extern void putset(FILE*,set*,int*,int,int,booleann); +extern void putset_firstbold(FILE*,set*,int*,int,int,booleann); +extern void rangraph(graph*,booleann,int,int,int); +extern void rangraph2(graph*,booleann,int,int,int,int); +extern void rangraph2_sg(sparsegraph*,booleann,int,int,int); extern void ranreg_sg(sparsegraph *sg, int degree, int n); extern void ranperm(int*,int); -extern void readgraph(FILE*,graph*,boolean,boolean,boolean,int,int,int); -extern void readgraph_sg(FILE*,sparsegraph*,boolean,boolean,int,int); -extern void readgraph_swg(FILE*,sparsegraph*,boolean,boolean,int,int); -extern boolean readinteger(FILE*,int*); -extern boolean readinteger_sl(FILE*,int*); -extern void readperm(FILE*,int*,boolean,int); -extern void readptn(FILE*,int*,int*,int*,boolean,int); -extern void readvperm(FILE*,int*,boolean,int,int*); -extern boolean readstring(FILE*,char*,int); +extern void readgraph(FILE*,graph*,booleann,booleann,booleann,int,int,int); +extern void readgraph_sg(FILE*,sparsegraph*,booleann,booleann,int,int); +extern void readgraph_swg(FILE*,sparsegraph*,booleann,booleann,int,int); +extern booleann readinteger(FILE*,int*); +extern booleann readinteger_sl(FILE*,int*); +extern void readperm(FILE*,int*,booleann,int); +extern void readptn(FILE*,int*,int*,int*,booleann,int); +extern void readvperm(FILE*,int*,booleann,int,int*); +extern booleann readstring(FILE*,char*,int); extern void relabel(graph*,int*,int*,graph*,int,int); extern void relabel_sg(sparsegraph*,int*,int*,sparsegraph*); extern long sethash(set*,int,long,int); diff --git a/nauty.c b/nauty.c index a92b2b0..d47fa31 100644 --- a/nauty.c +++ b/nauty.c @@ -112,7 +112,7 @@ static void writemarker(int, int, int, int, int, int); /* copies of some of the options: */ static TLS_ATTR - boolean getcanon,digraph,writeautoms,domarkers,cartesian,doschreier; + booleann getcanon,digraph,writeautoms,domarkers,cartesian,doschreier; static TLS_ATTR int linelength,tc_level,mininvarlevel,maxinvarlevel,invararg; static TLS_ATTR void (*usernodeproc)(graph*,int*,int*,int,int,int,int,int,int); static TLS_ATTR void (*userautomproc)(int,int*,int*,int,int,int); @@ -121,7 +121,7 @@ static TLS_ATTR void (*userlevelproc) static TLS_ATTR int (*usercanonproc) (graph*,int*,graph*,int,int,int,int); static TLS_ATTR void (*invarproc) - (graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + (graph*,int*,int*,int,int,int,int*,int,booleann,int,int); static TLS_ATTR FILE *outfile; static TLS_ATTR dispatchvec dispatch; @@ -157,7 +157,7 @@ static TLS_ATTR int gca_first, /* level of greatest common ancestor of gca_canon */ cosetindex; /* the point being fixed at level gca_first */ -static TLS_ATTR boolean needshortprune; /* used to flag calls to shortprune */ +static TLS_ATTR booleann needshortprune; /* used to flag calls to shortprune */ #if !MAXN DYNALLSTAT(set,defltwork,defltwork_sz); @@ -916,7 +916,7 @@ static int processnode(int *lab, int *ptn, int level, int numcells) { int i,code,save,newlevel; - boolean ispruneok; + booleann ispruneok; int sr; code = 0; diff --git a/nauty.h b/nauty.h index 8942278..ae9dab1 100644 --- a/nauty.h +++ b/nauty.h @@ -21,12 +21,12 @@ it is necessary to check they are correct. /* 2 = in malloc.h, 0 = in neither place */ #define HAS_MATH_INF 1 /* INFINITY is defined in math.h or */ /* some system header likely to be used */ -#define HAS_STDIO_UNLOCK 1 /* Whether there are getc_unlocked, */ +#define HAS_STDIO_UNLOCK 0 /* Whether there are getc_unlocked, */ /* putc_unlocked,flockfile and funlockfile*/ -#define DEFAULT_WORDSIZE 32 +#define DEFAULT_WORDSIZE 0 #define SIZEOF_INT 4 -#define SIZEOF_LONG 8 +#define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 8 /* 0 if nonexistent */ #define SIZEOF_POINTER 8 #define SIZEOF_INT128_T 16 /* 0 if nonexistent */ @@ -40,7 +40,7 @@ it is necessary to check they are correct. #define USE_ANSICONTROLS 0 /* whether --enable-ansicontrols is used */ -#define _FILE_OFFSET_BITS 0 +#define _FILE_OFFSET_BITS 64 #if _FILE_OFFSET_BITS == 64 #define _LARGEFILE_SOURCE #else @@ -48,9 +48,9 @@ it is necessary to check they are correct. #endif /* Support of gcc extensions __builtin_clz, __builtin_clzl, __builtin_clzll */ -#define HAVE_CLZ 0 -#define HAVE_CLZL 0 -#define HAVE_CLZLL 0 +#define HAVE_CLZ 1 +#define HAVE_CLZL 1 +#define HAVE_CLZLL 1 /* Support of gcc extensions __builtin_popcount, __builtin_popcountl, __builtin_popcountll @@ -60,10 +60,10 @@ it is necessary to check they are correct. _mm_popcnt_u32, _mm_popcnt_u64 for the Intel compiler icc. These need no compiler switch. */ -#define HAVE_HWPOPCNT 0 -#define HAVE_POPCNT 0 -#define HAVE_POPCNTL 0 -#define HAVE_POPCNTLL 0 +#define HAVE_HWPOPCNT 1 +#define HAVE_POPCNT 1 +#define HAVE_POPCNTL 1 +#define HAVE_POPCNTLL 1 #define HAVE_MMPOP32 0 #define HAVE_MMPOP64 0 @@ -286,7 +286,7 @@ it is necessary to check they are correct. * can be compiled to dynamically allocate arrays. Predefine MAXN=0 to * * achieve this effect, which is default behaviour from version 2.0. * * In that case, graphs of size up to NAUTY_INFINITY-2 can be handled * -* if the the memory is available. * +* if the memory is available. * * * * If only very small graphs need to be processed, use MAXN<=WORDSIZE * * since this causes substantial code optimizations. * @@ -825,7 +825,8 @@ typedef int nvector,np2vector; /* typedefs for sets, graphs, permutations, etc.: */ -typedef int boolean; /* boolean MUST be the same as int */ +// renaming "boolean" to "booleann" to avoid name clashes in MINGW +typedef int booleann; /* boolean MUST be the same as int */ #define UPROC void /* obsolete */ @@ -870,8 +871,8 @@ struct optionstruct; /* incomplete definition */ typedef struct { - boolean (*isautom) /* test for automorphism */ - (graph*,int*,boolean,int,int); + booleann (*isautom) /* test for automorphism */ + (graph*,int*,booleann,int,int); int (*testcanlab) /* test for better labelling */ (graph*,graph*,int*,int*,int,int); void (*updatecan) /* update canonical object */ @@ -880,10 +881,10 @@ typedef struct (graph*,int*,int*,int,int*,int*,set*,int*,int,int); void (*refine1) /* refine partition, MAXM==1 */ (graph*,int*,int*,int,int*,int*,set*,int*,int,int); - boolean (*cheapautom) /* test for easy automorphism */ - (int*,int,boolean,int); + booleann (*cheapautom) /* test for easy automorphism */ + (int*,int,booleann,int); int (*targetcell) /* decide which cell to split */ - (graph*,int*,int*,int,int,boolean,int,int,int); + (graph*,int*,int*,int,int,booleann,int,int,int); void (*freedyn)(void); /* free dynamic memory */ void (*check) /* check compilation parameters */ (int,int,int,int); @@ -897,11 +898,11 @@ typedef struct optionstruct { int getcanon; /* make canong and canonlab? */ #define LABELONLY 2 /* new value UNIMPLEMENTED */ - boolean digraph; /* multiple edges or loops? */ - boolean writeautoms; /* write automorphisms? */ - boolean writemarkers; /* write stats on pts fixed, etc.? */ - boolean defaultptn; /* set lab,ptn,active for single cell? */ - boolean cartesian; /* use cartesian rep for writing automs? */ + booleann digraph; /* multiple edges or loops? */ + booleann writeautoms; /* write automorphisms? */ + booleann writemarkers; /* write stats on pts fixed, etc.? */ + booleann defaultptn; /* set lab,ptn,active for single cell? */ + booleann cartesian; /* use cartesian rep for writing automs? */ int linelength; /* max chars/line (excl. '\n') for output */ FILE *outfile; /* file for output, if any */ void (*userrefproc) /* replacement for usual refine procedure */ @@ -915,16 +916,16 @@ typedef struct optionstruct int (*usercanonproc) /* procedure called for better labellings */ (graph*,int*,graph*,int,int,int,int); void (*invarproc) /* procedure to compute vertex-invariant */ - (graph*,int*,int*,int,int,int,int*,int,boolean,int,int); + (graph*,int*,int*,int,int,int,int*,int,booleann,int,int); int tc_level; /* max level for smart target cell choosing */ int mininvarlevel; /* min level for invariant computation */ int maxinvarlevel; /* max level for invariant computation */ int invararg; /* value passed to (*invarproc)() */ dispatchvec *dispatch; /* vector of object-specific routines */ - boolean schreier; /* use random schreier method */ + booleann schreier; /* use random schreier method */ void *extra_options; /* arbitrary extra options */ #ifdef NAUTY_IN_MAGMA - boolean print_stats; /* CAYLEY specfic - GYM Sep 1990 */ + booleann print_stats; /* CAYLEY specfic - GYM Sep 1990 */ char *invarprocname; /* Magma - no longer global sjc 1994 */ int lab_h; /* Magma - no longer global sjc 1994 */ int ptn_h; /* Magma - no longer global sjc 1994 */ @@ -1184,14 +1185,14 @@ extern "C" { extern void alloc_error(const char*); extern void breakout(int*,int*,int,int,int,set*,int); -extern boolean cheapautom(int*,int,boolean,int); +extern booleann cheapautom(int*,int,booleann,int); extern void doref(graph*,int*,int*,int,int*,int*,int*,set*,int*, void(*)(graph*,int*,int*,int,int*,int*,set*,int*,int,int), - void(*)(graph*,int*,int*,int,int,int,int*,int,boolean,int,int), - int,int,int,boolean,int,int); + void(*)(graph*,int*,int*,int,int,int,int*,int,booleann,int,int), + int,int,int,booleann,int,int); extern void extra_autom(int*,int); extern void extra_level(int,int*,int*,int,int,int,int,int,int); -extern boolean isautom(graph*,int*,boolean,int,int); +extern booleann isautom(graph*,int*,booleann,int,int); extern dispatchvec dispatch_graph; extern int itos(int,char*); extern void fmperm(int*,set*,set*,int,int); @@ -1199,8 +1200,8 @@ extern void fmptn(int*,int*,int,set*,set*,int,int); extern void longprune(set*,set*,set*,set*,int); extern void nauty(graph*,int*,int*,set*,int*,optionblk*, statsblk*,set*,int,int,int,graph*); -extern void maketargetcell(graph*,int*,int*,int,set*,int*,int*,int,boolean, - int,int (*)(graph*,int*,int*,int,int,boolean,int,int,int),int,int); +extern void maketargetcell(graph*,int*,int*,int,set*,int*,int*,int,booleann, + int,int (*)(graph*,int*,int*,int,int,booleann,int,int,int),int,int); extern int nextelement(set*,int,int); extern int orbjoin(int*,int*,int); extern void permset(set*,set*,int,int*); @@ -1208,10 +1209,10 @@ extern void putstring(FILE*,char*); extern void refine(graph*,int*,int*,int,int*,int*,set*,int*,int,int); extern void refine1(graph*,int*,int*,int,int*,int*,set*,int*,int,int); extern void shortprune(set*,set*,int); -extern int targetcell(graph*,int*,int*,int,int,boolean,int,int,int); +extern int targetcell(graph*,int*,int*,int,int,booleann,int,int,int); extern int testcanlab(graph*,graph*,int*,int*,int,int); extern void updatecan(graph*,graph*,int*,int,int,int); -extern void writeperm(FILE*,int*,boolean,int,int); +extern void writeperm(FILE*,int*,booleann,int,int); extern void nauty_freedyn(void); extern void nauty_check(int,int,int,int); extern void naugraph_check(int,int,int,int); diff --git a/nautycliquer.c b/nautycliquer.c index c667e8e..b58ef3b 100644 --- a/nautycliquer.c +++ b/nautycliquer.c @@ -112,20 +112,20 @@ static int clocks_per_sec=0; /* Recursion and helper functions */ -static boolean sub_unweighted_single(int *table, int size, int min_size, +static booleann sub_unweighted_single(int *table, int size, int min_size, graph_t *g); static int sub_unweighted_all(int *table, int size, int min_size, int max_size, - boolean maximal, graph_t *g, + booleann maximal, graph_t *g, clique_options *opts); static int sub_weighted_all(int *table, int size, int weight, int current_weight, int prune_low, int prune_high, - int min_weight, int max_weight, boolean maximal, + int min_weight, int max_weight, booleann maximal, graph_t *g, clique_options *opts); -static boolean store_clique(set_t clique, graph_t *g, clique_options *opts); -static boolean is_maximal(set_t clique, graph_t *g); -static boolean false_function(set_t clique,graph_t *g,clique_options *opts); +static booleann store_clique(set_t clique, graph_t *g, clique_options *opts); +static booleann is_maximal(set_t clique, graph_t *g); +static booleann false_function(set_t clique,graph_t *g,clique_options *opts); @@ -264,7 +264,7 @@ static int unweighted_clique_search_single(int *table, int min_size, * clique_size[] for all values in table must be defined and correct, * otherwise inaccurate results may occur. */ -static boolean sub_unweighted_single(int *table, int size, int min_size, +static booleann sub_unweighted_single(int *table, int size, int min_size, graph_t *g) { int i; int v; @@ -364,7 +364,7 @@ static boolean sub_unweighted_single(int *table, int size, int min_size, */ static int unweighted_clique_search_all(int *table, int start, int min_size, int max_size, - boolean maximal, graph_t *g, + booleann maximal, graph_t *g, clique_options *opts) { #if 0 struct timeval timeval; @@ -459,7 +459,7 @@ static int unweighted_clique_search_all(int *table, int start, * otherwise inaccurate results may occur. */ static int sub_unweighted_all(int *table, int size, int min_size, int max_size, - boolean maximal, graph_t *g, + booleann maximal, graph_t *g, clique_options *opts) { int i; int v; @@ -724,7 +724,7 @@ static int weighted_clique_search_single(int *table, int min_weight, */ static int weighted_clique_search_all(int *table, int start, int min_weight, int max_weight, - boolean maximal, graph_t *g, + booleann maximal, graph_t *g, clique_options *opts) { #if 0 struct timeval timeval; @@ -839,7 +839,7 @@ static int weighted_clique_search_all(int *table, int start, */ static int sub_weighted_all(int *table, int size, int weight, int current_weight, int prune_low, int prune_high, - int min_weight, int max_weight, boolean maximal, + int min_weight, int max_weight, booleann maximal, graph_t *g, clique_options *opts) { int i; int v,w; @@ -947,7 +947,7 @@ static int sub_weighted_all(int *table, int size, int weight, * Returns FALSE if opts->user_function() returned FALSE; otherwise * returns TRUE. */ -static boolean store_clique(set_t clique, graph_t *g, clique_options *opts) { +static booleann store_clique(set_t clique, graph_t *g, clique_options *opts) { clique_list_count++; @@ -994,7 +994,7 @@ static boolean store_clique(set_t clique, graph_t *g, clique_options *opts) { */ static void maximalize_clique(set_t s,graph_t *g) { int i,j; - boolean add; + booleann add; for (i=0; i < g->n; i++) { add=TRUE; @@ -1022,11 +1022,11 @@ static void maximalize_clique(set_t s,graph_t *g) { * * Returns TRUE is clique is a maximal clique of g, otherwise FALSE. */ -static boolean is_maximal(set_t clique, graph_t *g) { +static booleann is_maximal(set_t clique, graph_t *g) { int i,j; int *table; int len; - boolean addable; + booleann addable; if (temp_count) { temp_count--; @@ -1063,7 +1063,7 @@ static boolean is_maximal(set_t clique, graph_t *g) { * * Returns FALSE. Can be used as user_function. */ -static boolean false_function(set_t clique,graph_t *g,clique_options *opts) { +static booleann false_function(set_t clique,graph_t *g,clique_options *opts) { return FALSE; } @@ -1125,7 +1125,7 @@ int clique_unweighted_max_weight(graph_t *g, clique_options *opts) { * Note: Does NOT use opts->user_function() or opts->clique_list[]. */ set_t clique_unweighted_find_single(graph_t *g,int min_size,int max_size, - boolean maximal, clique_options *opts) { + booleann maximal, clique_options *opts) { int i; int *table; set_t s; @@ -1253,7 +1253,7 @@ set_t clique_unweighted_find_single(graph_t *g,int min_size,int max_size, * by set_free(). */ int clique_unweighted_find_all(graph_t *g, int min_size, int max_size, - boolean maximal, clique_options *opts) { + booleann maximal, clique_options *opts) { int i; int *table; int count; @@ -1407,7 +1407,7 @@ int clique_max_weight(graph_t *g,clique_options *opts) { * weights are the same. */ set_t clique_find_single(graph_t *g,int min_weight,int max_weight, - boolean maximal, clique_options *opts) { + booleann maximal, clique_options *opts) { int i; int *table; set_t s; @@ -1571,7 +1571,7 @@ set_t clique_find_single(graph_t *g,int min_weight,int max_weight, * weights are the same. */ int clique_find_all(graph_t *g, int min_weight, int max_weight, - boolean maximal, clique_options *opts) { + booleann maximal, clique_options *opts) { int i,n; int *table; @@ -1717,7 +1717,7 @@ int clique_find_all(graph_t *g, int min_weight, int max_weight, * * Returns always TRUE (ie. never requests abort). */ -boolean clique_print_time(int level, int i, int n, int max, +booleann clique_print_time(int level, int i, int n, int max, double cputime, double realtime, clique_options *opts) { static float prev_time=100; @@ -1766,7 +1766,7 @@ boolean clique_print_time(int level, int i, int n, int max, * * Returns always TRUE (ie. never requests abort). */ -boolean clique_print_time_always(int level, int i, int n, int max, +booleann clique_print_time_always(int level, int i, int n, int max, double cputime, double realtime, clique_options *opts) { static float prev_time=100; @@ -1915,7 +1915,7 @@ void graph_crop(graph_t *g) { * * Note: Does NOT require weights to be 1. */ -boolean graph_weighted(graph_t *g) { +booleann graph_weighted(graph_t *g) { int i,w; w=g->weights[0]; @@ -1958,7 +1958,7 @@ void graph_print(graph_t *g) { int nonpos=0; int extra=0; unsigned int weight=0; - boolean weighted; + booleann weighted; ASSERT((sizeof(setelement)*8)==ELEMENTSIZE); @@ -2043,7 +2043,7 @@ void graph_print(graph_t *g) { * * Returns TRUE if the graph is valid, FALSE otherwise. */ -boolean graph_test(graph_t *g,FILE *output) { +booleann graph_test(graph_t *g,FILE *output) { int i,j; int edges=0; int asymm=0; @@ -2051,7 +2051,7 @@ boolean graph_test(graph_t *g,FILE *output) { int refl=0; int extra=0; unsigned int weight=0; - boolean weighted; + booleann weighted; ASSERT((sizeof(setelement)*8)==ELEMENTSIZE); @@ -2304,11 +2304,11 @@ void reorder_reverse(int *order,int n) { * * Returns TRUE if it is a bijection, FALSE otherwise. */ -boolean reorder_is_bijection(int *order,int n) { - boolean *used; +booleann reorder_is_bijection(int *order,int n) { + booleann *used; int i; - used=calloc(n,sizeof(boolean)); + used=calloc(n,sizeof(booleann)); for (i=0; i=n) { free(used); @@ -2354,7 +2354,7 @@ int *reorder_ident(int n) { * * Returns an identity ordering. */ -int *reorder_by_ident(graph_t *g,boolean weighted) { +int *reorder_by_ident(graph_t *g,booleann weighted) { return reorder_ident(g->n); } @@ -2363,7 +2363,7 @@ int *reorder_by_ident(graph_t *g,boolean weighted) { * * Returns a reverse identity ordering. */ -int *reorder_by_reverse(graph_t *g,boolean weighted) { +int *reorder_by_reverse(graph_t *g,booleann weighted) { int i; int *order; @@ -2379,7 +2379,7 @@ int *reorder_by_reverse(graph_t *g,boolean weighted) { * Equivalent to reorder_by_weighted_greedy_coloring or * reorder_by_unweighted_greedy_coloring according to the value of weighted. */ -int *reorder_by_greedy_coloring(graph_t *g,boolean weighted) { +int *reorder_by_greedy_coloring(graph_t *g,booleann weighted) { if (weighted) return reorder_by_weighted_greedy_coloring(g,weighted); else @@ -2396,15 +2396,15 @@ int *reorder_by_greedy_coloring(graph_t *g,boolean weighted) { * * Experimentally efficient for use with unweighted graphs. */ -int *reorder_by_unweighted_greedy_coloring(graph_t *g,boolean weighted) { +int *reorder_by_unweighted_greedy_coloring(graph_t *g,booleann weighted) { int i,j,v; - boolean *tmp_used; + booleann *tmp_used; int *degree; /* -1 for used vertices */ int *order; int maxdegree,maxvertex=0; - boolean samecolor; + booleann samecolor; - tmp_used=calloc(g->n,sizeof(boolean)); + tmp_used=calloc(g->n,sizeof(booleann)); degree=calloc(g->n,sizeof(int)); order=calloc(g->n,sizeof(int)); @@ -2419,7 +2419,7 @@ int *reorder_by_unweighted_greedy_coloring(graph_t *g,boolean weighted) { v=0; while (v < g->n) { /* Reset tmp_used. */ - memset(tmp_used,0,g->n * sizeof(boolean)); + memset(tmp_used,0,g->n * sizeof(booleann)); do { /* Find vertex to be colored. */ @@ -2464,17 +2464,17 @@ int *reorder_by_unweighted_greedy_coloring(graph_t *g,boolean weighted) { * * Experimentally efficient for use with weighted graphs. */ -int *reorder_by_weighted_greedy_coloring(graph_t *g, boolean weighted) { +int *reorder_by_weighted_greedy_coloring(graph_t *g, booleann weighted) { int i,j,p=0; int cnt; int *nwt; /* Sum of surrounding vertices' weights */ int min_wt,max_nwt; - boolean *used; + booleann *used; int *order; nwt=malloc(g->n * sizeof(int)); order=malloc(g->n * sizeof(int)); - used=calloc(g->n,sizeof(boolean)); + used=calloc(g->n,sizeof(booleann)); for (i=0; i < g->n; i++) { nwt[i]=0; @@ -2518,7 +2518,7 @@ int *reorder_by_weighted_greedy_coloring(graph_t *g, boolean weighted) { * Returns a reordering of the graph g so that the vertices with largest * degrees (most neighbors) are first. */ -int *reorder_by_degree(graph_t *g, boolean weighted) { +int *reorder_by_degree(graph_t *g, booleann weighted) { int i,j,v; int *degree; int *order; @@ -2565,11 +2565,11 @@ int *reorder_by_degree(graph_t *g, boolean weighted) { * numbers. srand() is re-initialized every time reorder_by_random() * is called using the system time. */ -int *reorder_by_random(graph_t *g, boolean weighted) { +int *reorder_by_random(graph_t *g, booleann weighted) { /* struct tms t; */ int i,r; int *new; - boolean *used; + booleann *used; /* srand(times(&t)+time(NULL)); @@ -2577,7 +2577,7 @@ int *reorder_by_random(graph_t *g, boolean weighted) { INITRANBYTIME; new=calloc(g->n, sizeof(int)); - used=calloc(g->n, sizeof(boolean)); + used=calloc(g->n, sizeof(booleann)); for (i=0; i < g->n; i++) { do { r=NEXTRAN % g->n; @@ -2595,7 +2595,7 @@ int *reorder_by_random(graph_t *g, boolean weighted) { cliques of a given size in an undirected graph. */ int -find_clique(graph *g, int m, int n, int min, int max, boolean maximal) +find_clique(graph *g, int m, int n, int min, int max, booleann maximal) /* If there is a clique of size [min,max], perhaps required to be maximal, then return its size. If there is none, return 0. It is required that min <= max. Use min=max=0 to ask for @@ -2629,7 +2629,7 @@ find_clique(graph *g, int m, int n, int min, int max, boolean maximal) int -find_indset(graph *g, int m, int n, int min, int max, boolean maximal) +find_indset(graph *g, int m, int n, int min, int max, booleann maximal) /* If there is an independent set of size [min,max], perhaps required to be maximal, then return its size. If there is none, return 0. It is required that min <= max. Use min=max=0 to ask for diff --git a/nautycliquer.h b/nautycliquer.h index ff232e5..8bbcefc 100644 --- a/nautycliquer.h +++ b/nautycliquer.h @@ -67,14 +67,14 @@ */ /* - * We #define boolean instead of using a typedef because nauty.h uses it + * We #define booleann instead of using a typedef because nauty.h uses it * also. AFAIK, there is no way to check for an existing typedef, and * re-typedefing is illegal (even when using exactly the same datatype!). -#ifndef boolean -#define boolean int +#ifndef booleann +#define booleann int #endif -BDM: In nauty's version we will use nauty's boolean (which is int anyway). +BDM: In nauty's version we will use nauty's booleann (which is int anyway). */ /* @@ -528,20 +528,20 @@ extern void graph_free(graph_t *g); extern void graph_resize(graph_t *g, int size); extern void graph_crop(graph_t *g); -extern boolean graph_weighted(graph_t *g); +extern booleann graph_weighted(graph_t *g); extern int graph_edge_count(graph_t *g); extern graph_t *graph_read_dimacs(FILE *fp); extern graph_t *graph_read_dimacs_file(char *file); -extern boolean graph_write_dimacs_ascii(graph_t *g, char *comment,FILE *fp); -extern boolean graph_write_dimacs_ascii_file(graph_t *g,char *comment, +extern booleann graph_write_dimacs_ascii(graph_t *g, char *comment,FILE *fp); +extern booleann graph_write_dimacs_ascii_file(graph_t *g,char *comment, char *file); -extern boolean graph_write_dimacs_binary(graph_t *g, char *comment,FILE *fp); -extern boolean graph_write_dimacs_binary_file(graph_t *g, char *comment, +extern booleann graph_write_dimacs_binary(graph_t *g, char *comment,FILE *fp); +extern booleann graph_write_dimacs_binary_file(graph_t *g, char *comment, char *file); extern void graph_print(graph_t *g); -extern boolean graph_test(graph_t *g, FILE *output); +extern booleann graph_test(graph_t *g, FILE *output); extern int graph_test_regular(graph_t *g); UNUSED_FUNCTION INLINE @@ -578,30 +578,30 @@ extern int *reorder_duplicate(int *order,int n); extern void reorder_invert(int *order,int n); extern void reorder_reverse(int *order,int n); extern int *reorder_ident(int n); -extern boolean reorder_is_bijection(int *order,int n); +extern booleann reorder_is_bijection(int *order,int n); #define reorder_by_default reorder_by_greedy_coloring -extern int *reorder_by_greedy_coloring(graph_t *g, boolean weighted); -extern int *reorder_by_weighted_greedy_coloring(graph_t *g, boolean weighted); -extern int *reorder_by_unweighted_greedy_coloring(graph_t *g,boolean weighted); -extern int *reorder_by_degree(graph_t *g, boolean weighted); -extern int *reorder_by_random(graph_t *g, boolean weighted); -extern int *reorder_by_ident(graph_t *g, boolean weighted); -extern int *reorder_by_reverse(graph_t *g, boolean weighted); +extern int *reorder_by_greedy_coloring(graph_t *g, booleann weighted); +extern int *reorder_by_weighted_greedy_coloring(graph_t *g, booleann weighted); +extern int *reorder_by_unweighted_greedy_coloring(graph_t *g,booleann weighted); +extern int *reorder_by_degree(graph_t *g, booleann weighted); +extern int *reorder_by_random(graph_t *g, booleann weighted); +extern int *reorder_by_ident(graph_t *g, booleann weighted); +extern int *reorder_by_reverse(graph_t *g, booleann weighted); typedef struct _clique_options clique_options; struct _clique_options { - int *(*reorder_function)(graph_t *, boolean); + int *(*reorder_function)(graph_t *, booleann); int *reorder_map; /* arguments: level, n, max, user_time, system_time, opts */ - boolean (*time_function)(int,int,int,int,double,double, + booleann (*time_function)(int,int,int,int,double,double, clique_options *); FILE *output; - boolean (*user_function)(set_t,graph_t *,clique_options *); + booleann (*user_function)(set_t,graph_t *,clique_options *); void *user_data; set_t *clique_list; int clique_list_length; @@ -612,24 +612,24 @@ extern clique_options *clique_default_options; /* Weighted clique functions */ extern int clique_max_weight(graph_t *g,clique_options *opts); extern set_t clique_find_single(graph_t *g,int min_weight,int max_weight, - boolean maximal, clique_options *opts); -extern int clique_find_all(graph_t *g, int req_weight, boolean exact, - boolean maximal, clique_options *opts); + booleann maximal, clique_options *opts); +extern int clique_find_all(graph_t *g, int req_weight, booleann exact, + booleann maximal, clique_options *opts); /* Unweighted clique functions */ #define clique_unweighted_max_size clique_unweighted_max_weight extern int clique_unweighted_max_weight(graph_t *g, clique_options *opts); extern set_t clique_unweighted_find_single(graph_t *g,int min_size, - int max_size,boolean maximal, + int max_size,booleann maximal, clique_options *opts); extern int clique_unweighted_find_all(graph_t *g, int min_size, int max_size, - boolean maximal, clique_options *opts); + booleann maximal, clique_options *opts); /* Time printing functions */ -extern boolean clique_print_time(int level, int i, int n, int max, +extern booleann clique_print_time(int level, int i, int n, int max, double cputime, double realtime, clique_options *opts); -extern boolean clique_print_time_always(int level, int i, int n, int max, +extern booleann clique_print_time_always(int level, int i, int n, int max, double cputime, double realtime, clique_options *opts); @@ -640,8 +640,8 @@ extern boolean clique_print_time_always(int level, int i, int n, int max, /* Procedures defined in nautycliquer.c */ extern int find_clique(graph *g, int m, int n, - int min, int max, boolean maximal); + int min, int max, booleann maximal); extern int find_indset(graph *g, int m, int n, - int min, int max, boolean maximal); + int min, int max, booleann maximal); #endif /* !NAUTYCLIQUER_H */ diff --git a/newedgeg.c b/newedgeg.c index c33ecf6..8f704ba 100644 --- a/newedgeg.c +++ b/newedgeg.c @@ -72,7 +72,7 @@ newedge(graph *g1, int m1, int n1, /*************************************************************************/ static void -na_newedge(graph *g1, int m1, int n1, boolean dolabel) +na_newedge(graph *g1, int m1, int n1, booleann dolabel) /* Make all graphs by non-adjacent edge addition. */ { int n2,m2; @@ -127,7 +127,7 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile; - boolean badargs,dolabel,quiet; + booleann badargs,dolabel,quiet; int j,m,n,argnum; int codetype; graph *g; diff --git a/numleaves.c b/numleaves.c index 665a860..9d06e82 100644 --- a/numleaves.c +++ b/numleaves.c @@ -14,8 +14,8 @@ #include "gtools.h" -boolean -numleaves(graph *g, boolean digraph, long Qlo, long Qhi, int m, int n) +booleann +numleaves(graph *g, booleann digraph, long Qlo, long Qhi, int m, int n) { int i,leaves; set *gi; diff --git a/planarg.c b/planarg.c index 185901c..7e2ab39 100644 --- a/planarg.c +++ b/planarg.c @@ -110,11 +110,11 @@ write_planarcode(FILE *f, t_ver_sparse_rep *VR, t_adjl_sparse_rep *A, /*************************************************************************/ -static boolean +static booleann isplanar(t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, int e, int *c, t_ver_sparse_rep **VR, t_adjl_sparse_rep **AR, t_embed_sparse_rep **ER, int *nbr_e_obs, - boolean planarcheck, boolean nonplanarcheck) + booleann planarcheck, booleann nonplanarcheck) /* The input graph is given as an adjacency list: V: array of vertices @@ -137,7 +137,7 @@ isplanar(t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, int e, { t_dlcl **dfs_tree, **back_edges, **mult_edges; int edge_pos, v, w; - boolean ans; + booleann ans; t_ver_edge *embed_graph; ans = sparseg_adjl_is_planar(V, n, A, c, @@ -172,9 +172,9 @@ main(int argc, char *argv[]) char *infilename,*outfilename; FILE *infile,*outfile; sparsegraph sg; - boolean badargs; - boolean verbose,nonplanar,quiet; - boolean planarcode,nowrite,nocheck; + booleann badargs; + booleann verbose,nonplanar,quiet; + booleann planarcode,nowrite,nocheck; int i,j,k,n,argnum,ne,loops; int codetype,outcode; t_ver_sparse_rep *VR; diff --git a/planarity.c b/planarity.c index 39b27bc..fc2c25b 100644 --- a/planarity.c +++ b/planarity.c @@ -43,7 +43,7 @@ #endif -boolean +booleann sparseg_adjl_plan_and_iso (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, int e, int *c, t_ver_sparse_rep **VR, t_adjl_sparse_rep **AR, t_embed_sparse_rep **ER, int *nbr_e_obs) @@ -66,7 +66,7 @@ sparseg_adjl_plan_and_iso (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, { t_dlcl **dfs_tree, **back_edges, **mult_edges; int edge_pos, v, w; - boolean ans; + booleann ans; t_ver_edge *embed_graph; ans = sparseg_adjl_is_planar(V, n, A, c, @@ -131,7 +131,7 @@ sparseg_adjl_footprint (t_ver_sparse_rep *V, int n, void sparseg_adjl_print (t_ver_sparse_rep *V, int n, - t_adjl_sparse_rep *A, boolean user_level) + t_adjl_sparse_rep *A, booleann user_level) { int v; @@ -163,7 +163,7 @@ sparseg_adjl_print (t_ver_sparse_rep *V, int n, void sparseg_adjl_embed_print (t_ver_sparse_rep *V_e, int n, - t_adjl_sparse_rep *A, t_embed_sparse_rep *E, boolean user_level) + t_adjl_sparse_rep *A, t_embed_sparse_rep *E, booleann user_level) /* print the embedding given by E, edges are referred to by their index in A @@ -258,7 +258,7 @@ sparseg_adjl_to_nauty_graph (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A) #if 0 t_edge_sparse_rep * sparseg_adjl_edges (t_ver_sparse_rep *V, int n, - t_adjl_sparse_rep *A, int e, boolean digraph) + t_adjl_sparse_rep *A, int e, booleann digraph) /* e is the number of edges */ @@ -299,7 +299,7 @@ sparseg_adjl_edges (t_ver_sparse_rep *V, int n, t_edge_sparse_rep * sparseg_adjl_edges (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, - int e, boolean digraph) + int e, booleann digraph) /* e is the number of edges */ @@ -614,9 +614,9 @@ sparseg_adjl_edges (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, -boolean +booleann sparseg_adjl_add_edge (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep **A, - int *size_A, int *pos, int u, int v, boolean CHECK) + int *size_A, int *pos, int u, int v, booleann CHECK) /* add the UNDIRECTED edge to the sparse graph (V, n, A) - pos records where to add the next edge in A @@ -627,7 +627,7 @@ sparseg_adjl_add_edge (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep **A, also we assume that the graph (V, n, A) is undirected */ { - boolean edge_exists; + booleann edge_exists; edge_exists = FALSE; if (CHECK) @@ -666,9 +666,9 @@ sparseg_adjl_add_edge (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep **A, return TRUE; } -boolean +booleann sparseg_adjl_add_edge_no_extend (t_ver_sparse_rep *V, int n, - t_adjl_sparse_rep *A, int size_A, int *pos, int u, int v, boolean CHECK) + t_adjl_sparse_rep *A, int size_A, int *pos, int u, int v, booleann CHECK) /* like sparseg_adjl_add_edge but here we are guaranteed that pos + 1 < size_A @@ -685,7 +685,7 @@ sparseg_adjl_add_edge_no_extend (t_ver_sparse_rep *V, int n, with an undirected graph */ { - boolean edge_added; + booleann edge_added; edge_added = sparseg_adjl_add_dir_edge_no_extend(V, n, A, size_A, pos, u, v, @@ -699,10 +699,10 @@ sparseg_adjl_add_edge_no_extend (t_ver_sparse_rep *V, int n, } -boolean +booleann sparseg_adjl_add_dir_edge (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep **A, int *size_A, int *pos, int u, int v, - boolean CHECK) + booleann CHECK) /* add the DIRECTED edge to the sparse graph (V, n, A) - pos records where to add the next edge in A @@ -711,7 +711,7 @@ sparseg_adjl_add_dir_edge (t_ver_sparse_rep *V, int n, we check if the edge is already in the graph iff CHECK true */ { - boolean edge_exists; + booleann edge_exists; edge_exists = FALSE; if (CHECK) @@ -736,9 +736,9 @@ sparseg_adjl_add_dir_edge (t_ver_sparse_rep *V, int n, return TRUE; } -boolean +booleann sparseg_adjl_add_dir_edge_no_extend (t_ver_sparse_rep *V, int n, - t_adjl_sparse_rep *A, int size_A, int *pos, int u, int v, boolean CHECK) + t_adjl_sparse_rep *A, int size_A, int *pos, int u, int v, booleann CHECK) /* add an edge where A is guaranteed to be be big enough (unless that for some reason we attempt to add @@ -778,7 +778,7 @@ sparseg_adjl_add_dir_edge_no_extend (t_ver_sparse_rep *V, int n, -boolean +booleann sparseg_adjl_remove_edge_no_red (t_ver_sparse_rep *V, t_adjl_sparse_rep *A, int u, int v) /* @@ -793,7 +793,7 @@ sparseg_adjl_remove_edge_no_red (t_ver_sparse_rep *V, t_adjl_sparse_rep *A, } -boolean +booleann sparseg_adjl_remove_dir_edge_no_red (t_ver_sparse_rep *V, t_adjl_sparse_rep *A, int u, int v) /* @@ -1054,7 +1054,7 @@ sparseg_adjl_relabel_vertex (t_adjl_sparse_rep *A, int pos, int u) #ifndef PLANAR_IN_MAGMA #endif -boolean +booleann sparseg_adjl_dir_edge_exists (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, int u, int v) /* @@ -1088,7 +1088,7 @@ sparseg_adjl_dir_edge_exists (t_ver_sparse_rep *V, int n, -boolean +booleann sparseg_adjl_u_adj_v (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, int u, int v) /* @@ -1099,7 +1099,7 @@ sparseg_adjl_u_adj_v (t_ver_sparse_rep *V, int n, t_adjl_sparse_rep *A, } -boolean +booleann sparseg_adjl_sub (t_ver_sparse_rep *V1, int n1, t_adjl_sparse_rep *A1, t_ver_sparse_rep *V2, int n2, t_adjl_sparse_rep *A2) /* @@ -1170,7 +1170,7 @@ sparseg_adjl_sub (t_ver_sparse_rep *V1, int n1, t_adjl_sparse_rep *A1, -boolean +booleann sparseg_adjl_eq (t_ver_sparse_rep *V1, int n1, t_adjl_sparse_rep *A1, t_ver_sparse_rep *V2, int n2, t_adjl_sparse_rep *A2) /* @@ -1222,7 +1222,7 @@ sparseg_adjl_eq (t_ver_sparse_rep *V1, int n1, t_adjl_sparse_rep *A1, /* aproto: header embed_graph_protos.h */ /* aproto: beginstatic -- don't touch this!! */ -static boolean sparseg_dlcl_is_present (t_dlcl *, int, t_dlcl **); +static booleann sparseg_dlcl_is_present (t_dlcl *, int, t_dlcl **); /* aproto: endstatic -- don't touch this!! */ @@ -1255,7 +1255,7 @@ sparseg_dlcl_print (t_dlcl **g, int n) } -static boolean +static booleann sparseg_dlcl_is_present (t_dlcl *l, int label, t_dlcl **p) { *p = embedg_dlcl_find(l, label); @@ -1263,7 +1263,7 @@ sparseg_dlcl_is_present (t_dlcl *l, int label, t_dlcl **p) } -boolean +booleann sparseg_dlcl_is_adjacent (t_dlcl **g, int n, int v, int u, t_dlcl **p) /* is u adjacent to v @@ -1342,7 +1342,7 @@ sparseg_dlcl_to_sparseg (t_dlcl **g, int n, int e, ASSERT(i_e == 2 * e); } -boolean +booleann sparseg_dlcl_sub (t_dlcl **g1, int n1, t_dlcl **g2, int n2) /* is g2 a subgraph of g1 @@ -1481,7 +1481,7 @@ sparseg_dlcl_sub (t_dlcl **g1, int n1, t_dlcl **g2, int n2) /* aproto: header embed_graph_protos.h */ -boolean +booleann embedg_VES_is_vertex (int n, int i) /* is this a vertex @@ -1491,7 +1491,7 @@ embedg_VES_is_vertex (int n, int i) return i < n ? TRUE : FALSE; } -boolean +booleann embedg_VES_is_virtual_vertex (int n, int i) /* is this a virtual vertex @@ -1506,7 +1506,7 @@ embedg_VES_is_virtual_vertex (int n, int i) return i >= n && i < 2*n ? TRUE : FALSE; } -boolean +booleann embedg_VES_is_edge (int n, int i) /* is this an edge @@ -1516,7 +1516,7 @@ embedg_VES_is_edge (int n, int i) return i >= 2*n ? TRUE : FALSE; } -boolean +booleann embedg_VES_is_tree_edge (t_ver_edge *embed_graph, int n, int i) /* is this s tree edge @@ -1526,7 +1526,7 @@ embedg_VES_is_tree_edge (t_ver_edge *embed_graph, int n, int i) && embed_graph[i].type == TE; } -boolean +booleann embedg_VES_is_back_edge (t_ver_edge *embed_graph, int n, int i) /* is this a back edge @@ -1536,7 +1536,7 @@ embedg_VES_is_back_edge (t_ver_edge *embed_graph, int n, int i) && embed_graph[i].type == BE; } -boolean +booleann embedg_VES_is_short_cut_edge (t_ver_edge *embed_graph, int n, int i) /* as the name indicates... @@ -1798,11 +1798,11 @@ embedg_VES_walk_bicomp (t_ver_edge *embed_graph, int n, int v, int vin) void embedg_VES_print_adj_list (t_ver_edge *embed_graph, int n, int r, - boolean consistent) + booleann consistent) /* print r's adjacency list - r can be a vertex or edge - the boolean if true assumes that + the booleann if true assumes that the list is consistent (will determine the way we traverse the list) a priori we should get the same result either way @@ -1841,7 +1841,7 @@ embedg_VES_print_adj_list (t_ver_edge *embed_graph, int n, int r, } } -boolean +booleann embedg_VES_is_adj_list_consistent (t_ver_edge *embed_graph, int n, int r) /* checks that r's adjacency list is consistent: @@ -1919,7 +1919,7 @@ embedg_VES_is_adj_list_consistent (t_ver_edge *embed_graph, int n, int r) } -boolean +booleann embedg_VES_are_adj_lists_consistent (t_ver_edge *embed_graph, int n) /* checks that the adjacency list of each vertex is consistent @@ -2121,7 +2121,7 @@ static void embedg_dlcl_rec_insert_right (t_dlcl *, t_dlcl *); static void embedg_dlcl_rec_insert_left (t_dlcl *, t_dlcl *); static void embedg_dlcl_rec_retrieve (t_dlcl *); static void embedg_dlcl_rec_delete (t_dlcl *); -static boolean embedg_dlcl_is_singleton (t_dlcl *); +static booleann embedg_dlcl_is_singleton (t_dlcl *); /* aproto: endstatic -- don't touch this!! */ @@ -2372,14 +2372,14 @@ embedg_dlcl_delete_rec (t_dlcl *l, t_dlcl *r) } -boolean +booleann embedg_dlcl_is_empty (t_dlcl *l) { return (l == NP) ? TRUE : FALSE; } -static boolean +static booleann embedg_dlcl_is_singleton (t_dlcl *l) { return (l->right == l) ? TRUE : FALSE; @@ -2528,7 +2528,7 @@ embedg_dlcl_length (t_dlcl *l) #endif -boolean +booleann sparseg_adjl_is_planar ( t_ver_sparse_rep *V, int n, @@ -3567,7 +3567,7 @@ embedg_merge_queue_delete (t_merge_queue q) } -boolean +booleann embedg_merge_queue_empty (t_merge_queue q) { return q.start == q.end ? TRUE : FALSE; @@ -3733,7 +3733,7 @@ embedg_merge_queue_prune (t_merge_queue *q, int *v, -boolean +booleann embedg_VES_is_ver_pertinent (t_ver_edge *embed_graph, int n, int v, int w) /* is w pertinent (wrt v) @@ -3741,7 +3741,7 @@ embedg_VES_is_ver_pertinent (t_ver_edge *embed_graph, int n, int v, int w) - or w has a non empty pertinent_bicomp_list */ { - boolean ans; + booleann ans; ans = embed_graph[w].adjacent_to == v ? TRUE : FALSE; @@ -3752,7 +3752,7 @@ embedg_VES_is_ver_pertinent (t_ver_edge *embed_graph, int n, int v, int w) FALSE : TRUE; } -boolean +booleann embedg_VES_is_ver_ext_active (t_ver_edge *embed_graph, int n, int v, int w) /* is w externally active (wrt v) @@ -3765,7 +3765,7 @@ embedg_VES_is_ver_ext_active (t_ver_edge *embed_graph, int n, int v, int w) inactive */ { - boolean ans; + booleann ans; ans = embed_graph[w].least_ancestor < v ? TRUE : FALSE; @@ -3788,7 +3788,7 @@ embedg_VES_is_ver_ext_active (t_ver_edge *embed_graph, int n, int v, int w) } -boolean +booleann embedg_VES_is_ver_int_active (t_ver_edge *embed_graph, int n, int v, int w) /* is w internally active (wrt v): @@ -3799,7 +3799,7 @@ embedg_VES_is_ver_int_active (t_ver_edge *embed_graph, int n, int v, int w) && !embedg_VES_is_ver_ext_active(embed_graph, n, v, w); } -boolean +booleann embedg_VES_is_ver_inactive (t_ver_edge *embed_graph, int n, int v, int w) /* is w inactive (wrt v), that is w nor pertinent nor externally activ @@ -4448,7 +4448,7 @@ embedg_VES_embed_edge (t_ver_edge *embed_graph, int n, int *edge_pos, void embedg_VES_add_edge (t_ver_edge *embed_graph, int n, int *edge_pos, - int v, int w, boolean MARK, int mark) + int v, int w, booleann MARK, int mark) /* add the edge (v, w): this is DIFFERENT from embedg_VES_embed_edge in the sense @@ -4626,12 +4626,12 @@ embedg_VES_add_edge (t_ver_edge *embed_graph, int n, int *edge_pos, /* aproto: beginstatic -- don't touch this!! */ static void embedg_recover_embedding_embed_mult - (t_dlcl **, t_embed_sparse_rep *, int, int, int, int, int *, boolean *, int *); + (t_dlcl **, t_embed_sparse_rep *, int, int, int, int, int *, booleann *, int *); static void embedg_recover_embedding_embed_loops - (t_dlcl **, t_embed_sparse_rep *, int, int, int *, boolean *); + (t_dlcl **, t_embed_sparse_rep *, int, int, int *, booleann *); static t_dlcl **embedg_get_reduced_obs (t_dlcl **, int); -static boolean embedg_is_red_obs_K33 (t_dlcl **, int); -static boolean embedg_is_red_obs_K5 (t_dlcl **, int); +static booleann embedg_is_red_obs_K33 (t_dlcl **, int); +static booleann embedg_is_red_obs_K5 (t_dlcl **, int); /* aproto: endstatic -- don't touch this!! */ @@ -4688,7 +4688,7 @@ embedg_recover_embedding ( in either the embed_graph[v] record of the mult_edges[v] record */ int index_embed, v, mult, w, v_w_in_embed, new_first_edge; - boolean set_next; + booleann set_next; IF_DEB( fprintf(stdout, "in recover emb.\n"); @@ -5035,7 +5035,7 @@ embedg_recover_embedding ( static void embedg_recover_embedding_embed_mult (t_dlcl **mult_edges, t_embed_sparse_rep *embedding, int nbr_e, int v, int w, - int mult, int *index_embed, boolean *set_next, int *first_edge) + int mult, int *index_embed, booleann *set_next, int *first_edge) /* see if the directed edge [v, w] is multiple: if so embed it in embedding @@ -5055,7 +5055,7 @@ embedg_recover_embedding_embed_mult (t_dlcl **mult_edges, */ t_dlcl *p; int v_w_in_embed, v_w_prev; - boolean do_twins, start, do_first_edge; + booleann do_twins, start, do_first_edge; IF_DEB_EMBED_MULT( fprintf(stdout, "in recover emb. mult, v %d w %d mult %d\n", @@ -5294,7 +5294,7 @@ embedg_recover_embedding_embed_mult (t_dlcl **mult_edges, static void embedg_recover_embedding_embed_loops (t_dlcl **mult_edges, t_embed_sparse_rep *embedding, int nbr_e, int v, - int *index_embed, boolean *set_next) + int *index_embed, booleann *set_next) /* embed the [v, v] loops */ @@ -5391,7 +5391,7 @@ embedg_recover_embedding_embed_loops (t_dlcl **mult_edges, void embedg_recov_embed_walk_proper_face (int n, int e, t_adjl_sparse_rep *A, - t_embed_sparse_rep *embedding, boolean MARK, int mark) + t_embed_sparse_rep *embedding, booleann MARK, int mark) /* do a proper face walk in the recovered embedding starting at index e in the embedding @@ -5438,7 +5438,7 @@ embedg_recov_embed_walk_proper_face (int n, int e, t_adjl_sparse_rep *A, -boolean +booleann embedg_check_recov_embedding (int n, int nbr_e, int nbr_comp, t_ver_sparse_rep *vertices, t_adjl_sparse_rep *A, t_embed_sparse_rep *embedding) @@ -5682,7 +5682,7 @@ embedg_get_reduced_obs (t_dlcl **obs, int n) return reduced; } -static boolean +static booleann embedg_is_red_obs_K33 (t_dlcl **reduced, int n) /* check if the (reduced) obstruction is indeed K33 @@ -5766,7 +5766,7 @@ embedg_is_red_obs_K33 (t_dlcl **reduced, int n) } -static boolean +static booleann embedg_is_red_obs_K5 (t_dlcl **reduced, int n) /* check if the (reduced) obstruction is indeed K5 @@ -5799,14 +5799,14 @@ embedg_is_red_obs_K5 (t_dlcl **reduced, int n) } -boolean +booleann embedg_check_recov_obs (t_dlcl **obs, int n, minor m) /* check if the recovered obstruction is one of K33 or K5 */ { t_dlcl **reduced; - boolean ans; + booleann ans; reduced = embedg_get_reduced_obs(obs, n); if (m != MINOR_E5) @@ -6012,7 +6012,7 @@ embedg_mark_obstruction ( { int c, vr, x, y, w; int *path_v, *path_e, nbr_v, entry_in_path_e; - boolean px_attached_high, py_attached_high, is_minor_D; + booleann px_attached_high, py_attached_high, is_minor_D; minor m; @@ -6264,7 +6264,7 @@ embedg_iso_get_c_of_v (t_ver_edge *embed_graph, int n, int v, int w) } -boolean +booleann embedg_iso_is_minor_A (t_ver_edge *embed_graph, int n, int *edge_pos, int v, int c, int *vr) /* @@ -6420,7 +6420,7 @@ embedg_iso_get_x_y_w (t_ver_edge *embed_graph, int n, int v, int r, -boolean +booleann embedg_iso_is_minor_B (t_ver_edge *embed_graph, int n, int *edge_pos, int v, int c, int *x, int *y, int *w) /* @@ -6487,9 +6487,9 @@ embedg_iso_get_highest_x_y_path ( int *entry_in_path_e, /* the in direction for the FIRST edge in path_e: needed later on *sigh* */ - boolean *px_attached_high, - boolean *py_attached_high, - boolean *is_minor_D + booleann *px_attached_high, + booleann *py_attached_high, + booleann *is_minor_D ) /* the obstruction is one of minor C, D, E. @@ -6513,7 +6513,7 @@ embedg_iso_get_highest_x_y_path ( int vv, s, sin, p_x, p_y, cur_v, cur_vin; int e, ein, s_e, s_ein; - boolean avoid_vv; + booleann avoid_vv; /* must start the walk at edge embed_graph[v^c].link[1 ^ 0], @@ -6555,7 +6555,7 @@ embedg_iso_get_highest_x_y_path ( avoid_vv = FALSE; while (TRUE) { - boolean av; + booleann av; av = embedg_VES_get_succ_on_proper_face_with_avoidance( @@ -8311,7 +8311,7 @@ embedg_vertices_orientation (t_ver_edge *embed_graph, int n) for (vv = n; vv < 2*n; vv++) { int c, cur, cur_e; - boolean NEW_BICOMP; + booleann NEW_BICOMP; if (embed_graph[vv].link[0] == vv) /* @@ -8622,7 +8622,7 @@ embedg_nbr_faces (t_ver_edge *embed_graph, int n, int edge_pos, } -boolean +booleann embedg_is_embed_valid (t_ver_edge *embed_graph, int n, int nbr_comp, int edge_pos, int *ver_orient, int *nbr_e_embed) /* @@ -8706,7 +8706,7 @@ embedg_is_embed_valid (t_ver_edge *embed_graph, int n, int nbr_comp, void embedg_VES_get_succ_on_ext_face (t_ver_edge *embed_graph, int n, int v, - int vin, boolean MARK, int mark, int *s, int *sin) + int vin, booleann MARK, int mark, int *s, int *sin) /* find the successor s of v (entered via vin) on the external face -- also return the direction in which s has been entered @@ -8807,7 +8807,7 @@ embedg_VES_get_succ_on_ext_face (t_ver_edge *embed_graph, int n, int v, void embedg_VES_get_succ_active_on_ext_face (t_ver_edge *embed_graph, int n, - int v, int w, int win, boolean MARK, int mark, int *s, int *sin) + int v, int w, int win, booleann MARK, int mark, int *s, int *sin) /* find the ACTIVE (wrt v) successor s of w (entered via win) on the external face @@ -8836,7 +8836,7 @@ embedg_VES_get_succ_active_on_ext_face (t_ver_edge *embed_graph, int n, void embedg_VES_get_succ_ext_active_on_ext_face (t_ver_edge *embed_graph, int n, - int v, int w, int win, boolean MARK, int mark, int *s, int *sin) + int v, int w, int win, booleann MARK, int mark, int *s, int *sin) /* find the externally active (wrt v) successor s of w (entered via win) on the external face @@ -8861,7 +8861,7 @@ embedg_VES_get_succ_ext_active_on_ext_face (t_ver_edge *embed_graph, int n, void embedg_VES_get_succ_pertinent_on_ext_face (t_ver_edge *embed_graph, int n, - int v, int w, int win, boolean MARK, int mark, int *s, int *sin) + int v, int w, int win, booleann MARK, int mark, int *s, int *sin) /* find the pertinent (wrt v) successor s of w (entered via win) on the external face @@ -8935,7 +8935,7 @@ embedg_VES_get_succ_pertinent_on_ext_face (t_ver_edge *embed_graph, int n, static void embedg_VES_walk_mark_part_ext_face (t_ver_edge *, int, int, int, int, int, int); static void embedg_VES_walk_mark_ext_face (t_ver_edge *, int, int, int); static void embedg_VES_walk_mark_part_proper_face (t_ver_edge *, int, int, int, int, int); -static boolean embedg_VES_is_part_ext_face_marked (t_ver_edge *, int, int, int, int, int, int); +static booleann embedg_VES_is_part_ext_face_marked (t_ver_edge *, int, int, int, int, int, int); static void embedg_get_u_x (t_ver_edge *, int, int, int, int *); static int embedg_get_least_neigh (t_dlcl **, t_dlcl **, int, int, int); static void embedg_add_mark_u_x (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int *, int); @@ -9040,7 +9040,7 @@ embedg_VES_walk_mark_part_proper_face (t_ver_edge *embed_graph, int n, -static boolean +static booleann embedg_VES_is_part_ext_face_marked (t_ver_edge *embed_graph, int n, int v, int vin, int from, int to, int mark) /* @@ -9079,7 +9079,7 @@ embedg_VES_is_part_ext_face_marked (t_ver_edge *embed_graph, int n, int v, } -boolean +booleann embedg_VES_is_ext_face_marked (t_ver_edge *embed_graph, int n, int v, int mark) /* simple check to see if all the vertices on the external @@ -9546,7 +9546,7 @@ void embedg_mark_minor_C (t_dlcl **dfs_tree, t_dlcl **back_edges, t_ver_edge *embed_graph, int n, int *edge_pos, int v, int c, int x, int y, int w, int *path_v, int *path_e, - int nbr_v, boolean px_attached_high, boolean py_attached_high) + int nbr_v, booleann px_attached_high, booleann py_attached_high) { int vv, p_x, p_y, u_x, u_y, u; @@ -10166,9 +10166,9 @@ embedg_mark_minor_E (t_dlcl **dfs_tree, t_dlcl **back_edges, -boolean +booleann embedg_VES_get_succ_on_proper_face_with_avoidance (t_ver_edge *embed_graph, - int n, int e, int ein, int a, boolean MARK, int mark, int *s, + int n, int e, int ein, int a, booleann MARK, int mark, int *s, int *next_e, int *next_ein) /* find the successor s of embed_graph[e].neighbour @@ -10198,7 +10198,7 @@ embedg_VES_get_succ_on_proper_face_with_avoidance (t_ver_edge *embed_graph, { int eout; int twin, twinout; - boolean avoid_a; + booleann avoid_a; ASSERT(embedg_VES_is_edge(n, e)); ASSERT(!embedg_VES_is_short_cut_edge(embed_graph, n, e)); @@ -10321,7 +10321,7 @@ embedg_VES_get_succ_on_proper_face (t_ver_edge *embed_graph, int n, int e, same as above but without avoidance */ { - boolean avoid; + booleann avoid; avoid = embedg_VES_get_succ_on_proper_face_with_avoidance( @@ -10335,7 +10335,7 @@ embedg_VES_get_succ_on_proper_face (t_ver_edge *embed_graph, int n, int e, void embedg_VES_walk_proper_face (t_ver_edge *embed_graph, int n, int e, - int ein, boolean MARK, int mark) + int ein, booleann MARK, int mark) /* traversing a proper face starting at edge e which has been entered via ein diff --git a/planarity.h b/planarity.h index 1943437..df501de 100644 --- a/planarity.h +++ b/planarity.h @@ -235,18 +235,18 @@ extern "C" { */ /* aproto: file embed_graph/sparseg_adjl_pred.c */ -extern boolean sparseg_adjl_dir_edge_exists (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int); -extern boolean sparseg_adjl_u_adj_v (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int); -extern boolean sparseg_adjl_sub (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_ver_sparse_rep *, int, t_adjl_sparse_rep *); -extern boolean sparseg_adjl_eq (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_ver_sparse_rep *, int, t_adjl_sparse_rep *); +extern booleann sparseg_adjl_dir_edge_exists (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int); +extern booleann sparseg_adjl_u_adj_v (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int); +extern booleann sparseg_adjl_sub (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_ver_sparse_rep *, int, t_adjl_sparse_rep *); +extern booleann sparseg_adjl_eq (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_ver_sparse_rep *, int, t_adjl_sparse_rep *); /* aproto: endfile */ /* aproto: file embed_graph/VES_misc.c */ -extern boolean embedg_VES_is_vertex (int, int); -extern boolean embedg_VES_is_virtual_vertex (int, int); -extern boolean embedg_VES_is_edge (int, int); -extern boolean embedg_VES_is_tree_edge (t_ver_edge *, int, int); -extern boolean embedg_VES_is_back_edge (t_ver_edge *, int, int); -extern boolean embedg_VES_is_short_cut_edge (t_ver_edge *, int, int); +extern booleann embedg_VES_is_vertex (int, int); +extern booleann embedg_VES_is_virtual_vertex (int, int); +extern booleann embedg_VES_is_edge (int, int); +extern booleann embedg_VES_is_tree_edge (t_ver_edge *, int, int); +extern booleann embedg_VES_is_back_edge (t_ver_edge *, int, int); +extern booleann embedg_VES_is_short_cut_edge (t_ver_edge *, int, int); extern void embedg_VES_print_vertex (int, int); extern void embedg_VES_print_virtual_vertex (t_ver_edge *, int, int); extern void embedg_VES_print_any_vertex (t_ver_edge *, int, int); @@ -260,15 +260,15 @@ extern int embedg_VES_get_ver_from_virtual (t_ver_edge *, int, int); extern int embedg_VES_get_ver (t_ver_edge *, int, int); extern int embedg_VES_get_next_in_dlcl (t_ver_edge *, int, int, int); extern void embedg_VES_walk_bicomp (t_ver_edge *, int, int, int); -extern void embedg_VES_print_adj_list (t_ver_edge *, int, int, boolean); -extern boolean embedg_VES_is_adj_list_consistent (t_ver_edge *, int, int); -extern boolean embedg_VES_are_adj_lists_consistent (t_ver_edge *, int); +extern void embedg_VES_print_adj_list (t_ver_edge *, int, int, booleann); +extern booleann embedg_VES_is_adj_list_consistent (t_ver_edge *, int, int); +extern booleann embedg_VES_are_adj_lists_consistent (t_ver_edge *, int); extern void embedg_VES_remove_edge (t_ver_edge *, int, int); extern void embedg_VES_set_orientation (t_ver_edge *, int, int *); /* aproto: endfile */ /* aproto: file embed_graph/embed_edge.c */ extern void embedg_VES_embed_edge (t_ver_edge *, int, int *, int, int, int, int, int); -extern void embedg_VES_add_edge (t_ver_edge *, int, int *, int, int, boolean, int); +extern void embedg_VES_add_edge (t_ver_edge *, int, int *, int, int, booleann, int); /* aproto: endfile */ /* aproto: file embed_graph/embedg_misc.c */ extern void embedg_VES_delete (t_ver_edge *, int); @@ -276,23 +276,23 @@ extern void embedg_VES_print (t_ver_edge *, int); extern void embedg_VES_print_bigcomps (t_ver_edge *, int); /* aproto: endfile */ /* aproto: file embed_graph/ext_face_walk.c */ -extern void embedg_VES_get_succ_on_ext_face (t_ver_edge *, int, int, int, boolean, int, int *, int *); -extern void embedg_VES_get_succ_active_on_ext_face (t_ver_edge *, int, int, int, int, boolean, int, int *, int *); -extern void embedg_VES_get_succ_ext_active_on_ext_face (t_ver_edge *, int, int, int, int, boolean, int, int *, int *); -extern void embedg_VES_get_succ_pertinent_on_ext_face (t_ver_edge *, int, int, int, int, boolean, int, int *, int *); +extern void embedg_VES_get_succ_on_ext_face (t_ver_edge *, int, int, int, booleann, int, int *, int *); +extern void embedg_VES_get_succ_active_on_ext_face (t_ver_edge *, int, int, int, int, booleann, int, int *, int *); +extern void embedg_VES_get_succ_ext_active_on_ext_face (t_ver_edge *, int, int, int, int, booleann, int, int *, int *); +extern void embedg_VES_get_succ_pertinent_on_ext_face (t_ver_edge *, int, int, int, int, booleann, int, int *, int *); /* aproto: endfile */ /* aproto: file embed_graph/isolator.c */ extern int embedg_iso_get_c_of_v (t_ver_edge *, int, int, int); -extern boolean embedg_iso_is_minor_A (t_ver_edge *, int, int *, int, int, int *); +extern booleann embedg_iso_is_minor_A (t_ver_edge *, int, int *, int, int, int *); extern void embedg_iso_get_x_y_w (t_ver_edge *, int, int, int, int, int, int, int, int *, int *, int *); -extern boolean embedg_iso_is_minor_B (t_ver_edge *, int, int *, int, int, int *, int *, int *); -extern void embedg_iso_get_highest_x_y_path (t_ver_edge *, int, int, int, int, int, int, int, int, int, int **, int **, int *, int *, boolean *, boolean *, boolean *); +extern booleann embedg_iso_is_minor_B (t_ver_edge *, int, int *, int, int, int *, int *, int *); +extern void embedg_iso_get_highest_x_y_path (t_ver_edge *, int, int, int, int, int, int, int, int, int, int **, int **, int *, int *, booleann *, booleann *, booleann *); /* aproto: endfile */ /* aproto: file embed_graph/mark_kur.c */ -extern boolean embedg_VES_is_ext_face_marked (t_ver_edge *, int, int, int); +extern booleann embedg_VES_is_ext_face_marked (t_ver_edge *, int, int, int); extern void embedg_mark_minor_A (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int); extern void embedg_mark_minor_B (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int, int, int); -extern void embedg_mark_minor_C (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int, int, int, int *, int *, int, boolean, boolean); +extern void embedg_mark_minor_C (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int, int, int, int *, int *, int, booleann, booleann); extern void embedg_mark_minor_D (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int, int, int, int *, int *, int, int); extern minor embedg_mark_minor_E (t_dlcl **, t_dlcl **, t_ver_edge *, int, int *, int, int, int, int, int, int *, int *, int); /* aproto: endfile */ @@ -303,7 +303,7 @@ extern void embedg_VES_merge_pertinent_bicomps (t_ver_edge *, int, int, int, int /* aproto: file embed_graph/merge_queue_misc.c */ extern t_merge_queue embedg_merge_queue_new (int); extern void embedg_merge_queue_delete (t_merge_queue); -extern boolean embedg_merge_queue_empty (t_merge_queue); +extern booleann embedg_merge_queue_empty (t_merge_queue); extern void embedg_merge_queue_print (t_merge_queue); extern void embedg_merge_queue_append (t_merge_queue *, t_ver_edge *, int, int, int, int, int); extern void embedg_merge_queue_append_vertex (t_merge_queue *, t_ver_edge *, int, int, int); @@ -321,15 +321,15 @@ extern int *sparseg_find_least_ancestor (int, t_dlcl **); extern int *sparseg_find_dfs_parent (int, t_dlcl **); /* aproto: endfile */ /* aproto: file embed_graph/proper_face_walk.c */ -extern boolean embedg_VES_get_succ_on_proper_face_with_avoidance (t_ver_edge *, int, int, int, int, boolean, int, int *, int *, int *); +extern booleann embedg_VES_get_succ_on_proper_face_with_avoidance (t_ver_edge *, int, int, int, int, booleann, int, int *, int *, int *); extern void embedg_VES_get_succ_on_proper_face (t_ver_edge *, int, int, int, int, int, int *, int *, int *); -extern void embedg_VES_walk_proper_face (t_ver_edge *, int, int, int, boolean, int); +extern void embedg_VES_walk_proper_face (t_ver_edge *, int, int, int, booleann, int); /* aproto: endfile */ /* aproto: file embed_graph/vertex_activity.c */ -extern boolean embedg_VES_is_ver_pertinent (t_ver_edge *, int, int, int); -extern boolean embedg_VES_is_ver_ext_active (t_ver_edge *, int, int, int); -extern boolean embedg_VES_is_ver_int_active (t_ver_edge *, int, int, int); -extern boolean embedg_VES_is_ver_inactive (t_ver_edge *, int, int, int); +extern booleann embedg_VES_is_ver_pertinent (t_ver_edge *, int, int, int); +extern booleann embedg_VES_is_ver_ext_active (t_ver_edge *, int, int, int); +extern booleann embedg_VES_is_ver_int_active (t_ver_edge *, int, int, int); +extern booleann embedg_VES_is_ver_inactive (t_ver_edge *, int, int, int); /* aproto: endfile */ /* aproto: file embed_graph/walkdown.c */ extern t_merge_queue embedg_walkdown (t_ver_edge *, int, int *, int); @@ -337,10 +337,10 @@ extern t_merge_queue embedg_walkdown (t_ver_edge *, int, int *, int); /* aproto: file embed_graph/sparseg_dlcl_misc.c */ extern void sparseg_dlcl_delete (t_dlcl **, int); extern void sparseg_dlcl_print (t_dlcl **, int); -extern boolean sparseg_dlcl_is_adjacent (t_dlcl **, int, int, int, t_dlcl **); +extern booleann sparseg_dlcl_is_adjacent (t_dlcl **, int, int, int, t_dlcl **); extern void sparseg_dlcl_append_to_neigh_list (t_dlcl **, int, int, int, int); extern void sparseg_dlcl_to_sparseg (t_dlcl **, int, int, t_ver_sparse_rep **, t_adjl_sparse_rep **); -extern boolean sparseg_dlcl_sub (t_dlcl **, int, t_dlcl **, int); +extern booleann sparseg_dlcl_sub (t_dlcl **, int, t_dlcl **, int); /* aproto: endfile */ /* aproto: file embed_graph/walkup.c */ extern void embedg_walkup (t_ver_edge *, int, int, t_dlcl *); @@ -349,14 +349,14 @@ extern void embedg_walkup (t_ver_edge *, int, int, t_dlcl *); extern void sparseg_adjl_dfs_preprocessing (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int *, int **, int **, int **, t_dlcl ***, t_dlcl ***, int **, int **, t_dlcl ***); /* aproto: endfile */ /* aproto: file embed_graph/planar_by_edge_addition.c */ -extern boolean sparseg_adjl_is_planar (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int *, t_dlcl ***, t_dlcl ***, t_dlcl ***, t_ver_edge **, int *, int *, int *); +extern booleann sparseg_adjl_is_planar (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int *, t_dlcl ***, t_dlcl ***, t_dlcl ***, t_ver_edge **, int *, int *, int *); /* aproto: endfile */ /* aproto: file embed_graph/recover.c */ extern void embedg_recover_embedding (t_ver_sparse_rep *, t_adjl_sparse_rep *, t_ver_edge *, int, int, t_dlcl **, t_ver_sparse_rep **, t_embed_sparse_rep **); -extern void embedg_recov_embed_walk_proper_face (int, int, t_adjl_sparse_rep *, t_embed_sparse_rep *, boolean, int); -extern boolean embedg_check_recov_embedding (int, int, int, t_ver_sparse_rep *, t_adjl_sparse_rep *, t_embed_sparse_rep *); +extern void embedg_recov_embed_walk_proper_face (int, int, t_adjl_sparse_rep *, t_embed_sparse_rep *, booleann, int); +extern booleann embedg_check_recov_embedding (int, int, int, t_ver_sparse_rep *, t_adjl_sparse_rep *, t_embed_sparse_rep *); extern t_dlcl **embedg_recover_obstruction (t_ver_edge *, int, minor, int *); -extern boolean embedg_check_recov_obs (t_dlcl **, int, minor); +extern booleann embedg_check_recov_obs (t_dlcl **, int, minor); /* aproto: endfile */ /* aproto: file embed_graph/planar_alg_init.c */ extern t_ver_edge *embedg_planar_alg_init (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int *, int *, t_dlcl ***, t_dlcl ***, t_dlcl ***); @@ -372,7 +372,7 @@ extern t_dlcl *embedg_dlcl_find (t_dlcl *, int); extern t_dlcl *embedg_dlcl_find_with_NIL_twin_in_adjl (t_dlcl *, int); extern t_dlcl *embedg_dlcl_delete_first (t_dlcl *); extern t_dlcl *embedg_dlcl_delete_rec (t_dlcl *, t_dlcl *); -extern boolean embedg_dlcl_is_empty (t_dlcl *); +extern booleann embedg_dlcl_is_empty (t_dlcl *); extern t_dlcl *embedg_dlcl_list_next (t_dlcl *); extern t_dlcl *embedg_dlcl_list_prev (t_dlcl *); extern t_dlcl *embedg_dlcl_list_last (t_dlcl *); @@ -381,12 +381,12 @@ extern t_dlcl *embedg_dlcl_copy (t_dlcl *); extern int embedg_dlcl_length (t_dlcl *); /* aproto: endfile */ /* aproto: file embed_graph/sparseg_adjl.c */ -extern boolean sparseg_adjl_plan_and_iso (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, t_ver_sparse_rep **, t_adjl_sparse_rep **, t_embed_sparse_rep **, int *); +extern booleann sparseg_adjl_plan_and_iso (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, t_ver_sparse_rep **, t_adjl_sparse_rep **, t_embed_sparse_rep **, int *); extern int *sparseg_adjl_footprint (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int); -extern void sparseg_adjl_print (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, boolean); -extern void sparseg_adjl_embed_print (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_embed_sparse_rep *, boolean); +extern void sparseg_adjl_print (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, booleann); +extern void sparseg_adjl_embed_print (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_embed_sparse_rep *, booleann); extern graph *sparseg_adjl_to_nauty_graph (t_ver_sparse_rep *, int, t_adjl_sparse_rep *); -extern t_edge_sparse_rep *sparseg_adjl_edges (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, boolean); +extern t_edge_sparse_rep *sparseg_adjl_edges (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, booleann); /* aproto: endfile */ /* aproto: file embed_graph/embedding.c */ extern void embedg_embedding (t_ver_sparse_rep *, t_adjl_sparse_rep *, t_ver_edge *, int, int, int, int, t_dlcl **, t_ver_sparse_rep **, t_embed_sparse_rep **); @@ -394,15 +394,15 @@ extern void embedg_remove_SCE (t_ver_edge *, int, int); extern int *embedg_vertices_orientation (t_ver_edge *, int); extern int embedg_merge_remaining_virtual (t_ver_edge *, int); extern int embedg_nbr_faces (t_ver_edge *, int, int, int *, int *); -extern boolean embedg_is_embed_valid (t_ver_edge *, int, int, int, int *, int *); +extern booleann embedg_is_embed_valid (t_ver_edge *, int, int, int, int *, int *); /* aproto: endfile */ /* aproto: file embed_graph/sparseg_adjl_modify.c */ -extern boolean sparseg_adjl_add_edge (t_ver_sparse_rep *, int, t_adjl_sparse_rep **, int *, int *, int, int, boolean); -extern boolean sparseg_adjl_add_edge_no_extend (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, int, int, boolean); -extern boolean sparseg_adjl_add_dir_edge (t_ver_sparse_rep *, int, t_adjl_sparse_rep **, int *, int *, int, int, boolean); -extern boolean sparseg_adjl_add_dir_edge_no_extend (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, int, int, boolean); -extern boolean sparseg_adjl_remove_edge_no_red (t_ver_sparse_rep *, t_adjl_sparse_rep *, int, int); -extern boolean sparseg_adjl_remove_dir_edge_no_red (t_ver_sparse_rep *, t_adjl_sparse_rep *, int, int); +extern booleann sparseg_adjl_add_edge (t_ver_sparse_rep *, int, t_adjl_sparse_rep **, int *, int *, int, int, booleann); +extern booleann sparseg_adjl_add_edge_no_extend (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, int, int, booleann); +extern booleann sparseg_adjl_add_dir_edge (t_ver_sparse_rep *, int, t_adjl_sparse_rep **, int *, int *, int, int, booleann); +extern booleann sparseg_adjl_add_dir_edge_no_extend (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, int, int, booleann); +extern booleann sparseg_adjl_remove_edge_no_red (t_ver_sparse_rep *, t_adjl_sparse_rep *, int, int); +extern booleann sparseg_adjl_remove_dir_edge_no_red (t_ver_sparse_rep *, t_adjl_sparse_rep *, int, int); extern int sparseg_adjl_remove_all_dir_edge_no_red (t_ver_sparse_rep *, t_adjl_sparse_rep *, int, int); extern void sparseg_adjl_add_vertices (t_ver_sparse_rep **, int, int); extern void sparseg_adjl_add_vertices_no_extend (t_ver_sparse_rep *, int, int); @@ -418,8 +418,8 @@ extern t_adjl_sparse_rep *sparseg_adjl_dup_A (t_adjl_sparse_rep *, int); extern void sparseg_embed_assign_E (t_embed_sparse_rep *, t_embed_sparse_rep *, int); extern t_embed_sparse_rep *sparseg_embed_dup_E (t_embed_sparse_rep *, int); extern void sparseg_adjl_underlying_undir (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *, int *); -extern void sparseg_adjl_edge_union (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, t_ver_sparse_rep *, t_adjl_sparse_rep *, boolean, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *, int *); -extern void sparseg_adjl_add_edges (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, t_ver_sparse_rep *, t_adjl_sparse_rep *, boolean, int *); +extern void sparseg_adjl_edge_union (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, t_ver_sparse_rep *, t_adjl_sparse_rep *, booleann, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *, int *); +extern void sparseg_adjl_add_edges (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int *, t_ver_sparse_rep *, t_adjl_sparse_rep *, booleann, int *); /* aproto: endfile */ /* aproto: file embed_graph/degree.c */ extern int *sparseg_adjl_degree_seq (t_ver_sparse_rep *, int, t_adjl_sparse_rep *); @@ -433,7 +433,7 @@ extern void sparseg_comp_delete (t_comp_sparse_rep *, int); extern void sparseg_comp_print (t_comp_sparse_rep *, int); /* aproto: endfile */ /* aproto: file embed_graph/dfs_things.c */ -extern void sparseg_adjl_dfs_things (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, boolean, int *, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *, int **, int **, int **, int **, int **, int *, int **, int *, t_comp_sparse_rep **); +extern void sparseg_adjl_dfs_things (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, booleann, int *, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *, int **, int **, int **, int **, int **, int *, int **, int *, t_comp_sparse_rep **); extern void sparseg_adjl_dfs_add_vertex_to_comp (t_comp_sparse_rep **, int *, int); extern void sparseg_adjl_dfs_create_new_comp (t_comp_sparse_rep **, int *); extern void sparseg_adjl_from_comps_to_sparseg_adjl (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, t_comp_sparse_rep *, int, t_graph_sparse_rep **); @@ -443,11 +443,11 @@ extern void sparseg_adjl_from_start_comp_to_sparseg_adjl (t_ver_sparse_rep *, in extern void sparseg_adjl_dfs_digraph (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, int, int, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *, int **, int **, int **, int **, int **, int *, t_comp_sparse_rep **); /* aproto: endfile */ /* aproto: file embed_graph/bfs.c */ -extern void sparseg_adjl_bfs (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, boolean, int, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *); +extern void sparseg_adjl_bfs (t_ver_sparse_rep *, int, t_adjl_sparse_rep *, booleann, int, t_ver_sparse_rep **, t_adjl_sparse_rep **, int *); /* aproto: endfile */ /* aproto: file embed_graph/faces.c */ -extern void sparseg_adjl_walk_proper_face (int, t_adjl_sparse_rep *, t_embed_sparse_rep *, int, boolean, int, int *, t_edge_sparse_rep *); -extern void sparseg_adjl_get_face_edges (int, t_adjl_sparse_rep *, int, t_embed_sparse_rep *, int, t_edge_sparse_rep **, int *, boolean, int); +extern void sparseg_adjl_walk_proper_face (int, t_adjl_sparse_rep *, t_embed_sparse_rep *, int, booleann, int, int *, t_edge_sparse_rep *); +extern void sparseg_adjl_get_face_edges (int, t_adjl_sparse_rep *, int, t_embed_sparse_rep *, int, t_edge_sparse_rep **, int *, booleann, int); /* aproto: endfile */ #ifdef __cplusplus diff --git a/ranlabg.c b/ranlabg.c index 04338c5..6c14a3b 100644 --- a/ranlabg.c +++ b/ranlabg.c @@ -55,13 +55,13 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet,Sswitch,fswitch,mswitch; + booleann badargs,quiet,Sswitch,fswitch,mswitch; int j,m,n,argnum,fixed; int codetype,outcode; graph *g; nauty_counter nin; int mult; - boolean digraph; + booleann digraph; char *arg,sw; double t; long seed; diff --git a/schreier.c b/schreier.c index db00491..ae8574e 100644 --- a/schreier.c +++ b/schreier.c @@ -41,7 +41,7 @@ static TLS_ATTR int schreierfails = SCHREIERFAILS; #define TMP -static boolean filterschreier(schreier*,int*,permnode**,boolean,int,int); +static booleann filterschreier(schreier*,int*,permnode**,booleann,int,int); #define PNCODE(x) ((int)(((size_t)(x)>>3)&0xFFFUL)) /* #define TESTP(id,p,n) testispermutation(id,p,n) */ @@ -322,7 +322,7 @@ addpermutationunmarked(permnode **ring, int *p, int n) /************************************************************************/ -boolean +booleann addgenerator(schreier **gp, permnode **ring, int *p, int n) /* Add new permutation to group, unless it is discovered to be * already in the group. It is is possible to be in the group @@ -336,7 +336,7 @@ addgenerator(schreier **gp, permnode **ring, int *p, int n) /************************************************************************/ -boolean +booleann condaddgenerator(schreier **gp, permnode **ring, int *p, int n) /* Add new permutation to group, unless it is discovered to be * already in the group. It is is possible to be in the group @@ -539,9 +539,9 @@ applyperm(int *wp, int *p, int k, int n) /************************************************************************/ -static boolean +static booleann filterschreier(schreier *gp, int *p, permnode **ring, - boolean ingroup, int maxlevel, int n) + booleann ingroup, int maxlevel, int n) /* Filter permutation p up to level maxlevel of gp. * Use ingroup=TRUE if p is known to be in the group, otherwise * at least one equivalent generator is added unless it is proved @@ -554,7 +554,7 @@ filterschreier(schreier *gp, int *p, permnode **ring, schreier *sh; int *orbits,*pwr; permnode **vec,*curr; - boolean changed,lchanged,ident; + booleann changed,lchanged,ident; #if !MAXN DYNALLOC1(int,workperm,workperm_sz,n,"filterschreier"); #endif @@ -656,13 +656,13 @@ filterschreier(schreier *gp, int *p, permnode **ring, /************************************************************************/ -boolean +booleann expandschreier(schreier *gp, permnode **ring, int n) /* filter random elements until schreierfails failures. * Return true if it ever expanded. */ { int i,j,nfails,wordlen,skips; - boolean changed; + booleann changed; permnode *pn; #if !MAXN DYNALLOC1(int,workperm2,workperm2_sz,n,"expandschreier"); @@ -749,7 +749,7 @@ getorbits(int *fix, int nfix, schreier *gp, permnode **ring, int n) int getorbitsmin(int *fix, int nfix, schreier *gp, permnode **ring, - int **orbits, int *cell, int ncell, int n, boolean changed) + int **orbits, int *cell, int ncell, int n, booleann changed) /* If the basis elements fix[0..nfix-1] are minimal in their orbits, * as far as we know, return value nfix and set *orbits to point * to orbits fixing fix[0..nfix-1]. If fix[i] is seen to be not diff --git a/schreier.h b/schreier.h index b53b758..f2c2eb2 100644 --- a/schreier.h +++ b/schreier.h @@ -41,14 +41,14 @@ extern "C" { extern void freeschreier(schreier **gp, permnode **gens); extern void addpermutation(permnode **ring, int *p, int n); extern permnode *findpermutation(permnode *gens, int *p, int n); -extern boolean addgenerator(schreier **gp, permnode **gens, int *p, int n); -extern boolean +extern booleann addgenerator(schreier **gp, permnode **gens, int *p, int n); +extern booleann condaddgenerator(schreier **gp, permnode **gens, int *p, int n); -extern boolean expandschreier(schreier *gp, permnode **gens, int n); +extern booleann expandschreier(schreier *gp, permnode **gens, int n); extern int *getorbits(int *fix, int nfix, schreier *gp, permnode **gens, int n); extern int getorbitsmin(int *fix, int nfix, schreier *gp, permnode **gens, - int **orbits, int *cell, int ncell, int n, boolean changed); + int **orbits, int *cell, int ncell, int n, booleann changed); extern void pruneset(set *fixset, schreier *gp, permnode **gens, set *x, int m, int n); extern void newgroup(schreier **gp, permnode **gens, int n); diff --git a/shortg.c b/shortg.c index fa859f5..472fd71 100644 --- a/shortg.c +++ b/shortg.c @@ -109,9 +109,9 @@ FILE *fdopen(int, const char*); static struct invarrec { void (*entrypoint)(graph*,int*,int*,int,int,int,int*, - int,boolean,int,int); + int,booleann,int,int); void (*entrypoint_sg)(graph*,int*,int*,int,int,int,int*, - int,boolean,int,int); + int,booleann,int,int); char *name; } invarproc[] = {{NULL, NULL, "none"}, @@ -139,7 +139,7 @@ static struct invarrec static pid_t beginsort(FILE **sortin, FILE **sortout, char *tempdir, - boolean vdswitch, boolean keep) + booleann vdswitch, booleann keep) /* begin sort process, open streams for i/o to it, and return its pid */ { int pid; @@ -229,7 +229,7 @@ tosort(FILE *f, char *cdstr, char *dstr, nauty_counter index) /**************************************************************************/ -static boolean +static booleann fromsort(FILE *f, char **cdstr, char **dstr, nauty_counter *index) /* read one graph from sort process */ { @@ -277,10 +277,10 @@ main(int argc, char *argv[]) int status,loops; char *dstr,*cdstr,*prevdstr,*prevcdstr; char sw,*fmt; - boolean badargs,quiet,vswitch,dswitch,kswitch,format,uswitch; - boolean iswitch,Iswitch,Kswitch,Tswitch; - boolean zswitch,sswitch,gswitch,Sswitch,tswitch; - boolean digraph; + booleann badargs,quiet,vswitch,dswitch,kswitch,format,uswitch; + booleann iswitch,Iswitch,Kswitch,Tswitch; + booleann zswitch,sswitch,gswitch,Sswitch,tswitch; + booleann digraph; nauty_counter numread,prevnumread,numwritten,classsize; int m,n,i,ii,argnum,line; int outcode,codetype; diff --git a/showg.c b/showg.c index acc3081..05f7475 100644 --- a/showg.c +++ b/showg.c @@ -157,7 +157,7 @@ typedef unsigned long setword; #endif typedef setword set; typedef setword graph; -typedef int boolean; +typedef int booleann; static setword bit[32]= {020000000000,010000000000,04000000000,02000000000, @@ -347,7 +347,7 @@ opengraphfile(char *filename, int *codetype, int assumefixed, long position) FILE *f; int c,firstc; long i,l,pos,pos1,pos2; - boolean bad_header; + booleann bad_header; if (filename == NULL) f = stdin; @@ -562,7 +562,7 @@ stringtograph(char *s, graph *g, int m) int n,i,j,k,v,x,nb,need; size_t ii; set *gi,*gj; - boolean done; + booleann done; n = graphsize(s); if (n == 0) return; @@ -691,7 +691,7 @@ stringtograph(char *s, graph *g, int m) /***********************************************************************/ graph* /* read graph into nauty format */ -readgg(FILE *f, graph *g, int reqm, int *pm, int *pn, boolean *digraph) +readgg(FILE *f, graph *g, int reqm, int *pm, int *pn, booleann *digraph) /* graph6, digraph6 and sparse6 formats are supported f = an open file g = place to put the answer (NULL for dynamic allocation) @@ -764,7 +764,7 @@ readgg(FILE *f, graph *g, int reqm, int *pm, int *pn, boolean *digraph) static int longvalue(char **ps, long *l) { - boolean neg,pos; + booleann neg,pos; long sofar,last; char *s; @@ -904,11 +904,11 @@ static long nin; static void putsetx(FILE *f, set *set1, int *curlenp, int linelength, int m, - boolean compress, int start) + booleann compress, int start) { int slen,j1,j2; char s[40]; - boolean first; + booleann first; first = TRUE; j1 = start; @@ -960,7 +960,7 @@ putsetx(FILE *f, set *set1, int *curlenp, int linelength, int m, *****************************************************************************/ static void -putgraphx(FILE *f, graph *g, int linelength, boolean triang, int m, int n) +putgraphx(FILE *f, graph *g, int linelength, booleann triang, int m, int n) { int i,curlen; set *pg; @@ -978,7 +978,7 @@ putgraphx(FILE *f, graph *g, int linelength, boolean triang, int m, int n) static void putedges(FILE *f, graph *g, int linelength, - boolean digraph, int m, int n) + booleann digraph, int m, int n) /* Write list of edges, preceded by the numbers of vertices and edges. Use labelorg */ { @@ -1023,7 +1023,7 @@ putedges(FILE *f, graph *g, int linelength, /***************************************************************************/ static void -putcgraph(FILE *f, graph *g, int linelength, boolean digraph, int m, int n) +putcgraph(FILE *f, graph *g, int linelength, booleann digraph, int m, int n) /* write compressed form, using labelorg */ { int i,curlen,j0; @@ -1063,12 +1063,12 @@ putcgraph(FILE *f, graph *g, int linelength, boolean digraph, int m, int n) /**************************************************************************/ static void -putam(FILE *f, graph *g, int linelength, boolean space, boolean triang, +putam(FILE *f, graph *g, int linelength, booleann space, booleann triang, int m, int n) /* write adjacency matrix */ { set *gi; int i,j; - boolean first; + booleann first; for (i = 0, gi = (set*)g; i < n - (triang!=0); ++i, gi += m) { @@ -1094,11 +1094,11 @@ main(int argc, char *argv[]) int m,n,codetype; int argnum,j; char *arg,sw; - boolean badargs,digraph; + booleann badargs,digraph; long maxin,pval1,pval2; - boolean fswitch,pswitch,cswitch,dswitch; - boolean aswitch,lswitch,oswitch,Fswitch; - boolean Aswitch,eswitch,tswitch,qswitch; + booleann fswitch,pswitch,cswitch,dswitch; + booleann aswitch,lswitch,oswitch,Fswitch; + booleann Aswitch,eswitch,tswitch,qswitch; int linelength; char *infilename,*outfilename; diff --git a/subdivideg.c b/subdivideg.c index 82e0485..357b49c 100644 --- a/subdivideg.c +++ b/subdivideg.c @@ -121,7 +121,7 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet,kswitch; + booleann badargs,quiet,kswitch; int j,argnum,kvalue; int codetype,outcode; SG_DECL(g); SG_DECL(h); diff --git a/sumlines.c b/sumlines.c index 5e1a66f..624f7cc 100644 --- a/sumlines.c +++ b/sumlines.c @@ -164,7 +164,7 @@ static integer maxint; /* set by find_maxint() */ {fprintf(stderr,">E overflow with %%d or %%p format\n"); exit(1);} \ x += (inc);} /* x += inc with safety check */ -typedef int boolean; +typedef int booleann; #define FALSE 0 #define TRUE 1 @@ -332,7 +332,7 @@ writeline(char *outf, number *val, unsigned long count) int i,n; integer mins,nsecs; double secs,hms; - boolean neg; + booleann neg; n = 0; @@ -401,7 +401,7 @@ writeline(char *outf, number *val, unsigned long count) /*********************************************************************/ static void -print_counts(countnode *root, boolean printcounts) +print_counts(countnode *root, booleann printcounts) /* Use a non-recursive inorder traversal to print the tree */ { int code; @@ -572,7 +572,7 @@ splay(countnode *p) static void add_one(countnode **to_root, char *fmt, integer pmod, int nval, - number *val, int *valtype, int which, boolean numcompare) + number *val, int *valtype, int which, booleann numcompare) /* Add one match to the node with the given format, creating it if it is new. The tree is then splayed to ensure good efficiency. */ { @@ -743,11 +743,11 @@ scanline(char *s, char *f, number *val, int *valtype, { int n; /* Number of values assigned */ int digit; - boolean doass,neg,oflow,badgmp; + booleann doass,neg,oflow,badgmp; integer ival; double dval,digval,comval; char ends,*saves; - static boolean gmp_warning = FALSE; + static booleann gmp_warning = FALSE; integer *ilist; size_t ilist_sz; int nilist; @@ -1173,7 +1173,7 @@ sort_formats(int *order, int numformats) /****************************************************************************/ static void -read_formats(char *filename, int *numformatsp, boolean mustexist) +read_formats(char *filename, int *numformatsp, booleann mustexist) /* Read formats from the given file. */ { FILE *f; @@ -1182,7 +1182,7 @@ read_formats(char *filename, int *numformatsp, boolean mustexist) char line[MAXLINELEN+3]; integer pmod; char *s; - boolean oflow,badpmod; + booleann oflow,badpmod; int digit; if (strcmp(filename,"-") == 0) @@ -1358,7 +1358,7 @@ read_env_formats(int *numformatsp) /****************************************************************************/ -static boolean +static booleann readoneline(FILE *f, char *line, int size, int *nulls) /* Get a line. Read at most size-1 chars until EOF or \n. If \n is read, it is stored. Then \0 is appended. @@ -1441,12 +1441,12 @@ main(int argc, char *argv[]) char *filename; FILE *infile; int numformats,firstarg,nulls; - boolean havefinal,nowarn,noWarn,listformats,readfiles; + booleann havefinal,nowarn,noWarn,listformats,readfiles; integer seq; int order[MAXFORMATS]; glob_t globlk,globlk_stdin,*pglob; char *glob_stdin_v[2]; - boolean printcounts; + booleann printcounts; HELP; diff --git a/testg.c b/testg.c index 2646158..629cff9 100644 --- a/testg.c +++ b/testg.c @@ -25,7 +25,7 @@ -l Put a blank line whenever the first parameter changes,\n\ if there are at least two parameters.\n\ -1 Write output as lines of numbers separated by spaces,\n\ - with 0/1 for boolean and both endpoints of ranges given\n\ + with 0/1 for booleann and both endpoints of ranges given\n\ separately even if they are the same, and the count at\n\ the end of the line. Also, no total is written.\n\ -2 The same as -1 but counts are not written.\n\ @@ -161,11 +161,11 @@ typedef long value_t; static struct constraint_st /* Table of Constraints */ { char symbol; - boolean digraphok; /* Can be computed for digraphs */ - boolean rangeonly; /* Display a range */ + booleann digraphok; /* Can be computed for digraphs */ + booleann rangeonly; /* Display a range */ int needed; /* 1 = sortkey, 2 = constraint; 3 = both */ - boolean computed; - boolean inverse; + booleann computed; + booleann inverse; nauty_counter prereq; /* Must be earlier, must be <= bits in nauty_counter */ value_t lo,hi; @@ -272,8 +272,8 @@ static struct constraint_st /* Table of Constraints */ ? group_in_range((group_node*)VAL(i),LO(i),HI(i)) \ : INBOUNDS0(i)) -static boolean docount,dofilter; -static boolean rangemarkerseen = FALSE; /* --: seen */ +static booleann docount,dofilter; +static booleann rangemarkerseen = FALSE; /* --: seen */ #define MAXKEYS NUMCONSTRAINTS /* Maximum number of keys to sort by */ @@ -315,7 +315,7 @@ typedef struct value_st /* variant for value tree */ #define SCAN_ARGS , FILE *f #define ACTION(p) {possibleblankline(f,TOCOUNT(p)->val); \ printkeyvals(f,TOCOUNT(p)->count,TOCOUNT(p)->val); } -#define INSERT_ARGS , boolean isvalue, SPLAYNODE *new_val, size_t new_val_sz +#define INSERT_ARGS , booleann isvalue, SPLAYNODE *new_val, size_t new_val_sz #define COMPARE(p) (isvalue ? \ compare_value_node(TOVALUE(new_val),TOVALUE(p)) \ : compare_count_node(TOCOUNT(new_val),TOCOUNT(p))) @@ -344,7 +344,7 @@ typedef struct grpsize_st long groupsize2; } group_node; -static boolean lswitch,oneswitch,twoswitch; +static booleann lswitch,oneswitch,twoswitch; /**********************************************************************/ @@ -618,7 +618,7 @@ printkeyvals(FILE *f, nauty_counter count, range *val) /**********************************************************************/ static void -groupstats(graph *g, boolean digraph, int m, int n, group_node *sz, +groupstats(graph *g, booleann digraph, int m, int n, group_node *sz, int *numorbits, int *fixedpts) /* Find the automorphism group of the undirected graph g. Return the group size and number of orbits and fixed points. */ @@ -714,14 +714,14 @@ groupstats(graph *g, boolean digraph, int m, int n, group_node *sz, /**********************************************************************/ static void -compute(graph *g, int m, int n, int code, boolean digraph) +compute(graph *g, int m, int n, int code, booleann digraph) /* Compute property i assuming the prerequisites are known. */ { int mind,maxd,mincount,maxcount; int minind,maxind,minincount,maxincount; int rad,diam,loops; unsigned long ned; - boolean eul; + booleann eul; group_node sz; int norbs,fixedpts; int minadj,maxadj,minnon,maxnon; @@ -887,7 +887,7 @@ compute(graph *g, int m, int n, int code, boolean digraph) /**********************************************************************/ -static boolean +static booleann group_in_range(group_node *sz, value_t lo, value_t hi) /* Test if the group size is in the given range */ { @@ -925,8 +925,8 @@ group_in_range(group_node *sz, value_t lo, value_t hi) /**********************************************************************/ -static boolean -selected(graph *g, int m, int n, boolean digraph) +static booleann +selected(graph *g, int m, int n, booleann digraph) /* See if g is selected by the constraints */ { int i; @@ -987,7 +987,7 @@ decodekeys(char *s) if (rangemarkerseen && VALTYPE(j) == BOOLTYPE) { fprintf(stderr, - ">W ignoring unsplit boolean property %c\n",s[i]); + ">W ignoring unsplit booleann property %c\n",s[i]); continue; } @@ -1020,12 +1020,12 @@ main(int argc, char *argv[]) nauty_counter nin,nout; int argnum,i,j,nprev,mprev,digbad; char *arg,sw,*baseptr,*bp; - boolean badargs,lastwritten,digraph; + booleann badargs,lastwritten,digraph; long pval1,pval2,maxin; - boolean fswitch,pswitch,Vswitch,vswitch,Xswitch,qswitch; + booleann fswitch,pswitch,Vswitch,vswitch,Xswitch,qswitch; nauty_counter cmask; long arglo,arghi; - boolean havecon,neg,doflush,isselected; + booleann havecon,neg,doflush,isselected; double t; HELP; PUTVERSION; diff --git a/traces.c b/traces.c index 0581314..f310375 100644 --- a/traces.c +++ b/traces.c @@ -53,7 +53,7 @@ typedef struct weightwhere { #define NAUTY_KILLED (-12) typedef struct Candidate { - boolean sortedlab; + booleann sortedlab; int *invlab; int *lab; int code; @@ -165,22 +165,22 @@ typedef struct TracesVars { } TracesVars; typedef struct TracesInfo { - boolean autofound; - boolean deg_one; - boolean first_matching; - boolean regular; - boolean exitfromref; - boolean identitygroup; - boolean minimalinorbits; - boolean thegraphisparse; - boolean thegrouphaschanged; - boolean thereisnextlevel; - boolean useTempOrbits1; - boolean useTempOrbits2; + booleann autofound; + booleann deg_one; + booleann first_matching; + booleann regular; + booleann exitfromref; + booleann identitygroup; + booleann minimalinorbits; + booleann thegraphisparse; + booleann thegrouphaschanged; + booleann thereisnextlevel; + booleann useTempOrbits1; + booleann useTempOrbits2; } TracesInfo; typedef struct TracesSpine { - boolean thetracexists; + booleann thetracexists; Candidate *listend; Candidate *liststart; int ccend; @@ -231,7 +231,7 @@ typedef struct grph_strct { int *e; int *w; int d; - boolean one; + booleann one; } grph_strct; typedef struct ExpPathInfo { @@ -240,11 +240,11 @@ typedef struct ExpPathInfo { int info; } ExpPathInfo; -static boolean traces_degree_refine(sparsegraph*, Candidate*, int, Partition*, +static booleann traces_degree_refine(sparsegraph*, Candidate*, int, Partition*, struct TracesVars*, struct TracesInfo*, int, int*); static int traces_vertexclass_refine (int, int*, int*, Candidate*, Partition*, int*); static int traces_refine(Candidate*, int, Partition*, - struct TracesVars*, struct TracesInfo*, int, boolean); + struct TracesVars*, struct TracesInfo*, int, booleann); static void traces_refine_notrace(Candidate*, int, Partition*, struct TracesVars*, struct TracesInfo*); static void traces_refine_maketrie(Candidate*, int, Partition*, @@ -257,69 +257,69 @@ static int traces_refine_refine(sparsegraph*, Candidate*, int, Partition*, struct TracesVars*, struct TracesInfo*); static void refine_tr_refine(Candidate*, int, Partition*, struct TracesVars*, struct TracesInfo*); -static int given_gens(sparsegraph*, permnode*, int*, boolean); +static int given_gens(sparsegraph*, permnode*, int*, booleann); static void quickSort(int*, int); static struct Partition* NewPartition(int); static struct Candidate* NewCandidate(int, Candidate**, int); static void NewPartSpine(int, int); static int FreeList(Candidate*, int); static int FixBase(int*, struct TracesVars*, Candidate*, int, int); -static boolean FixedBase(int*, struct TracesVars*, Candidate*, int, int); +static booleann FixedBase(int*, struct TracesVars*, Candidate*, int, int); static void factorial(double*, int*, int); static void factorial2(double*, int*, int); static int CheckForAutomorphisms(Candidate*, Candidate*, struct TracesVars*, struct TracesInfo*, int, int, Partition*); static int CheckForSingAutomorphisms(Candidate*, Partition*, Candidate*, struct TracesVars*, struct TracesInfo*, int, int); static int CheckForMatching(Candidate*, Candidate*, Partition*, struct TracesVars*, struct TracesInfo*, int, int); static void Individualize(Partition*, Candidate*, int, int, int, int); -static boolean TreeFyTwo(int, Candidate*, Candidate*, Partition*, int, struct TracesVars*, struct TracesInfo*); +static booleann TreeFyTwo(int, Candidate*, Candidate*, Partition*, int, struct TracesVars*, struct TracesInfo*); static void ExperimentalStep(Partition*, Candidate*, struct TracesVars*, struct TracesInfo*, int, int); -static boolean TargetCell(Candidate*, Partition*, int, struct TracesVars*, int); -static boolean TargetCellFirstPath(Candidate*, Partition*, struct TracesVars*); +static booleann TargetCell(Candidate*, Partition*, int, struct TracesVars*, int); +static booleann TargetCellFirstPath(Candidate*, Partition*, struct TracesVars*); static int TargetCellExpPath(Candidate*, Partition*, struct TracesVars*); -static boolean TargetCellSmall(Candidate*, Partition*, int, struct TracesVars*, int); -static boolean TargetCellFirstPathSmall(Candidate*, Partition*, struct TracesVars*); +static booleann TargetCellSmall(Candidate*, Partition*, int, struct TracesVars*, int); +static booleann TargetCellFirstPathSmall(Candidate*, Partition*, struct TracesVars*); static int TargetCellExpPathSmall(Candidate*, Partition*, struct TracesVars*); -static boolean SelectNextLevel(int, struct TracesVars*, struct TracesInfo*); +static booleann SelectNextLevel(int, struct TracesVars*, struct TracesInfo*); static void CopyCand(Candidate*, Candidate*, int, int*, int*); static struct trie* trie_new(int, struct TracesVars*); static struct trie* trie_make(trie*, int, int, struct TracesVars*); static struct trie* trie_comp(trie*, int); static void trie_dump(trie*); static void trie_class(trie*, int*); -static void RemoveFromLevel(int, int, int, boolean); +static void RemoveFromLevel(int, int, int, booleann); static int CompStage0(Partition*, Partition*, Candidate*, Candidate*, int, int, struct TracesVars*, struct TracesInfo*); static int CompStage1(Partition*, Partition*, Candidate*, Candidate*, int, int, struct TracesVars*, struct TracesInfo*); static int CompStage2(Partition*, Partition*, Candidate*, Candidate*, int, int, struct TracesVars*, struct TracesInfo*); static void grouporderplus(sparsegraph*, Candidate*, Partition*, permnode**, double*, int*, int, struct TracesVars*, struct TracesInfo*); -static boolean Prefix(Candidate*, Candidate*, int); -static boolean findperm(permnode*, int*, int); +static booleann Prefix(Candidate*, Candidate*, int); +static booleann findperm(permnode*, int*, int); static int spinelementorbsize(int*, int*, int, int); static trielist* searchtrie_new(int, struct TracesVars*); static searchtrie* searchtrie_make(Candidate*, Candidate*, int, struct TracesVars*); -static boolean lookup(searchtrie*); +static booleann lookup(searchtrie*); static int* findcurrorbits(schreier*, int); static int Preprocess(sparsegraph*, permnode**, Candidate*, int, Partition*, struct TracesVars*); -static void MakeTree(int, int, sparsegraph*, int, struct TracesVars*, boolean); +static void MakeTree(int, int, sparsegraph*, int, struct TracesVars*, booleann); static void MakeCanTree(int, sparsegraph*, int, Candidate*, Partition*, struct TracesVars*); static int maxint(int, int); static int minint(int, int); static void orbjoin_sp_perm(int*, int*, int*, int, int*); static void orbjoin_sp_pair(int*, int*, int, int, int, int*); -static boolean isautom_sg_pair(graph*, int*, boolean, int, int, struct TracesVars*); +static booleann isautom_sg_pair(graph*, int*, booleann, int, int, struct TracesVars*); static void SetAutom(int, int, struct TracesVars*); static void ResetAutom(int, int, struct TracesVars*); static void PrintVect(int*, int, int, int); static void putgraphplus_sg(FILE*, sparsegraph*, int); -static boolean VerifyId(int *p, int n); +static booleann VerifyId(int *p, int n); static void PrintPartition(int*, int*, int, int, int); static void Place(int, Candidate*, Partition*); static int NonSingDeg(int, Candidate*, Partition*); static int NonSingDegPlus1(Candidate*, Partition*, int, TracesVars*); static void NonSingDegPlus2(Candidate*, Partition*, int, TracesVars*); static void Edge_Delete(int, int, Candidate*, TracesVars*); -static boolean VerifyPart(Partition*, int, int); +static booleann VerifyPart(Partition*, int, int); static int VerifyPerm(int*, int,int); -static boolean VerifyCand(Candidate*, int, int); +static booleann VerifyCand(Candidate*, int, int); static int FirstNeighbour(int, Candidate*, Partition*, int*, int, int*, int); static int NextNeighbour(int, Candidate*, Partition*, int*, int, int*, int); static sparsegraph* copy_sg_structure(sparsegraph*, sparsegraph*); @@ -698,8 +698,8 @@ DYNALLSTAT(int, BreakSteps, BreakSteps_sz); DYNALLSTAT(int, CStack, CStack_sz); DYNALLSTAT(int, CurrOrbSize, CurrOrbSize_sz); DYNALLSTAT(int, CurrRefCells, CurrRefCells_sz); -DYNALLSTAT(boolean, Diff, Diff_sz); -DYNALLSTAT(boolean, Factorials, Factorials_sz); +DYNALLSTAT(booleann, Diff, Diff_sz); +DYNALLSTAT(booleann, Factorials, Factorials_sz); DYNALLSTAT(int, fix, fix_sz); DYNALLSTAT(int, IDENTITY_PERM, IDENTITY_PERM_sz); DYNALLSTAT(int, Markers, Markers_sz); @@ -748,8 +748,8 @@ static TLS_ATTR int AUTPERM[MAXN]; static TLS_ATTR int BreakSteps[MAXN]; static TLS_ATTR int CurrOrbSize[MAXN]; static TLS_ATTR int CurrRefCells[MAXN]; -static TLS_ATTR boolean Diff[MAXN]; -static TLS_ATTR boolean Factorials[MAXN]; +static TLS_ATTR booleann Diff[MAXN]; +static TLS_ATTR booleann Factorials[MAXN]; static TLS_ATTR int fix[MAXN]; static TLS_ATTR int IDENTITY_PERM[MAXN]; static TLS_ATTR int Markers[MAXN]; @@ -1046,7 +1046,7 @@ Traces(sparsegraph *g_arg, int *lab, int *ptn, } if (tv->preprocessed) { - memset(Diff,0,n*sizeof(boolean)); + memset(Diff,0,n*sizeof(booleann)); for (i=0; i 1) && (tv->input_graph->d[i] != TheGraph[i].d)) Diff[i] = TRUE; @@ -1363,7 +1363,7 @@ int traces_refine(Candidate *Cand, struct TracesVars* tv, struct TracesInfo *ti, int num_indv, - boolean make_code) { + booleann make_code) { int i, j, k, jk, sc, ind0, ind1, ind2, ind3, ind4, tlp1, labi; int value, iend, newcell; @@ -1374,7 +1374,7 @@ int traces_refine(Candidate *Cand, int Sparse = TRUE; int *lab, *cls, *InvLab, *TracePos, *SplitCell, *LabCell, *TraceEnd, Traceccend, *Tracestpend; int BigCell, BigCellPos, BigCellSize; - boolean TraceCell = FALSE; + booleann TraceCell = FALSE; int *nghb; int conta; const int variation = 0; @@ -3901,7 +3901,7 @@ int traces_refine_sametrace(Candidate *Cand, int Sparse = TRUE; int *lab, *cls, *InvLab, *TracePos, *SplitCell, *LabCell, *TraceEnd, Traceccend, *Tracestpend; int BigCell, BigCellPos, BigCellSize; - boolean TraceCell = FALSE; + booleann TraceCell = FALSE; int *nghb; const int variation = 0; int currentweight, weightstart, weightend, currentcell, currentsize; @@ -4743,7 +4743,7 @@ void refine_tr_refine(Candidate *Cand, int Sparse = TRUE; int *lab, *cls, *InvLab, *TracePos, *SplitCell, *LabCell, TraceEnd, Traceccend, Tracestpend; int BigCell, BigCellPos, BigCellSize; - boolean TraceCell = FALSE; + booleann TraceCell = FALSE; int *nghb; const int variation = 0; int currentweight, weightstart, weightend, currentcell, currentsize; @@ -5334,9 +5334,9 @@ void Allocate_Traces_Structures(int n) { DYNALLOC1(int, BreakSteps, BreakSteps_sz, n, "Traces"); DYNALLOC1(int, CurrOrbSize, CurrOrbSize_sz, n, "Traces"); DYNALLOC1(int, CurrRefCells, CurrRefCells_sz, n, "Traces"); - DYNALLOC1(boolean, Diff, Diff_sz, n, "Traces"); + DYNALLOC1(booleann, Diff, Diff_sz, n, "Traces"); DYNALLOC1(int, CStack, CStack_sz, n, "Traces"); - DYNALLOC1(boolean, Factorials, Factorials_sz, n, "Traces"); + DYNALLOC1(booleann, Factorials, Factorials_sz, n, "Traces"); DYNALLOC1(int, fix, fix_sz, n, "Traces"); DYNALLOC1(int, IDENTITY_PERM, IDENTITY_PERM_sz, n, "Traces"); DYNALLOC1(int, Markers, Markers_sz, n, "Traces"); @@ -6005,7 +6005,7 @@ int CheckForMatching(Candidate *CurrCand, Candidate *NextCand, Partition *Part, Candidate *CheckAutList; int *cls; searchtrie *TrieCandFrom, *TrieCheckFrom; - boolean CodeVerify; + booleann CodeVerify; SpineTL = Spine+tv->tolevel; CheckAutList = SpineTL->liststart; @@ -6308,7 +6308,7 @@ int CompStage0(Partition *CurrPart, Partition *NextPart, Candidate *CurrCand, Ca int m, int n, struct TracesVars* tv, struct TracesInfo *ti) { int i, j, i1, j2, k, cu, cu1, num_indv; int temp, tmp, auxcode, search_vtx, gom_level; - boolean closeloop, firstsing, has_nexttcell; + booleann closeloop, firstsing, has_nexttcell; Candidate *SpTLliststart, *AuxCand; searchtrie *TreeNode, *TreeNode1, *TreeNode2; @@ -7024,9 +7024,9 @@ int CompStage2(Partition *CurrPart, Partition *NextPart, Candidate *CurrCand, Ca Candidate *AuxCand; searchtrie *TreeNode, *TreeNode1, *TreeNode2; int *CuOrb,*AuxOrb; - boolean has_nexttcell = FALSE; + booleann has_nexttcell = FALSE; searchtrie *TrieNode; - boolean schreierwrong; + booleann schreierwrong; #ifdef NAUTY_IN_MAGMA if (main_seen_interrupt) return NAUTY_KILLED; @@ -7627,7 +7627,7 @@ void factorial2(double *size1, int *size2, int k) { } } -boolean findperm(permnode *pn, int *p, int n) { +booleann findperm(permnode *pn, int *p, int n) { permnode *rn; if (!pn) { @@ -7731,7 +7731,7 @@ int FixBase(int *fix, struct TracesVars *tv, Candidate *Cand, int from, int to) return j; } -boolean FixedBase(int *fix, struct TracesVars *tv, Candidate *Cand, int from, int to) { +booleann FixedBase(int *fix, struct TracesVars *tv, Candidate *Cand, int from, int to) { int i, k, nfix; nfix = 0; @@ -7772,7 +7772,7 @@ int FreeList(Candidate *List, int cond) { /* Check if the permutations in the list gens are automorphisms, * also set mark and refcount fields and initialise orbits. */ -int given_gens(sparsegraph *g, permnode *gens, int *orbits, boolean digraph) { +int given_gens(sparsegraph *g, permnode *gens, int *orbits, booleann digraph) { int i, m, n, norbs; permnode *pn; @@ -7809,7 +7809,7 @@ void grouporderplus(sparsegraph *sg_orig, Candidate *Cand, Partition *Part, perm searchtrie *TrieNode; int NSFCInd, ind; - boolean do_ngh = FALSE; + booleann do_ngh = FALSE; numvertices = n; memcpy(CanonIndices, IDENTITY_PERM, n*sizeof(int)); @@ -8562,7 +8562,7 @@ void Initialize_Traces_Time_Variables (TracesVars *tv) { tv->schreier3 = 0; } -boolean isautom_sg_pair(graph *g, int *p, boolean digraph, int m, int n, struct TracesVars *tv) { +booleann isautom_sg_pair(graph *g, int *p, booleann digraph, int m, int n, struct TracesVars *tv) { int *d, *e; size_t *v; int i, k, pi, di; @@ -8589,7 +8589,7 @@ boolean isautom_sg_pair(graph *g, int *p, boolean digraph, int m, int n, struct return TRUE; } -boolean lookup(searchtrie *t) { +booleann lookup(searchtrie *t) { searchtrie *TreeNode; TreeNode = t; @@ -8650,11 +8650,11 @@ void MakeDiscrete(Partition *Part, int cell) { } } -void MakeTree(int v1, int v2, sparsegraph *sg, int n, struct TracesVars* tv, boolean forceautom) { +void MakeTree(int v1, int v2, sparsegraph *sg, int n, struct TracesVars* tv, booleann forceautom) { int ind, vtx1, vtx2, ngh1, ngh2, trind, deg0, deg1; size_t j1; int *sge1, *sge2; - boolean build_autom; + booleann build_autom; if (v1 == v2) return; build_autom = tv->build_autom || forceautom; @@ -8950,7 +8950,7 @@ void Place(int vtx, Candidate *Cand, Partition *Part) { } } -boolean Prefix(Candidate *Cand1, Candidate *Cand2, int k) { +booleann Prefix(Candidate *Cand1, Candidate *Cand2, int k) { int i; for (i=1; i<=k; i++) { @@ -9373,7 +9373,7 @@ void quickSort(int *arr, int elements) { } } -void RemoveFromLevel(int from, int to, int strategy, boolean reinit) { +void RemoveFromLevel(int from, int to, int strategy, booleann reinit) { int i; for (i=from; i<=to; i++) { @@ -9479,10 +9479,10 @@ int Select_from_CStack(int *cls, int CStackInd) { return k; } -boolean SelectNextLevel(int n, struct TracesVars *tv, struct TracesInfo *ti) { +booleann SelectNextLevel(int n, struct TracesVars *tv, struct TracesInfo *ti) { int i, j, val; Candidate *FirstCand; - boolean orbitcell; + booleann orbitcell; VERB_PRINT("SelNxtLev",3,FALSE) switch (tv->compstage) { @@ -9652,7 +9652,7 @@ int spinelementorbsize(int *orbits, int *lab, int size, int elem) { return j; } -boolean TargetCell(Candidate *TargCand, Partition *Part, int n, struct TracesVars* tv, int Lv) { +booleann TargetCell(Candidate *TargCand, Partition *Part, int n, struct TracesVars* tv, int Lv) { int TCell = -1, TCSize = 1; int i; VERB_PRINT("TCELL",3,FALSE) @@ -9725,11 +9725,11 @@ int TargetCellExpPath(Candidate *TargCand, Partition *Part, struct TracesVars* t } } -boolean TargetCellFirstPath(Candidate *TargCand, Partition *Part, struct TracesVars* tv) { +booleann TargetCellFirstPath(Candidate *TargCand, Partition *Part, struct TracesVars* tv) { int n, TCell, TCSize, TCell1, TCSize1; int Lv, i, Lev, vtx, vtx_d; int loopstart, loopend; - boolean divided; + booleann divided; VERB_PRINT("TCFP",3,FALSE) n = tv->input_graph->nv; @@ -9881,7 +9881,7 @@ void traces_freedyn(void) { #endif } -boolean TreeFyTwo(int From, Candidate *Cand1, Candidate *Cand2, Partition *Part, int n, +booleann TreeFyTwo(int From, Candidate *Cand1, Candidate *Cand2, Partition *Part, int n, struct TracesVars* tv, struct TracesInfo *ti) { int i, i1, i2, j1, j2, k; int vtx1, vtx2, ngh1, ngh2, arg, val; @@ -10098,7 +10098,7 @@ struct trie *trie_new(int n, struct TracesVars* tv) { return TrieArray[0]; } -boolean VerifyCand(Candidate *Cand, int n, int line) { +booleann VerifyCand(Candidate *Cand, int n, int line) { int i, k; for (i=0; icls[i]) { @@ -10245,7 +10245,7 @@ void WeightCodes(int n) { -boolean TargetCellSmall(Candidate *TargCand, Partition *Part, int n, struct TracesVars* tv, int Lv) { +booleann TargetCellSmall(Candidate *TargCand, Partition *Part, int n, struct TracesVars* tv, int Lv) { int TCell = -1, TCSize = n; int i; @@ -10313,11 +10313,11 @@ int TargetCellExpPathSmall(Candidate *TargCand, Partition *Part, struct TracesVa } } -boolean TargetCellFirstPathSmall(Candidate *TargCand, Partition *Part, struct TracesVars* tv) { +booleann TargetCellFirstPathSmall(Candidate *TargCand, Partition *Part, struct TracesVars* tv) { int n, TCell, TCSize, TCell1, TCSize1; int Lv, i, Lev, vtx, vtx_d; int loopstart, loopend; - boolean divided; + booleann divided; n = tv->input_graph->nv; if (Part->cells == n) { diff --git a/traces.h b/traces.h index 9378e54..8b813eb 100644 --- a/traces.h +++ b/traces.h @@ -27,11 +27,11 @@ #include "schreier.h" typedef struct TracesOptions { - boolean getcanon; - boolean writeautoms; - boolean cartesian; - boolean digraph; - boolean defaultptn; + booleann getcanon; + booleann writeautoms; + booleann cartesian; + booleann digraph; + booleann defaultptn; int linelength; FILE* outfile; int strategy; /* Only the value 0 is supported in this version. */ @@ -39,7 +39,7 @@ typedef struct TracesOptions { permnode **generators; void (*userautomproc)(int,int*,int); int (*usercanonproc)(graph*,int*,graph*,int,int,int,int); - boolean weighted; + booleann weighted; } TracesOptions; #define DEFAULTOPTIONS_TRACES(opts) TracesOptions opts \ diff --git a/twohamg.c b/twohamg.c index 1a09d90..c66f0cc 100644 --- a/twohamg.c +++ b/twohamg.c @@ -64,7 +64,7 @@ typedef struct p4 { int e1,e2,e3; int v1,v2,v3,v4; - boolean ok; + booleann ok; } p4; DYNALLSTAT(int,bluefarend,bluefarend_sz); /* Parallel to sg.v */ @@ -82,7 +82,7 @@ DYNALLSTAT(p4,p4list,p4list_sz); /* List of non-triangular p4s */ /* vstack is a stack of interesting vertices; onstack says whether a vertex is on vstack so that we don't put it there twice */ DYNALLSTAT(int,vstack,vstack_sz); -DYNALLSTAT(boolean,onstack,onstack_sz); +DYNALLSTAT(booleann,onstack,onstack_sz); static int *top; #define PUSH(v) if (!onstack[v]) { *(top++) = (v); onstack[v] = TRUE; } #define POP(v) { v = *(--top); onstack[v] = FALSE; } @@ -170,7 +170,7 @@ initialise_g(int n, int *e) DYNALLOC1(int,bluedeg,bluedeg_sz,n,"malloc"); DYNALLOC1(int,reddeg,reddeg_sz,n,"malloc"); DYNALLOC1(int,vstack,vstack_sz,n,"malloc"); - DYNALLOC1(boolean,onstack,onstack_sz,n,"malloc"); + DYNALLOC1(booleann,onstack,onstack_sz,n,"malloc"); DYNALLOC1(int,beste,beste_sz,2*n,"malloc"); /* Randomize e; seems to be no purpose for this any more. */ @@ -244,8 +244,8 @@ initialise_colouring(int n) /**************************************************************************/ -static boolean -makeblue(int edge, boolean lastok) +static booleann +makeblue(int edge, booleann lastok) /* Colour WHITE edge BLUE, return success. lastok indicates if it is ok to add the final blue edge */ { @@ -274,8 +274,8 @@ makeblue(int edge, boolean lastok) /**************************************************************************/ -static boolean -makered(int edge, boolean lastok) +static booleann +makered(int edge, booleann lastok) /* Colour WHITE edge RED, return success. lastok indicates if it is ok to add the final red edge */ { @@ -304,7 +304,7 @@ makered(int edge, boolean lastok) /**************************************************************************/ -static boolean +static booleann propagate(int n, int *e, int *nblue, int *nred) /* Look at active vertices and propagate colourings */ { @@ -499,7 +499,7 @@ fishtail(int n, int *nblue, int *nred) static int searchnode(int level, int n, int *e, int nblue, int nred) { - boolean ok; + booleann ok; int i,status,nbest; addrval *valptr; int best,score,bestscore; @@ -607,7 +607,7 @@ dispatchsearch(int n, int *e, int nblue, int nred) { int i,status; addrval *valptr; - boolean ok; + booleann ok; nauty_counter remaininglimit; ok = propagate(n,e,&nblue,&nred); @@ -789,7 +789,7 @@ iscrossdecomposable(sparsegraph sg, int vertex) /**************************************************************************/ static int -p4decomposition(sparsegraph sg, int vertex, boolean vertical) +p4decomposition(sparsegraph sg, int vertex, booleann vertical) /* Test which non-triangular P4s extend to a decomposition. Return -2: timeout -1: not decomposable at all @@ -898,9 +898,9 @@ main(int argc, char *argv[]) int n,codetype; int argnum,i,j,outcode; char *arg,sw; - boolean badargs; - boolean sswitch,gswitch,qswitch,vswitch,xswitch,Xswitch; - boolean pswitch,Lswitch,tswitch,yswitch,Yswitch; + booleann badargs; + booleann sswitch,gswitch,qswitch,vswitch,xswitch,Xswitch; + booleann pswitch,Lswitch,tswitch,yswitch,Yswitch; long Lvalue; double t; char *infilename,*outfilename; diff --git a/underlyingg.c b/underlyingg.c index 3e239cf..f2bab03 100644 --- a/underlyingg.c +++ b/underlyingg.c @@ -40,8 +40,8 @@ main(int argc, char *argv[]) { char *infilename,*outfilename; FILE *infile,*outfile; - boolean badargs,quiet; - boolean digraph; + booleann badargs,quiet; + booleann digraph; int j,m,n,argnum; int codetype,outcode; graph *g; diff --git a/vcolg.c b/vcolg.c index 986edf4..7f67f85 100644 --- a/vcolg.c +++ b/vcolg.c @@ -28,12 +28,12 @@ FILE *outfile; #define MAXNV 128 static int col[MAXNV]; -static boolean first; +static booleann first; static int lastreject[MAXNV]; -static boolean lastrejok; +static booleann lastrejok; static unsigned long groupsize; static unsigned long newgroupsize; -static boolean Tswitch; +static booleann Tswitch; static int fail_level; @@ -131,12 +131,12 @@ testmax(int *p, int n, int *abort) /**************************************************************************/ static int -trythisone(grouprec *group, graph *g, boolean digraph, int m, int n) +trythisone(grouprec *group, graph *g, booleann digraph, int m, int n) /* Try one solution, accept if maximal. */ /* Return value is level to return to. */ { int i,j; - boolean accept; + booleann accept; graph *gi; size_t ne; @@ -204,7 +204,7 @@ trythisone(grouprec *group, graph *g, boolean digraph, int m, int n) /**************************************************************************/ static int -scan(int level, graph *g, boolean digraph, int *prev, long minedges, long maxedges, +scan(int level, graph *g, booleann digraph, int *prev, long minedges, long maxedges, long sofar, long numcols, grouprec *group, int m, int n) /* Recursive scan for default case */ /* Returned value is level to return to. */ @@ -246,7 +246,7 @@ colourgraph(graph *g, int nfixed, long minedges, long maxedges, int i,j,k,nloops; set *gi,*gj; int lab[MAXNV],ptn[MAXNV],orbits[MAXNV]; - boolean loop[MAXNV]; + booleann loop[MAXNV]; int prev[MAXNV]; /* If >= 0, earlier point that must have greater colour */ int weight[MAXNV]; int region,start,stop; @@ -371,7 +371,7 @@ colourdigraph(graph *g, int nfixed, long minedges, long maxedges, size_t ii; set *gi,*gj,*gci,*gcj; int lab[MAXNV],ptn[MAXNV],orbits[MAXNV]; - boolean loop[MAXNV]; + booleann loop[MAXNV]; int prev[MAXNV]; /* If >= 0, earlier point that must have greater colour */ int weight[MAXNV]; int region,start,stop; @@ -507,8 +507,8 @@ main(int argc, char *argv[]) int m,n,codetype; int argnum,j,nfixed; char *arg,sw; - boolean badargs,digraph; - boolean fswitch,uswitch,eswitch,qswitch,mswitch; + booleann badargs,digraph; + booleann fswitch,uswitch,eswitch,qswitch,mswitch; long minedges,maxedges,numcols; double t; char *infilename,*outfilename; diff --git a/watercluster2.c b/watercluster2.c index 6382a21..c7e44f1 100644 --- a/watercluster2.c +++ b/watercluster2.c @@ -118,7 +118,7 @@ int remember_size[MAXN]; // remember_size[i] is the number of characters allocat /* OPTIONS */ -boolean dummybool; +booleann dummybool; int mingerichtdeg; int remaining_doubles=0; /* hoeveel bogen kunnen ten hoogste nog in allebei richtingen gericht worden ? */