Subversion Repositories SvarDOS

Rev

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

Rev 352 Rev 353
Line 1... Line 1...
1
/* entry point for internal commands
1
/* entry point for internal commands
2
 * matches internal commands and executes them
2
 * matches internal commands and executes them
3
 * returns exit code or -1 if not processed */
3
 * returns -1 or exit code if processed
-
 
4
 * returns -2 if command unrecognized */
4
 
5
 
5
#include <i86.h>
6
#include <i86.h>
6
#include <stdio.h>
7
#include <stdio.h>
7
 
8
 
8
#include "helpers.h"
9
#include "helpers.h"
Line 13... Line 14...
13
 
14
 
14
int cmd_process(int argc, const char **argv, unsigned short env_seg) {
15
int cmd_process(int argc, const char **argv, unsigned short env_seg) {
15
 
16
 
16
  if (imatch(argv[0], "set")) return(cmd_set(argc, argv, env_seg));
17
  if (imatch(argv[0], "set")) return(cmd_set(argc, argv, env_seg));
17
 
18
 
18
  return(-1);
19
  return(-2); /* command is not recognized as internal */
19
}
20
}