Revision: 37495
          http://brlcad.svn.sourceforge.net/brlcad/?rev=37495&view=rev
Author:   bob1961
Date:     2010-01-29 22:37:00 +0000 (Fri, 29 Jan 2010)

Log Message:
-----------
Modified ged_move_all_file() to handle comments. It's expected that 
bu_argv_from_string() will handle arguments with spaces (i.e. "example arg with 
spaces").

Modified Paths:
--------------
    brlcad/trunk/src/libged/move_all.c

Modified: brlcad/trunk/src/libged/move_all.c
===================================================================
--- brlcad/trunk/src/libged/move_all.c  2010-01-29 22:32:48 UTC (rev 37494)
+++ brlcad/trunk/src/libged/move_all.c  2010-01-29 22:37:00 UTC (rev 37495)
@@ -46,15 +46,17 @@
     }
 
     while (bu_fgets(line, sizeof(line), fp) != NULL) {
-       char old[256];
-       char new[256];
+       char *cp;
+       char *new_av[3];
 
-       if (sscanf(line, "%s %s", old, new) != 2) {
-           bu_vls_printf(&gedp->ged_result_str, "Discarding %s\n", line);
+       /* Skip comments */
+       if ((cp = strchr(line, '#')) != NULL)
+           *cp = '\0';
+
+       if (bu_argv_from_string(new_av, 2, line) != 2)
            continue;
-       }
 
-       ged_move_all_func(gedp, nflag, (const char *)old, (const char *)new);
+       ged_move_all_func(gedp, nflag, (const char *)new_av[0], (const char 
*)new_av[1]);
     }
 
     fclose(fp);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to