[Mistat-cvs] mistat/src Makefile.in,1.10,1.11 cmdline.c,1.6,1.7 cmdline.h,1.5,1.6 output.c,1.22,1.23
Status: Pre-Alpha
Brought to you by:
bikepunk005
|
From: Mike H. B. <bik...@us...> - 2004-04-25 22:30:59
|
Update of /cvsroot/mistat/mistat/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src Modified Files: Makefile.in cmdline.c cmdline.h output.c statistics.c statistics.h Log Message: gengetopt version 2.12.1 updates. Index: statistics.c =================================================================== RCS file: /cvsroot/mistat/mistat/src/statistics.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** statistics.c 19 Apr 2004 16:17:11 -0000 1.28 --- statistics.c 25 Apr 2004 22:30:44 -0000 1.29 *************** *** 89,92 **** --- 89,93 ---- long double temp, temp1; long double mean, variance, skewness, kurtosis; + int sum; *************** *** 96,100 **** if (is_vector) /*Just get moments for one variable. */ { ! mean = mean_int_vector (vta, index, nrows); variance = var_int_vector (vta, &mean, index, nrows); skewness = skewness_int_vector (vta, &variance, &mean, nrows); --- 97,101 ---- if (is_vector) /*Just get moments for one variable. */ { ! mean = mean_int_vector (vta, index, nrows, &sum); variance = var_int_vector (vta, &mean, index, nrows); skewness = skewness_int_vector (vta, &variance, &mean, nrows); *************** *** 104,108 **** else /*Get moments from matrix. */ { ! mean = mean_int_matrix (mta, index, nrows); variance = var_int_matrix (mta, &mean, index, nrows); skewness = skewness_int_matrix (mta, index, &variance, &mean, nrows); --- 105,109 ---- else /*Get moments from matrix. */ { ! mean = mean_int_matrix (mta, index, nrows, &sum); variance = var_int_matrix (mta, &mean, index, nrows); skewness = skewness_int_matrix (mta, index, &variance, &mean, nrows); *************** *** 114,117 **** --- 115,119 ---- D_STATS.skewness = skewness; D_STATS.kurtosis = kurtosis; + D_STATS.sum = sum; } *************** *** 123,127 **** get_sorted_stats (bool is_vector, int index) { ! long double median, min, max; if (is_vector) /*Process vector data. */ --- 125,129 ---- get_sorted_stats (bool is_vector, int index) { ! long double median, min, max, l_quart, u_quart; if (is_vector) /*Process vector data. */ *************** *** 131,134 **** --- 133,137 ---- q_sort_int_vector (vta, 1, nrows); median = median_int_vector (vta, nrows); + quartiles_int_vector (vta, nrows, &l_quart, &u_quart); } *************** *** 140,145 **** q_sort_int_matrix (mta, index, 1, nrows); median = median_int_matrix (mta, index, nrows); ! ! } --- 143,147 ---- q_sort_int_matrix (mta, index, 1, nrows); median = median_int_matrix (mta, index, nrows); ! quartiles_int_matrix (mta, index, nrows, &l_quart, &u_quart); } *************** *** 147,150 **** --- 149,155 ---- S_STATS.max = max; S_STATS.median = median; + S_STATS.l_quart = l_quart; + S_STATS.u_quart = u_quart; + S_STATS.iqr = (u_quart - l_quart); } Index: output.c =================================================================== RCS file: /cvsroot/mistat/mistat/src/output.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** output.c 18 Apr 2004 14:02:25 -0000 1.22 --- output.c 25 Apr 2004 22:30:43 -0000 1.23 *************** *** 149,155 **** printf ! (" mean = %f\n skew = %f\n kur = %f\n var = %f\n median = %f\n min = %f\n max = %f\n", ! D_STATS.mean, D_STATS.skewness, D_STATS.kurtosis, D_STATS.variance, ! S_STATS.median, S_STATS.min, S_STATS.max); } --- 149,156 ---- printf ! (" mean = %f\n skew = %f\n kur = %f\n var = %f\n sum = %f\n median = %f\n min = %f\n max = %f\n lower = %f\n higher = %f\n iqr = %f\n\n", ! D_STATS.mean, D_STATS.skewness, D_STATS.kurtosis, ! D_STATS.variance, D_STATS.sum, S_STATS.median, S_STATS.min, ! S_STATS.max, S_STATS.l_quart, S_STATS.u_quart, S_STATS.iqr); } *************** *** 165,171 **** get_sorted_stats (is_vector, i); printf ! (" mean = %f\n skew = %f\n kur = %f\n var = %f\n\n median = %f\n min = %f\n max = %f\n", D_STATS.mean, D_STATS.skewness, D_STATS.kurtosis, ! D_STATS.variance, S_STATS.median, S_STATS.min, S_STATS.max); } } --- 166,174 ---- get_sorted_stats (is_vector, i); printf ! (" mean = %f\n skew = %f\n kur = %f\n var = %f\n sum = %f\n median = %f\n min = %f\n max = %f\n lower = %f\n higher = %f\n iqr = %f\n\n", D_STATS.mean, D_STATS.skewness, D_STATS.kurtosis, ! D_STATS.variance, D_STATS.sum, S_STATS.median, ! S_STATS.min, S_STATS.max, S_STATS.l_quart, ! S_STATS.u_quart, S_STATS.iqr); } } Index: cmdline.h =================================================================== RCS file: /cvsroot/mistat/mistat/src/cmdline.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** cmdline.h 16 Mar 2004 14:53:39 -0000 1.5 --- cmdline.h 25 Apr 2004 22:30:43 -0000 1.6 *************** *** 1,5 **** /* cmdline.h */ ! /* File autogenerated by gengetopt version 2.10 */ #ifndef CMDLINE_H --- 1,5 ---- /* cmdline.h */ ! /* File autogenerated by gengetopt version 2.12.1 */ #ifndef CMDLINE_H *************** *** 44,51 **** --- 44,57 ---- int cmdline_parser (int argc, char *const *argv, struct gengetopt_args_info *args_info); + int cmdline_parser2 (int argc, char *const *argv, + struct gengetopt_args_info *args_info, int override, + int initialize, int check_required); void cmdline_parser_print_help (void); void cmdline_parser_print_version (void); + void cmdline_parser_init (struct gengetopt_args_info *args_info); + void cmdline_parser_free (struct gengetopt_args_info *args_info); + #ifdef __cplusplus } Index: Makefile.in =================================================================== RCS file: /cvsroot/mistat/mistat/src/Makefile.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.in 18 Apr 2004 14:02:25 -0000 1.10 --- Makefile.in 25 Apr 2004 22:30:43 -0000 1.11 *************** *** 1,6 **** ! # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ ! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation --- 1,6 ---- ! # Makefile.in generated by automake 1.8 from Makefile.am. # @configure_input@ ! # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation *************** *** 35,38 **** --- 35,40 ---- # Process with automake to produce Makefile.in. + SOURCES = $(mistat_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ *************** *** 42,46 **** pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ --- 44,47 ---- *************** *** 56,59 **** --- 57,94 ---- PRE_UNINSTALL = : POST_UNINSTALL = : + bin_PROGRAMS = mistat$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = + am__installdirs = $(DESTDIR)$(bindir) + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) + am_mistat_OBJECTS = cmdline.$(OBJEXT) error.$(OBJEXT) \ + file_ops.$(OBJEXT) main.$(OBJEXT) menu.$(OBJEXT) \ + output.$(OBJEXT) statistics.$(OBJEXT) memwatch.$(OBJEXT) + mistat_OBJECTS = $(am_mistat_OBJECTS) + mistat_LDADD = $(LDADD) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/config/depcomp + am__depfiles_maybe = depfiles + @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cmdline.Po ./$(DEPDIR)/error.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/file_ops.Po ./$(DEPDIR)/main.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/memwatch.Po ./$(DEPDIR)/menu.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/output.Po ./$(DEPDIR)/statistics.Po + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + SOURCES = $(mistat_SOURCES) + DIST_SOURCES = $(mistat_SOURCES) + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ *************** *** 124,174 **** sysconfdir = @sysconfdir@ target_alias = @target_alias@ - - bin_PROGRAMS = mistat mistat_SOURCES = cmdline.c error.c file_ops.c main.c menu.c output.c statistics.c cmdline.h error.h file_ops.h main.h menu.h output.h statistics.h system.h memwatch.c - subdir = src - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = - bin_PROGRAMS = mistat$(EXEEXT) - PROGRAMS = $(bin_PROGRAMS) - - am_mistat_OBJECTS = cmdline.$(OBJEXT) error.$(OBJEXT) file_ops.$(OBJEXT) \ - main.$(OBJEXT) menu.$(OBJEXT) output.$(OBJEXT) \ - statistics.$(OBJEXT) memwatch.$(OBJEXT) - mistat_OBJECTS = $(am_mistat_OBJECTS) - mistat_LDADD = $(LDADD) - mistat_DEPENDENCIES = - mistat_LDFLAGS = - - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/config/depcomp - am__depfiles_maybe = depfiles - @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cmdline.Po ./$(DEPDIR)/error.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/file_ops.Po ./$(DEPDIR)/main.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/memwatch.Po ./$(DEPDIR)/menu.Po \ - @AMDEP_TRUE@ ./$(DEPDIR)/output.Po ./$(DEPDIR)/statistics.Po - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - DIST_SOURCES = $(mistat_SOURCES) - DIST_COMMON = $(srcdir)/Makefile.in Makefile.am - SOURCES = $(mistat_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj ! $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) ! binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) ! $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ --- 159,199 ---- sysconfdir = @sysconfdir@ target_alias = @target_alias@ mistat_SOURCES = cmdline.c error.c file_ops.c main.c menu.c output.c statistics.c cmdline.h error.h file_ops.h main.h menu.h output.h statistics.h system.h memwatch.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj ! $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) ! @for dep in $?; do \ ! case '$(am__configure_deps)' in \ ! *$$dep*) \ ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ ! && exit 0; \ ! exit 1;; \ ! esac; \ ! done; \ ! echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile ! .PRECIOUS: Makefile ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! @case '$?' in \ ! *config.status*) \ ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ! *) \ ! echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ! cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ! esac; ! ! $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ! ! $(top_srcdir)/configure: $(am__configure_deps) ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ! $(ACLOCAL_M4): $(am__aclocal_m4_deps) ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) ! $(mkdir_p) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ *************** *** 196,200 **** mostlyclean-compile: ! -rm -f *.$(OBJEXT) core *.core distclean-compile: --- 221,225 ---- mostlyclean-compile: ! -rm -f *.$(OBJEXT) distclean-compile: *************** *** 211,244 **** .c.o: ! @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ ! @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ ! @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ! @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ ! @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ! @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: ! @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ ! @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ ! @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ ! @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ ! @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ! @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` uninstall-info-am: - ETAGS = etags - ETAGSFLAGS = - - CTAGS = ctags - CTAGSFLAGS = - - tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ --- 236,255 ---- .c.o: ! @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ ! @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ! @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: ! @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ ! @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ! @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ *************** *** 249,252 **** --- 260,264 ---- END { for (i in files) print i; }'`; \ mkid -fID $$unique + tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ *************** *** 263,267 **** || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique - ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ --- 275,278 ---- *************** *** 286,293 **** distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - - top_distdir = .. - distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) --- 297,300 ---- *************** *** 303,307 **** if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ ! $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ --- 310,314 ---- if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ ! $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ *************** *** 321,327 **** check: check-am all-am: Makefile $(PROGRAMS) - installdirs: ! $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am --- 328,333 ---- check: check-am all-am: Makefile $(PROGRAMS) installdirs: ! $(mkdir_p) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am *************** *** 362,365 **** --- 368,373 ---- dvi-am: + html: html-am + info: info-am *************** *** 397,405 **** .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ ! distclean-generic distclean-tags distdir dvi dvi-am info \ ! info-am install install-am install-binPROGRAMS install-data \ ! install-data-am install-exec install-exec-am install-info \ ! install-info-am install-man install-strip installcheck \ ! installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ --- 405,413 ---- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ ! distclean-generic distclean-tags distdir dvi dvi-am html \ ! html-am info info-am install install-am install-binPROGRAMS \ ! install-data install-data-am install-exec install-exec-am \ ! install-info install-info-am install-man install-strip \ ! installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ Index: statistics.h =================================================================== RCS file: /cvsroot/mistat/mistat/src/statistics.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** statistics.h 30 Mar 2004 15:49:48 -0000 1.16 --- statistics.h 25 Apr 2004 22:30:44 -0000 1.17 *************** *** 35,38 **** --- 35,39 ---- double kurtosis; double variance; + double sum; } D_STATS; *************** *** 45,48 **** --- 46,52 ---- double upper_tail; double lower_tail; + double l_quart; + double u_quart; + double iqr; } S_STATS; Index: cmdline.c =================================================================== RCS file: /cvsroot/mistat/mistat/src/cmdline.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cmdline.c 16 Mar 2004 14:53:10 -0000 1.6 --- cmdline.c 25 Apr 2004 22:30:43 -0000 1.7 *************** *** 1,7 **** /* ! File autogenerated by gengetopt version 2.10 generated with the following command: gengetopt --input=mistat.ggo -u ! The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: --- 1,7 ---- /* ! File autogenerated by gengetopt version 2.12.1 generated with the following command: gengetopt --input=mistat.ggo -u ! The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: *************** *** 9,17 **** */ - - #include <stdio.h> - #include <stdlib.h> - #include <string.h> - /* If we use autoconf. */ #ifdef HAVE_CONFIG_H --- 9,12 ---- *************** *** 19,26 **** --- 14,56 ---- #endif + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include "getopt.h" #include "cmdline.h" + static void clear_given (struct gengetopt_args_info *args_info); + static void clear_args (struct gengetopt_args_info *args_info); + + static int + cmdline_parser_internal (int argc, char *const *argv, + struct gengetopt_args_info *args_info, int override, + int initialize, int check_required, + const char *additional_error); + + static char *gengetopt_strdup (const char *s); + + static void + clear_given (struct gengetopt_args_info *args_info) + { + args_info->help_given = 0; + args_info->version_given = 0; + args_info->nobell_given = 0; + args_info->digits_given = 0; + args_info->log_given = 0; + args_info->nofile_given = 0; + } + + static void + clear_args (struct gengetopt_args_info *args_info) + { + args_info->nobell_flag = 0; + args_info->digits_arg = 2; + args_info->log_flag = 0; + args_info->nofile_flag = 0; + } + void cmdline_parser_print_version (void) *************** *** 37,54 **** " mistat is a statistical program based on statist.\nCopyright (C) 2003 Mike H. Benton\nmistat comes with NO WARRANTY, \nto the extent permitted by law. \nYou may redistribute copies of mistat\nunder the terms of the GNU General Public License. \nFor more information about these matters, \nsee the files named COPYING. \n\n" "\n" "Usage: %s [OPTIONS]... [FILES]...\n", CMDLINE_PARSER_PACKAGE); ! printf (" -h --help Print help and exit\n"); ! printf (" -V --version Print version and exit\n"); ! printf ! (" -b --nobell No beeps on errors or warnings (default=off)\n"); ! printf ! (" -d --digits Number of digits to print (default='2')\n"); ! printf ! (" -l --log Write results to statist.log (default=off)\n"); ! printf ! (" -n --nofile Do not read data file on startup.\n\t\t\tData file must be specified from menu. (default=off)\n"); } - static char *gengetopt_strdup (const char *s); /* gengetopt_strdup() */ --- 67,108 ---- " mistat is a statistical program based on statist.\nCopyright (C) 2003 Mike H. Benton\nmistat comes with NO WARRANTY, \nto the extent permitted by law. \nYou may redistribute copies of mistat\nunder the terms of the GNU General Public License. \nFor more information about these matters, \nsee the files named COPYING. \n\n" "\n" "Usage: %s [OPTIONS]... [FILES]...\n", CMDLINE_PARSER_PACKAGE); ! printf ("\n"); ! printf ("%s\n", " -h, --help Print help and exit"); ! printf ("%s\n", " -V, --version Print version and exit"); ! printf ("%s\n", ! " -b, --nobell No beeps on errors or warnings (default=off)"); ! printf ("%s\n", ! " -d, --digits=INT Number of digits to print (default=`2')"); ! printf ("%s\n", ! " -l, --log Write results to statist.log (default=off)"); ! printf ("%s\n", ! " -n, --nofile Do not read data file on startup.\n\t\t\tData file must be specified from menu. (default=off)\n"); ! } ! ! void ! cmdline_parser_init (struct gengetopt_args_info *args_info) ! { ! clear_given (args_info); ! clear_args (args_info); ! ! args_info->inputs = NULL; ! args_info->inputs_num = 0; } + void + cmdline_parser_free (struct gengetopt_args_info *args_info) + { + + int i; + + for (i = 0; i < args_info->inputs_num; ++i) + free (args_info->inputs[i]); + + if (args_info->inputs_num) + free (args_info->inputs); + + clear_given (args_info); + } /* gengetopt_strdup() */ *************** *** 57,61 **** gengetopt_strdup (const char *s) { ! char *result = (char *) malloc (strlen (s) + 1); if (result == (char *) 0) return (char *) 0; --- 111,119 ---- gengetopt_strdup (const char *s) { ! char *result = NULL; ! if (!s) ! return result; ! ! result = (char *) malloc (strlen (s) + 1); if (result == (char *) 0) return (char *) 0; *************** *** 68,92 **** struct gengetopt_args_info *args_info) { ! int c; /* Character of the parsed option. */ ! int missing_required_options = 0; ! args_info->help_given = 0; ! args_info->version_given = 0; ! args_info->nobell_given = 0; ! args_info->digits_given = 0; ! args_info->log_given = 0; ! args_info->nofile_given = 0; ! #define clear_args() \ ! { \ ! args_info->nobell_flag = 0;\ ! args_info->digits_arg = 2 ;\ ! args_info->log_flag = 0;\ ! args_info->nofile_flag = 0;\ ! } ! clear_args (); ! args_info->inputs = NULL; ! args_info->inputs_num = 0; optarg = 0; --- 126,166 ---- struct gengetopt_args_info *args_info) { ! return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); ! } ! int ! cmdline_parser2 (int argc, char *const *argv, ! struct gengetopt_args_info *args_info, int override, ! int initialize, int check_required) ! { ! int result; ! result = ! cmdline_parser_internal (argc, argv, args_info, override, initialize, ! check_required, NULL); ! if (result == EXIT_FAILURE) ! { ! cmdline_parser_free (args_info); ! exit (EXIT_FAILURE); ! } ! ! return result; ! } ! ! int ! cmdline_parser_internal (int argc, char *const *argv, ! struct gengetopt_args_info *args_info, int override, ! int initialize, int check_required, ! const char *additional_error) ! { ! int c; /* Character of the parsed option. */ ! int error = 0; ! struct gengetopt_args_info local_args_info; ! ! if (initialize) ! cmdline_parser_init (args_info); ! ! cmdline_parser_init (&local_args_info); optarg = 0; *************** *** 121,142 **** { case 'h': /* Print help and exit. */ - clear_args (); cmdline_parser_print_help (); exit (EXIT_SUCCESS); case 'V': /* Print version and exit. */ - clear_args (); cmdline_parser_print_version (); exit (EXIT_SUCCESS); case 'b': /* No beeps on errors or warnings. */ ! if (args_info->nobell_given) { fprintf (stderr, ! "%s: `--nobell' (`-b') option given more than once\n", ! CMDLINE_PARSER_PACKAGE); ! clear_args (); ! exit (EXIT_FAILURE); } args_info->nobell_given = 1; args_info->nobell_flag = !(args_info->nobell_flag); --- 195,217 ---- { case 'h': /* Print help and exit. */ cmdline_parser_print_help (); exit (EXIT_SUCCESS); case 'V': /* Print version and exit. */ cmdline_parser_print_version (); exit (EXIT_SUCCESS); case 'b': /* No beeps on errors or warnings. */ ! if (local_args_info.nobell_given) { fprintf (stderr, ! "%s: `--nobell' (`-b') option given more than once%s\n", ! CMDLINE_PARSER_PACKAGE, ! (additional_error ? additional_error : "")); ! goto failure; } + if (args_info->nobell_given && !override) + continue; + local_args_info.nobell_given = 1; args_info->nobell_given = 1; args_info->nobell_flag = !(args_info->nobell_flag); *************** *** 144,155 **** case 'd': /* Number of digits to print. */ ! if (args_info->digits_given) { fprintf (stderr, ! "%s: `--digits' (`-d') option given more than once\n", ! CMDLINE_PARSER_PACKAGE); ! clear_args (); ! exit (EXIT_FAILURE); } args_info->digits_given = 1; args_info->digits_arg = strtol (optarg, &stop_char, 0); --- 219,233 ---- case 'd': /* Number of digits to print. */ ! if (local_args_info.digits_given) { fprintf (stderr, ! "%s: `--digits' (`-d') option given more than once%s\n", ! CMDLINE_PARSER_PACKAGE, ! (additional_error ? additional_error : "")); ! goto failure; } + if (args_info->digits_given && !override) + continue; + local_args_info.digits_given = 1; args_info->digits_given = 1; args_info->digits_arg = strtol (optarg, &stop_char, 0); *************** *** 157,168 **** case 'l': /* Write results to statist.log. */ ! if (args_info->log_given) { fprintf (stderr, ! "%s: `--log' (`-l') option given more than once\n", ! CMDLINE_PARSER_PACKAGE); ! clear_args (); ! exit (EXIT_FAILURE); } args_info->log_given = 1; args_info->log_flag = !(args_info->log_flag); --- 235,249 ---- case 'l': /* Write results to statist.log. */ ! if (local_args_info.log_given) { fprintf (stderr, ! "%s: `--log' (`-l') option given more than once%s\n", ! CMDLINE_PARSER_PACKAGE, ! (additional_error ? additional_error : "")); ! goto failure; } + if (args_info->log_given && !override) + continue; + local_args_info.log_given = 1; args_info->log_given = 1; args_info->log_flag = !(args_info->log_flag); *************** *** 170,181 **** case 'n': /* Do not read data file on startup.\n\t\t\tData file must be specified from menu.. */ ! if (args_info->nofile_given) { fprintf (stderr, ! "%s: `--nofile' (`-n') option given more than once\n", ! CMDLINE_PARSER_PACKAGE); ! clear_args (); ! exit (EXIT_FAILURE); } args_info->nofile_given = 1; args_info->nofile_flag = !(args_info->nofile_flag); --- 251,265 ---- case 'n': /* Do not read data file on startup.\n\t\t\tData file must be specified from menu.. */ ! if (local_args_info.nofile_given) { fprintf (stderr, ! "%s: `--nofile' (`-n') option given more than once%s\n", ! CMDLINE_PARSER_PACKAGE, ! (additional_error ? additional_error : "")); ! goto failure; } + if (args_info->nofile_given && !override) + continue; + local_args_info.nofile_given = 1; args_info->nofile_given = 1; args_info->nofile_flag = !(args_info->nofile_flag); *************** *** 187,195 **** case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ ! exit (EXIT_FAILURE); default: /* bug: option not considered. */ ! fprintf (stderr, "%s: option unknown: %c\n", CMDLINE_PARSER_PACKAGE, ! c); abort (); } /* switch */ --- 271,280 ---- case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ ! goto failure; default: /* bug: option not considered. */ ! fprintf (stderr, "%s: option unknown: %c%s\n", ! CMDLINE_PARSER_PACKAGE, c, ! (additional_error ? additional_error : "")); abort (); } /* switch */ *************** *** 197,202 **** ! if (missing_required_options) ! exit (EXIT_FAILURE); if (optind < argc) --- 282,291 ---- ! ! if (check_required) ! {} ! ! if (error) ! return (EXIT_FAILURE); if (optind < argc) *************** *** 221,225 **** } } - return 0; } --- 310,317 ---- } } return 0; + + failure: + cmdline_parser_free (&local_args_info); + return (EXIT_FAILURE); } |