Subversion Repositories SvarDOS

Rev

Rev 1137 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1137 Rev 1138
Line 60... Line 60...
60
    }
60
    }
61
  } else { /* set variable (do not rely on argv, SET has its own rules...) */
61
  } else { /* set variable (do not rely on argv, SET has its own rules...) */
62
    const char far *ptr;
62
    const char far *ptr;
63
    unsigned short i;
63
    unsigned short i;
64
 
64
 
-
 
65
    /* locate the first space (note that cmdline separators should be sanitized
65
    /* locate the first space or tab */
66
     * to space only by now) */
66
    for (ptr = p->cmdline; ((*ptr != ' ') && (*ptr != '\t')); ptr++);
67
    for (ptr = p->cmdline; *ptr != ' '; ptr++);
67
 
68
 
68
    /* now locate the first non-space/non-tab: that's where the variable name begins */
69
    /* now locate the first non-space: that's where the variable name begins */
69
    for (; ((*ptr == ' ') || (*ptr == '\t')); ptr++);
70
    for (; *ptr == ' '; ptr++);
70
 
71
 
71
    /* copy variable name to buff */
72
    /* copy variable name to buff */
72
    i = 0;
73
    i = 0;
73
    for (; *ptr != '='; ptr++) {
74
    for (; *ptr != '='; ptr++) {
74
      if (*ptr == 0) goto syntax_err;
75
      if (*ptr == 0) goto syntax_err;