Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1352 → Rev 1351

/sved/trunk/sved.c
495,12 → 495,12
 
/* a custom argv-parsing routine that looks directly inside the PSP, avoids the need
* of argc and argv, saves some 330 bytes of binary size */
static const char *parseargv(void) {
static char *parseargv(void) {
char *tail = (void *)0x81; /* THIS WORKS ONLY IN SMALL MEMORY MODEL */
unsigned short count = 0;
char *argv[2];
char *argv[4];
 
while (count < 2) {
while (count < 4) {
/* jump to nearest arg */
while (*tail == ' ') {
*tail = 0;
520,9 → 520,8
 
/* check args now */
if (count == 0) return("");
if (count == 1) return(argv[0]);
 
return(NULL);
return(argv[0]);
}