Subversion Repositories SvarDOS

Rev

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

Rev 405 Rev 410
Line 55... Line 55...
55
#include "rmodinit.h"
55
#include "rmodinit.h"
56
 
56
 
57
struct config {
57
struct config {
58
  int locate;
58
  int locate;
59
  int install;
59
  int install;
60
  int envsiz;
60
  unsigned short envsiz;
61
} cfg;
61
} cfg;
62
 
62
 
63
 
63
 
64
static void parse_argv(struct config *cfg, int argc, char **argv) {
64
static void parse_argv(struct config *cfg, int argc, char **argv) {
65
  int i;
65
  int i;
Line 68... Line 68...
68
  for (i = 1; i < argc; i++) {
68
  for (i = 1; i < argc; i++) {
69
    if (strcmp(argv[i], "/locate") == 0) {
69
    if (strcmp(argv[i], "/locate") == 0) {
70
      cfg->locate = 1;
70
      cfg->locate = 1;
71
    }
71
    }
72
    if (strstartswith(argv[i], "/e:") == 0) {
72
    if (strstartswith(argv[i], "/e:") == 0) {
73
      cfg->envsiz = atoi(argv[i]+3);
73
      if ((atouns(&(cfg->envsiz), argv[i] + 3) != 0) || (cfg->envsiz < 64)) {
74
      if (cfg->envsiz < 64) cfg->envsiz = 0;
74
        cfg->envsiz = 0;
-
 
75
      }
75
    }
76
    }
76
  }
77
  }
77
}
78
}
78
 
79
 
79
 
80