+ dir = argv[optind++];
+ if (!dir) die_usage();
+
+ if (dir[0] != '/')
+ strerr_die2x(100,FATAL,ERR_SLASH);
+
+ if (chdir(dir) == -1)
+ strerr_die4sys(111,FATAL,ERR_SWITCH,dir,": ");
+
+ if (forcehash == 0) forcehash = (int) u;
+
+ if (argv[optind]) {
+ while ((addr = argv[optind++]))
+ (void) subscribe(dir,addr,0,"","-manual",flagmysql,
+ forcehash,(char *) 0,FATAL);
+ } else {
+ for (;;) {
+ if (getln(&ssin,&line,&match,'\n') == -1)
+ strerr_die2sys(111,FATAL,ERR_READ_INPUT);
+ if (!match) break;
+ if (line.len == 1 || *line.s == '#') continue;
+ line.s[line.len - 1] = '\0';
+ if (flagname) {
+ cp = line.s;
+ while ((ch = *cp)) {
+ if (ch == '\\') {
+ if (!*(++cp)) break;
+ } else if (ch == ' ' || ch == '\t' || ch == ',') break;
+ cp++;
+ }
+ if (ch)
+ *cp = '\0';
+ }
+ (void) subscribe(dir,line.s,0,"","+manual",flagmysql,
+ forcehash,(char *) 0,FATAL);
+ }
+ }
+ closesql();