Subversion Repositories SvarDOS

Rev

Rev 538 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 538 Rev 989
Line 1... Line 1...
1
/* This file is part of the SvarCOM project and is published under the terms
1
/* This file is part of the SvarCOM project and is published under the terms
2
 * of the MIT license.
2
 * of the MIT license.
3
 *
3
 *
4
 * Copyright (C) 2021 Mateusz Viste
4
 * Copyright (C) 2021-2022 Mateusz Viste
5
 *
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a
6
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 * copy of this software and associated documentation files (the "Software"),
7
 * copy of this software and associated documentation files (the "Software"),
8
 * to deal in the Software without restriction, including without limitation
8
 * to deal in the Software without restriction, including without limitation
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Line 38... Line 38...
38
static enum cmd_result cmd_cd(struct cmd_funcparam *p) {
38
static enum cmd_result cmd_cd(struct cmd_funcparam *p) {
39
  char *buffptr = p->BUFFER;
39
  char *buffptr = p->BUFFER;
40
 
40
 
41
  /* CD /? */
41
  /* CD /? */
42
  if (cmd_ishlp(p)) {
42
  if (cmd_ishlp(p)) {
43
    outputnl("Displays the name of or changes the current directory.");
43
    nls_outputnl(12,0); /* "Displays the name of or changes the current directory." */
44
    outputnl("");
44
    outputnl("");
45
    outputnl("CHDIR [drive:][path]");
45
    nls_outputnl(12,1); /* "CHDIR [drive:][path]" */
46
    outputnl("CHDIR[..]");
46
    nls_outputnl(12,2); /* "CHDIR[..]" */
47
    outputnl("CD [drive:][path]");
47
    nls_outputnl(12,3); /* "CD [drive:][path]" */
48
    outputnl("CD[..]");
48
    nls_outputnl(12,4); /* "CD[..]" */
49
    outputnl("");
49
    outputnl("");
50
    outputnl(".. Specifies that you want to change to the parent directory.");
50
    nls_outputnl(12,5); /* ".. Specifies that you want to change to the parent directory." */
51
    outputnl("");
51
    outputnl("");
52
    outputnl("Type CD drive: to display the current directory in the specified drive.");
52
    nls_outputnl(12,6); /* "Type CD drive: to display the current directory in the specified drive." */
53
    outputnl("Type CD without parameters to display the current drive and directory.");
53
    nls_outputnl(12,7); /* "Type CD without parameters to display the current drive and directory." */
54
    return(CMD_OK);
54
    return(CMD_OK);
55
  }
55
  }
56
 
56
 
57
  /* one argument max */
57
  /* one argument max */
58
  if (p->argc > 1) {
58
  if (p->argc > 1) {
59
    outputnl("Too many parameters");
59
    nls_outputnl(0,4); /* "Too many parameters" */
60
    return(CMD_FAIL);
60
    return(CMD_FAIL);
61
  }
61
  }
62
 
62
 
63
  /* no argument? display current drive and dir ("CWD") */
63
  /* no argument? display current drive and dir ("CWD") */
64
  if (p->argc == 0) {
64
  if (p->argc == 0) {