From dace9aa3265b95725e5541bed89367fdca873b06 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Sat, 28 Jul 2018 12:31:25 -0500 Subject: Moved life.man to life.6 Updated life.6 version Removed info link in life.6 Tagged and tarballed life-1.3.3.tar.gz Signed-off-by: Aiden Woodruff --- Makefile.am | 2 +- Makefile.in | 48 ++++++------- cmdline-life.c | 112 +++++++++++++++++++++++++------ cmdline-life.h | 15 +++-- configure | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++--- configure.ac | 2 +- life-1.3.2.tar.gz | 0 life-1.3.3.tar.gz | Bin 0 -> 115061 bytes life.6 | 42 ++++++++++++ life.man | 54 --------------- 10 files changed, 356 insertions(+), 116 deletions(-) delete mode 100644 life-1.3.2.tar.gz create mode 100644 life-1.3.3.tar.gz create mode 100644 life.6 delete mode 100644 life.man diff --git a/Makefile.am b/Makefile.am index 3eea097..e9bb78a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,5 +3,5 @@ bin_PROGRAMS = life life_SOURCES = life.c cmdline-life.c updatemap.c menus.c life_CFLAGS = -I$(srcdir) include_HEADERS = life.h updatemap.h menus.h cmdline-life.h -man_MANS = life.man +man_MANS = life.6 EXTRA_DIST = $(man_MANS) diff --git a/Makefile.in b/Makefile.in index 324cc3e..20279d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,7 +101,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(manmdir)" \ +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man6dir)" \ "$(DESTDIR)$(includedir)" PROGRAMS = $(bin_PROGRAMS) am_life_OBJECTS = life-life.$(OBJEXT) life-cmdline-life.$(OBJEXT) \ @@ -176,7 +176,7 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -manmdir = $(mandir)/manm +man6dir = $(mandir)/man6 NROFF = nroff MANS = $(man_MANS) HEADERS = $(include_HEADERS) @@ -204,7 +204,7 @@ CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README compile depcomp \ - install-sh mdate-sh missing texinfo.tex + install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -314,7 +314,7 @@ AM_OPTIONS = gnu life_SOURCES = life.c cmdline-life.c updatemap.c menus.c life_CFLAGS = -I$(srcdir) include_HEADERS = life.h updatemap.h menus.h cmdline-life.h -man_MANS = life.man +man_MANS = life.6 EXTRA_DIST = $(man_MANS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -496,49 +496,49 @@ life-menus.obj: menus.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='menus.c' object='life-menus.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(life_CFLAGS) $(CFLAGS) -c -o life-menus.obj `if test -f 'menus.c'; then $(CYGPATH_W) 'menus.c'; else $(CYGPATH_W) '$(srcdir)/menus.c'; fi` -install-manm: $(man_MANS) +install-man6: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ - test -n "$(manmdir)" \ + test -n "$(man6dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(manmdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(manmdir)" || exit 1; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man6dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man6dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.m[a-z]*$$/p'; \ + | sed -n '/\.6[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^m][0-9a-z]*$$,m,;x' \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(manmdir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(manmdir)/$$inst" || exit $$?; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(manmdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(manmdir)" || exit $$?; }; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man6dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man6dir)" || exit $$?; }; \ done; } -uninstall-manm: +uninstall-man6: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(manmdir)" || exit 0; \ + @list=''; test -n "$(man6dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.m[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^m][0-9a-z]*$$,m,;x' \ + sed -n '/\.6[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(manmdir)'; $(am__uninstall_files_from_dir) + dir='$(DESTDIR)$(man6dir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -787,7 +787,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) config.h installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(manmdir)" "$(DESTDIR)$(includedir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man6dir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -859,7 +859,7 @@ install-info: install-info-am install-info-am: -install-man: install-manm +install-man: install-man6 install-pdf: install-pdf-am @@ -893,7 +893,7 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ uninstall-man -uninstall-man: uninstall-manm +uninstall-man: uninstall-man6 .MAKE: all install-am install-strip @@ -908,13 +908,13 @@ uninstall-man: uninstall-manm install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ - install-man install-manm install-pdf install-pdf-am install-ps \ + install-man install-man6 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-includeHEADERS uninstall-man \ - uninstall-manm + uninstall-man6 .PRECIOUS: Makefile diff --git a/cmdline-life.c b/cmdline-life.c index 1af24f6..e4d81c5 100644 --- a/cmdline-life.c +++ b/cmdline-life.c @@ -38,10 +38,16 @@ const char *gengetopt_args_info_detailed_help[] = { " --detailed-help Print help, including all details and hidden options,\n and exit", " -V, --version Print version and exit", " -r, --ruleint=rule Specify rule-int on command line (default=`6152')", - " -W, --width=width Specify width", - " -H, --height=height Specify height", - " -d, --delay=delay Specify delay time", + " -d, --delay=INT Specify delay time", " Specify delay time, multiplied by 10ms", + "\nDimensions:", + " -W, --width=INT Specify width", + " -H, --height=INT Specify height", + " -m, --maximize Maximize dimensions for terminal", + " If specified, cancels out height and/or width options", + "\nCharacters:", + " -L, --live=CH Character for a live cell", + " -D, --dead=CH Character for a dead cell", 0 }; @@ -53,15 +59,21 @@ init_help_array(void) gengetopt_args_info_help[2] = gengetopt_args_info_detailed_help[2]; gengetopt_args_info_help[3] = gengetopt_args_info_detailed_help[3]; gengetopt_args_info_help[4] = gengetopt_args_info_detailed_help[4]; - gengetopt_args_info_help[5] = gengetopt_args_info_detailed_help[5]; - gengetopt_args_info_help[6] = gengetopt_args_info_detailed_help[6]; - gengetopt_args_info_help[7] = 0; + gengetopt_args_info_help[5] = gengetopt_args_info_detailed_help[6]; + gengetopt_args_info_help[6] = gengetopt_args_info_detailed_help[7]; + gengetopt_args_info_help[7] = gengetopt_args_info_detailed_help[8]; + gengetopt_args_info_help[8] = gengetopt_args_info_detailed_help[9]; + gengetopt_args_info_help[9] = gengetopt_args_info_detailed_help[11]; + gengetopt_args_info_help[10] = gengetopt_args_info_detailed_help[12]; + gengetopt_args_info_help[11] = gengetopt_args_info_detailed_help[13]; + gengetopt_args_info_help[12] = 0; } -const char *gengetopt_args_info_help[8]; +const char *gengetopt_args_info_help[13]; typedef enum {ARG_NO + , ARG_STRING , ARG_INT } cmdline_parser_arg_type; @@ -85,9 +97,12 @@ void clear_given (struct gengetopt_args_info *args_info) args_info->detailed_help_given = 0 ; args_info->version_given = 0 ; args_info->ruleint_given = 0 ; + args_info->delay_given = 0 ; args_info->width_given = 0 ; args_info->height_given = 0 ; - args_info->delay_given = 0 ; + args_info->maximize_given = 0 ; + args_info->live_given = 0 ; + args_info->dead_given = 0 ; } static @@ -96,9 +111,13 @@ void clear_args (struct gengetopt_args_info *args_info) FIX_UNUSED (args_info); args_info->ruleint_arg = 6152; args_info->ruleint_orig = NULL; + args_info->delay_orig = NULL; args_info->width_orig = NULL; args_info->height_orig = NULL; - args_info->delay_orig = NULL; + args_info->live_arg = NULL; + args_info->live_orig = NULL; + args_info->dead_arg = NULL; + args_info->dead_orig = NULL; } @@ -111,9 +130,12 @@ void init_args_info(struct gengetopt_args_info *args_info) args_info->detailed_help_help = gengetopt_args_info_detailed_help[1] ; args_info->version_help = gengetopt_args_info_detailed_help[2] ; args_info->ruleint_help = gengetopt_args_info_detailed_help[3] ; - args_info->width_help = gengetopt_args_info_detailed_help[4] ; - args_info->height_help = gengetopt_args_info_detailed_help[5] ; - args_info->delay_help = gengetopt_args_info_detailed_help[6] ; + args_info->delay_help = gengetopt_args_info_detailed_help[4] ; + args_info->width_help = gengetopt_args_info_detailed_help[7] ; + args_info->height_help = gengetopt_args_info_detailed_help[8] ; + args_info->maximize_help = gengetopt_args_info_detailed_help[9] ; + args_info->live_help = gengetopt_args_info_detailed_help[12] ; + args_info->dead_help = gengetopt_args_info_detailed_help[13] ; } @@ -207,9 +229,13 @@ cmdline_parser_release (struct gengetopt_args_info *args_info) { free_string_field (&(args_info->ruleint_orig)); + free_string_field (&(args_info->delay_orig)); free_string_field (&(args_info->width_orig)); free_string_field (&(args_info->height_orig)); - free_string_field (&(args_info->delay_orig)); + free_string_field (&(args_info->live_arg)); + free_string_field (&(args_info->live_orig)); + free_string_field (&(args_info->dead_arg)); + free_string_field (&(args_info->dead_orig)); @@ -248,12 +274,18 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) write_into_file(outfile, "version", 0, 0 ); if (args_info->ruleint_given) write_into_file(outfile, "ruleint", args_info->ruleint_orig, 0); + if (args_info->delay_given) + write_into_file(outfile, "delay", args_info->delay_orig, 0); if (args_info->width_given) write_into_file(outfile, "width", args_info->width_orig, 0); if (args_info->height_given) write_into_file(outfile, "height", args_info->height_orig, 0); - if (args_info->delay_given) - write_into_file(outfile, "delay", args_info->delay_orig, 0); + if (args_info->maximize_given) + write_into_file(outfile, "maximize", 0, 0 ); + if (args_info->live_given) + write_into_file(outfile, "live", args_info->live_orig, 0); + if (args_info->dead_given) + write_into_file(outfile, "dead", args_info->dead_orig, 0); i = EXIT_SUCCESS; @@ -389,6 +421,7 @@ int update_arg(void *field, char **orig_field, char *stop_char = 0; const char *val = value; int found; + char **string_field; FIX_UNUSED (field); stop_char = 0; @@ -422,6 +455,14 @@ int update_arg(void *field, char **orig_field, case ARG_INT: if (val) *((int *)field) = strtol (val, &stop_char, 0); break; + case ARG_STRING: + if (val) { + string_field = (char **)field; + if (!no_free && *string_field) + free (*string_field); /* free previous string */ + *string_field = gengetopt_strdup (val); + } + break; default: break; }; @@ -499,13 +540,16 @@ cmdline_parser_internal ( { "detailed-help", 0, NULL, 0 }, { "version", 0, NULL, 'V' }, { "ruleint", 1, NULL, 'r' }, + { "delay", 1, NULL, 'd' }, { "width", 1, NULL, 'W' }, { "height", 1, NULL, 'H' }, - { "delay", 1, NULL, 'd' }, + { "maximize", 0, NULL, 'm' }, + { "live", 1, NULL, 'L' }, + { "dead", 1, NULL, 'D' }, { 0, 0, 0, 0 } }; - c = getopt_long (argc, argv, "hVr:W:H:d:", long_options, &option_index); + c = getopt_long (argc, argv, "hVr:d:W:H:mL:D:", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ @@ -569,14 +613,38 @@ cmdline_parser_internal ( goto failure; break; - case 'd': /* Specify delay time. */ + case 'm': /* Maximize dimensions for terminal. */ - if (update_arg( (void *)&(args_info->delay_arg), - &(args_info->delay_orig), &(args_info->delay_given), - &(local_args_info.delay_given), optarg, 0, 0, ARG_INT, + if (update_arg( 0 , + 0 , &(args_info->maximize_given), + &(local_args_info.maximize_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, - "delay", 'd', + "maximize", 'm', + additional_error)) + goto failure; + + break; + case 'L': /* Character for a live cell. */ + + + if (update_arg( (void *)&(args_info->live_arg), + &(args_info->live_orig), &(args_info->live_given), + &(local_args_info.live_given), optarg, 0, 0, ARG_STRING, + check_ambiguity, override, 0, 0, + "live", 'L', + additional_error)) + goto failure; + + break; + case 'D': /* Character for a dead cell. */ + + + if (update_arg( (void *)&(args_info->dead_arg), + &(args_info->dead_orig), &(args_info->dead_given), + &(local_args_info.dead_given), optarg, 0, 0, ARG_STRING, + check_ambiguity, override, 0, 0, + "dead", 'D', additional_error)) goto failure; diff --git a/cmdline-life.h b/cmdline-life.h index 480c83e..99579f3 100644 --- a/cmdline-life.h +++ b/cmdline-life.h @@ -56,17 +56,24 @@ struct gengetopt_args_info int height_arg; /**< @brief Specify height. */ char * height_orig; /**< @brief Specify height original value given at command line. */ const char *height_help; /**< @brief Specify height help description. */ - int delay_arg; /**< @brief Specify delay time. */ - char * delay_orig; /**< @brief Specify delay time original value given at command line. */ - const char *delay_help; /**< @brief Specify delay time help description. */ + const char *maximize_help; /**< @brief Maximize dimensions for terminal help description. */ + char * live_arg; /**< @brief Character for a live cell. */ + char * live_orig; /**< @brief Character for a live cell original value given at command line. */ + const char *live_help; /**< @brief Character for a live cell help description. */ + char * dead_arg; /**< @brief Character for a dead cell. */ + char * dead_orig; /**< @brief Character for a dead cell original value given at command line. */ + const char *dead_help; /**< @brief Character for a dead cell help description. */ unsigned int help_given ; /**< @brief Whether help was given. */ unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */ unsigned int version_given ; /**< @brief Whether version was given. */ unsigned int ruleint_given ; /**< @brief Whether ruleint was given. */ + unsigned int delay_given ; /**< @brief Whether delay was given. */ unsigned int width_given ; /**< @brief Whether width was given. */ unsigned int height_given ; /**< @brief Whether height was given. */ - unsigned int delay_given ; /**< @brief Whether delay was given. */ + unsigned int maximize_given ; /**< @brief Whether maximize was given. */ + unsigned int live_given ; /**< @brief Whether live was given. */ + unsigned int dead_given ; /**< @brief Whether dead was given. */ } ; diff --git a/configure b/configure index c29ff27..bbba70b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for life 1.0.0. +# Generated by GNU Autoconf 2.69 for life 1.3.3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='life' PACKAGE_TARNAME='life' -PACKAGE_VERSION='1.0.0' -PACKAGE_STRING='life 1.0.0' +PACKAGE_VERSION='1.3.3' +PACKAGE_STRING='life 1.3.3' PACKAGE_BUGREPORT='aiden.woodruff@gmail.com' PACKAGE_URL='' @@ -1277,7 +1277,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures life 1.0.0 to adapt to many kinds of systems. +\`configure' configures life 1.3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1344,7 +1344,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of life 1.0.0:";; + short | recursive ) echo "Configuration of life 1.3.3:";; esac cat <<\_ACEOF @@ -1435,7 +1435,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -life configure 1.0.0 +life configure 1.3.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1804,7 +1804,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by life $as_me 1.0.0, which was +It was created by life $as_me 1.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3037,6 +3037,183 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + +fi + + # Checks for libraries. @@ -4129,7 +4306,7 @@ fi # Define the identity of the package. PACKAGE='life' - VERSION='1.0.0' + VERSION='1.3.3' cat >>confdefs.h <<_ACEOF @@ -4880,7 +5057,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by life $as_me 1.0.0, which was +This file was extended by life $as_me 1.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4946,7 +5123,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -life config.status 1.0.0 +life config.status 1.3.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 754083e..7a4bc97 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([life], [1.3.2], [aiden.woodruff@gmail.com]) +AC_INIT([life], [1.3.3], [aiden.woodruff@gmail.com]) AC_CONFIG_SRCDIR([life.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/life-1.3.2.tar.gz b/life-1.3.2.tar.gz deleted file mode 100644 index e69de29..0000000 diff --git a/life-1.3.3.tar.gz b/life-1.3.3.tar.gz new file mode 100644 index 0000000..71b1dab Binary files /dev/null and b/life-1.3.3.tar.gz differ diff --git a/life.6 b/life.6 new file mode 100644 index 0000000..f2059ac --- /dev/null +++ b/life.6 @@ -0,0 +1,42 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH LIFE "6" "July 2018" "life 1.3.3" "Games" +.SH NAME +life \- ncurses Cellular Arbitrary Automata +.SH SYNOPSIS +.B life +[\fI\,OPTIONS\/\fR]... +.SH DESCRIPTION +life 1.3.3 +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help and exit +.TP +\fB\-\-detailed\-help\fR +Print help, including all details and hidden options, +and exit +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version and exit +.TP +\fB\-r\fR, \fB\-\-ruleint\fR=\fI\,rule\/\fR +Specify rule\-int on command line (default=`6152') +.TP +\fB\-d\fR, \fB\-\-delay\fR=\fI\,INT\/\fR +Specify delay time +.SS "Dimensions:" +.TP +\fB\-W\fR, \fB\-\-width\fR=\fI\,INT\/\fR +Specify width +.TP +\fB\-H\fR, \fB\-\-height\fR=\fI\,INT\/\fR +Specify height +.TP +\fB\-m\fR, \fB\-\-maximize\fR +Maximize dimensions for terminal +.SS "Characters:" +.TP +\fB\-L\fR, \fB\-\-live\fR=\fI\,CH\/\fR +Character for a live cell +.TP +\fB\-D\fR, \fB\-\-dead\fR=\fI\,CH\/\fR +Character for a dead cell diff --git a/life.man b/life.man deleted file mode 100644 index 109af67..0000000 --- a/life.man +++ /dev/null @@ -1,54 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. -.TH LIFE "6" "July 2018" "Debian" "Games" -.SH NAME -life \- ncurses Cellular Arbitrary Automata -.SH SYNOPSIS -.B life -[\fI\,OPTIONS\/\fR]... -.SH DESCRIPTION -life 0.1 -.TP -\fB\-h\fR, \fB\-\-help\fR -Print help and exit -.TP -\fB\-\-detailed\-help\fR -Print help, including all details and hidden options, -and exit -.TP -\fB\-V\fR, \fB\-\-version\fR -Print version and exit -.TP -\fB\-r\fR, \fB\-\-ruleint\fR=\fI\,rule\/\fR -Specify rule\-int on command line (default=`6152') -.TP -\fB\-d\fR, \fB\-\-delay\fR=\fI\,INT\/\fR -Specify delay time -.SS "Dimensions:" -.TP -\fB\-W\fR, \fB\-\-width\fR=\fI\,INT\/\fR -Specify width -.TP -\fB\-H\fR, \fB\-\-height\fR=\fI\,INT\/\fR -Specify height -.TP -\fB\-m\fR, \fB\-\-maximize\fR -Maximize dimensions for terminal -.SS "Characters:" -.TP -\fB\-L\fR, \fB\-\-live\fR=\fI\,CH\/\fR -Character for a live cell -.TP -\fB\-D\fR, \fB\-\-dead\fR=\fI\,CH\/\fR -Character for a dead cell -.SH "SEE ALSO" -The full documentation for -.B life -is maintained as a Texinfo manual. If the -.B info -and -.B life -programs are properly installed at your site, the command -.IP -.B info life -.PP -should give you access to the complete manual. -- cgit