Skip to content

Commit

Permalink
Conditional compilation macros for Windows (MINGW)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlo Spaccasassi committed Apr 30, 2019
1 parent 332c548 commit a2bc33c
Show file tree
Hide file tree
Showing 74 changed files with 1,540 additions and 927 deletions.
2 changes: 1 addition & 1 deletion NRswitchg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions addedgeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions amtog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions assembleg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions biplabg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
{
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions blisstog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
{
Expand Down Expand Up @@ -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];

Expand Down
4 changes: 2 additions & 2 deletions catg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions checks6.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/***********************************************************************/

static boolean
static booleann
seemsbad(char *s)
/* Check graph string for apparent problem, if so, correct it */
{
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions complg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions converseg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions copyg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down
26 changes: 13 additions & 13 deletions cubhamg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 */
{
Expand Down Expand Up @@ -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 */
{
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
{
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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];
Expand Down
6 changes: 3 additions & 3 deletions deledgeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ 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;
nauty_counter nin,nout;
char *arg,sw;
setword *gv,*gw;
int mindeg,actmindeg,degv;
boolean zswitch;
booleann zswitch;
double t;
#if MAXN
graph h[MAXN*MAXM];
Expand Down
Loading

0 comments on commit a2bc33c

Please sign in to comment.