Subversion Repositories SvarDOS

Rev

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

Rev 375 Rev 387
Line 42... Line 42...
42
 
42
 
43
 
43
 
44
static int cmd_cd(struct cmd_funcparam *p) {
44
static int cmd_cd(struct cmd_funcparam *p) {
45
  char *buffptr = p->BUFFER;
45
  char *buffptr = p->BUFFER;
46
 
46
 
47
  /* two arguments max */
-
 
48
  if (p->argc > 1) {
-
 
49
    outputnl("Too many parameters");
-
 
50
    return(-1);
-
 
51
  }
-
 
52
 
-
 
53
  /* CD /? */
47
  /* CD /? */
54
  if ((p->argc == 1) && (imatch(p->argv[0], "/?"))) {
48
  if (cmd_ishlp(p)) {
55
    outputnl("Displays the name of or changes the current directory.");
49
    outputnl("Displays the name of or changes the current directory.");
56
    outputnl("");
50
    outputnl("");
57
    outputnl("CHDIR [drive:][path]");
51
    outputnl("CHDIR [drive:][path]");
58
    outputnl("CHDIR[..]");
52
    outputnl("CHDIR[..]");
59
    outputnl("CD [drive:][path]");
53
    outputnl("CD [drive:][path]");
Line 64... Line 58...
64
    outputnl("Type CD drive: to display the current directory in the specified drive.");
58
    outputnl("Type CD drive: to display the current directory in the specified drive.");
65
    outputnl("Type CD without parameters to display the current drive and directory.");
59
    outputnl("Type CD without parameters to display the current drive and directory.");
66
    return(-1);
60
    return(-1);
67
  }
61
  }
68
 
62
 
-
 
63
  /* one argument max */
-
 
64
  if (p->argc > 1) {
-
 
65
    outputnl("Too many parameters");
-
 
66
    return(-1);
-
 
67
  }
-
 
68
 
69
  /* no argument? display current drive and dir ("CWD") */
69
  /* no argument? display current drive and dir ("CWD") */
70
  if (p->argc == 0) {
70
  if (p->argc == 0) {
71
    unsigned char drv = 0;
71
    unsigned char drv = 0;
72
 
72
 
73
    _asm {
73
    _asm {