Index: factory/fex/runfex
===================================================================
--- factory/fex/runfex	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/fex/runfex	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,8 +1,8 @@
 #! /home/schmidt/bin/bash
-# $Id: runfex,v 1.5 1998-02-02 11:00:54 schmidt Exp $
-
-#{{{ docu
-#
-# runfxc - run factory example collection.
+# $Id: runfex,v 1.6 1998-03-11 16:11:28 schmidt Exp $
+
+#{{{ docu
+#
+# runfex - run factory example collection.
 #
 #}}}
@@ -130,4 +130,6 @@
 # $1: options how to print data
 # $2: default width to print data
+# $3: name of example/collection
+# $4: note on example/collection
 #
 # Global variables used:
@@ -139,4 +141,6 @@
     typeset \
 	options="$1" \
+	name="$3" \
+	note="$4" \
 	colWidth
 
@@ -149,4 +153,14 @@
     while [ -n "$options" ]; do
 	case "$options" in
+	    (*h*)
+		# do some pretty printing
+		if [ ${#name} -lt 7 ]; then
+		    echo "$name:		$note."
+		elif  [ ${#name} -lt 15 ]; then
+		    echo "$name:	$note."
+		else
+		    echo "$name: $note."
+		fi
+		 options="${options//h/}" ;;
 	    (*p*) echo "$algChar"
 		 options="${options//p/}" ;;
@@ -338,6 +352,4 @@
 	if [ -n "$debugMode" ]; then
 	    echo "skipping $exampleName"
-	else
-	    warn "skipping $exampleName"
 	fi
 	return
@@ -423,5 +435,5 @@
 
 	# print table
-	printData "$algorithmTBOptions" "$TBColWidth"
+	printData "$algorithmTBOptions" "$TBColWidth" "$exampleName" "$exampleNote"
     }
     #}}}
@@ -435,5 +447,4 @@
 #
 # runROOptions: options for RO table.  Read from commandline.
-# runNote: comment on run.  Read from commandline.
 # rawCollectionName: collection name with full path
 #
@@ -445,5 +456,4 @@
 #}}}
 typeset runROOptions=""
-typeset runNote=""
 typeset rawCollectionName=""
 
@@ -451,7 +461,6 @@
 # read options
 typeset opt
-while getopts "n:a:c:C:t:r:d" opt; do
+while getopts "a:c:C:t:r:d" opt; do
     case "$opt" in
-	(n)  runNote="$OPTARG" ;;
 	(a)  runOptions="$runOptions -a$OPTARG" ;;
 	(c)  runOptions="$runOptions -c$OPTARG" ;;
@@ -518,5 +527,5 @@
 	options="${options//tcrd/}"
 
-	printData "$options" "$ROColWidth"
+	printData "$options" "$ROColWidth" "$collectionName" "$collectionNote"
     }
 fi
Index: factory/ftest/ChangeLog
===================================================================
--- factory/ftest/ChangeLog	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/ftest/ChangeLog	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,6 +1,71 @@
+Wed Feb 25 17:26:18 1998  Jens Schmidt  <schmidt@mathematik.uni-kl.de>
+
+	* runfex (printData): arguments `$name' and `$note' re-added
+	  which are printed on occurence of `h' in `$options'.  All
+	  callers changed.
+
+	* runfex (main): variable `$runNote' and corresponding commandline
+	  option removed.
+
+	* gcd.fex (collection gcd): cosmetic changes
+
+	* gcd.fex (univ0RanA, univ0RanB, univ0CofactorSerialA,
+	  univ0GCDSerialA): real results added
+
+	* gcd.fex (univ0CofactorSerialA): slightly modified
+
+	* ftest_util.m4 (ftestGetInVar): recognizes tagged arguments
+
+	* ftest_util.m4 (ftestGetEnv, _ftestOutput): cosmetic changes
+
+	* ftest_util.m4 (ftestRun): checks for end of commandline before
+	  running algorithm
+
+	* ftest_util.m4 (ftestDefaultInitializer): new macro.
+	* ftest_util.m4 (ftestOutVar, ftestInVar): call
+	  `ftestDefaultInitializer()' to write default initializer
+
+	* ftest_io.cc (ftestGetbool): new function.  Declaration adapted.
+
+	* ftest_util.cc (ftestSearchTaggedArg, ftestCutBlancs): new
+	  functions.  Declarations adapted.
+
+	* ftest_util.cc (ftestSubStr): made external.  Declaration
+	  adapted.
+
+	* ftest_util.cc (ftestError, ftestGetOpts, ftestGetEnv,
+	  ftestPrintTimer, ftestPrintEnv): superfluous `const' removed
+	  from signature.  Declarations adapted.
+
+Fri Feb 20 18:29:40 1998  Jens Schmidt  <schmidt@mathematik.uni-kl.de>
+
+	* ftest_util.cc (ftestError): returns on `errno' == `noError'
+
+	* ftest_util.h (ftestErrorT): `Ok' renamed to `noError'
+
+Thu Feb 19 16:07:09 1998  Jens Schmidt  <schmidt@mathematik.uni-kl.de>
+
+	* ftest_util.m4: `#line' preprocessor directives added to most of
+	  the macros (that's cool, man!)
+
+	* ftest_util.m4 (ftestSetEnv): macro removed
+
 Mon Feb  2 11:59:36 1998  Jens Schmidt  <schmidt@mathematik.uni-kl.de>
 
 	* runfex (runConfiguration): new global variable.  `runfex'
 	  supports different configurations.
+
+Fri Jan 30 15:11:23 1998  Jens Schmidt  <schmidt@mathematik.uni-kl.de>
+
+	* gcd.fex (univ0CofactorSerialA, univ0GCDSerialA): new examples
+
+	* gcd.fex (univ0RanC, univ0RanD): examples removed
+
+	* runfex: (example): does not print `skipping example ...'
+
+	* runfex: cosmetic changes
+
+	* runfex: totally rewritten.  Does not print html-code any longer,
+	  only ASCII-information.
 
 Thu Jan 22 10:46:03 1998  Jens Schmidt  <schmidt@mathematik.uni-kl.de>
Index: factory/ftest/ftest_io.cc
===================================================================
--- factory/ftest/ftest_io.cc	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/ftest/ftest_io.cc	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftest_io.cc,v 1.10 1997-11-21 13:59:07 schmidt Exp $ */
+/* $Id: ftest_io.cc,v 1.11 1998-03-11 16:10:54 schmidt Exp $ */
 
 //{{{ docu
@@ -141,4 +141,44 @@
 //}}}
 
+//{{{ bool ftestGetbool ( const char * stringBool )
+//{{{ docu
+//
+// ftestGetbool() - read an boolean from stringBool,
+//   return it.
+//
+//}}}
+bool
+ftestGetbool ( const char * stringBool )
+{
+    const char * tokenCursor;
+
+    bool b;
+    // skip blancs
+    stringBool = ftestSkipBlancs( stringBool );
+
+    // look for "true" or "false"
+    tokenCursor = ftestSubStr( "true", stringBool );
+    if ( stringBool != tokenCursor )
+	b = true;
+    else {
+	tokenCursor = ftestSubStr( "false", stringBool );
+	b = false;
+    }
+
+    // do error checks
+    if ( stringBool == tokenCursor )
+	ftestError( CommandlineError,
+		    "bool expected at `%s'\n", stringBool );
+
+    // check for extra characters
+    stringBool = ftestSkipBlancs( tokenCursor );
+    if ( *stringBool )
+	ftestError( CommandlineError,
+		    "extra characters after bool spec `%s'\n", stringBool );
+
+    return b;
+}
+//}}}
+
 //{{{ void ftestPrintResult ( const char * resultName, const CanonicalForm & result )
 //{{{ docu
Index: factory/ftest/ftest_io.h
===================================================================
--- factory/ftest/ftest_io.h	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/ftest/ftest_io.h	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftest_io.h,v 1.5 1997-10-15 13:53:31 schmidt Exp $ */
+/* $Id: ftest_io.h,v 1.6 1998-03-11 16:11:01 schmidt Exp $ */
 
 #ifndef INCL_FTEST_IO_H
@@ -16,4 +16,5 @@
 Variable ftestGetVariable ( const char * stringVariable );
 int ftestGetint ( const char * stringInt );
+bool ftestGetbool ( const char * stringBool );
 
 void ftestPrintResult ( const char * resultName, const CanonicalForm & result );
Index: factory/ftest/ftest_util.cc
===================================================================
--- factory/ftest/ftest_util.cc	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/ftest/ftest_util.cc	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftest_util.cc,v 1.14 1997-11-21 14:07:22 schmidt Exp $ */
+/* $Id: ftest_util.cc,v 1.15 1998-03-11 16:11:06 schmidt Exp $ */
 
 //{{{ docu
@@ -137,29 +137,4 @@
 // - static functions.
 //
-
-//{{{ static const char * ftestSubStr( const char * subString, const char * string )
-//{{{ docu
-//
-// ftestSubStr() - check whether subString is a substring of string.
-//
-// If so, return index behind subString in string, otherwise
-// string.
-//
-//}}}
-static const char *
-ftestSubStr( const char * subString, const char * string )
-{
-    const char * stringStart = string;
-
-    while ( *subString && *subString == *string ) {
-	subString++; string++;
-    }
-
-    if ( *subString )
-	return stringStart;
-    else
-	return string;
-}
-//}}}
 
 //{{{ static char * ftestConcatEnv ( char ** argv, int & optind )
@@ -590,5 +565,52 @@
 //}}}
 
-//{{{ void ftestError ( const ftestErrorT errno, const char * format ... )
+//{{{ char * ftestCutBlancs ( char * string )
+//{{{ docu
+//
+// ftestCutBlancs() - cut off all trailing blancs in `string'.
+//
+// Returns `string' unchanged.
+//
+//}}}
+char *
+ftestCutBlancs ( char * string )
+{
+    char * stringCursor = string + strlen( string );
+
+    while ( (string != stringCursor)
+	    && isspace( *(stringCursor-1) ) )
+	stringCursor--;
+
+    *stringCursor = '\0';
+    return string;
+}
+//}}}
+
+//{{{ const char * ftestSubStr ( const char * subString, const char * string )
+//{{{ docu
+//
+// ftestSubStr() - check whether subString is a substring of string.
+//
+// If so, return index behind subString in string, otherwise
+// string.
+//
+//}}}
+const char *
+ftestSubStr ( const char * subString, const char * string )
+{
+    const char * stringStart = string;
+
+    while ( *subString && *subString == *string ) {
+	subString++; string++;
+    }
+
+    if ( *subString )
+	return stringStart;
+    else
+	return string;
+}
+//}}}
+
+//{{{ void ftestError ( ftestErrorT errno, const char * format ... )
 //{{{ docu
 //
@@ -602,5 +624,5 @@
 //}}}
 void
-ftestError ( const ftestErrorT errno, const char * format ... )
+ftestError ( ftestErrorT errno, const char * format ... )
 {
     // print error message
@@ -617,4 +639,6 @@
 
     switch ( errno ) {
+    case noError:
+	return;
     case CommandlineError:
     case EnvSyntaxError: 
@@ -735,5 +759,5 @@
 //}}}
 
-//{{{ void ftestGetOpts ( const int argc, char ** argv, int & optind )
+//{{{ void ftestGetOpts ( int argc, char ** argv, int & optind )
 //{{{ docu
 //
@@ -744,5 +768,5 @@
 //}}}
 void
-ftestGetOpts ( const int argc, char ** argv, int & optind )
+ftestGetOpts ( int argc, char ** argv, int & optind )
 {
     // parse command line
@@ -776,5 +800,5 @@
 //}}}
 
-//{{{ void ftestGetEnv ( const int, char ** argv, int & optind )
+//{{{ void ftestGetEnv ( int, char ** argv, int & optind )
 //{{{ docu
 //
@@ -786,5 +810,5 @@
 //}}}
 void
-ftestGetEnv ( const int, char ** argv, int & optind )
+ftestGetEnv ( int, char ** argv, int & optind )
 {
     // initialize environment
@@ -804,4 +828,63 @@
 //}}}
 
+//{{{ bool ftestSearchTaggedArg ( int, char ** argv, int & optind, const char * optionTag )
+//{{{ docu
+//
+// ftestSearchTaggedArg() - search for tagged argument.
+//
+// If the current argument (`argv[ optind ]') is of the form
+// `<tag>=<value>', where `<tag>' is a substring of
+// `<optionTag>', the current argument is modified to point
+// directly after the `=' sign and `true' is returned.
+//
+// Otherwise, `false' is returned.
+//
+// Note: There may be arbitrary white-space between the several
+// tokens of the tagged argument, but the tokens must not span
+// more than one argument.
+//
+//}}}
+bool
+ftestSearchTaggedArg ( int, char ** argv, int & optind, const char * optionTag )
+{
+    const char * tokenCursor;
+    const char * tokenString = argv[ optind ];
+    int tokenLen;
+
+    // check for end of argument list
+    if ( ! tokenString )
+	return false;
+
+    // skip leading blancs
+    tokenString = ftestSkipBlancs( tokenString );
+
+    // check whether it is a tagged argument
+    tokenCursor = strchr( tokenString, '=' );
+    if ( ! tokenCursor )
+	return false;
+    tokenLen = tokenCursor - tokenString;
+
+    // isolate possible keyword
+    char * keyword = new char[ tokenLen+1 ];
+    strncpy( keyword, tokenString, tokenLen );
+    keyword[ tokenLen ] = '\0';
+    ftestCutBlancs( keyword );
+
+    // advance tokenString after `=' sign
+    tokenString = tokenCursor+1;
+
+    // check whether keyword is a substring of `optionTag'
+    tokenCursor = ftestSubStr( keyword, optionTag );
+    if ( tokenCursor == optionTag ) {
+	// optionTag not found
+	delete [] keyword;
+	return false;
+    } else {
+	argv[ optind ] = (char *)tokenString;
+	return true;
+    }
+}
+//}}}
+
 //{{{ void ftestWriteSeed ()
 //{{{ docu
@@ -824,5 +907,5 @@
 //}}}
 
-//{{{ void ftestPrintTimer ( const long timer )
+//{{{ void ftestPrintTimer ( long timer )
 //{{{ docu
 //
@@ -831,5 +914,5 @@
 //}}}
 void
-ftestPrintTimer ( const long timer )
+ftestPrintTimer ( long timer )
 {
     if ( ftestPrintTimingFlag )
@@ -838,5 +921,5 @@
 //}}}
 
-//{{{ void ftestPrintCheck ( const ftestSatusT check )
+//{{{ void ftestPrintCheck ( ftestSatusT check )
 //{{{ docu
 //
@@ -845,5 +928,5 @@
 //}}}
 void
-ftestPrintCheck ( const ftestStatusT check )
+ftestPrintCheck ( ftestStatusT check )
 {
     if ( ftestPrintCheckFlag ) {
Index: factory/ftest/ftest_util.h
===================================================================
--- factory/ftest/ftest_util.h	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/ftest/ftest_util.h	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftest_util.h,v 1.11 1997-11-21 14:06:30 schmidt Exp $ */
+/* $Id: ftest_util.h,v 1.12 1998-03-11 16:11:12 schmidt Exp $ */
 
 #ifndef INCL_FTEST_UTIL_H
@@ -20,5 +20,5 @@
 // enum ftestErrorT - FTE error types.
 //
-// Ok: no error (rarely used :-)
+// noError: no error (rarely used :-)
 // CommandlineError: commandline syntax error
 // EnvSyntaxError: error in environment specification
@@ -32,5 +32,5 @@
 enum ftestErrorT
 {
-    Ok, CommandlineError, EnvSyntaxError, FileError,
+    noError, CommandlineError, EnvSyntaxError, FileError,
     CanFormSpecError, CheckError,
     SignalError, TimeoutError = SignalError + 14
@@ -46,5 +46,7 @@
 
 const char * ftestSkipBlancs ( const char * string );
-void ftestError ( const ftestErrorT errno, const char * format ... );
+char * ftestCutBlancs ( char * string );
+const char * ftestSubStr ( const char * subString, const char * string );
+void ftestError ( ftestErrorT errno, const char * format ... );
 void ftestUsagePrint ( const char * additionalUsage = 0 );
 
@@ -53,10 +55,11 @@
 void ftestSetName ( const char * execName, const char * algorithmName, const char * usage );
 
-void ftestGetOpts ( const int argc, char ** argv, int & optind );
-void ftestGetEnv ( const int, char ** argv, int & optind );
+void ftestGetOpts ( int argc, char ** argv, int & optind );
+void ftestGetEnv ( int, char ** argv, int & optind );
+bool ftestSearchTaggedArg ( int, char ** argv, int & optind, const char * optionTag );
 void ftestWriteSeed ();
 
-void ftestPrintTimer ( const long timer );
-void ftestPrintCheck ( const ftestStatusT check );
+void ftestPrintTimer ( long timer );
+void ftestPrintCheck ( ftestStatusT check );
 void ftestPrintEnv ();
 
Index: factory/ftest/ftest_util.m4
===================================================================
--- factory/ftest/ftest_util.m4	(revision d636adca8e47219c329f1d05ef6a4b1712a88b48)
+++ factory/ftest/ftest_util.m4	(revision 085370c3bc7e4c1b7148b5e0a0697d932dd8d11e)
@@ -1,3 +1,3 @@
-dnl $Id: ftest_util.m4,v 1.15 1998-02-19 15:10:07 schmidt Exp $
+dnl $Id: ftest_util.m4,v 1.16 1998-03-11 16:11:17 schmidt Exp $
 dnl
 dnl ftest_util.m4 - m4 macros used by the factory test environment.
@@ -110,4 +110,16 @@
 
 #
+# ftestDefaultInitializer() - return type dependent default
+#   initializer.
+#
+# $1: type
+#
+define(`ftestDefaultInitializer', `dnl
+ifelse(
+  `$1', `int', `` = 0'',
+  `$1', `bool', `` = false'',
+  `')')
+
+#
 # ftestOutVar() - declare output variable.
 #
@@ -115,15 +127,11 @@
 # $2: name of output variable
 #
-# Stores type of variable in macro _ftestOutType_<name>.
-# Does some extra magic for int's to avoid warnings on
+# Stores type of variable in macro _ftestOutType_<name>.  Does
+# some extra magic for internal data types to avoid warnings on
 # uninitialized variables.
 #
 define(`ftestOutVar', `dnl
 define(`_ftestOutType_'_qstripTWS(`$2'), `$1')dnl
-ifelse(`$1', `int',
-  ``$1 '_qstripTWS(`$2')` = 0'',
-  `$1', `bool',
-  ``$1 '_qstripTWS(`$2')` = false'',
-  ``$1 '_qstripTWS(`$2')')')
+`$1 '_qstripTWS(`$2')ftestDefaultInitializer(`$1')')
 
 #
@@ -137,12 +145,10 @@
 # checks whether this variable has been set from commandline or
 # not.
-# Does some extra magic for int's to avoid warnings on
-# uninitialized variables.
+# Does some extra magic for internal data types to avoid warnings
+# on uninitialized variables.
 #
 define(`ftestInVar', `dnl
 define(`_ftestInType_'_qstripTWS(`$2'), `$1')dnl
-ifelse(`$1', `int',
-  ``$1 '_qstripTWS(`$2')` = 0;'',
-  ``$1 '_qstripTWS(`$2')`;'')`
+`$1 '_qstripTWS(`$2')ftestDefaultInitializer(`$1')`;
     bool ftestArgGiven$2= false'')
 
@@ -163,5 +169,7 @@
     `ftestGetEnv( argc, argv, optind );
 
-    ftestPrintEnv()'')
+    ftestPrintEnv();
+
+'dnl')
 
 #
@@ -170,4 +178,5 @@
 # $1: name of input variable
 # $2: default for optional command line arguments
+# $3: search for optional argument with this tag
 #
 # Before reading the argument, check whether it really exists.
@@ -176,9 +185,17 @@
 # more arguments, and there is no default specified, print an
 # error.  If there is a default value, use it instead.
+#
+# If optional third argument is given, call
+# `ftestSearchTaggedArg()' to check whether there is a tagged
+# optional argument `<tag> = <value>' where `<tag>' is a
+# substring of `$3'.  Use `<value>' as value for the input
+# variable in this case, `$2' otherwise.
+#
 # In any case, save the fact whether the argument was given or
 # not in the variable ftestArgGiven<name>.
 #
 define(`ftestGetInVar', `dnl
-ifelse(`$#', `1',
+ifelse(
+  `$#', `1',
   ``if ( argv[ optind ] ) {
         ftestArgGiven$1= true;
@@ -188,5 +205,11 @@
                     "expected '_stripTWS(`_ftestInType_$1')` at position %d in commandline\n",
                     optind );'',
+  `$#', `2',
   ``if ( argv[ optind ] ) {
+	ftestArgGiven$1 = true;
+	$1 = ftestGet'_stripTWS(`_ftestInType_$1')`( argv[ optind++ ] );
+    } else
+	$1 = '_qstripTWS(`$2')`;'',
+  ``if ( ftestSearchTaggedArg( argc, argv, optind, $3) ) {
 	ftestArgGiven$1 = true;
 	$1 = ftestGet'_stripTWS(`_ftestInType_$1')`( argv[ optind++ ] );
@@ -215,5 +238,10 @@
 define(`ftestRun', `dnl
 `#line' __line__ "__file__"
-    `// save random generator seed now since the algorithm
+    `// check for superfluous command line arguments
+    if ( argv[ optind ] )
+	ftestError( CommandlineError, "superfluous argument `%s' at position %d",
+                    argv[ optind ], optind );
+
+    // save random generator seed now since the algorithm
     // most likely is going to change it
     ftestWriteSeed();
@@ -250,5 +278,6 @@
 # internal auxiliary function
 define(`_ftestOutput', `dnl
-ifelse(`$#', `0', ,
+ifelse(
+  `$#', `0', ,
   `$#', `1', ,
 ``;
