Revision: 42252
http://brlcad.svn.sourceforge.net/brlcad/?rev=42252&view=rev
Author: brlcad
Date: 2011-01-13 22:14:06 +0000 (Thu, 13 Jan 2011)
Log Message:
-----------
replace commas with a #define COMMA since multichar string literals are not
valid to the preprocessor and will be caught more easily during compilation if
they get expanded with a space.
Modified Paths:
--------------
brlcad/trunk/src/conv/nastran-g.c
Modified: brlcad/trunk/src/conv/nastran-g.c
===================================================================
--- brlcad/trunk/src/conv/nastran-g.c 2011-01-13 21:06:57 UTC (rev 42251)
+++ brlcad/trunk/src/conv/nastran-g.c 2011-01-13 22:14:06 UTC (rev 42252)
@@ -40,7 +40,9 @@
#include "wdb.h"
#include "bu.h"
+#define COMMA ','
+
struct coord_sys
{
struct bu_list l; /* for the linked list */
@@ -375,10 +377,10 @@
while (line[i] != '\0' && isspace(line[i]))
i++;
j = (-1);
- while (line[i] != '\0' && line[i] != ',' && !isspace(line[i]))
+ while (line[i] != '\0' && line[i] != COMMA && !isspace(line[i]))
curr_rec[field_no][++j] = line[i++];
curr_rec[field_no][++j] = '\0';
- if (line[i] == ',')
+ if (line[i] == COMMA)
i++;
}
@@ -393,10 +395,10 @@
while (line[i] != '\0' && isspace(line[i]))
i++;
j = (-1);
- while (line[i] != '\0' && line[i] != ',' && !isspace(line[i]))
+ while (line[i] != '\0' && line[i] != COMMA && !isspace(line[i]))
curr_rec[field_no][++j] = line[i++];
curr_rec[field_no][++j] = '\0';
- if (line[i] == ',')
+ if (line[i] == COMMA)
i++;
}
}
@@ -461,7 +463,7 @@
return 1;
/* check which format is being used */
- tmp = strchr(line, ',');
+ tmp = strchr(line, COMMA);
if (tmp && tmp - line < 10)
form = FREE_FIELD;
else {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits