home *** CD-ROM | disk | FTP | other *** search
- *** config.old.h
- --- config.h
- **************
- *** 11,16
- /* default place for dbm output of makedb (or use -o at run-time) */
- #define ALIASDB "/usr/local/lib/palias"
-
-
-
- /**************************************************************************
- --- 11,19 -----
- /* default place for dbm output of makedb (or use -o at run-time) */
- #define ALIASDB "/usr/local/lib/palias"
-
- + /* place for zcat for uncompressing maps inline */
- + #define COMPRESS "/usr2/clewis/maps/compress12 -d"
- +
-
-
- /**************************************************************************
- *** parse.old.y
- --- parse.y
- **************
- *** 402,407
- fixprivate(); /* munge private host definitions */
- Lineno = 1;
- while (optind < Argc) {
- if (freopen((Cfile = Argv[optind++]), "r", stdin) != 0)
- return 0;
- sprintf(errbuf, "%s: %s", Argv[0], Cfile);
- --- 402,439 -----
- fixprivate(); /* munge private host definitions */
- Lineno = 1;
- while (optind < Argc) {
- + #ifdef COMPRESS
- + static char Fname[512];
- + char compressed[512];
- + char cmdbuf[512];
- + int dotidx;
- +
- + strcpy(Fname, Cfile = Argv[optind++]);
- + strcpy(compressed, Cfile);
- +
- + dotidx = strlen(Cfile) - 2;
- + if (dotidx >= 0 && strcmp(&Fname[dotidx], ".Z") == 0)
- + Fname[dotidx] = '\0';
- + else
- + strcat(compressed, ".Z");
- +
- + if (access(Fname, 04) != 0) {
- + if (access(compressed, 04) == 0) {
- + unlink("/tmp/pathfile");
- + sprintf(cmdbuf, "%s < %s > /tmp/pathfile", COMPRESS,
- + compressed);
- + system(cmdbuf);
- + if (freopen("/tmp/pathfile", "r", stdin) != 0) {
- + unlink("/tmp/pathfile");
- + return 0;
- + }
- + unlink("/tmp/pathfile");
- + }
- + } else {
- + if (freopen(Fname, "r", stdin) != 0)
- + return 0;
- + }
- + #else
- if (freopen((Cfile = Argv[optind++]), "r", stdin) != 0)
- return 0;
- #endif
- **************
- *** 404,409
- while (optind < Argc) {
- if (freopen((Cfile = Argv[optind++]), "r", stdin) != 0)
- return 0;
- sprintf(errbuf, "%s: %s", Argv[0], Cfile);
- perror(errbuf);
- }
- --- 436,442 -----
- #else
- if (freopen((Cfile = Argv[optind++]), "r", stdin) != 0)
- return 0;
- + #endif
- sprintf(errbuf, "%s: %s", Argv[0], Cfile);
- perror(errbuf);
- }
-