Module Name: othersrc
Committed By: agc
Date: Thu Sep 30 22:16:57 UTC 2021
Modified Files:
othersrc/external/bsd/bufgap/dist: gap.h main.c
Log Message:
make the test program print the current version when invoked with -V
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.h
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/external/bsd/bufgap/dist/gap.h
diff -u othersrc/external/bsd/bufgap/dist/gap.h:1.1 othersrc/external/bsd/bufgap/dist/gap.h:1.2
--- othersrc/external/bsd/bufgap/dist/gap.h:1.1 Thu Sep 30 22:01:03 2021
+++ othersrc/external/bsd/bufgap/dist/gap.h Thu Sep 30 22:16:57 2021
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GAP_H_
-#define GAP_H_ 20210920
+#define GAP_H_ 20210930
#include <inttypes.h>
Index: othersrc/external/bsd/bufgap/dist/main.c
diff -u othersrc/external/bsd/bufgap/dist/main.c:1.2 othersrc/external/bsd/bufgap/dist/main.c:1.3
--- othersrc/external/bsd/bufgap/dist/main.c:1.2 Thu Sep 30 22:01:03 2021
+++ othersrc/external/bsd/bufgap/dist/main.c Thu Sep 30 22:16:57 2021
@@ -29,6 +29,10 @@
#include "gap.h"
+#define STRINGIFY(x) #x
+
+#define GAP_VERSION_STRING(x) STRINGIFY(x)
+
/* print stats for current position */
static int
printstats(gap_t *gap)
@@ -70,7 +74,12 @@ main(int argc, char **argv)
int ok;
int i;
- while ((i = getopt(argc, argv, "")) != -1) {
+ while ((i = getopt(argc, argv, "V")) != -1) {
+ switch(i) {
+ case 'V':
+ printf("%s: gap version: " GAP_VERSION_STRING(GAP_H_) "\n", *argv);
+ exit(EXIT_SUCCESS);
+ }
}
gap = gap_new();
while ((s = fgetln(stdin, &size)) != NULL) {