60,7 → 60,7 |
} |
} else { /* set variable (do not rely on argv, SET has its own rules...) */ |
const char far *ptr; |
unsigned short i, errcode = 0; |
unsigned short i; |
|
/* locate the first space or tab */ |
for (ptr = p->cmdline; ((*ptr != ' ') && (*ptr != '\t')); ptr++); |
75,29 → 75,10 |
buff[i++] = *ptr; |
} |
|
/* make variable name all caps */ |
_asm { |
push ax |
push cx |
push dx |
/* make variable name all caps (country-dependend) */ |
buff[i] = 0; |
nls_strtoup(buff); |
|
mov ax, 0x6521 /* country-dependent capitalize string (DOS 4+) */ |
mov cx, [i] /* CX=length of string */ |
mov dx, buff /* DS:DX->string to capitalize */ |
int 0x21 |
jnc DONE |
mov [errcode], ax |
DONE: |
|
pop dx |
pop cx |
pop ax |
} |
if (errcode != 0) { |
nls_outputnl_doserr(errcode); |
return(CMD_FAIL); |
} |
|
/* copy value now */ |
while (*ptr != 0) { |
buff[i++] = *ptr; |