Subversion Repositories SvarDOS

Rev

Rev 493 | Rev 500 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 493 Rev 494
Line 120... Line 120...
120
      case 'k': /* /K = execute command and keep running */
120
      case 'k': /* /K = execute command and keep running */
121
      case 'K':
121
      case 'K':
122
        cfg->execcmd = cmdline + 1;
122
        cfg->execcmd = cmdline + 1;
123
        return;
123
        return;
124
 
124
 
-
 
125
      case 'd': /* /D = skip autoexec.bat processing */
-
 
126
      case 'D':
-
 
127
        cfg->flags |= FLAG_SKIP_AUTOEXEC;
-
 
128
        break;
-
 
129
 
125
      case 'e': /* preset the initial size of the environment block */
130
      case 'e': /* preset the initial size of the environment block */
126
      case 'E':
131
      case 'E':
127
        cmdline++;
132
        cmdline++;
128
        if (*cmdline == ':') cmdline++; /* could be /E:size */
133
        if (*cmdline == ':') cmdline++; /* could be /E:size */
129
        atous(&(cfg->envsiz), cmdline);
134
        atous(&(cfg->envsiz), cmdline);
Line 136... Line 141...
136
        break;
141
        break;
137
 
142
 
138
      case '?':
143
      case '?':
139
        outputnl("Starts the SvarCOM command interpreter");
144
        outputnl("Starts the SvarCOM command interpreter");
140
        outputnl("");
145
        outputnl("");
141
        outputnl("COMMAND /E:nnn [/[C|K] command]");
146
        outputnl("COMMAND /E:nnn [/[C|K] [/P] [/D] command]");
142
        outputnl("");
147
        outputnl("");
-
 
148
        outputnl("/D      Skip AUTOEXEC.BAT processing (makes sense only with /P)");
143
        outputnl("/E:nnn     Sets the environment size to nnn bytes");
149
        outputnl("/E:nnn  Sets the environment size to nnn bytes");
144
        outputnl("/P         Makes the new command interpreter permanent (can't exit)");
150
        outputnl("/P      Makes the new command interpreter permanent and run AUTOEXEC.BAT");
145
        outputnl("/C         Executes the specified command and returns");
151
        outputnl("/C      Executes the specified command and returns");
146
        outputnl("/K         Executes the specified command and continues running");
152
        outputnl("/K      Executes the specified command and continues running");
147
        exit(1);
153
        exit(1);
148
        break;
154
        break;
149
 
155
 
150
      default:
156
      default:
151
        output("Invalid switch:");
157
        output("Invalid switch: /");
152
        output(" ");
-
 
153
        outputnl(cmdline);
158
        outputnl(cmdline);
154
        break;
159
        break;
155
    }
160
    }
156
 
161
 
157
    /* move to next argument or quit processing if end of cmdline */
162
    /* move to next argument or quit processing if end of cmdline */
Line 646... Line 651...
646
    envsiz = *sizptr;
651
    envsiz = *sizptr;
647
    envsiz *= 16;
652
    envsiz *= 16;
648
    printf("rmod_inpbuff at %04X:%04X, env_seg at %04X:0000 (env_size = %u bytes)\r\n", rmod->rmodseg, RMOD_OFFSET_INPBUFF, *rmod_envseg, envsiz);
653
    printf("rmod_inpbuff at %04X:%04X, env_seg at %04X:0000 (env_size = %u bytes)\r\n", rmod->rmodseg, RMOD_OFFSET_INPBUFF, *rmod_envseg, envsiz);
649
  }*/
654
  }*/
650
 
655
 
651
  /* on /P check for the presence of AUTOEXEC.BAT and execute it if found */
656
  /* on /P check for the presence of AUTOEXEC.BAT and execute it if found,
-
 
657
   * but skip this check if /D was also passed */
652
  if (cfg.flags & FLAG_PERMANENT) {
658
  if ((cfg.flags & (FLAG_PERMANENT | FLAG_SKIP_AUTOEXEC)) == FLAG_PERMANENT) {
653
    if (file_getattr("AUTOEXEC.BAT") >= 0) cfg.execcmd = "AUTOEXEC.BAT";
659
    if (file_getattr("AUTOEXEC.BAT") >= 0) cfg.execcmd = "AUTOEXEC.BAT";
654
  }
660
  }
655
 
661
 
656
  do {
662
  do {
657
    /* terminate previous command with a CR/LF if ECHO ON (but not during BAT processing) */
663
    /* terminate previous command with a CR/LF if ECHO ON (but not during BAT processing) */