Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 405 → Rev 404

/svarcom/trunk/cmd.c
11,7 → 11,6
#include "doserr.h"
#include "env.h"
#include "helpers.h"
#include "rmodinit.h"
 
#define BUFFER_SIZE 2048 /* make sure this is not bigger than the static buffer in command.c */
 
19,9 → 18,8
int argc; /* number of arguments */
const char *argv[256]; /* pointers to each argument */
unsigned short env_seg; /* segment of environment block */
unsigned short rmod_seg; /* segment of the resident module */
unsigned short argoffset; /* offset of cmdline where first argument starts */
const char far *cmdline; /* original cmdline (terminated by a NULL) */
const char far *cmdline; /* original cmdline (terminated by \r) */
char BUFFER[BUFFER_SIZE]; /* a buffer for whatever is needed */
};
 
41,7 → 39,6
#include "cmd/del.c"
#include "cmd/vol.c" /* must be included before dir.c due to dependency */
#include "cmd/dir.c"
#include "cmd/echo.c"
#include "cmd/exit.c"
#include "cmd/mkdir.c"
#include "cmd/path.c"
73,7 → 70,7
{"DATE", cmd_notimpl},
{"DEL", cmd_del},
{"DIR", cmd_dir},
{"ECHO", cmd_echo},
{"ECHO", cmd_notimpl},
{"ERASE", cmd_del},
{"EXIT", cmd_exit},
{"LH", cmd_notimpl},
158,7 → 155,7
}
 
 
int cmd_process(unsigned short rmod_seg, unsigned short env_seg, const char far *cmdline, char *BUFFER) {
int cmd_process(unsigned short env_seg, const char far *cmdline, char *BUFFER) {
const struct CMD_ID *cmdptr;
unsigned short argoffset;
struct cmd_funcparam *p = (void *)BUFFER;
199,7 → 196,6
/* prepare function parameters and feed it to the cmd handling function */
p->argc = cmd_explode(BUFFER + sizeof(*p), cmdline + argoffset, p->argv);
p->env_seg = env_seg;
p->rmod_seg = rmod_seg;
p->argoffset = argoffset;
p->cmdline = cmdline;