Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 532 → Rev 533

/svarcom/trunk/cmd/type.c
26,7 → 26,7
* type
*/
 
static int cmd_type(struct cmd_funcparam *p) {
static enum cmd_result cmd_type(struct cmd_funcparam *p) {
char *buff = p->BUFFER;
const char *fname = p->argv[0];
unsigned short err = 0;
35,17 → 35,17
outputnl("Displays the contents of a text file.");
outputnl("");
outputnl("TYPE [drive:][path]filename");
return(-1);
return(CMD_OK);
}
 
if (p->argc == 0) {
outputnl("Required parameter missing");
return(-1);
return(CMD_FAIL);
}
 
if (p->argc > 1) {
outputnl("Too many parameters");
return(-1);
return(CMD_FAIL);
}
 
/* if here then display the file */
104,7 → 104,10
pop ax
}
 
if (err != 0) outputnl(doserr(err));
if (err != 0) {
outputnl(doserr(err));
return(CMD_FAIL);
}
 
return(-1);
return(CMD_OK);
}