Subversion Repositories SvarDOS

Rev

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

Rev 576 Rev 957
Line 20... Line 20...
20
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
 * DEALINGS IN THE SOFTWARE.
22
 * DEALINGS IN THE SOFTWARE.
23
 */
23
 */
24
 
24
 
25
/* entry point for internal commands
25
/* entry point for internal commands, it matches internal commands and
26
 * matches internal commands and executes them
26
 * executes them.
-
 
27
 *
27
 * returns -1 or exit code if processed
28
 * returns one of the following values:
-
 
29
 *   CMD_OK               command executed successfully
-
 
30
 *   CMD_FAIL             command ended in error
-
 
31
 *   CMD_CHANGED          command-line has been modified (used by IF)
-
 
32
 *   CMD_CHANGED_BY_CALL  command-line has been modified by CALL
28
 * returns -2 if command unrecognized
33
 *   CMD_NOTFOUND         command unrecognized
29
 */
34
 */
30
 
35
 
31
#include <i86.h>
36
#include <i86.h>
32
#include <stdio.h>
37
#include <stdio.h>
33
#include <stdlib.h>
38
#include <stdlib.h>
Line 63... Line 68...
63
  return(0);
68
  return(0);
64
}
69
}
65
 
70
 
66
#include "cmd/_notimpl.c"
71
#include "cmd/_notimpl.c"
67
#include "cmd/break.c"
72
#include "cmd/break.c"
-
 
73
#include "cmd/call.c"
68
#include "cmd/cd.c"
74
#include "cmd/cd.c"
69
#include "cmd/chcp.c"
75
#include "cmd/chcp.c"
70
#include "cmd/cls.c"
76
#include "cmd/cls.c"
71
#include "cmd/copy.c"
77
#include "cmd/copy.c"
72
#include "cmd/date.c"
78
#include "cmd/date.c"
Line 97... Line 103...
97
  enum cmd_result (*func_ptr)(struct cmd_funcparam *); /* pointer to handling function */
103
  enum cmd_result (*func_ptr)(struct cmd_funcparam *); /* pointer to handling function */
98
};
104
};
99
 
105
 
100
const struct CMD_ID INTERNAL_CMDS[] = {
106
const struct CMD_ID INTERNAL_CMDS[] = {
101
  {"BREAK",   cmd_break},
107
  {"BREAK",   cmd_break},
-
 
108
  {"CALL",    cmd_call},
102
  {"CD",      cmd_cd},
109
  {"CD",      cmd_cd},
103
  {"CHCP",    cmd_chcp},
110
  {"CHCP",    cmd_chcp},
104
  {"CHDIR",   cmd_cd},
111
  {"CHDIR",   cmd_cd},
105
  {"CLS",     cmd_cls},
112
  {"CLS",     cmd_cls},
106
  {"COPY",    cmd_copy},
113
  {"COPY",    cmd_copy},