r5996 - in developers/werner/cncmap: align gp2rml zmap

werner at docs.openmoko.org werner at docs.openmoko.org
Mon Nov 1 23:54:39 CET 2010


Author: werner
Date: 2010-11-01 23:54:38 +0100 (Mon, 01 Nov 2010)
New Revision: 5996

Modified:
   developers/werner/cncmap/align/align.c
   developers/werner/cncmap/gp2rml/gp2rml.c
   developers/werner/cncmap/zmap/main.c
Log:
Accept "#" as comment character in gnuplot data files.

Misread the documentation - on Unix, only # is a valid comment character in
gnuplot data files. So we treat it as such now.
 
- gp2rml/gp2rml.c (process_file), zmap/main.c (process_file), align/align.c
  (process_file): accept "#" as comment character (in addition to "!")
  



Modified: developers/werner/cncmap/align/align.c
===================================================================
--- developers/werner/cncmap/align/align.c	2010-11-01 02:59:22 UTC (rev 5995)
+++ developers/werner/cncmap/align/align.c	2010-11-01 22:54:38 UTC (rev 5996)
@@ -123,7 +123,7 @@
 
 	while (fgets(buf, sizeof(buf), file)) {
 		lineno++;
-		if (*buf == '!') {
+		if (*buf == '!' || *buf == '#') {
 			printf("%s", buf);
 			continue;
 		}

Modified: developers/werner/cncmap/gp2rml/gp2rml.c
===================================================================
--- developers/werner/cncmap/gp2rml/gp2rml.c	2010-11-01 02:59:22 UTC (rev 5995)
+++ developers/werner/cncmap/gp2rml/gp2rml.c	2010-11-01 22:54:38 UTC (rev 5996)
@@ -94,7 +94,7 @@
 	new_path();
 	while (fgets(buf, sizeof(buf), file)) {
 		lineno++;
-		if (*buf == '!')
+		if (*buf == '!' || *buf == '#')
 			continue;
 		n = sscanf(buf, "%lf %lf %lf\n", &x, &y, &z);
 		switch (n) {

Modified: developers/werner/cncmap/zmap/main.c
===================================================================
--- developers/werner/cncmap/zmap/main.c	2010-11-01 02:59:22 UTC (rev 5995)
+++ developers/werner/cncmap/zmap/main.c	2010-11-01 22:54:38 UTC (rev 5996)
@@ -1,8 +1,8 @@
 /*
  * main.c - Command-line interface to zmap and zline
  *
- * Written 2009 by Werner Almesberger
- * Copyright 2009 Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 Werner Almesberger
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@
 
 	while (fgets(buf, sizeof(buf), file)) {
 		lineno++;
-		if (*buf == '!') {
+		if (*buf == '!' || *buf == '#') {
 			printf("%s", buf);
 			continue;
 		}




More information about the commitlog mailing list