Revision: 45761
http://brlcad.svn.sourceforge.net/brlcad/?rev=45761&view=rev
Author: brlcad
Date: 2011-08-02 18:26:50 +0000 (Tue, 02 Aug 2011)
Log Message:
-----------
style cleanup
Modified Paths:
--------------
brlcad/trunk/src/libbu/getopt.c
Modified: brlcad/trunk/src/libbu/getopt.c
===================================================================
--- brlcad/trunk/src/libbu/getopt.c 2011-08-02 18:11:12 UTC (rev 45760)
+++ brlcad/trunk/src/libbu/getopt.c 2011-08-02 18:26:50 UTC (rev 45761)
@@ -31,7 +31,7 @@
#define BADCH (int)'?'
#define EMSG ""
-#define tell(s) if (bu_opterr) { \
+#define tell(s) if (bu_opterr) { \
fputs(*nargv, stderr); \
fputs(s, stderr); \
fputc(bu_optopt, stderr); \
@@ -47,8 +47,10 @@
if (*place=='\0') {
/* update scanning pointer */
- if (bu_optind >= nargc || *(place = nargv[bu_optind]) != '-' ||
- !*++place) {
+ if (bu_optind >= nargc
+ || *(place = nargv[bu_optind]) != '-'
+ || !*++place)
+ {
place = EMSG;
return -1;
}
@@ -74,22 +76,26 @@
++bu_optind;
place = EMSG;
}
- }
- else {
+ } else {
/* need an argument */
- if (*place) bu_optarg = place; /* no white space */
- else if (nargc <= ++bu_optind) {
+ if {
+ /* no white space */
+ (*place) bu_optarg = place;
+ } else if (nargc <= ++bu_optind) {
/* no arg */
place = EMSG;
tell(": option requires an argument -- ");
+ } else {
+ /* white space */
+ bu_optarg = nargv[bu_optind];
}
- else bu_optarg = nargv[bu_optind]; /* white space */
place = EMSG;
++bu_optind;
}
return bu_optopt; /* dump back option letter */
}
+
/*
* Local Variables:
* mode: C
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits