Subversion Repositories SvarDOS

Rev

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

Rev 407 Rev 410
Line 1... Line 1...
1
/*
1
/*
2
 * chcp
2
 * chcp
3
 */
3
 */
4
 
4
 
5
static int cmd_chcp(struct cmd_funcparam *p) {
5
static int cmd_chcp(struct cmd_funcparam *p) {
6
  short nnn = 0;
6
  unsigned short nnn = 0;
7
  unsigned short errcode = 0;
7
  unsigned short errcode = 0;
8
 
8
 
9
  if (cmd_ishlp(p)) {
9
  if (cmd_ishlp(p)) {
10
    outputnl("Displays or sets the active code page number");
10
    outputnl("Displays or sets the active code page number");
11
    outputnl("");
11
    outputnl("");
Line 23... Line 23...
23
    return(-1);
23
    return(-1);
24
  }
24
  }
25
 
25
 
26
  /* one param? must be numeric in range 1+ */
26
  /* one param? must be numeric in range 1+ */
27
  if (p->argc == 1) {
27
  if (p->argc == 1) {
28
    nnn = atoi(p->argv[0]);
28
    if (atouns(&nnn, p->argv[0]) != 0) {
29
    if (nnn < 1) {
-
 
30
      outputnl("Invalid code page number");
29
      outputnl("Invalid code page number");
31
      return(-1);
30
      return(-1);
32
    }
31
    }
33
    /* set code page to nnn */
32
    /* set code page to nnn */
34
    _asm {
33
    _asm {