gEDA-dev: [Patch] Gerbv: drill.c: Simplify code

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Thu May 17 10:52:08 EDT 2007


Appended patch simplifies reading the code.

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--- gerbv-1.0.2.orig/src/drill.c	2006-07-25 23:47:59.000000000 +0200
+++ gerbv-1.0.2/src/drill.c	2007-05-17 16:45:37.000000000 +0200
@@ -347,8 +347,7 @@
 		while ((read = gerb_fgetc(fd)) != EOF &&
 		       (isdigit(read) || read == '+' || read == '-'
 			|| read == ',' || read == '.')) {
-		    if(read != '+' && read != '-' 
-		       && read != ',' && read != '.') length ++;
+		    if(isdigit(read)) length ++;
 		    switch (local_state) {
 		    case 0:
 			if(read == '0') {


More information about the geda-dev mailing list