Compare commits

..

No commits in common. "rawhide" and "f35" have entirely different histories.
rawhide ... f35

16 changed files with 2370 additions and 3487 deletions

View File

@ -1,12 +0,0 @@
# nauty
[Nauty and Traces](https://pallini.di.uniroma1.it/) are programs for computing
automorphism groups of graphs and digraphs. (At present, Traces does not
accept digraphs.) They can also produce a canonical label. They are written
in a portable subset of C, and run on a considerable number of different
systems.
There is a small suite of programs called gtools included in the package. For
example, geng can generate non-isomorphic graphs very quickly. There are also
generators for bipartite graphs, digraphs, and multigraphs, and programs for
manipulating files of graphs in a compact format.

View File

@ -8,8 +8,8 @@ Last-Update: 2017-11-24
+++ b/configure.ac
@@ -1,6 +1,22 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT([nauty],[2.8.6])
+AC_INIT([nauty],[2.8.6],[bdm@cs.anu.edu.au],[nauty],[https://pallini.di.uniroma1.it/])
-AC_INIT
+AC_INIT([nauty],[@INJECTVER@],[bdm@cs.anu.edu.au],[nauty],[http://pallini.di.uniroma1.it/])
AC_CONFIG_SRCDIR([nauty-h.in])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([autotool])
@ -30,7 +30,7 @@ Last-Update: 2017-11-24
# ======================================================================
# First we define some functions
@@ -128,30 +144,37 @@
@@ -120,30 +136,37 @@
is_cygwin=0 ;;
esac
@ -85,13 +85,13 @@ Last-Update: 2017-11-24
case "$CC" in
gcc*)
@@ -471,7 +494,26 @@
AS_IF([test "$gunzip_prog" = "gunzip"],[have_gunzip=1],[have_gunzip=0])
AC_SUBST(have_gunzip)
@@ -451,7 +474,26 @@
AC_PROG_MKDIR_P
AC_PROG_INSTALL
-AC_CONFIG_FILES([makefile:makefile.in nauty.h:nauty-h.in
- naututil.h:naututil-h.in gtools.h:gtools-h.in
- nauty.pc:nauty-pc.in])
- nauty.pc:nauty.pc.in])
+dnl Checks for linker script support
+gl_LD_VERSION_SCRIPT
+
@ -106,7 +106,7 @@ Last-Update: 2017-11-24
+AM_PATH_GMP(6.1.2,[],[AC_MSG_WARN([could not find required version of GMP])])
+
+AC_CONFIG_FILES([
+ nauty.pc:nauty-pc.in
+ nauty.pc
+ Makefile
+ nauty/Makefile
+ nauty.h:nauty-h.in
@ -117,7 +117,7 @@ Last-Update: 2017-11-24
AC_OUTPUT
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,565 @@
@@ -0,0 +1,525 @@
+AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS = -I m4
+
@ -146,9 +146,7 @@ Last-Update: 2017-11-24
+ dreadnaut \
+ \
+ addedgeg \
+ addptg \
+ amtog \
+ ancestorg \
+ assembleg \
+ biplabg \
+ catg \
@ -166,8 +164,6 @@ Last-Update: 2017-11-24
+ genbg \
+ genbgL \
+ geng \
+ gengL \
+ genposetg \
+ genquarticg \
+ genrang \
+ genspecialg \
@ -183,7 +179,6 @@ Last-Update: 2017-11-24
+ NRswitchg \
+ pickg \
+ planarg \
+ productg \
+ ranlabg \
+ shortg \
+ showg \
@ -193,8 +188,7 @@ Last-Update: 2017-11-24
+ vcolg \
+ watercluster2 \
+ \
+ bliss2dre \
+ dimacs2g \
+ blisstog \
+ checks6 \
+ sumlines
+
@ -202,9 +196,7 @@ Last-Update: 2017-11-24
+ dreadnaut.1 \
+ \
+ addedgeg.1 \
+ addptg.1 \
+ amtog.1 \
+ ancestorg.1 \
+ assembleg.1 \
+ biplabg.1 \
+ catg.1 \
@ -222,8 +214,6 @@ Last-Update: 2017-11-24
+ genbg.1 \
+ genbgL.1 \
+ geng.1 \
+ gengL.1 \
+ genposetg.1 \
+ genquarticg.1 \
+ genrang.1 \
+ genspecialg.1 \
@ -239,7 +229,6 @@ Last-Update: 2017-11-24
+ NRswitchg.1 \
+ pickg.1 \
+ planarg.1 \
+ productg.1 \
+ ranlabg.1 \
+ shortg.1 \
+ showg.1 \
@ -249,8 +238,7 @@ Last-Update: 2017-11-24
+ vcolg.1 \
+ watercluster2.1 \
+ \
+ bliss2dre.1 \
+ dimacs2g.1 \
+ blisstog.1 \
+ checks6.1 \
+ sumlines.1
+
@ -287,10 +275,8 @@ Last-Update: 2017-11-24
+LDADD =
+
+NAUTY_LDADD = $(top_builddir)/libnauty.la $(threadlib)
+NAUTYW0_LDADD = $(top_builddir)/libnautyW0.la $(threadlib)
+NAUTYW1_LDADD = $(top_builddir)/libnautyW1.la $(threadlib)
+NAUTYL1_LDADD = $(top_builddir)/libnautyL1.la $(threadlib)
+NAUTYS1_LDADD = $(top_builddir)/libnautyS1.la $(threadlib)
+
+AM_H2MFLAGS = \
+ --manual="Nauty Manual" \
@ -325,9 +311,7 @@ Last-Update: 2017-11-24
+## in section `Utilities' (15) of the `Nauty and Traces User's Guide' (version 2.6)
+dreadnaut_DESCRIPTION = "command line interface to nauty graph isomorphism library"
+addedgeg_DESCRIPTION = "add an edge in each possible way"
+addptg_DESCRIPTION = "add additional vertices in various ways"
+amtog_DESCRIPTION = "read graphs in matrix format"
+ancestorg_DESCRIPTION = "removes a specified number of final vertices"
+assembleg_DESCRIPTION = "assemble input graphs as components of output graphs"
+biplabg_DESCRIPTION = "label bipartite graphs so the colour classes are contiguous"
+catg_DESCRIPTION = "concatenate files of graphs"
@ -345,8 +329,6 @@ Last-Update: 2017-11-24
+genbg_DESCRIPTION = "generate small bicoloured graphs"
+genbgL_DESCRIPTION = "$(shell printf "%s %s" $(genbg_DESCRIPTION) "(L1 flavour)")"
+geng_DESCRIPTION = "generate small graphs"
+gengL_DESCRIPTION = "$(shell printf "%s %s" $(geng_DESCRIPTION) "(L1 flavour)")"
+genposetg_DESCRIPTION = "generate posets"
+genquarticg_DESCRIPTION = "generate quartic graphs"
+genrang_DESCRIPTION = "generate random graphs"
+genspecialg_DESCRIPTION = "generate special graphs"
@ -362,7 +344,6 @@ Last-Update: 2017-11-24
+NRswitchg_DESCRIPTION = "complement vertex edges"
+pickg_DESCRIPTION = "select graphs according to a variety of properties"
+planarg_DESCRIPTION = "test graphs for planarity and find embeddings or obstructions"
+productg_DESCRIPTION = "product of two graphs (such as Cartesian product)"
+ranlabg_DESCRIPTION = "randomly relabel graphs"
+shortg_DESCRIPTION = "remove isomorphs from a file of graphs"
+showg_DESCRIPTION = "$(shell printf "%s %s" $(listg_DESCRIPTION) "(stand-alone subset of listg)")"
@ -371,16 +352,13 @@ Last-Update: 2017-11-24
+underlyingg_DESCRIPTION = "take the underlying undirected graphs of a file of graphs"
+vcolg_DESCRIPTION = "colour the vertices of graphs in all distinct ways"
+watercluster2_DESCRIPTION = "$(shell printf "%s %s" $(directg_DESCRIPTION) "(faster alternative to directg)")"
+bliss2dre_DESCRIPTION = "convert files of graphs in Bliss/DIMACS format to stdout in sparse6 format"
+dimacs2g_DESCRIPTION = "convert files of graphs in DIMACS format to stdout in sparse6 format"
+blisstog_DESCRIPTION = "convert files of graphs in bliss format to stdout in sparse6 format"
+checks6_DESCRIPTION = "check a file of graphs and optionally perform corrections"
+sumlines_DESCRIPTION = "sum lines matching specified graph formats"
+
+dreadnaut_CPPFLAGS =
+addedgeg_CPPFLAGS =
+addptg_CPPFLAGS =
+amtog_CPPFLAGS =
+ancestorg_CPPFLAGS =
+assembleg_CPPFLAGS =
+biplabg_CPPFLAGS =
+catg_CPPFLAGS =
@ -391,7 +369,6 @@ Last-Update: 2017-11-24
+cubhamg_CPPFLAGS =
+deledgeg_CPPFLAGS =
+delptg_CPPFLAGS =
+dimacs2g_CPPFLAGS =
+directg_CPPFLAGS =
+dretodot_CPPFLAGS =
+dretog_CPPFLAGS =
@ -399,12 +376,10 @@ Last-Update: 2017-11-24
+genbg_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
+genbgL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS) -DMAXN1=30
+geng_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
+gengL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
+genposetg_CPPFLAGS = $(nautyS1_flavour_CPPFLAGS)
+genquarticg_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
+genrang_CPPFLAGS =
+genspecialg_CPPFLAGS =
+gentourng_CPPFLAGS = $(nautyW0_flavour_CPPFLAGS) -DMAXN=24
+gentourng_CPPFLAGS = -DMAXN=24
+gentreeg_CPPFLAGS =
+hamheuristic_CPPFLAGS =
+labelg_CPPFLAGS =
@ -416,7 +391,6 @@ Last-Update: 2017-11-24
+NRswitchg_CPPFLAGS =
+pickg_CPPFLAGS =
+planarg_CPPFLAGS =
+productg_CPPFLAGS =
+ranlabg_CPPFLAGS =
+shortg_CPPFLAGS =
+showg_CPPFLAGS =
@ -424,17 +398,14 @@ Last-Update: 2017-11-24
+twohamg_CPPFLAGS =
+underlyingg_CPPFLAGS =
+vcolg_CPPFLAGS =
+watercluster2_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
+bliss2dre_CPPFLAGS =
+dimacs2g_CPPFLAGS = $(ZLIB_CFLAGS)
+watercluster2_CPPFLAGS = -DMAXN=32
+blisstog_CPPFLAGS = $(ZLIB_CFLAGS)
+checks6_CPPFLAGS =
+sumlines_CPPFLAGS = $(GMP_CFLAGS)
+
+dreadnaut_SOURCES = dreadnaut.c
+addedgeg_SOURCES = addedgeg.c
+addptg_SOURCES = addptg.c
+amtog_SOURCES = amtog.c
+ancestorg_SOURCES = ancestorg.c
+assembleg_SOURCES = assembleg.c
+biplabg_SOURCES = biplabg.c
+catg_SOURCES = catg.c
@ -452,8 +423,6 @@ Last-Update: 2017-11-24
+genbg_SOURCES = genbg.c
+genbgL_SOURCES = genbg.c
+geng_SOURCES = geng.c
+gengL_SOURCES = geng.c
+genposetg_SOURCES = genposetg.c
+genquarticg_SOURCES = genquarticg.c
+genrang_SOURCES = genrang.c
+genspecialg_SOURCES = genspecialg.c
@ -469,7 +438,6 @@ Last-Update: 2017-11-24
+NRswitchg_SOURCES = NRswitchg.c
+pickg_SOURCES = testg.c
+planarg_SOURCES = planarg.c planarity.c
+productg_SOURCES = productg.c
+ranlabg_SOURCES = ranlabg.c
+shortg_SOURCES = shortg.c
+showg_SOURCES = showg.c
@ -478,16 +446,13 @@ Last-Update: 2017-11-24
+underlyingg_SOURCES = underlyingg.c
+vcolg_SOURCES = vcolg.c
+watercluster2_SOURCES = watercluster2.c
+bliss2dre_SOURCES = bliss2dre.c
+dimacs2g_SOURCES = dimacs2g.c
+blisstog_SOURCES = blisstog.c
+checks6_SOURCES = checks6.c
+sumlines_SOURCES = sumlines.c
+
+dreadnaut_LDADD = $(NAUTY_LDADD)
+addedgeg_LDADD = $(NAUTY_LDADD)
+addptg_LDADD = $(NAUTY_LDADD)
+amtog_LDADD = $(NAUTY_LDADD)
+ancestorg_LDADD = $(NAUTY_LDADD)
+assembleg_LDADD = $(NAUTY_LDADD)
+biplabg_LDADD = $(NAUTY_LDADD)
+catg_LDADD = $(NAUTY_LDADD)
@ -505,12 +470,10 @@ Last-Update: 2017-11-24
+genbg_LDADD = $(NAUTYW1_LDADD)
+genbgL_LDADD = $(NAUTYL1_LDADD)
+geng_LDADD = $(NAUTYW1_LDADD)
+gengL_LDADD = $(NAUTYL1_LDADD)
+genposetg_LDADD = $(NAUTYS1_LDADD)
+genquarticg_LDADD = $(NAUTYL1_LDADD)
+genrang_LDADD = $(NAUTY_LDADD)
+genspecialg_LDADD = $(NAUTY_LDADD)
+gentourng_LDADD = $(NAUTYW0_LDADD)
+gentourng_LDADD = $(NAUTY_LDADD)
+gentreeg_LDADD = $(NAUTY_LDADD)
+hamheuristic_LDADD = $(NAUTY_LDADD)
+labelg_LDADD = $(NAUTY_LDADD)
@ -522,7 +485,6 @@ Last-Update: 2017-11-24
+NRswitchg_LDADD = $(NAUTY_LDADD)
+pickg_LDADD = $(NAUTY_LDADD)
+planarg_LDADD = $(NAUTY_LDADD)
+productg_LDADD = $(NAUTY_LDADD)
+ranlabg_LDADD = $(NAUTY_LDADD)
+shortg_LDADD = $(NAUTY_LDADD)
+showg_LDADD =
@ -530,9 +492,8 @@ Last-Update: 2017-11-24
+twohamg_LDADD = $(NAUTY_LDADD)
+underlyingg_LDADD = $(NAUTY_LDADD)
+vcolg_LDADD = $(NAUTY_LDADD)
+watercluster2_LDADD = $(NAUTYW1_LDADD)
+bliss2dre_LDADD = $(NAUTY_LDADD)
+dimacs2g_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
+watercluster2_LDADD = $(NAUTY_LDADD)
+blisstog_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
+checks6_LDADD = $(NAUTY_LDADD)
+sumlines_LDADD = $(GMP_LIBS)
+
@ -577,19 +538,18 @@ Last-Update: 2017-11-24
+ nautil.c \
+ nausparse.c \
+ naugraph.c \
+ schreier.c \
+ naurng.c \
+ schreier.c \
+ traces.c \
+ gtools.c \
+ naututil.c \
+ nautinv.c \
+ nautycliquer.c \
+ planarity.c \
+ gutil1.c \
+ gutil2.c \
+ gtnauty.c \
+ naugroup.c \
+ nautycliquer.c \
+ naugstrings.c \
+ nautaux.c
+ naugroup.c
+
+libnautyA1_la_DEPENDENCIES = $(libnautyA1_la_MAP)
+libnautyA1_la_CPPFLAGS = $(nautyA1_flavour_CPPFLAGS)
@ -741,7 +701,7 @@ Last-Update: 2017-11-24
+])
--- a/runalltests
+++ b/runalltests
@@ -1,6 +1,10 @@
@@ -1,13 +1,17 @@
#!/bin/sh
# Run all nauty checks
@ -749,10 +709,18 @@ Last-Update: 2017-11-24
+
+tdx=0
+
# runonetest command input output
runonetest() {
cmd="$1"
in="$2"
@@ -19,10 +23,16 @@
ok="$3"
printf "%s %s %s " "$cmd" "$in" "$ok"
-
+
if [ "X$in" = "X" ] ; then
in=/dev/null
elif [ ! -r "$in" ] ; then
@@ -20,10 +24,16 @@
exit 1
fi
@ -768,12 +736,12 @@ Last-Update: 2017-11-24
+ sed -i 's@'$top_workingdir'/.libs/lt-@./@' $out2
+fi
+
LC_COLLATE=C sort $out2 >>$out1
LC_LANG=C sort $out2 >>$out1
if ./naucompare "$out1" "$ok" ; then
rm $out1 $out2
--- /dev/null
+++ b/nauty.map
@@ -0,0 +1,311 @@
@@ -0,0 +1,291 @@
+LIBNAUTY_2.5 {
+global:
+## nauty.h
@ -1065,26 +1033,6 @@ Last-Update: 2017-11-24
+find_clique;
+find_indset;
+};
+
+LIBNAUTY_2.8 {
+## gtools.h
+breakcellwt;
+## gutils.h
+numcomponents;
+numcomponents1;
+sources_sinks;
+digoncount;
+numind3sets;
+numind3sets1;
+numdirtriangles1;
+numsquares;
+numdiamonds;
+## naurng.h
+ran_init_time;
+## naututil.h
+listtoset;
+settolist;
+};
--- /dev/null
+++ b/m4/gmp.m4
@@ -0,0 +1,168 @@
@ -1258,7 +1206,7 @@ Last-Update: 2017-11-24
+])
--- a/gtools-h.in
+++ b/gtools-h.in
@@ -59,8 +59,8 @@
@@ -58,8 +58,8 @@
This twisted expression works up to n=160529 in 32-bit arithmetic
and for larger n if size_t has 64 bits. */
@ -1284,21 +1232,22 @@ Last-Update: 2017-11-24
{
--- a/naurng.h
+++ b/naurng.h
@@ -11,8 +11,9 @@
@@ -11,8 +11,10 @@
random number 0..k-1.
*/
-#ifndef NAURNG_H
-#include "naututil.h"
-#include "nauty.h"
+#ifndef _NAURNG_H_ /* only process this file once */
+#define _NAURNG_H_
+#include <nauty/naututil.h>
+
+#include <nauty/nauty.h>
#ifdef __cplusplus
extern "C" {
@@ -37,5 +38,4 @@
@@ -36,5 +38,4 @@
var = __getkran % (k);}
#define INITRANBYTIME ran_init_time(0)
#define INITRANBYTIME ran_init((long)time(NULL))
-#define NAURNG_H
-#endif
@ -1335,7 +1284,7 @@ Last-Update: 2017-11-24
extern "C" {
--- a/naututil-h.in
+++ b/naututil-h.in
@@ -122,9 +122,12 @@
@@ -116,9 +116,12 @@
* *
*****************************************************************************/
@ -1396,12 +1345,12 @@ Last-Update: 2017-11-24
+distclean-local: remove-links
+ -rm -f Makefile
+
--- a/nauty-pc.in
+++ b/nauty-pc.in
--- a/nauty.pc.in
+++ b/nauty.pc.in
@@ -6,6 +6,7 @@
Name: nauty
Description: Programs and library for graph isomorphism
Version: @PACKAGE_VERSION@
Version: 27r3
-Libs: -L${libdir} LIBS
-Libs.private:
-Cflags: -I${includedir} CFLGS
@ -1442,9 +1391,9 @@ Last-Update: 2017-11-24
+])
--- a/traces.h
+++ b/traces.h
@@ -26,6 +26,8 @@
* 10-Nov-22 : bug correction (cycles in degree 2 subgraphs) *
******************************************************************************/
@@ -23,6 +23,8 @@
* 12-Jul-16 : bug correction (reaching degree 2 vertices) *
*****************************************************************************/
+#pragma once
+
@ -1453,9 +1402,8 @@ Last-Update: 2017-11-24
--- a/gutils.h
+++ b/gutils.h
@@ -3,6 +3,8 @@
#ifndef _GUTILS_H_ /* only process this file once */
#define _GUTILS_H_
@@ -1,5 +1,7 @@
/* gutils.h - procedure declarations for gutil1.c and gutil2.c */
+#pragma once
+

View File

@ -1,13 +0,0 @@
--- a/checks6.c
+++ b/checks6.c
@@ -118,9 +118,8 @@
*p++ = BIAS6 + ((x << k) | ((1 << (k-1)) - 1));
return TRUE;
}
- else
- return FALSE;
}
+ return FALSE;
}
/***********************************************************************/

View File

@ -15,7 +15,7 @@ Last-Update: 2017-11-24
--- a/gtools-h.in
+++ b/gtools-h.in
@@ -312,6 +312,7 @@
@@ -294,6 +294,7 @@
extern TLS_ATTR char *readg_line;
extern TLS_ATTR size_t ogf_linelen;
extern TLS_ATTR boolean is_pipe;
@ -25,7 +25,7 @@ Last-Update: 2017-11-24
}
--- a/gtnauty.c
+++ b/gtnauty.c
@@ -20,7 +20,7 @@
@@ -19,7 +19,7 @@
static int fuzz2[] = {006532,070236,035523,062437};
#define FUZZ2(x) ((x) ^ fuzz2[(x)&3])

View File

@ -1,22 +0,0 @@
--- a/assembleg.c 2021-09-03 01:29:06.000000000 -0600
+++ b/assembleg.c 2022-01-27 14:51:21.291007503 -0700
@@ -360,7 +360,7 @@ main(int argc, char *argv[])
t = CPUTIME - t;
if (!quiet)
- fprintf(stderr,">Z %d graphs read from %s; " COUNTER_FMT
+ fprintf(stderr,">Z %d graphs read from %s; %lu"
" graphs written to %s in %3.2f sec.\n",
ninputs,infilename,nout,outfilename,t);
--- a/dretodot.c 2021-09-04 05:22:07.000000000 -0600
+++ b/dretodot.c 2022-01-27 14:51:58.387049903 -0700
@@ -625,7 +625,7 @@ main(int argc, char *argv[])
too_big = TRUE;
}
if (e_count > MaxE) {
- fprintf(stderr, ">E Too many edges (%lu, max: %d; use -E# (at your own risk))\n", e_count, MaxE);
+ fprintf(stderr, ">E Too many edges (%zu, max: %d; use -E# (at your own risk))\n", e_count, MaxE);
too_big = TRUE;
}

View File

@ -128,7 +128,24 @@ Last-Update: 2016-03-19
*/
//#include<stdio.h>
@@ -4042,6 +4054,15 @@ int main(int argc, char *argv[])
@@ -526,7 +538,7 @@ while (nuller<knotenzahl-1)
return 1;
}
-
+#ifndef GTOOL_USAGEHELP_COMPATIBILITY
void usage(char name[])
{
@@ -546,6 +558,7 @@ void usage(char name[])
exit(1);
}
+#endif
/**********DECODE_TO_NAUTY****************************************************/
@@ -4041,6 +4054,15 @@ int main(int argc, char *argv[])
int multicode=0, g6code=1;
long long int last=0LL;
@ -144,18 +161,18 @@ Last-Update: 2016-03-19
if (sizeof(long long int)<8)
{
fprintf(stderr,">E long long too short; This may cause problems with the hashing function for large degree -- exit().\n");
@@ -4063,7 +4084,15 @@ int main(int argc, char *argv[])
else if (argv[i][0]=='Z') direct_output=4; /* BDM */
else if (argv[i][0]=='S') double_allowed=0;
else if (argv[i][0]=='m') { g6code=0; multicode=1; }
@@ -4059,7 +4081,15 @@ int main(int argc, char *argv[])
else if (argv[i][0]=='Z') direct_output=4; /* BDM */
else if (argv[i][0]=='S') double_allowed=0;
else if (argv[i][0]=='m') { g6code=0; multicode=1; }
- else usage(argv[0]);
+ else {
+#ifdef GTOOL_USAGEHELP_COMPATIBILITY
+ fprintf(stderr, ">E Usage: %s\n", USAGE);
+ fprintf(stderr, "Use watercluster2 -help to see a list of the options.\n");
+ exit(1);
+ fprintf(stderr, ">E Usage: %s\n", USAGE);
+ fprintf(stderr, "Use watercluster2 -help to see a list of the options.\n");
+ exit(1);
+#else
+ usage(argv[0]);
+ usage(argv[0]);
+#endif
+ }
}
@ -176,12 +193,12 @@ Last-Update: 2016-03-19
--- a/geng.c
+++ b/geng.c
@@ -6,8 +6,7 @@
/* geng.c version 3.6; B D McKay, October 2022. */
/* geng.c version 3.1; B D McKay, Jan 2019. */
#define USAGE \
-"geng [-cCmtfkbd#D#] [-uygsnh] [-lvq] \n\
-"geng [-cCmtfbd#D#] [-uygsnh] [-lvq] \n\
- [-x#X#] n [mine[:maxe]] [res/mod] [file]"
+"geng [-cCmtfkbd#D#] [-uygsnh] [-lvq] [-x#X#] n [mine[:maxe]] [res/mod] [file]"
+"geng [-cCmtfbd#D#] [-uygsnh] [-lvq] [-x#X#] n [mine[:maxe]] [res/mod] [file]"
#define HELPTEXT \
" Generate all graphs of a specified class.\n\
@ -191,9 +208,9 @@ Last-Update: 2016-03-19
/* TODO: Check allocs for no edges */
#define USAGE \
-"genrang [-P#|-P#/#|-e#|-r#|-R#|-d#] [-M#] [-l#] [-m#] [-t] [-T] [-a] \n" \
-"genrang [-P#|-P#/#|-e#|-r#|-R#|-d#] [-l#] [-m#] [-t] [-T] [-a] \n" \
-" [-s|-g|-z] [-S#] [-q] n|n1,n2 num [outfile]"
+"genrang [-P#|-P#/#|-e#|-r#|-R#|-d#] [-M#] [-l#] [-m#] [-t] [-T] [-a] [-s|-g|-z] [-S#] [-q] n|n1,n2 num [outfile]"
+"genrang [-P#|-P#/#|-e#|-r#|-R#|-d#] [-l#] [-m#] [-t] [-T] [-a] [-s|-g|-z] [-S#] [-q] n|n1,n2 num [outfile]"
#define HELPTEXT \
" Generate random graphs.\n\
@ -243,57 +260,125 @@ Last-Update: 2016-03-19
--- a/cubhamg.c
+++ b/cubhamg.c
@@ -3,8 +3,7 @@
Version 2.0 of August 2021. */
@@ -1,54 +1,53 @@
-/* cubhamg.c : pick those inputs that are nonhamiltonian and
- have max degree <= 3.
-
- Usage:
-cubhamg [-#] [-v|-V] [-n#-#|-y#-#|-i|-I|-o|-x|-e|-E] [-b|-t] [infile [outfile]]
-
- infile is the name of the input file in graph6/sparse6 format
- outfile is the name of the output file in the same format
-
- stdin and stdout are the defaults for infile and outfile
-
- The output file will have a header >>graph6<< or >>sparse6<<
- if and only if the input file does.
-
- Optional switches:
+/* cubhamg.c : pick those inputs that are nonhamiltonian and have max degree <= 3. */
#define USAGE \
- "cubhamg [-#] [-v|-V]" \
- " [-n#-#|-y#-#|-i|-I|-o|-O|-x|-e|-E] [-b|-t] [infile [outfile]]"
+ "cubhamg [-#] [-v|-V] [-n#-#|-y#-#|-i|-I|-o|-O|-x|-e|-E] [-b|-t] [infile [outfile]]"
- -# A parameter useful for tuning (default 100)
- -v Report nonhamiltonian graphs and noncubic graphs
- -V .. in addition give a cycle for the hamiltonian ones
- -n#-# If the two numbers are v and i, then the i-th edge
- out of vertex v is required to be not in the cycle.
- It must be that i=1..3 and v=0..n-1.
- -y#-# If the two numbers are v and i, then the i-th edge
- out of vertex v is required to be in the cycle.
- It must be that i=1..3 and v=0..n-1.
- You can use any number of -n/-y switches to force
- edges. Out of range first arguments are ignored.
- If -y and -n give same edge, -y wins.
- -i Test + property: for each edge e, there is a hamiltonian
- cycle using e.
- -I Test ++ property: for each pair of edges e,e', there is
- a hamiltonian cycle which uses both e and e'.
- -o Test - property: for each edge e, there is a hamiltonian
- cycle avoiding e.
- -x Test +- property: for each pair of edges e,e', there is
- a hamiltonian cycle which uses e but avoids e'.
- -e Test 3/4 property: for each edge e, at least 3 of the 4
- paths of length 3 passing through e lie on hamiltonian cycles.
- -E Test 3/4+ property: for each edge e failing the 3/4 property,
- all three ways of joining e to the rest of the graph are
- hamiltonian avoiding e.
- -T# Specify a timeout, being a limit on how many search tree
- nodes are made. If the timeout occurs, the graph is
- written to the output as if it is nonhamiltonian.
- -R# Specify the number of repeat attempts for each stage.
- -F Analyze covering paths from 2 or 4 vertices of degree 2.
+#define USAGE "cubhamg [-#] [-v|-V] [-n#-#|-y#-#|-i|-I|-o|-x|-e|-E] [-b|-t] [infile [outfile]]"
#define HELPTEXT \
" cubhamg : Find hamiltonian cycles in sub-cubic graphs\n" \
--- a/bliss2dre.c
+++ b/bliss2dre.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
/* Reads a graph in Bliss/DIMACS format from stdin and writes it in
* dreadnaut format to stdout. If there is an argument, it is written
* to the output before the graph. If there are two arguments, they
@@ -43,6 +44,13 @@
int i,v,w;
int haveptn;
- -b Require biconnectivity
- -t Require triconnectivity (note: quadratic algorithm)
+#define HELPTEXT \
+" Pick those inputs that are nonhamiltonian and have max degree <= 3.\n\
+\n\
+ infile is the name of the input file in graph6/sparse6 format (default: stdin)\n\
+\n\
+ outfile is the name of the output file in the same format (default: stdout)\n\
+\n\
+ The output file will have a header >>graph6<< or >>sparse6<< if the input file does.\n\
+\n\
+Options:\n\
+ -# A parameter useful for tuning (default 100)\n\
+ -v Report nonhamiltonian graphs and noncubic graphs\n\
+ -V .. in addition give a cycle for the hamiltonian ones\n\
+ -n#-# If the two numbers are v and i, then the i-th edge\n\
+ out of vertex v is required to be not in the cycle.\n\
+ It must be that i=1..3 and v=0..n-1.\n\
+ -y#-# If the two numbers are v and i, then the i-th edge\n\
+ out of vertex v is required to be in the cycle.\n\
+ It must be that i=1..3 and v=0..n-1.\n\
+ You can use any number of -n/-y switches to force\n\
+ edges. Out of range first arguments are ignored.\n\
+ If -y and -n give same edge, -y wins.\n\
+ -i Test + property: for each edge e, there is a hamiltonian cycle using e.\n\
+ -I Test ++ property: for each pair of edges e,e', there is\n\
+ a hamiltonian cycle which uses both e and e'.\n\
+ -o Test - property: for each edge e, there is a hamiltonian cycle avoiding e.\n\
+ -x Test +- property: for each pair of edges e,e', there is\n\
+ a hamiltonian cycle which uses e but avoids e'.\n\
+ -e Test 3/4 property: for each edge e, at least 3 of the 4\n\
+ paths of length 3 passing through e lie on hamiltonian cycles.\n\
+ -E Test 3/4+ property: for each edge e failing the 3/4 property,\n\
+ all three ways of joining e to the rest of the graph are\n\
+ hamiltonian avoiding e.\n\
+ -T# Specify a timeout, being a limit on how many search tree\n\
+ nodes are made. If the timeout occurs, the graph is\n\
+ written to the output as if it is nonhamiltonian.\n\
+ -R# Specify the number of repeat attempts for each stage.\n\
+ -F Analyze covering paths from 2 or 4 vertices of degree 2.\n\
+\n\
+ -b Require biconnectivity\n\
+ -t Require triconnectivity (note: quadratic algorithm)\n\
+\n\
+Comments:\n\
+ -y, -n, -#, -R and -T are ignored for -i, -I, -x, -o, -e, -E, -F\n"
+ if (argc > 1 && strcmp(argv[1],"--help") == 0)
+ {
+ puts("Usage: bliss2dre < bliss.graph > dreadnaut.graph");
+ puts(" Reads a graph in Bliss/DIMACS format from stdin.");
+ puts(" Writes the graph in dreadnaut format to stdout.");
+ return 0;
+ }
haven = 0;
j = 0;
while ((c = nextchar()) >= 0)
--- a/genposetg.c
+++ b/genposetg.c
@@ -727,12 +727,12 @@
- -y, -n, -#, -R and -T are ignored for -i, -I, -x, -o, -e, -E, -F
+/**************************************************************************
static void usage(char name[])
B. D. McKay, Nov 1995 + Aug 1996 + Feb 2002 + Jul 2008 + Nov 2015
-{ fprintf(stderr,"\nUsage: %s n [o|t] [q] [m x y] where n <= 16 is the number of points\n",name );
- fprintf(stderr," Generate the Hasse diagrams of the posets with n points\n");
- fprintf(stderr," o causes digraph6 output in arbitrary order to be written to stdout\n");
- fprintf(stderr," t causes digraph6 output in topological order to be written to stdout\n");
- fprintf(stderr," q supresses statistics except for the final count\n");
- fprintf(stderr," m x y with 0 <= x < y divides the generation\n"
+{ printf("\nUsage: %s n [o|t] [q] [m x y] where n <= 16 is the number of points\n",name );
+ printf(" Generate the Hasse diagrams of the posets with n points\n");
+ printf(" -o causes digraph6 output in arbitrary order to be written to stdout\n");
+ printf(" -t causes digraph6 output in topological order to be written to stdout\n");
+ printf(" -q supresses statistics except for the final count\n");
+ printf(" -m x y with 0 <= x < y divides the generation\n"
" into y parts and writes only part x.\n");
exit(0); }
@@ -1611,6 +1610,8 @@ main(int argc, char *argv[])
char *arg;
int codetype;
+ HELP;
+
infilename = outfilename = NULL;
badargs = FALSE;
e34plus = e34 = in = out = inin = inout = FALSE;
@@ -1729,8 +1730,8 @@ main(int argc, char *argv[])
if (badargs)
{
- fprintf(stderr,
- ">E Usage: cubhamg [-#] [-v | -V] [-n#-#] [-y#-#] [infile [outfile]]\n");
+ fprintf(stderr, ">E Usage: " USAGE "\n" );
+ GETHELP;
exit(1);
}

View File

@ -1,33 +0,0 @@
--- a/gtools.h 2021-09-03 04:19:20.000000000 -0600
+++ b/gtools.h 2022-07-01 10:22:31.451579384 -0600
@@ -287,7 +287,7 @@ extern void arg_sequence(char**,char*,lo
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 void gt_abort(const char*) __attribute__((noreturn));
extern char *stringcopy(char*);
extern boolean strhaschar(char*,int);
--- a/nauty.h 2021-09-03 04:19:53.000000000 -0600
+++ b/nauty.h 2022-07-01 10:21:58.819514878 -0600
@@ -1353,7 +1353,7 @@ int leftbit[] = {8,7,6,6,5,5,5,5,4,4,4
extern "C" {
#endif
-extern void alloc_error(const char*);
+extern void alloc_error(const char*) __attribute__((noreturn));
extern void breakout(int*,int*,int,int,int,set*,int);
extern boolean cheapautom(int*,int,boolean,int);
extern void doref(graph*,int*,int*,int,int*,int*,int*,set*,int*,
--- a/showg.c 2022-01-27 15:24:09.078428828 -0700
+++ b/showg.c 2022-07-01 10:22:53.852623673 -0600
@@ -216,7 +216,7 @@ static long ogf_linelen;
/************************************************************************/
-static void
+static void __attribute__((noreturn))
gt_abort(char *msg) /* Write message and halt. */
{
if (msg) fprintf(stderr,"%s",msg);

File diff suppressed because it is too large Load Diff

View File

@ -5,14 +5,12 @@ Last-Update: 2017-11-24
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,114 +25,114 @@
@@ -25,102 +25,102 @@
bin_PROGRAMS = \
dreadnaut \
\
- addedgeg \
- addptg \
- amtog \
- ancestorg \
- assembleg \
- biplabg \
- catg \
@ -30,8 +28,6 @@ Last-Update: 2017-11-24
- genbg \
- genbgL \
- geng \
- gengL \
- genposetg \
- genquarticg \
- genrang \
- genspecialg \
@ -47,7 +43,6 @@ Last-Update: 2017-11-24
- NRswitchg \
- pickg \
- planarg \
- productg \
- ranlabg \
- shortg \
- showg \
@ -57,9 +52,7 @@ Last-Update: 2017-11-24
- vcolg \
- watercluster2 \
+ nauty-addedgeg \
+ nauty-addptg \
+ nauty-amtog \
+ nauty-ancestorg \
+ nauty-assembleg \
+ nauty-biplabg \
+ nauty-catg \
@ -77,8 +70,6 @@ Last-Update: 2017-11-24
+ nauty-genbg \
+ nauty-genbgL \
+ nauty-geng \
+ nauty-gengL \
+ nauty-genposetg \
+ nauty-genquarticg \
+ nauty-genrang \
+ nauty-genspecialg \
@ -94,7 +85,6 @@ Last-Update: 2017-11-24
+ nauty-NRswitchg \
+ nauty-pickg \
+ nauty-planarg \
+ nauty-productg \
+ nauty-ranlabg \
+ nauty-shortg \
+ nauty-showg \
@ -104,12 +94,10 @@ Last-Update: 2017-11-24
+ nauty-vcolg \
+ nauty-watercluster2 \
\
- bliss2dre \
- dimacs2g \
- blisstog \
- checks6 \
- sumlines
+ nauty-bliss2dre \
+ nauty-dimacs2g \
+ nauty-blisstog \
+ nauty-checks6 \
+ nauty-sumlines
@ -117,9 +105,7 @@ Last-Update: 2017-11-24
dreadnaut.1 \
\
- addedgeg.1 \
- addptg.1 \
- amtog.1 \
- ancestorg.1 \
- assembleg.1 \
- biplabg.1 \
- catg.1 \
@ -137,8 +123,6 @@ Last-Update: 2017-11-24
- genbg.1 \
- genbgL.1 \
- geng.1 \
- gengL.1 \
- genposetg.1 \
- genquarticg.1 \
- genrang.1 \
- genspecialg.1 \
@ -154,7 +138,6 @@ Last-Update: 2017-11-24
- NRswitchg.1 \
- pickg.1 \
- planarg.1 \
- productg.1 \
- ranlabg.1 \
- shortg.1 \
- showg.1 \
@ -164,9 +147,7 @@ Last-Update: 2017-11-24
- vcolg.1 \
- watercluster2.1 \
+ nauty-addedgeg.1 \
+ nauty-addptg.1 \
+ nauty-amtog.1 \
+ nauty-ancestorg.1 \
+ nauty-assembleg.1 \
+ nauty-biplabg.1 \
+ nauty-catg.1 \
@ -184,8 +165,6 @@ Last-Update: 2017-11-24
+ nauty-genbg.1 \
+ nauty-genbgL.1 \
+ nauty-geng.1 \
+ nauty-gengL.1 \
+ nauty-genposetg.1 \
+ nauty-genquarticg.1 \
+ nauty-genrang.1 \
+ nauty-genspecialg.1 \
@ -201,7 +180,6 @@ Last-Update: 2017-11-24
+ nauty-NRswitchg.1 \
+ nauty-pickg.1 \
+ nauty-planarg.1 \
+ nauty-productg.1 \
+ nauty-ranlabg.1 \
+ nauty-shortg.1 \
+ nauty-showg.1 \
@ -211,18 +189,16 @@ Last-Update: 2017-11-24
+ nauty-vcolg.1 \
+ nauty-watercluster2.1 \
\
- bliss2dre.1 \
- dimacs2g.1 \
- blisstog.1 \
- checks6.1 \
- sumlines.1
+ nauty-bliss2dre.1 \
+ nauty-dimacs2g.1 \
+ nauty-blisstog.1 \
+ nauty-checks6.1 \
+ nauty-sumlines.1
lib_LTLIBRARIES = \
libnauty.la \
@@ -182,8 +182,8 @@
@@ -168,8 +168,8 @@
LD_LIBRARY_PATH=$(top_builddir)/.libs $(HELP2MAN) \
-s 1 \
$(AM_H2MFLAGS) \
@ -233,15 +209,13 @@ Last-Update: 2017-11-24
-o $@ \
$(top_builddir)/$<
@@ -203,218 +203,218 @@
@@ -189,193 +189,193 @@
## short descriptions inspired from the basic functions of the programs as described
## in section `Utilities' (15) of the `Nauty and Traces User's Guide' (version 2.6)
-dreadnaut_DESCRIPTION = "command line interface to nauty graph isomorphism library"
-addedgeg_DESCRIPTION = "add an edge in each possible way"
-addptg_DESCRIPTION = "add additional vertices in various ways"
-amtog_DESCRIPTION = "read graphs in matrix format"
-ancestorg_DESCRIPTION = "removes a specified number of final vertices"
-assembleg_DESCRIPTION = "assemble input graphs as components of output graphs"
-biplabg_DESCRIPTION = "label bipartite graphs so the colour classes are contiguous"
-catg_DESCRIPTION = "concatenate files of graphs"
@ -259,8 +233,6 @@ Last-Update: 2017-11-24
-genbg_DESCRIPTION = "generate small bicoloured graphs"
-genbgL_DESCRIPTION = "$(shell printf "%s %s" $(genbg_DESCRIPTION) "(L1 flavour)")"
-geng_DESCRIPTION = "generate small graphs"
-gengL_DESCRIPTION = "$(shell printf "%s %s" $(geng_DESCRIPTION) "(L1 flavour)")"
-genposetg_DESCRIPTION = "generate posets"
-genquarticg_DESCRIPTION = "generate quartic graphs"
-genrang_DESCRIPTION = "generate random graphs"
-genspecialg_DESCRIPTION = "generate special graphs"
@ -276,7 +248,6 @@ Last-Update: 2017-11-24
-NRswitchg_DESCRIPTION = "complement vertex edges"
-pickg_DESCRIPTION = "select graphs according to a variety of properties"
-planarg_DESCRIPTION = "test graphs for planarity and find embeddings or obstructions"
-productg_DESCRIPTION = "product of two graphs (such as Cartesian product)"
-ranlabg_DESCRIPTION = "randomly relabel graphs"
-shortg_DESCRIPTION = "remove isomorphs from a file of graphs"
-showg_DESCRIPTION = "$(shell printf "%s %s" $(listg_DESCRIPTION) "(stand-alone subset of listg)")"
@ -285,15 +256,12 @@ Last-Update: 2017-11-24
-underlyingg_DESCRIPTION = "take the underlying undirected graphs of a file of graphs"
-vcolg_DESCRIPTION = "colour the vertices of graphs in all distinct ways"
-watercluster2_DESCRIPTION = "$(shell printf "%s %s" $(directg_DESCRIPTION) "(faster alternative to directg)")"
-bliss2dre_DESCRIPTION = "convert files of graphs in Bliss/DIMACS format to stdout in sparse6 format"
-dimacs2g_DESCRIPTION = "convert files of graphs in DIMACS format to stdout in sparse6 format"
-blisstog_DESCRIPTION = "convert files of graphs in bliss format to stdout in sparse6 format"
-checks6_DESCRIPTION = "check a file of graphs and optionally perform corrections"
-sumlines_DESCRIPTION = "sum lines matching specified graph formats"
+dreadnaut_DESCRIPTION = "command line interface to nauty graph isomorphism library"
+nauty_addedgeg_DESCRIPTION = "add an edge in each possible way"
+nauty_addptg_DESCRIPTION = "add additional vertices in various ways"
+nauty_amtog_DESCRIPTION = "read graphs in matrix format"
+nauty_ancestorg_DESCRIPTION = "removes a specified number of final vertices"
+nauty_assembleg_DESCRIPTION = "assemble input graphs as components of output graphs"
+nauty_biplabg_DESCRIPTION = "label bipartite graphs so the colour classes are contiguous"
+nauty_catg_DESCRIPTION = "concatenate files of graphs"
@ -309,10 +277,8 @@ Last-Update: 2017-11-24
+nauty_dretog_DESCRIPTION = "read graphs in dreadnaut format"
+nauty_edgetransg_DESCRIPTION = "select undirected graphs according to group action on vertices, edges and arcs"
+nauty_genbg_DESCRIPTION = "generate small bicoloured graphs"
+nauty_genbgL_DESCRIPTION = "$(shell printf "%s %s" $(nauty_genbg_DESCRIPTION) "(L1 flavour)")"
+nauty_genbgL_DESCRIPTION = "$(shell printf "%s %s" $(genbg_DESCRIPTION) "(L1 flavour)")"
+nauty_geng_DESCRIPTION = "generate small graphs"
+nauty_gengL_DESCRIPTION = "$(shell printf "%s %s" $(nauty_geng_DESCRIPTION) "(L1 flavour)")"
+nauty_genposetg_DESCRIPTION = "generate posets"
+nauty_genquarticg_DESCRIPTION = "generate quartic graphs"
+nauty_genrang_DESCRIPTION = "generate random graphs"
+nauty_genspecialg_DESCRIPTION = "generate special graphs"
@ -328,25 +294,21 @@ Last-Update: 2017-11-24
+nauty_NRswitchg_DESCRIPTION = "complement vertex edges"
+nauty_pickg_DESCRIPTION = "select graphs according to a variety of properties"
+nauty_planarg_DESCRIPTION = "test graphs for planarity and find embeddings or obstructions"
+nauty_productg_DESCRIPTION = "product of two graphs (such as Cartesian product)"
+nauty_ranlabg_DESCRIPTION = "randomly relabel graphs"
+nauty_shortg_DESCRIPTION = "remove isomorphs from a file of graphs"
+nauty_showg_DESCRIPTION = "$(shell printf "%s %s" $(nauty_listg_DESCRIPTION) "(stand-alone subset of listg)")"
+nauty_showg_DESCRIPTION = "$(shell printf "%s %s" $(listg_DESCRIPTION) "(stand-alone subset of listg)")"
+nauty_subdivideg_DESCRIPTION = "compute the subdivision graphs of a file of graphs"
+nauty_twohamg_DESCRIPTION = "split quartic graphs into two hamiltonian cycles"
+nauty_underlyingg_DESCRIPTION = "take the underlying undirected graphs of a file of graphs"
+nauty_vcolg_DESCRIPTION = "colour the vertices of graphs in all distinct ways"
+nauty_watercluster2_DESCRIPTION = "$(shell printf "%s %s" $(nauty_directg_DESCRIPTION) "(faster alternative to directg)")"
+nauty_bliss2dre_DESCRIPTION = "convert files of graphs in Bliss/DIMACS format to stdout in sparse6 format"
+nauty_dimacs2g_DESCRIPTION = "convert files of graphs in DIMACS format to stdout in sparse6 format"
+nauty_watercluster2_DESCRIPTION = "$(shell printf "%s %s" $(directg_DESCRIPTION) "(faster alternative to directg)")"
+nauty_blisstog_DESCRIPTION = "convert files of graphs in bliss format to stdout in sparse6 format"
+nauty_checks6_DESCRIPTION = "check a file of graphs and optionally perform corrections"
+nauty_sumlines_DESCRIPTION = "sum lines matching specified graph formats"
dreadnaut_CPPFLAGS =
-addedgeg_CPPFLAGS =
-addptg_CPPFLAGS =
-amtog_CPPFLAGS =
-ancestorg_CPPFLAGS =
-assembleg_CPPFLAGS =
-biplabg_CPPFLAGS =
-catg_CPPFLAGS =
@ -357,7 +319,6 @@ Last-Update: 2017-11-24
-cubhamg_CPPFLAGS =
-deledgeg_CPPFLAGS =
-delptg_CPPFLAGS =
-dimacs2g_CPPFLAGS =
-directg_CPPFLAGS =
-dretodot_CPPFLAGS =
-dretog_CPPFLAGS =
@ -365,12 +326,10 @@ Last-Update: 2017-11-24
-genbg_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
-genbgL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS) -DMAXN1=30
-geng_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
-gengL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
-genposetg_CPPFLAGS = $(nautyS1_flavour_CPPFLAGS)
-genquarticg_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
-genrang_CPPFLAGS =
-genspecialg_CPPFLAGS =
-gentourng_CPPFLAGS = $(nautyW0_flavour_CPPFLAGS) -DMAXN=24
-gentourng_CPPFLAGS = -DMAXN=24
-gentreeg_CPPFLAGS =
-hamheuristic_CPPFLAGS =
-labelg_CPPFLAGS =
@ -382,7 +341,6 @@ Last-Update: 2017-11-24
-NRswitchg_CPPFLAGS =
-pickg_CPPFLAGS =
-planarg_CPPFLAGS =
-productg_CPPFLAGS =
-ranlabg_CPPFLAGS =
-shortg_CPPFLAGS =
-showg_CPPFLAGS =
@ -390,15 +348,12 @@ Last-Update: 2017-11-24
-twohamg_CPPFLAGS =
-underlyingg_CPPFLAGS =
-vcolg_CPPFLAGS =
-watercluster2_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
-bliss2dre_CPPFLAGS =
-dimacs2g_CPPFLAGS = $(ZLIB_CFLAGS)
-watercluster2_CPPFLAGS = -DMAXN=32
-blisstog_CPPFLAGS = $(ZLIB_CFLAGS)
-checks6_CPPFLAGS =
-sumlines_CPPFLAGS = $(GMP_CFLAGS)
+nauty_addedgeg_CPPFLAGS =
+nauty_addptg_CPPFLAGS =
+nauty_amtog_CPPFLAGS =
+nauty_ancestorg_CPPFLAGS =
+nauty_assembleg_CPPFLAGS =
+nauty_biplabg_CPPFLAGS =
+nauty_catg_CPPFLAGS =
@ -409,7 +364,6 @@ Last-Update: 2017-11-24
+nauty_cubhamg_CPPFLAGS =
+nauty_deledgeg_CPPFLAGS =
+nauty_delptg_CPPFLAGS =
+nauty_dimacs2g_CPPFLAGS =
+nauty_directg_CPPFLAGS =
+nauty_dretodot_CPPFLAGS =
+nauty_dretog_CPPFLAGS =
@ -417,12 +371,10 @@ Last-Update: 2017-11-24
+nauty_genbg_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
+nauty_genbgL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS) -DMAXN1=30
+nauty_geng_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
+nauty_gengL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
+nauty_genposetg_CPPFLAGS = $(nautyS1_flavour_CPPFLAGS)
+nauty_genquarticg_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
+nauty_genrang_CPPFLAGS =
+nauty_genspecialg_CPPFLAGS =
+nauty_gentourng_CPPFLAGS = $(nautyW0_flavour_CPPFLAGS) -DMAXN=24
+nauty_gentourng_CPPFLAGS = -DMAXN=24
+nauty_gentreeg_CPPFLAGS =
+nauty_hamheuristic_CPPFLAGS =
+nauty_labelg_CPPFLAGS =
@ -434,7 +386,6 @@ Last-Update: 2017-11-24
+nauty_NRswitchg_CPPFLAGS =
+nauty_pickg_CPPFLAGS =
+nauty_planarg_CPPFLAGS =
+nauty_productg_CPPFLAGS =
+nauty_ranlabg_CPPFLAGS =
+nauty_shortg_CPPFLAGS =
+nauty_showg_CPPFLAGS =
@ -442,17 +393,14 @@ Last-Update: 2017-11-24
+nauty_twohamg_CPPFLAGS =
+nauty_underlyingg_CPPFLAGS =
+nauty_vcolg_CPPFLAGS =
+nauty_watercluster2_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
+nauty_bliss2dre_CPPFLAGS =
+nauty_dimacs2g_CPPFLAGS = $(ZLIB_CFLAGS)
+nauty_watercluster2_CPPFLAGS = -DMAXN=32
+nauty_blisstog_CPPFLAGS = $(ZLIB_CFLAGS)
+nauty_checks6_CPPFLAGS =
+nauty_sumlines_CPPFLAGS = $(GMP_CFLAGS)
dreadnaut_SOURCES = dreadnaut.c
-addedgeg_SOURCES = addedgeg.c
-addptg_SOURCES = addptg.c
-amtog_SOURCES = amtog.c
-ancestorg_SOURCES = ancestorg.c
-assembleg_SOURCES = assembleg.c
-biplabg_SOURCES = biplabg.c
-catg_SOURCES = catg.c
@ -470,8 +418,6 @@ Last-Update: 2017-11-24
-genbg_SOURCES = genbg.c
-genbgL_SOURCES = genbg.c
-geng_SOURCES = geng.c
-gengL_SOURCES = geng.c
-genposetg_SOURCES = genposetg.c
-genquarticg_SOURCES = genquarticg.c
-genrang_SOURCES = genrang.c
-genspecialg_SOURCES = genspecialg.c
@ -487,7 +433,6 @@ Last-Update: 2017-11-24
-NRswitchg_SOURCES = NRswitchg.c
-pickg_SOURCES = testg.c
-planarg_SOURCES = planarg.c planarity.c
-productg_SOURCES = productg.c
-ranlabg_SOURCES = ranlabg.c
-shortg_SOURCES = shortg.c
-showg_SOURCES = showg.c
@ -496,14 +441,11 @@ Last-Update: 2017-11-24
-underlyingg_SOURCES = underlyingg.c
-vcolg_SOURCES = vcolg.c
-watercluster2_SOURCES = watercluster2.c
-bliss2dre_SOURCES = bliss2dre.c
-dimacs2g_SOURCES = dimacs2g.c
-blisstog_SOURCES = blisstog.c
-checks6_SOURCES = checks6.c
-sumlines_SOURCES = sumlines.c
+nauty_addedgeg_SOURCES = addedgeg.c
+nauty_addptg_SOURCES = addptg.c
+nauty_amtog_SOURCES = amtog.c
+nauty_ancestorg_SOURCES = ancestorg.c
+nauty_assembleg_SOURCES = assembleg.c
+nauty_biplabg_SOURCES = biplabg.c
+nauty_catg_SOURCES = catg.c
@ -521,8 +463,6 @@ Last-Update: 2017-11-24
+nauty_genbg_SOURCES = genbg.c
+nauty_genbgL_SOURCES = genbg.c
+nauty_geng_SOURCES = geng.c
+nauty_gengL_SOURCES = geng.c
+nauty_genposetg_SOURCES = genposetg.c
+nauty_genquarticg_SOURCES = genquarticg.c
+nauty_genrang_SOURCES = genrang.c
+nauty_genspecialg_SOURCES = genspecialg.c
@ -538,7 +478,6 @@ Last-Update: 2017-11-24
+nauty_NRswitchg_SOURCES = NRswitchg.c
+nauty_pickg_SOURCES = testg.c
+nauty_planarg_SOURCES = planarg.c planarity.c
+nauty_productg_SOURCES = productg.c
+nauty_ranlabg_SOURCES = ranlabg.c
+nauty_shortg_SOURCES = shortg.c
+nauty_showg_SOURCES = showg.c
@ -547,16 +486,13 @@ Last-Update: 2017-11-24
+nauty_underlyingg_SOURCES = underlyingg.c
+nauty_vcolg_SOURCES = vcolg.c
+nauty_watercluster2_SOURCES = watercluster2.c
+nauty_bliss2dre_SOURCES = bliss2dre.c
+nauty_dimacs2g_SOURCES = dimacs2g.c
+nauty_blisstog_SOURCES = blisstog.c
+nauty_checks6_SOURCES = checks6.c
+nauty_sumlines_SOURCES = sumlines.c
-dreadnaut_LDADD = $(NAUTY_LDADD)
-addedgeg_LDADD = $(NAUTY_LDADD)
-addptg_LDADD = $(NAUTY_LDADD)
-amtog_LDADD = $(NAUTY_LDADD)
-ancestorg_LDADD = $(NAUTY_LDADD)
-assembleg_LDADD = $(NAUTY_LDADD)
-biplabg_LDADD = $(NAUTY_LDADD)
-catg_LDADD = $(NAUTY_LDADD)
@ -574,12 +510,10 @@ Last-Update: 2017-11-24
-genbg_LDADD = $(NAUTYW1_LDADD)
-genbgL_LDADD = $(NAUTYL1_LDADD)
-geng_LDADD = $(NAUTYW1_LDADD)
-gengL_LDADD = $(NAUTYL1_LDADD)
-genposetg_LDADD = $(NAUTYS1_LDADD)
-genquarticg_LDADD = $(NAUTYL1_LDADD)
-genrang_LDADD = $(NAUTY_LDADD)
-genspecialg_LDADD = $(NAUTY_LDADD)
-gentourng_LDADD = $(NAUTYW0_LDADD)
-gentourng_LDADD = $(NAUTY_LDADD)
-gentreeg_LDADD = $(NAUTY_LDADD)
-hamheuristic_LDADD = $(NAUTY_LDADD)
-labelg_LDADD = $(NAUTY_LDADD)
@ -591,7 +525,6 @@ Last-Update: 2017-11-24
-NRswitchg_LDADD = $(NAUTY_LDADD)
-pickg_LDADD = $(NAUTY_LDADD)
-planarg_LDADD = $(NAUTY_LDADD)
-productg_LDADD = $(NAUTY_LDADD)
-ranlabg_LDADD = $(NAUTY_LDADD)
-shortg_LDADD = $(NAUTY_LDADD)
-showg_LDADD =
@ -599,16 +532,13 @@ Last-Update: 2017-11-24
-twohamg_LDADD = $(NAUTY_LDADD)
-underlyingg_LDADD = $(NAUTY_LDADD)
-vcolg_LDADD = $(NAUTY_LDADD)
-watercluster2_LDADD = $(NAUTYW1_LDADD)
-bliss2dre_LDADD = $(NAUTY_LDADD)
-dimacs2g_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
-watercluster2_LDADD = $(NAUTY_LDADD)
-blisstog_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
-checks6_LDADD = $(NAUTY_LDADD)
-sumlines_LDADD = $(GMP_LIBS)
+dreadnaut_LDADD = $(NAUTY_LDADD)
+nauty_addedgeg_LDADD = $(NAUTY_LDADD)
+nauty_addptg_LDADD = $(NAUTY_LDADD)
+nauty_amtog_LDADD = $(NAUTY_LDADD)
+nauty_ancestorg_LDADD = $(NAUTY_LDADD)
+nauty_assembleg_LDADD = $(NAUTY_LDADD)
+nauty_biplabg_LDADD = $(NAUTY_LDADD)
+nauty_catg_LDADD = $(NAUTY_LDADD)
@ -626,12 +556,10 @@ Last-Update: 2017-11-24
+nauty_genbg_LDADD = $(NAUTYW1_LDADD)
+nauty_genbgL_LDADD = $(NAUTYL1_LDADD)
+nauty_geng_LDADD = $(NAUTYW1_LDADD)
+nauty_gengL_LDADD = $(NAUTYL1_LDADD)
+nauty_genposetg_LDADD = $(NAUTYS1_LDADD)
+nauty_genquarticg_LDADD = $(NAUTYL1_LDADD)
+nauty_genrang_LDADD = $(NAUTY_LDADD)
+nauty_genspecialg_LDADD = $(NAUTY_LDADD)
+nauty_gentourng_LDADD = $(NAUTYW0_LDADD)
+nauty_gentourng_LDADD = $(NAUTY_LDADD)
+nauty_gentreeg_LDADD = $(NAUTY_LDADD)
+nauty_hamheuristic_LDADD = $(NAUTY_LDADD)
+nauty_labelg_LDADD = $(NAUTY_LDADD)
@ -643,7 +571,6 @@ Last-Update: 2017-11-24
+nauty_NRswitchg_LDADD = $(NAUTY_LDADD)
+nauty_pickg_LDADD = $(NAUTY_LDADD)
+nauty_planarg_LDADD = $(NAUTY_LDADD)
+nauty_productg_LDADD = $(NAUTY_LDADD)
+nauty_ranlabg_LDADD = $(NAUTY_LDADD)
+nauty_shortg_LDADD = $(NAUTY_LDADD)
+nauty_showg_LDADD =
@ -651,9 +578,8 @@ Last-Update: 2017-11-24
+nauty_twohamg_LDADD = $(NAUTY_LDADD)
+nauty_underlyingg_LDADD = $(NAUTY_LDADD)
+nauty_vcolg_LDADD = $(NAUTY_LDADD)
+nauty_watercluster2_LDADD = $(NAUTYW1_LDADD)
+nauty_bliss2dre_LDADD = $(NAUTY_LDADD)
+nauty_dimacs2g_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
+nauty_watercluster2_LDADD = $(NAUTY_LDADD)
+nauty_blisstog_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
+nauty_checks6_LDADD = $(NAUTY_LDADD)
+nauty_sumlines_LDADD = $(GMP_LIBS)
@ -661,7 +587,7 @@ Last-Update: 2017-11-24
libnautyA1_la_MAP =
--- a/runalltests
+++ b/runalltests
@@ -30,7 +30,7 @@
@@ -31,7 +31,7 @@
eval $cmd <"$in" 2>$out2 >$out1
if [ -d $top_workingdir/.libs ]; then
@ -669,8 +595,8 @@ Last-Update: 2017-11-24
+ sed -i 's@'$top_workingdir'/.libs/lt-nauty-@./@' $out2
fi
LC_COLLATE=C sort $out2 >>$out1
@@ -97,18 +97,18 @@
LC_LANG=C sort $out2 >>$out1
@@ -100,13 +100,13 @@
runonetest ./dreadtest4K nautest2.dre nautest2a.ans
runonetest "./dreadtest4K -o As" nautest2.dre nautest2b.ans
@ -680,24 +606,14 @@ Last-Update: 2017-11-24
-runonetest "./gentourng -q -z 8 | ./pickg -T3" "" nautestd.ans
-runonetest "./gentreeg -q -s 18 | ./countg -z6 --o" "" nauteste.ans
-runonetest "./geng -c -q 8 8 | ./directg -q -o | ./converseg -q | ./labelg -q" "" nautestf.ans
-runonetest "./genbg -q 4 3 10 | ./vcolg -m5 -T" "" nautestg.ans
-runonetest "./genposetg 8 o q" "" nautesth.ans
-runonetest "./genspecialg -q -c12 -b11,4 -P5,2 -T3,4,5" "" nautesti.ans
-runonetest "./genspecialg -qz -c12 -b11,4 -P5,2 -T3,4,5" "" nautestj.ans
-runonetest "./gentreeg -q 3:4 | ./assembleg -n4:12L -cq" "" nautestk.ans
-runonetest "./geng -q 10 10 | ./countg --WTKcc,ee,hk" "" nautestl.ans
-runonetest "./genbg -q 4 3 10 | ./vcolg -m6 -T" "" nautestg.ans
+runonetest "./nauty-geng -ud1D7t 11" "" nautesta.ans
+runonetest "./nauty-geng -cd1f 10 | ./nauty-labelg -q" "" nautestb.ans
+runonetest "./nauty-genrang -r3 114 100 | ./nauty-countg --nedDr -q" "" nautestc.ans
+runonetest "./nauty-gentourng -q -z 8 | ./nauty-pickg -T3" "" nautestd.ans
+runonetest "./nauty-gentreeg -q -s 18 | ./nauty-countg -z6 --o" "" nauteste.ans
+runonetest "./nauty-geng -c -q 8 8 | ./nauty-directg -q -o | ./nauty-converseg -q | ./nauty-labelg -q" "" nautestf.ans
+runonetest "./nauty-genbg -q 4 3 10 | ./nauty-vcolg -m5 -T" "" nautestg.ans
+runonetest "./nauty-genposetg 8 o q" "" nautesth.ans
+runonetest "./nauty-genspecialg -q -c12 -b11,4 -P5,2 -T3,4,5" "" nautesti.ans
+runonetest "./nauty-genspecialg -qz -c12 -b11,4 -P5,2 -T3,4,5" "" nautestj.ans
+runonetest "./nauty-gentreeg -q 3:4 | ./nauty-assembleg -n4:12L -cq" "" nautestk.ans
+runonetest "./nauty-geng -q 10 10 | ./nauty-countg --WTKcc,ee,hk" "" nautestl.ans
+runonetest "./nauty-genbg -q 4 3 10 | ./nauty-vcolg -m6 -T" "" nautestg.ans
echo " "

File diff suppressed because it is too large Load Diff

View File

@ -1,545 +0,0 @@
--- a/amtog.c
+++ b/amtog.c
@@ -42,7 +42,7 @@ main(int argc, char *argv[])
{
int m,n,outdigit;
int argnum,i,j,outcode,val;
- int unsym0,unsym1,loop0;
+ int unsym0=0,unsym1=0,loop0=0;
char *arg,sw,ochar;
boolean badargs;
boolean nswitch,sswitch,gswitch,hswitch,qswitch;
--- a/bliss2dre.c
+++ b/bliss2dre.c
@@ -39,7 +39,7 @@ main(int argc, char *argv[])
{
int n,c;
unsigned long ne,j;
- vpair *elist,*vlist;
+ vpair *elist=NULL,*vlist=NULL;
int haven;
int i,v,w;
int haveptn;
--- a/complg.c
+++ b/complg.c
@@ -74,7 +74,7 @@ main(int argc, char *argv[])
int j,m,n,argnum;
int codetype,outcode;
graph *g;
- size_t ii,ned,nedc,nn,loops,loopsc,gwords;
+ size_t ii,ned,nedc,nn,loops,loopsc=0,gwords;
nauty_counter nin;
char *arg,sw;
static graph *gq;
--- a/cubhamg.c
+++ b/cubhamg.c
@@ -1961,7 +1961,7 @@ main(int argc, char *argv[])
double t0,t1;
cubgraph cub;
char *arg;
- nauty_counter count,mincount,maxcount,totalcount;
+ nauty_counter count,mincount=0,maxcount=0,totalcount;
int codetype;
HELP; PUTVERSION;
--- a/dreadnaut.c
+++ b/dreadnaut.c
@@ -389,7 +389,7 @@ main(int argc, char *argv[])
unsigned long uli;
size_t sli;
set *gp;
- double timebefore,timeafter,mintime;
+ double timebefore=0.0,timeafter=0.0,mintime;
char filename[515];
int sgn,sgorg,nperm;
int multiplicity,actmult;
--- a/dretodot.c
+++ b/dretodot.c
@@ -252,7 +252,7 @@ double ComputeFontsize(int vtx) {
int
main(int argc, char *argv[])
{
- int m, n, c, a, i, j, k, end, n_count;
+ int m=0, n, c, a, i, j, k, end, n_count;
size_t j1, e_count;
int argnum, initorg, cell, numCol, modcode, vtx, refcode, MaxV, MaxE;
char *arg, sw;
@@ -266,10 +266,10 @@ main(int argc, char *argv[])
char model[10];
int numcells, flind, indivtx;
long minil, maxil;
- double hsize, vsize, fsize;
+ double hsize, vsize, fsize=0.0;
sparsegraph g, g1;
list *liststart, *listend;
- int nodescale, distance, StInd, StIndDist, RnkInd, RnkIndDist;
+ int nodescale, distance, StInd=0, StIndDist, RnkInd, RnkIndDist=0;
HELP; PUTVERSION;
--- a/genbg.c
+++ b/genbg.c
@@ -1192,7 +1192,7 @@ genextend(graph *g, int n2, int *deg, in
graph gx[MAXN];
int degx[MAXN];
boolean rigidx;
- int dneed,need,nfeet,hideg,deg1,ft[MAXN],nfrag,frag[MAXN];
+ int dneed,need,nfeet=0,hideg,deg1,ft[MAXN],nfrag=0,frag[MAXN];
#ifdef INSTRUMENT
boolean haschild;
--- a/genquarticg.c
+++ b/genquarticg.c
@@ -226,8 +226,8 @@ STATIC_POPCNTFUNC(void,extend,
(int n, graph *g, edgestruct *edge, pairstruct *epair, int numpair,
int *epairorbit, int *multar, setword *zar, int *col00w, boolean 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,
+ int vm1, vm2, vm3, vm4, vt1, vt2, vt3, vt4, c, b, mcol1=0,
+ tcol, got_one, i, j, numpair1, numdovi, maxdovi=0, i1, j1, i2, j2,
temp, mult, multm, rely, numedge, dcol, dcolp, e1, e2;
int firsttime[MAXN], firsttimey[MAXN], multar1[MAXN],
col00[MAXN], col00w1[MAXN], doviorbit[3*MAXN],
@@ -242,7 +242,7 @@ STATIC_POPCNTFUNC(void,extend,
dovistruct dovi[3*MAXN];
dovistruct dovimax;
register setword gi1, gi2, gj1, gj2;
- boolean conf;
+ boolean conf=FALSE;
/////////////////////////////////////////////////////////////////////////
if( n == splitlevel )
--- a/genrang.c
+++ b/genrang.c
@@ -1087,7 +1087,7 @@ main(int argc, char *argv[])
static FILE *outfile;
char *outfilename;
sparsegraph sg;
- boolean usesparse,digraph,bipartite;
+ boolean usesparse,digraph,bipartite=FALSE;
#if MAXN
graph g[MAXM*1L*MAXN];
--- a/gtnauty.c
+++ b/gtnauty.c
@@ -682,7 +682,7 @@ istransitive(graph *g, int m, int n, gra
int i,inv;
set *gw;
short wt;
- int d,inv0,v,w;
+ int d,inv0=0,v,w;
statsblk stats;
static DEFAULTOPTIONS_GRAPH(options);
#if MAXN
--- a/gtools.c
+++ b/gtools.c
@@ -445,8 +445,8 @@ char*
getecline(FILE *f) /* read an edge_code line */
/* No trailing \n or \0 is added. Immediate EOF causes NULL return. */
{
- size_t headsize,bodysize;
- int sizesize,edgesize;
+ size_t headsize=0,bodysize=0;
+ int sizesize=0,edgesize=0;
int c1,c,i;
DYNALLSTAT(unsigned char,s,s_sz);
@@ -657,7 +657,7 @@ stringtograph(char *s, graph *g, int m)
/* Assumes g is big enough to hold it. */
{
char *p;
- int n,i,j,k,v,x,nb,need;
+ int n,i,j,k,v,x=0,nb,need;
size_t ii;
set *gi,*gj;
boolean done;
@@ -800,7 +800,7 @@ stringtograph_inc(char *s, graph *g, int
*/
{
char *p;
- int n,i,j,k,v,x,nb,need;
+ int n,i,j,k,v,x=0,nb,need;
size_t ii;
set *gi,*gj;
boolean done;
@@ -955,7 +955,7 @@ readgg(FILE *f, graph *g, int reqm, int
*/
{
char *s,*p;
- int m,n;
+ int m=0,n;
if ((readg_line = gtools_getline(f)) == NULL) return NULL;
@@ -1108,7 +1108,7 @@ readgg_inc(FILE *f, graph *g, int reqm,
*/
{
char *s,*p;
- int m,n;
+ int m=0,n;
if ((readg_line = gtools_getline(f)) == NULL) return NULL;
@@ -1219,7 +1219,7 @@ stringtosparsegraph(char *s, sparsegraph
* Also returns the number of loops */
{
char *p,*q;
- int n,nde,i,j,k,vv,x,nb,need;
+ int n,nde,i,j,k,vv,x=0,nb,need;
int *d,*e;
size_t *v;
int loops;
--- a/gutil1.c
+++ b/gutil1.c
@@ -163,7 +163,9 @@ POPCNTFUNC(void,degstats2,
return;
}
-#if !MAXN
+#if MAXN
+ memset(indeg, 0, MAXN * sizeof(int));
+#else
if (digraph)
{
DYNALLOC1(int,indeg,indeg_sz,n,"degstats2");
--- a/gutil2.c
+++ b/gutil2.c
@@ -457,7 +457,7 @@ POPCNTFUNC(int,conncontent,(graph *g, in
graph h[WORDSIZE];
setword gj;
int i,j,v1,v2,x,y;
- int minv,mindeg,deg,goodv;
+ int minv=0,mindeg,deg,goodv;
long ne;
if (m > 1) ABORT("conncontent only implemented for m=1");
--- a/hamheuristic.c
+++ b/hamheuristic.c
@@ -252,14 +252,14 @@ main(int argc, char *argv[])
{
sparsegraph sg;
int n,codetype;
- int argnum,i,j,outcode,tvalue;
+ int argnum,i,j,outcode=0,tvalue;
char *arg,sw;
boolean badargs;
boolean pswitch,sswitch,gswitch,qswitch,Lswitch,tswitch,vswitch,uswitch;
long Lvalue;
double t;
char *infilename,*outfilename;
- FILE *infile,*outfile;
+ FILE *infile,*outfile=NULL;
nauty_counter nin,nout,nNO,nYES,nTIMEOUT;
int status;
DYNALLSTAT(int,cyc,cyc_sz);
--- a/labelg.c
+++ b/labelg.c
@@ -99,14 +99,14 @@ main(int argc, char *argv[])
sparsegraph sg,sh;
int m,n,codetype;
int argnum,j,outcode;
- char *arg,sw,*fmt;
+ char *arg,sw,*fmt = NULL;
boolean badargs,digraph;
boolean sswitch,gswitch,qswitch,fswitch,Oswitch;
boolean iswitch,Iswitch,Kswitch,Mswitch,Sswitch;
boolean uswitch,tswitch,Cswitch,Wswitch,zswitch;
boolean dooutput;
int tabsize,outinvar;
- int inv,mininvarlevel,maxinvarlevel,invararg;
+ int inv,mininvarlevel=0,maxinvarlevel=0,invararg;
long minil,maxil;
double t;
char *infilename,*outfilename;
--- a/linegraphg.c
+++ b/linegraphg.c
@@ -27,7 +27,7 @@ linegraph(sparsegraph *g, sparsegraph *h
size_t *gv,*hv;
int gnv,hnv,jj;
size_t i,j,k,gnde,hnde,xhnde,num;
- size_t hi,lo,mid,v,w;
+ size_t hi,lo,mid=0,v,w;
sortlists_sg(g);
SG_VDE(g,gv,gd,ge);
@@ -113,7 +113,7 @@ totalgraph(sparsegraph *g, sparsegraph *
size_t *gv,*hv;
int gnv,hnv,jj;
size_t i,j,k,gnde,hnde,xhnde,num;
- size_t hi,lo,mid,v,w;
+ size_t hi,lo,mid=0,v,w;
sortlists_sg(g);
SG_VDE(g,gv,gd,ge);
--- a/listg.c
+++ b/listg.c
@@ -529,7 +529,7 @@ main(int argc, char *argv[])
boolean sswitch,Mswitch,Wswitch,Lswitch,Eswitch;
boolean bswitch,Gswitch,yswitch,Yswitch,Hswitch;
int linelength;
- char *infilename,*outfilename,*yarg;
+ char *infilename,*outfilename,*yarg=NULL;
HELP; PUTVERSION;
--- a/multig.c
+++ b/multig.c
@@ -895,7 +895,7 @@ main(int argc, char *argv[])
{
graph *g;
graph gg[MAXNV*SETWORDSNEEDED(MAXNV)];
- int i,m,n,ne,codetype;
+ int i,m,n,ne=0,codetype;
int argnum,j,nfixed,maxdeg,regdeg,ldeg;
char *arg,sw;
boolean badargs;
--- a/naugraph.c
+++ b/naugraph.c
@@ -193,7 +193,7 @@ POPCNTFUNC(void,refine,(graph *g, int *l
int cnt,bmin,bmax;
long longcode;
set *gptr;
- int maxcell,maxpos,hint;
+ int maxcell,maxpos=0,hint;
DEF_DYNINT(workperm,n,"refine");
DEF_DYNSET(workset,m,"refine");
@@ -346,7 +346,7 @@ POPCNTFUNC(void,refine1,(graph *g, int *
int cnt,bmin,bmax;
long longcode;
set *gptr,workset0;
- int maxcell,maxpos,hint;
+ int maxcell,maxpos=0,hint;
DEF_DYNINT(workperm,n,"refine1");
DEF_DYNINT(bucket,n+2,"refine1");
--- a/nautinv.c
+++ b/nautinv.c
@@ -1575,7 +1575,7 @@ STATIC_POPCNTFUNC(int,semirefine,
int cnt,bmin,bmax;
long longcode;
set *gptr;
- int maxcell,maxpos,hint;
+ int maxcell,maxpos=0,hint;
DEF_DYNINT(workperm,n,"refine");
DEF_DYNSET(workset,m,"refine");
--- a/nauty.c
+++ b/nauty.c
@@ -565,7 +565,7 @@ firstpathnode(int *lab, int *ptn, int le
#endif
{
int tv;
- int tv1,index,rtnlevel,tcellsize,tc,childcount,qinvar,refcode;
+ int tv1,index,rtnlevel,tcellsize,tc,childcount=0,qinvar,refcode;
#if !MAXN
set *tcell;
tcnode *tcnode_this;
--- a/planarg.c
+++ b/planarg.c
@@ -171,7 +171,7 @@ int
main(int argc, char *argv[])
{
char *infilename,*outfilename;
- FILE *infile,*outfile;
+ FILE *infile,*outfile=NULL;
sparsegraph sg;
boolean badargs;
boolean verbose,nonplanar,quiet;
--- a/planarity.c
+++ b/planarity.c
@@ -803,7 +803,7 @@ sparseg_adjl_remove_dir_edge_no_red (t_v
A will be left with "holes"
*/
{
- int cur_e, prev_e;
+ int cur_e, prev_e=0;
cur_e = V[u].first_edge;
if (cur_e == NIL)
@@ -4687,7 +4687,7 @@ embedg_recover_embedding (
- for edge e, find its index in A: this should be found
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;
+ int index_embed, v, mult, w, v_w_in_embed=0, new_first_edge;
boolean set_next;
IF_DEB(
@@ -7552,7 +7552,7 @@ sparseg_adjl_dfs_preprocessing (
according to their lowpoint value
*/
lowpoint_order = (int *) mem_malloc(sizeof(int) * n);
- temp = (t_dlcl **) mem_malloc(sizeof(t_dlcl *) * n);
+ temp = (t_dlcl **) calloc(sizeof(t_dlcl *), n);
new_dfs_tree = (t_dlcl **) mem_malloc(sizeof(t_dlcl *) * n);
/*
--- a/productg.c
+++ b/productg.c
@@ -99,7 +99,7 @@ void
arg_oct(char **ps, int *val, char *id)
{
int code;
- long longval;
+ long longval=0;
code = longoctvalue(ps,&longval);
*val = longval;
--- a/schreier.c
+++ b/schreier.c
@@ -558,7 +558,7 @@ filterschreier(schreier *gp, int *p, per
schreier *sh;
int *orbits,*pwr;
permnode **vec,*curr;
- boolean changed,lchanged,ident;
+ boolean changed,lchanged,ident=FALSE;
#if !MAXN
DYNALLOC1(int,workperm,workperm_sz,n,"filterschreier");
#endif
@@ -774,7 +774,7 @@ getorbitsmin(int *fix, int nfix, schreie
{
schreier *sh,*sha;
int *fixorbs;
- int i,j,k,icell,nfails,wordlen,skips;
+ int i,j,k,icell=0,nfails,wordlen,skips;
permnode *pn;
#if !MAXN
DYNALLOC1(int,workperm2,workperm2_sz,n,"expandschreier");
--- a/shortg.c
+++ b/shortg.c
@@ -280,11 +280,11 @@ int
main(int argc, char *argv[])
{
char *infilename,*outfilename;
- FILE *infile,*outfile;
- FILE *sortin,*sortout;
+ FILE *infile,*outfile=NULL;
+ FILE *sortin=NULL,*sortout=NULL;
int status,loops;
char *dstr,*cdstr,*prevdstr,*prevcdstr;
- char sw,*fmt;
+ char sw,*fmt=NULL;
boolean badargs,quiet,vswitch,dswitch,kswitch,format,uswitch;
boolean iswitch,Iswitch,Kswitch,Tswitch;
boolean zswitch,sswitch,gswitch,Sswitch,tswitch;
@@ -292,7 +292,7 @@ main(int argc, char *argv[])
nauty_counter numread,prevnumread,numwritten,classsize;
int m,n,i,ii,argnum,line;
int outcode,codetype;
- int inv,mininvarlevel,maxinvarlevel,invararg;
+ int inv,mininvarlevel=0,maxinvarlevel=0,invararg;
long minil,maxil;
pid_t sortpid;
graph *g;
--- a/showg.c
+++ b/showg.c
@@ -559,7 +559,7 @@ stringtograph(char *s, graph *g, int m)
/* Assumes g is big enough to hold it. */
{
char *p;
- int n,i,j,k,v,x,nb,need;
+ int n,i,j,k,v,x=0,nb,need;
size_t ii;
set *gi,*gj;
boolean done;
@@ -703,7 +703,7 @@ readgg(FILE *f, graph *g, int reqm, int
{
char *s,*p;
int m,n;
- int readg_code;
+ int readg_code=0;
if ((s = showg_getline(f)) == NULL) return NULL;
--- a/subdivideg.c
+++ b/subdivideg.c
@@ -26,7 +26,7 @@ subdivisiongraph(sparsegraph *g, int k,
size_t *gv,*hv;
int gnv,hnv;
size_t i,j,l,gnde,hnde,num;
- size_t hi,lo,mid,w;
+ size_t hi,lo,mid=0,w;
sortlists_sg(g);
if (k == 0)
--- a/traces.c
+++ b/traces.c
@@ -1386,7 +1386,7 @@ int traces_refine(Candidate *Cand,
int newtrace = FALSE;
int Sparse = TRUE;
int *lab, *cls, *InvLab, *TracePos, *SplitCell, *LabCell, *TraceEnd, Traceccend, *Tracestpend;
- int BigCell, BigCellPos, BigCellSize;
+ int BigCell=0, BigCellPos=0, BigCellSize=0;
boolean TraceCell = FALSE;
int *nghb;
int conta;
@@ -2158,7 +2158,7 @@ void traces_refine_notrace(Candidate *Ca
int Split = 0;
int Sparse = TRUE;
int *lab, *cls, *InvLab, *SplitCell, *LabCell;
- int BigCell, BigCellPos, BigCellSize;
+ int BigCell=0, BigCellPos=0, BigCellSize=0;
int *nghb;
const int variation = 1;
int currentweight, weightstart, weightend, currentcell, currentsize;
@@ -2754,7 +2754,7 @@ void traces_refine_maketrie(Candidate *C
int Split = 0;
int Sparse = TRUE;
int *lab, *cls, *InvLab, *SplitCell, *LabCell;
- int BigCell, BigCellPos, BigCellSize;
+ int BigCell=0, BigCellPos=0, BigCellSize=0;
int *nghb;
const int variation = 1;
int currentweight, weightstart, weightend, currentcell, currentsize;
@@ -3331,7 +3331,7 @@ int traces_refine_comptrie(Candidate *Ca
int Split = 0;
int Sparse = TRUE;
int *lab, *cls, *InvLab, *SplitCell, *LabCell;
- int BigCell, BigCellPos, BigCellSize;
+ int BigCell=0, BigCellPos=0, BigCellSize=0;
int *nghb;
const int variation = 1;
int currentweight, weightstart, weightend, currentcell, currentsize;
@@ -3913,7 +3913,7 @@ int traces_refine_sametrace(Candidate *C
unsigned int longcode;
int Sparse = TRUE;
int *lab, *cls, *InvLab, *TracePos, *SplitCell, *LabCell, *TraceEnd, Traceccend, *Tracestpend;
- int BigCell, BigCellPos, BigCellSize;
+ int BigCell=0, BigCellPos=0, BigCellSize=0;
boolean TraceCell = FALSE;
int *nghb;
const int variation = 0;
@@ -4755,7 +4755,7 @@ void refine_tr_refine(Candidate *Cand,
int newtrace = FALSE;
int Sparse = TRUE;
int *lab, *cls, *InvLab, *TracePos, *SplitCell, *LabCell, TraceEnd, Traceccend, Tracestpend;
- int BigCell, BigCellPos, BigCellSize;
+ int BigCell=0, BigCellPos=0, BigCellSize=0;
boolean TraceCell = FALSE;
int *nghb;
const int variation = 0;
@@ -6378,7 +6378,7 @@ int CompStage0(Partition *CurrPart, Part
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;
+ boolean closeloop=FALSE, firstsing, has_nexttcell;
Candidate *SpTLliststart, *AuxCand;
searchtrie *TreeNode, *TreeNode1, *TreeNode2;
@@ -10173,12 +10173,11 @@ struct trie *trie_make(trie *t, int valu
struct trie *trie_new(int n, struct TracesVars* tv) {
- TrieArray[0] = malloc(n*sizeof(trie));
+ TrieArray[0] = calloc(n, sizeof(trie));
if (TrieArray[0] == NULL) {
fprintf(ERRFILE, "\nError, memory not allocated.\n");
exit(1);
}
- TrieArray[0][0].first_child = TrieArray[0][0].next_sibling = NULL;
tv->triepos = 0;
tv->trienext = 1;
return TrieArray[0];

211
nauty-zlib-blisstog.patch Normal file
View File

@ -0,0 +1,211 @@
Description: implement zlib support to blisstog utility
zlib is implemented to handle directly flate and compress files
for the blisstog nauty tool.
Origin: debian
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2016-03-18
--- a/blisstog.c
+++ b/blisstog.c
@@ -9,45 +9,37 @@
-n#:# Specify a range of n values for output\n\
Input files with name *.gz are ungzipped\n"
-#define ZCAT "gunzip -c" /* name of zcat command (might be "gunzip -c") */
-
/*************************************************************************/
+#include <zlib.h>
#include "gtools.h"
+#define BUFSIZE 256
+
typedef struct
{
int v,w;
} vpair;
-static int
-nextchar(FILE *f)
-{
- char s[2];
-
- if (fscanf(f,"%1s",s) != 1) return EOF;
- else return s[0];
-}
-
static boolean
-readblissgraph(FILE *f, sparsegraph *g)
+readblissgraph(gzFile f, sparsegraph *g)
/* Reads a graph from Bliss format into a sparse graph */
{
- int n,c;
+ int n;
unsigned long ne,j;
int haven;
int i,v,w;
- int haveptn;
DYNALLSTAT(vpair,elist,elist_sz);
+ char buffer[BUFSIZE];
+ memset(buffer, '\0', BUFSIZE);
haven = 0;
j = 0;
- while ((c = nextchar(f)) >= 0)
+ while (gzgets(f, buffer, BUFSIZE) != NULL && strlen(buffer) < BUFSIZE - 1)
{
- switch (c)
+ switch (*buffer)
{
case 'c':
- while ((c = getc(f)) != '\n' && c != EOF) {}
break;
case 'p':
@@ -56,7 +48,7 @@
fprintf(stderr,"Duplicate p line\n");
exit(1);
}
- if (fscanf(f," edge %d %lu",&n,&ne) != 2)
+ if (sscanf(buffer,"p edge %d %lu",&n,&ne) != 2)
{
fprintf(stderr,"Bad p line\n");
return FALSE;
@@ -71,7 +63,7 @@
fprintf(stderr,"Missing p line\n");
return FALSE;
}
- if (fscanf(f,"%d%d",&w,&v) != 2 || w < 1 || w > n)
+ if (sscanf(buffer,"n %d%d",&w,&v) != 2 || w < 1 || w > n)
{
fprintf(stderr,"Bad n line\n");
return FALSE;
@@ -84,7 +76,7 @@
fprintf(stderr,"Missing p line or too many e lines\n");
return FALSE;
}
- if (fscanf(f,"%d%d",&v,&w) != 2 || v < 1 || w < 1 || v > n || w > n)
+ if (sscanf(buffer,"e %d%d",&v,&w) != 2 || v < 1 || w < 1 || v > n || w > n)
{
fprintf(stderr,"Bad e line\n");
return FALSE;
@@ -94,11 +86,22 @@
break;
default:
- fprintf(stderr,"Unknown line %c\n",c);
+ fprintf(stderr,"Unknown line\n");
return FALSE;
}
}
+ if (errno)
+ {
+ fputs("Corrupted data file\n", stderr);
+ return FALSE;
+ }
+ else if (strlen(buffer) == BUFSIZE - 1)
+ {
+ fputs("Corruped data line\n", stderr);
+ return FALSE;
+ }
+
if (j != ne)
{
fprintf(stderr,"Wrong number of e lines\n");
@@ -135,13 +138,10 @@
int
main(int argc, char *argv[])
{
- FILE *infile;
+ gzFile infile;
int j,firstarg;
SG_DECL(g);
- size_t flen;
- boolean ispipe;
int nmin,nmax;
- char zcmd[515];
HELP; PUTVERSION;
@@ -160,53 +160,46 @@
if (argc == firstarg)
{
- if (!readblissgraph(stdin,&g))
+ if ((infile = gzdopen(STDIN_FILENO,"r")) == NULL)
{
- fprintf(stderr,">E Bliss error in file %s\n","stdin");
+ fputs(">E Can't open stdin\n", stderr);
gt_abort(NULL);
}
else
- writes6_sg(stdout,&g);
+ {
+ if (!readblissgraph(stdin,&g))
+ {
+ fprintf(stderr,">E Bliss error in file %s\n","stdin");
+ gt_abort(NULL);
+ }
+ else
+ writes6_sg(stdout,&g);
+ gzclose(infile);
+ }
}
else
{
for (j = firstarg; j < argc; ++j)
{
- flen = strlen(argv[j]);
- if (flen >= 3 && strcmp(argv[j]+flen-3,".gz") == 0)
- {
- sprintf(zcmd,"%s \"%s\"",ZCAT,argv[j]);
- if ((infile = popen(zcmd,"r")) == NULL)
- {
- fprintf(stderr,
- ">E blisstog: cannot open zcat pipe for \"%s\"\n",
- argv[j]);
- gt_abort(NULL);
- }
- ispipe = TRUE;
- }
- else
- {
- if ((infile = fopen(argv[j],"r")) == NULL)
- {
- fprintf(stderr,">E Can't open file %s\n",argv[j]);
- gt_abort(NULL);
- }
- ispipe = FALSE;
- }
-
- if (!readblissgraph(infile,&g))
+ if ((infile = gzopen(argv[j],"r")) == NULL)
{
- fprintf(stderr,">E Bliss error in file %s\n",argv[j]);
+ fprintf(stderr,">E Can't open file %s\n",argv[j]);
gt_abort(NULL);
}
- else if (nmax < 0 || (g.nv >= nmin && g.nv <= nmax))
- {
- sortlists_sg(&g);
- writes6_sg(stdout,&g);
+ else
+ {
+ if (!readblissgraph(infile,&g))
+ {
+ fprintf(stderr,">E Bliss error in file %s\n",argv[j]);
+ gt_abort(NULL);
+ }
+ else if (nmax < 0 || (g.nv >= nmin && g.nv <= nmax))
+ {
+ sortlists_sg(&g);
+ writes6_sg(stdout,&g);
+ }
+ gzclose(infile);
}
-
- if (ispipe) pclose(infile); else fclose(infile);
}
}

View File

@ -1,206 +0,0 @@
Invoke zlib functions rather than calling gunzip in a subprocess.
Inspired by the debian nauty-zlib-blisstog patch.
--- a/dimacs2g.c 2022-11-15 22:15:46.000000000 -0700
+++ b/dimacs2g.c 2022-11-16 14:11:09.504416535 -0700
@@ -17,17 +17,10 @@
/*************************************************************************/
+#include <zlib.h>
#include "gtools.h"
-#if HAVE_GUNZIP && HAVE_POPEN
-#if !POPEN_DEC
-extern FILE *popen(const char *command, const char *type);
-extern int pclose(FILE *stream);
-#endif
-#endif
-
-#define GUNZIP "gunzip -c"
-
+#define BUFSIZE 256
#define MAXCOMMENT 200
static char comment[MAXCOMMENT+3];
static int commentlen;
@@ -37,40 +30,30 @@ typedef struct
int v,w;
} vpair;
-static int
-nextchar(FILE *f)
-{
- char s[2];
-
- if (fscanf(f,"%1s",s) != 1) return EOF;
- else return s[0];
-}
-
static boolean
-readdimacsgraph(FILE *f, sparsegraph *g)
+readdimacsgraph(gzFile f, sparsegraph *g)
/* Reads a graph from Bliss format into a sparse graph */
{
- int n,c;
+ int n;
unsigned long ne,j;
int haven;
int i,v,w;
- int haveptn;
DYNALLSTAT(vpair,elist,elist_sz);
+ char buffer[BUFSIZE];
+ memset(buffer, '\0', BUFSIZE);
commentlen = 0;
haven = 0;
j = 0;
- while ((c = nextchar(f)) >= 0)
+ while (gzgets(f, buffer, BUFSIZE) != NULL && strlen(buffer) < BUFSIZE - 1)
{
- switch (c)
+ switch (*buffer)
{
case 'c':
- commentlen = 0;
- while ((c = getc(f)) != '\n' && c != EOF)
- {
- if (commentlen < MAXCOMMENT)
- comment[commentlen++] = c;
- }
+ commentlen = strlen(buffer);
+ if (commentlen > MAXCOMMENT)
+ commentlen = MAXCOMMENT;
+ memcpy(comment, &buffer[1], commentlen);
comment[commentlen] = '\0';
break;
@@ -80,7 +63,7 @@ readdimacsgraph(FILE *f, sparsegraph *g)
fprintf(stderr,"Duplicate p line\n");
exit(1);
}
- if (fscanf(f," edge %d %lu",&n,&ne) != 2)
+ if (sscanf(&buffer[1]," edge %d %lu",&n,&ne) != 2)
{
fprintf(stderr,"Bad p line\n");
return FALSE;
@@ -95,7 +78,7 @@ readdimacsgraph(FILE *f, sparsegraph *g)
fprintf(stderr,"Missing p line\n");
return FALSE;
}
- if (fscanf(f,"%d%d",&w,&v) != 2 || w < 1 || w > n)
+ if (sscanf(&buffer[1],"%d%d",&w,&v) != 2 || w < 1 || w > n)
{
fprintf(stderr,"Bad n line\n");
return FALSE;
@@ -108,7 +91,7 @@ readdimacsgraph(FILE *f, sparsegraph *g)
fprintf(stderr,"Missing p line or too many e lines\n");
return FALSE;
}
- if (fscanf(f,"%d%d",&v,&w) != 2 || v < 1 || w < 1 || v > n || w > n)
+ if (sscanf(&buffer[1],"%d%d",&v,&w) != 2 || v < 1 || w < 1 || v > n || w > n)
{
fprintf(stderr,"Bad e line\n");
return FALSE;
@@ -118,11 +101,22 @@ readdimacsgraph(FILE *f, sparsegraph *g)
break;
default:
- fprintf(stderr,"Unknown line %c\n",c);
+ fprintf(stderr,"Unknown line %c\n",*buffer);
return FALSE;
}
}
+ if (errno)
+ {
+ fputs("Corrupted data file\n", stderr);
+ return FALSE;
+ }
+ else if (strlen(buffer) == BUFSIZE - 1)
+ {
+ fputs("Corruped data line\n", stderr);
+ return FALSE;
+ }
+
if (j != ne)
{
fprintf(stderr,"Wrong number of e lines\n");
@@ -159,13 +153,11 @@ readdimacsgraph(FILE *f, sparsegraph *g)
int
main(int argc, char *argv[])
{
- FILE *infile;
+ gzFile infile;
int j,firstarg;
SG_DECL(g);
- size_t flen;
- boolean nocomment,nofiles,nswitch,iszip,dreadnaut,badargs;
+ boolean nocomment,nofiles,nswitch,dreadnaut,badargs;
long nmin,nmax;
- char zcmd[550];
char *arg,sw;
char *prestring,*poststring;
@@ -212,35 +204,21 @@ main(int argc, char *argv[])
for (j = firstarg; j < argc || nofiles; ++j)
{
if (nofiles)
- infile = stdin;
- else
{
- flen = strlen(argv[j]);
- if (flen >= 3 && strcmp(argv[j]+flen-3,".gz") == 0)
+ infile = gzdopen(STDIN_FILENO,"r");
+ if (infile == NULL)
{
-#if HAVE_GUNZIP && HAVE_POPEN
- if (strlen(argv[j]) > 500) gt_abort(">E file name too long\n");
- sprintf(zcmd,"%s \"%s\"",GUNZIP,argv[j]);
- if ((infile = popen(zcmd,"r")) == NULL)
- {
- fprintf(stderr,
- ">E dimacs2g: cannot open gunzip pipe for \"%s\"\n",
- argv[j]);
- gt_abort(NULL);
- }
- iszip = TRUE;
-#else
- gt_abort(">E dimacs2g is not compiled with gunzip support\n");
-#endif
+ fputs(">E Can't open stdin\n",stderr);
+ gt_abort(NULL);
}
- else
+ }
+ else
+ {
+ infile = gzopen(argv[j],"r");
+ if (infile == NULL)
{
- if ((infile = fopen(argv[j],"r")) == NULL)
- {
- fprintf(stderr,">E Can't open file %s\n",argv[j]);
- gt_abort(NULL);
- }
- iszip = FALSE;
+ fprintf(stderr,">E Can't open file %s\n",argv[j]);
+ gt_abort(NULL);
}
}
@@ -270,14 +248,8 @@ main(int argc, char *argv[])
if (nofiles)
nofiles = FALSE;
- else if (iszip)
- {
-#if HAVE_GUNZIP && HAVE_POPEN
- pclose(infile);
-#endif
- }
else
- fclose(infile);
+ gzclose(infile);
}
exit(0);

5
nauty.rpmlintrc Normal file
View File

@ -0,0 +1,5 @@
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# Spelling errors
addFilter(r'W: spelling-error .* (automorphism|geng|gtools|multigraphs|(N|n)auty)')

View File

@ -1,24 +1,19 @@
%global nautybasever 2.7r3
%global nautytarver %(tr -d . <<< %{nautybasever})
Name: nauty
Version: 2.8.6
Release: 2%{?dist}
Version: %(tr r . <<< %{nautybasever})
Release: 1%{?dist}
Summary: Graph canonical labeling and automorphism group computation
%global nautytarver %(tr . _ <<< %{version})
# The projects as a whole is Apache-2.0.
# The bundled cliquer code in nautycliquer.c is GPL-2.0-or-later, but we patch
# it out.
# Other licenses are due to embedded fonts in the PDF manual.
# CM: Knuth-CTAN
# CM-Super: GPL-1.0-or-later
License: Apache-2.0 AND Knuth-CTAN AND GPL-1.0-or-later
License: ASL 2.0
URL: https://pallini.di.uniroma1.it/
Source0: https://pallini.di.uniroma1.it/%{name}%{nautytarver}.tar.gz
# Debian patch to fix the gt_numorbits declaration
Patch0: %{name}-fix-gt_numorbits.patch
# Use zlib instead of invoking zcat through a pipe
Patch1: %{name}-zlib-dimacs2g.patch
# Debian patch to use zlib instead of invoking zcat through a pipe
Patch1: %{name}-zlib-blisstog.patch
# Debian patch to improve usage and help information
Patch2: %{name}-help2man.patch
# Debian patch to add libtool support for building a shared library
@ -31,14 +26,6 @@ Patch5: %{name}-tool-prefix.patch
Patch6: %{name}-popcnt.patch
# Unbundle cliquer
Patch7: %{name}-unbundle-cliquer.patch
# Fix incorrect printf format strings
Patch8: %{name}-format.patch
# Fix uninitialized variable warnings
Patch9: %{name}-uninitialized.patch
# Fix a function that can fall off the end
Patch10: %{name}-fall-off.patch
# Mark functions as noreturn to improve compiler diagnostics
Patch11: %{name}-noreturn.patch
BuildRequires: cliquer-devel
BuildRequires: gcc
@ -70,7 +57,6 @@ multigraphs, and programs for manipulating files of graphs in a compact
format.
%package -n libnauty
License: Apache-2.0
Summary: Library for graph automorphism
%description -n libnauty
@ -79,7 +65,6 @@ automorphism groups of graphs and digraphs. This package contains a
library of nauty procedures.
%package -n libnauty-devel
License: Apache-2.0
Summary: Development files for libnauty
Requires: lib%{name}%{?_isa} = %{version}-%{release}
@ -92,22 +77,16 @@ This package contains files needed to develop programs that use libnauty.
# Remove the pregenerated makefile
rm -f makefile
# Inject the version number
sed -i 's/@INJECTVER@/%{version}/' configure.ac
# Regenerate the configure script with libtool support
autoreconf -fi
# Fix the pkgconfig file on 64-bit systems
if [ '%{_lib}' != 'lib' ]; then
sed -i 's,/lib,/lib64,' nauty.pc
fi
%build
# The runtime popcnt support used to work for 32-bit x86 as well. But then
# GCC 12 arrived, and the runtime popcnt support led to failing tests on CPUs
# that have the popcnt instruction. I don't care enough about that platform
# to spend time debugging the issue.
export CFLAGS="%{build_cflags} -fwrapv -I%{_includedir}/cliquer"
export CFLAGS="%{optflags} -fwrapv -I%{_includedir}/cliquer"
%configure --disable-static --enable-generic \
%ifarch x86_64
%ifarch %ix86 x86_64
--enable-runtime-popcnt \
%endif
--enable-tls
@ -127,22 +106,18 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
# We do not want the libtool archives
rm %{buildroot}%{_libdir}/*.la
# Link identical executables
rm %{buildroot}%{_bindir}/nauty-pickg
ln -s nauty-countg %{buildroot}%{_bindir}/nauty-pickg
%check
LD_LIBRARY_PATH=$PWD/.libs PATH=$PWD:$PATH make check
LD_LIBRARY_PATH=$PWD/.libs make check
%files
%doc README nug28.pdf
%doc README nug27.pdf
%{_bindir}/dreadnaut
%{_bindir}/nauty-*
%{_mandir}/man1/dreadnaut.1*
%{_mandir}/man1/nauty-*.1*
%files -n libnauty
%doc changes24-28.txt formats.txt
%doc changes24-27.txt formats.txt
%license COPYRIGHT
%{_libdir}/libnauty*.so.2*
@ -153,27 +128,6 @@ LD_LIBRARY_PATH=$PWD/.libs PATH=$PWD:$PATH make check
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Nov 16 2022 Jerry James <loganjerry@gmail.com> - 2.8.6-1
- Version 2_8_6
- Convert License tag to SPDX
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jul 1 2022 Jerry James <loganjerry@gmail.com> - 2.7.4-1
- Version 2.7r4
- Add -fall-off and -noreturn patches
* Thu Jan 27 2022 Jerry James <loganjerry@gmail.com> - 2.7.3-2
- Disable popcnt support on i386 due to test failures
- Add -format and -uninitialized patches
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Sep 6 2021 Jerry James <loganjerry@gmail.com> - 2.7.3-1
- Version 2.7.3

View File

@ -1 +1 @@
SHA512 (nauty2_8_6.tar.gz) = 0620113185ed89e06aa889317ded1a45184f8de3dde0b69e4144d4f49cb780b4c88dd46e91aadea094e6da1d4bd1f0453282f4450c83c61b3b50d2970cdbd43c
SHA512 (nauty27r3.tar.gz) = 8d6d92de8d348d3874677a55773088f4ff5b9a45fd9ed3802c9b1590072f5861946ac1d21892f4b383a9e36f6c9ac08270d021429cf36da3e5038e6a38d9fb6c