Hi.
I see there is no way in urjtag to use arguments with white spaces. This 
feature is useful for filenames in the "svf" command. With a little 
patch, white spaces can be used if preceded with the escape character '\'.
The patch :

--- src/global/parse.c    2010-01-13 17:05:49.375000000 -0300
+++ src/global/parse.c    2010-01-14 20:04:55.984375000 -0300
@@ -48,6 +48,7 @@
 urj_parse_line (urj_chain_t *chain, char *line)
 {
     int l, i, r, tcnt;
+    int escape = 0;
     char **a;
     char *c, *d;
     char *sline;
@@ -85,9 +86,18 @@
             break;
 
         /* copy the meat (non-space, non-NUL) */
-        while (!isspace (*c) && *c != '\0')
+        while ((!isspace (*c) || escape) && *c != '\0')
         {
-            *d++ = *c++;
+            if (*c == '\\' && escape == 0)
+            {
+                escape = 1;
+                c++;
+            }
+            else
+            {
+                escape = 0;
+                *d++ = *c++;
+            }
         }
         /* mark the end to the destination string */
         *d++ = '\0';


Usage example:
jtag> svf C:/path\ to\ file/PROGRAM.svf
or
jtag> svf C:\\path\ to\ file\\PROGRAM.svf

Gastón.


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to