Subversion Repositories SvarDOS

Rev

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

Rev 462 Rev 533
Line 27... Line 27...
27
 *
27
 *
28
 * Changes the DOS command prompt.
28
 * Changes the DOS command prompt.
29
 *
29
 *
30
 */
30
 */
31
 
31
 
32
static int cmd_prompt(struct cmd_funcparam *p) {
32
static enum cmd_result cmd_prompt(struct cmd_funcparam *p) {
33
 
33
 
34
  if (cmd_ishlp(p)) {
34
  if (cmd_ishlp(p)) {
35
    outputnl("Changes the DOS command prompt.");
35
    outputnl("Changes the DOS command prompt.");
36
    outputnl("");
36
    outputnl("");
37
    outputnl("PROMPT [new command prompt specification]");
37
    outputnl("PROMPT [new command prompt specification]");
38
    return(-1);
38
    return(CMD_OK);
39
  }
39
  }
40
 
40
 
41
  /* no parameter - restore default prompt path */
41
  /* no parameter - restore default prompt path */
42
  if (p->argc == 0) {
42
  if (p->argc == 0) {
43
    env_dropvar(p->env_seg, "PROMPT");
43
    env_dropvar(p->env_seg, "PROMPT");
44
    return(-1);
44
    return(CMD_OK);
45
  }
45
  }
46
 
46
 
47
  /* otherwise set PROMPT to whatever is passed on command-line */
47
  /* otherwise set PROMPT to whatever is passed on command-line */
48
  {
48
  {
49
    unsigned short i;
49
    unsigned short i;
Line 54... Line 54...
54
      if (buff[i + 7] == 0) break;
54
      if (buff[i + 7] == 0) break;
55
    }
55
    }
56
    env_setvar(p->env_seg, buff);
56
    env_setvar(p->env_seg, buff);
57
  }
57
  }
58
 
58
 
59
  return(-1);
59
  return(CMD_OK);
60
}
60
}