Subversion Repositories SvarDOS

Rev

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

Rev 421 Rev 533
Line 24... Line 24...
24
 
24
 
25
/*
25
/*
26
 * verify
26
 * verify
27
 */
27
 */
28
 
28
 
29
static int cmd_verify(struct cmd_funcparam *p) {
29
static enum cmd_result cmd_verify(struct cmd_funcparam *p) {
30
 
30
 
31
  if (cmd_ishlp(p)) {
31
  if (cmd_ishlp(p)) {
32
    outputnl("Tells DOS whether to verify that files are written correctly to disk.");
32
    outputnl("Tells DOS whether to verify that files are written correctly to disk.");
33
    outputnl("\r\nVERIFY [ON | OFF]\r\n");
33
    outputnl("\r\nVERIFY [ON | OFF]\r\n");
34
    outputnl("Type VERIFY without a parameter to display its current setting.");
34
    outputnl("Type VERIFY without a parameter to display its current setting.");
35
    return(-1);
35
    return(CMD_OK);
36
  }
36
  }
37
 
37
 
38
  if (p->argc > 1) {
38
  if (p->argc > 1) {
39
    outputnl("Too many parameters");
39
    outputnl("Too many parameters");
40
    return(-1);
40
    return(CMD_FAIL);
41
  }
41
  }
42
 
42
 
43
  if (p->argc == 0) {
43
  if (p->argc == 0) {
44
    unsigned char verstate = 0;
44
    unsigned char verstate = 0;
45
    _asm {
45
    _asm {
Line 52... Line 52...
52
    if (verstate == 0) {
52
    if (verstate == 0) {
53
      outputnl("VERIFY is off");
53
      outputnl("VERIFY is off");
54
    } else {
54
    } else {
55
      outputnl("VERIFY is on");
55
      outputnl("VERIFY is on");
56
    }
56
    }
57
    return(-1);
57
    return(CMD_OK);
58
  }
58
  }
59
 
59
 
60
  /* argc == 1*/
60
  /* argc == 1*/
61
  if (imatch(p->argv[0], "on")) {
61
  if (imatch(p->argv[0], "on")) {
62
    _asm {
62
    _asm {
Line 78... Line 78...
78
      pop dx
78
      pop dx
79
      pop ax
79
      pop ax
80
    }
80
    }
81
  } else {
81
  } else {
82
    outputnl("Must specify ON or OFF");
82
    outputnl("Must specify ON or OFF");
-
 
83
    return(CMD_FAIL);
83
  }
84
  }
84
 
85
 
85
  return(-1);
86
  return(CMD_OK);
86
}
87
}