head 2.73; access; symbols; locks; strict; comment @ * @; 2.73 date 96.02.08.19.07.47; author jromine; state Exp; branches; next 2.72; 2.72 date 96.02.08.18.36.25; author jromine; state Exp; branches; next 2.71; 2.71 date 93.11.30.22.01.04; author jromine; state Exp; branches; next 2.70; 2.70 date 93.08.25.18.07.10; author jromine; state Exp; branches; next 2.69; 2.69 date 93.08.20.19.47.46; author jromine; state Exp; branches; next 2.68; 2.68 date 93.08.19.23.51.43; author jromine; state Exp; branches; next 2.67; 2.67 date 93.06.03.17.59.55; author jromine; state Exp; branches; next 2.66; 2.66 date 93.06.03.17.43.20; author jromine; state Exp; branches; next 2.65; 2.65 date 93.02.26.19.01.17; author jromine; state Exp; branches; next 2.64; 2.64 date 92.12.16.21.01.07; author jromine; state Exp; branches; next 2.63; 2.63 date 92.12.02.19.08.03; author jromine; state Exp; branches; next 2.62; 2.62 date 92.11.13.00.55.38; author jromine; state Exp; branches; next 2.61; 2.61 date 92.11.12.22.48.51; author jromine; state Exp; branches; next 2.60; 2.60 date 92.11.11.22.58.07; author jromine; state Exp; branches; next 2.59; 2.59 date 92.11.11.21.26.23; author jromine; state Exp; branches; next 2.58; 2.58 date 92.11.10.22.40.56; author jromine; state Exp; branches; next 2.57; 2.57 date 92.11.09.17.37.20; author jromine; state Exp; branches; next 2.56; 2.56 date 92.11.06.00.46.48; author jromine; state Exp; branches; next 2.55; 2.55 date 92.11.05.19.25.27; author jromine; state Exp; branches; next 2.54; 2.54 date 92.11.05.17.20.49; author jromine; state Exp; branches; next 2.53; 2.53 date 92.11.04.03.00.54; author jromine; state Exp; branches; next 2.52; 2.52 date 92.10.31.07.56.48; author jromine; state Exp; branches; next 2.51; 2.51 date 92.10.27.20.22.26; author jromine; state Exp; branches; next 2.50; 2.50 date 92.10.27.18.10.15; author jromine; state Exp; branches; next 2.49; 2.49 date 92.10.26.22.32.44; author jromine; state Exp; branches; next 2.48; 2.48 date 92.10.21.02.06.58; author jromine; state Exp; branches; next 2.47; 2.47 date 92.10.20.23.49.51; author jromine; state Exp; branches; next 2.46; 2.46 date 92.10.20.20.40.19; author jromine; state Exp; branches; next 2.45; 2.45 date 92.10.19.21.59.33; author jromine; state Exp; branches; next 2.44; 2.44 date 92.10.19.19.57.22; author jromine; state Exp; branches; next 2.43; 2.43 date 92.10.19.16.46.32; author jromine; state Exp; branches; next 2.42; 2.42 date 92.05.12.21.45.45; author jromine; state Exp; branches; next 2.41; 2.41 date 92.03.03.17.09.57; author jromine; state Exp; branches; next 2.40; 2.40 date 92.03.03.17.07.48; author jromine; state Exp; branches; next 2.39; 2.39 date 92.02.09.23.30.11; author jromine; state Exp; branches; next 2.38; 2.38 date 92.02.08.00.02.59; author jromine; state Exp; branches; next 2.37; 2.37 date 92.02.07.19.12.39; author jromine; state Exp; branches; next 2.36; 2.36 date 92.02.05.22.10.00; author jromine; state Exp; branches; next 2.35; 2.35 date 92.02.05.21.52.46; author jromine; state Exp; branches; next 2.34; 2.34 date 92.02.05.21.10.45; author jromine; state Exp; branches; next 2.33; 2.33 date 92.01.31.22.47.36; author jromine; state Exp; branches; next 2.32; 2.32 date 92.01.31.21.07.51; author jromine; state Exp; branches; next 2.31; 2.31 date 92.01.27.17.34.29; author jromine; state Exp; branches; next 2.30; 2.30 date 91.01.25.14.48.44; author mh; state Exp; branches; next 2.29; 2.29 date 90.12.18.14.13.31; author mh; state Exp; branches; next 2.28; 2.28 date 90.12.18.13.38.31; author mh; state Exp; branches; next 2.27; 2.27 date 90.12.18.13.36.49; author mh; state Exp; branches; next 2.26; 2.26 date 90.11.05.16.24.55; author mh; state Exp; branches; next 2.25; 2.25 date 90.11.05.16.05.46; author mh; state Exp; branches; next 2.24; 2.24 date 90.11.05.15.56.27; author mh; state Exp; branches; next 2.23; 2.23 date 90.04.08.10.57.33; author sources; state Exp; branches; next 2.22; 2.22 date 90.04.06.09.54.00; author sources; state Exp; branches; next 2.21; 2.21 date 90.04.05.22.20.02; author sources; state Exp; branches; next 2.20; 2.20 date 90.04.05.15.29.12; author sources; state Exp; branches; next 2.19; 2.19 date 90.04.05.14.43.07; author sources; state Exp; branches; next 2.18; 2.18 date 90.04.02.14.49.52; author sources; state Exp; branches; next 2.17; 2.17 date 90.04.02.14.11.33; author sources; state Exp; branches; next 2.16; 2.16 date 90.03.21.11.01.12; author sources; state Exp; branches; next 2.15; 2.15 date 90.03.20.20.53.14; author sources; state Exp; branches; next 2.14; 2.14 date 90.03.19.15.49.44; author sources; state Exp; branches; next 2.13; 2.13 date 90.03.19.10.23.21; author sources; state Exp; branches; next 2.12; 2.12 date 90.03.15.21.25.01; author sources; state Exp; branches; next 2.11; 2.11 date 90.03.12.14.28.10; author sources; state Exp; branches; next 2.10; 2.10 date 90.03.09.14.27.20; author sources; state Exp; branches; next 2.9; 2.9 date 90.03.09.14.26.10; author sources; state Exp; branches; next 2.8; 2.8 date 90.02.16.11.07.25; author sources; state Exp; branches; next 2.7; 2.7 date 90.02.16.10.57.17; author sources; state Exp; branches; next 2.6; 2.6 date 90.02.15.15.55.37; author sources; state Exp; branches; next 2.5; 2.5 date 90.02.15.13.58.03; author sources; state Exp; branches; next 2.4; 2.4 date 90.02.15.13.56.08; author sources; state Exp; branches; next 2.3; 2.3 date 90.02.08.15.47.58; author sources; state Exp; branches; next 2.2; 2.2 date 90.02.06.12.50.08; author sources; state Exp; branches; next 2.1; 2.1 date 90.02.01.13.13.31; author sources; state Exp; branches; next 2.0; 2.0 date 89.11.17.15.56.51; author sources; state Exp; branches; next 1.2; 1.2 date 89.06.02.11.02.18; author sources; state Exp; branches; next 1.1; 1.1 date 88.06.29.13.57.02; author sources; state Exp; branches; next ; desc @Initial revision with no mods. Gary @ 2.73 log @update for 6.8.4 @ text @/* mhconfig.c - configure MH */ /* cc [-DSYS5] mhconfig.c -o mhconfig */ #ifndef lint static char ident[] = "@@(#)$Id: mhconfig.c,v 2.72 1996/02/08 18:36:25 jromine Exp jromine $"; #endif /* lint */ #include #include #ifdef hpux #define SYS5 #endif #ifdef SYS5 #define index strchr #define rindex strrchr #endif /* SYS5 */ static void insopt(), mkopts(); extern char *strcpy(), *malloc(), *index(), *rindex(); #ifdef notdef extern char *sprintf(); /* rely on stdio.h to declare this */ #endif #define BANNER "This is %s, for generic UNIX (MH.6 configuration program)\n\n" #define SED "config.sed" #define SEDOC "doc/config.sed" #define MAKE "../%s/Makefile" #define WARNING "This file is automatically generated. Do not edit!" #define MHRELEASE "6.8.4" /* for version: "Maj.min.pat" */ #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */ #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */ #define MHSLIBVER "3.2" /* SunOS4 shared library version */ #define NOTOK (-1) #define NULLCP ((char *) 0) #define SVAL(s) (s ? s : "") #define QUOTE '\\' /* */ static int smtp = 0; static int mpop = 0; static int sedP = 1; static int filesP = 1; static int docP = 1; static int makeP = 1; static char *myname = "mhconfig"; static char *config = NULL; static char *myopts = NULL; static char *binpath = "/usr/local"; static char *bbhome = "/usr/spool/bboards"; static char *bboards = "off"; static char *bbdelivery = "off"; static char *ccoptions = NULL; static char *chownpath = "/etc/chown"; static char *compiler = "/bin/cc"; static char *copy = "cp"; static char *curses = "-lcurses -ltermlib"; static char *debug = "off"; static char *editor = "prompter"; static char *etcpath = "/usr/local/lib/mh"; static char *ldoptions = NULL; static char *ldoptlibs = NULL; static char *lex = "lex -nt"; static char *ln = "ln"; static char *mailgroup = "off"; static char *mailpath = "/usr/spool/mail"; static char *maildir = NULL; static char *mailfile = NULL; static char *mancat = "man"; static char *mandir = "/usr/man"; static char *manuals = "standard"; static char *mf = "off"; static char *mts = "sendmail"; static char *poppath = "/usr/etc"; static char *removeit = "mv -f"; static char *regtest = "off"; static char *oldload = "off"; static char *options = NULL; static char *pop = "off"; static char *ranlib = "on"; static char *sharedlib = "off"; static char *signl = "int"; static char *slibdir = "/usr/local/lib"; static char *slflags = "-pic"; static char *sprntf = NULL; /* */ #define unknown 0 #define mmdf 1 #define mmdf2 2 #define mh 3 #define sendmail 4 static int mtsnum = unknown; static struct mtsopt { char *mtskey; char *optval; int code; int mtsflags; #define NOFLAGS 0x00 #define DOSMTP 0x01 #define NOMF 0x02 } mtsopts[] = { "mmdf", "MMDFMTS MMDFI", mmdf, NOFLAGS, "mmdf/smtp", "SENDMTS SMTP", mmdf, DOSMTP, "mmdf2", "MMDFMTS MMDFII", mmdf2, NOFLAGS, "mmdf2/smtp", "SENDMTS MMDFII SMTP", mmdf2, DOSMTP, "mh", "MHMTS", mh, NOFLAGS, "sendmail", "SENDMTS", sendmail, NOMF, "sendmail/smtp", "SENDMTS SMTP", sendmail, NOMF, "zmailer", "ZMAILER SENDMTS", sendmail, NOMF, "zmailer/smtp", "ZMAILER SENDMTS SMTP", sendmail, NOMF, NULL, NULL, unknown, NOFLAGS }; /* other options which cause sed BEGIN/END configuration changes */ static struct copt { char *c_name; int c_value; } copts[] = { "APOP", 0, /* authenticated pop */ "BSD43", 0, /* sgid ttys */ "BSD44", 0, /* manual headings */ "KPOP", 0, /* KERBEROS pop */ "HESIOD", 0, "MIME", 0, /* multi-media extensions */ "MPOP", 0, /* mobile pop */ "MSGID", 0, /* slocal dup surpression */ "NORUSERPASS", 0, /* no ruserpass(3) */ "TMA", 0, /* trusted mail */ "TTYD", 0, "UCI", 0, NULL, 0 }; /* */ static struct bind { char *keyword; char **value; int flags; #define BD_NIL 0x00 #define BD_ADD 0x01 } binds[] = { "bin", &binpath, BD_NIL, "bbhome", &bbhome, BD_NIL, "bboards", &bboards, BD_NIL, "bbdelivery", &bbdelivery, BD_NIL, "ccoptions", &ccoptions, BD_ADD, "chown", &chownpath, BD_NIL, "cc", &compiler, BD_NIL, "cp", ©, BD_NIL, "curses", &curses, BD_NIL, "debug", &debug, BD_NIL, "editor", &editor, BD_NIL, "etc", &etcpath, BD_NIL, "ldoptions", &ldoptions, BD_ADD, "ldoptlibs", &ldoptlibs, BD_ADD, "lex", &lex, BD_NIL, "ln", &ln, BD_NIL, "mail", &mailpath, BD_NIL, "mailgroup", &mailgroup, BD_NIL, "mandir", &mandir, BD_NIL, "manuals", &manuals, BD_NIL, "mf", &mf, BD_NIL, "mts", &mts, BD_NIL, "oldload", &oldload, BD_NIL, "options", &options, BD_ADD, "pop", &pop, BD_NIL, "popdir", &poppath, BD_NIL, "ranlib", &ranlib, BD_NIL, "remove", &removeit, BD_NIL, "regtest", ®test, BD_NIL, "sharedlib", &sharedlib, BD_NIL, "signal", &signl, BD_NIL, "slflags", &slflags, BD_NIL, "slibdir", &slibdir, BD_NIL, "sprintf", &sprntf, BD_NIL, NULL }; /* */ char *files[] = { "../support/bboards/bboards.daily", "../support/bboards/bboards.weekly", "../support/bboards/crontab", "../support/bboards/MakeBBoards", "../config/config.c", "../zotnet/mts/mts.c", "../zotnet/mts/mtstailor", "../support/general/MailAliases", "../mts/sendmail/bboardsMH.m4", "../mts/sendmail/popMH.m4", NULL }; static struct pair { char *infile; char *outfile; } makefiles[] = { "makefiles/MH-Makefile", ".", "makefiles/config","config", "makefiles/dist","dist", "makefiles/doc","doc", "makefiles/mtsM","mts", "makefiles/mts/mh","mts/mh", "makefiles/mts/mmdf","mts/mmdf", "makefiles/mts/sendmail","mts/sendmail", "makefiles/papers","papers", "makefiles/sbr","sbr", "makefiles/supportM","support", "makefiles/support/bboards","support/bboards", "makefiles/support/general","support/general", "makefiles/support/pop","support/pop", "makefiles/uip","uip", "makefiles/zotnetM","zotnet", "makefiles/zotnet/bboards","zotnet/bboards", "makefiles/zotnet/mf","zotnet/mf", "makefiles/zotnet/mts","zotnet/mts", "makefiles/zotnet/tws","zotnet/tws", NULL }; static do_sed(), do_sedfile(), do_files(), do_doc(), do_make(); static shell(), arginit(), add_option(), trim(); static char *stradd (), *strdup (), *tail (); long time (); /* */ /* ARGSUSED */ main (argc, argv, envp) int argc; char **argv, **envp; { arginit (argv); if (sedP) do_sed (); if (filesP) do_files (); if (docP) do_doc (); if (makeP) do_make (); #ifdef notdef printf ("Don't forget to edit \"config/mtstailor\"\n"); #endif if (filesP || makeP) printf ("Don't forget to run \"make clean\" in the top directory before compiling\n"); exit (0); } /* */ static do_sed () { if (docP != 2) do_sedfile (SED, 0); do_sedfile (SEDOC, smtp); } static do_alldoc (fp) FILE *fp; { fprintf (fp, "%s\n%s\n%s\n%s\n", /* turn @@BEGIN: XX into #ifdef XX */ "s!^@@BEGIN: \\(.*\\)$!.br\\", /* for MH wizard manual set */ ".ti 0i\\", "#ifdef \\1\\", ".br!" ); fprintf (fp, "%s\n%s\n%s\n%s\n", "s!^@@END: \\(.*\\)$!.br\\", ".ti 0i\\", "#endif /* \\1\\ */", ".br!" ); } /* */ static do_sedfile (sed, flag) char *sed; int flag; { int i; FILE * fp; struct copt *op; if ((fp = fopen (sed, "w")) == NULL) adios (sed, "unable to write"); printf ("generating %s\n", sed); if (docP == 2) { printf ("...using special all-doc format.\n"); printf ("Be sure to reconfigure before compiling.\n"); do_alldoc(fp); /* hack up doc/config.sed */ } fprintf (fp, "s%%@@(MHCONFIGFILE)%%%s%%g\n", SVAL(config)); fprintf (fp, "s%%@@(MHWARNING)%%%s%%g\n", WARNING); fprintf (fp, "s%%@@(MHRELEASE)%%%s%%g\n", MHRELEASE); fprintf (fp, "s%%@@(MHCENTERFOOT)%%%s%%g\n", MHCENTERFOOT); fprintf (fp, "s%%@@(MHLEFTFOOT)%%%s%%g\n", MHLEFTFOOT); fprintf (fp, "s%%@@(MHBINPATH)%%%s%%g\n", SVAL (binpath)); fprintf (fp, "s%%@@(MHETCPATH)%%%s%%g\n", SVAL (etcpath)); fprintf (fp, "s%%@@(MHPOPDPATH)%%%s%%g\n", SVAL (poppath)); fprintf (fp, "s%%@@(MHCHOWNPATH)%%%s%%g\n", SVAL (chownpath)); fprintf (fp, "s%%@@(MHDROPATH)%%%s%%g\n", SVAL (maildir)); fprintf (fp, "s%%@@(MHDROPFIL)%%%s%%g\n", SVAL (mailfile)); if (maildir) fprintf (fp, "s%%@@(MHDROPLOC)%%%s/$USER%%g\n", SVAL (maildir)); else fprintf (fp, "s%%@@(MHDROPLOC)%%$HOME/%s%%g\n", SVAL (mailfile)); fprintf (fp, "s%%@@(MHDROPHAK)%%%s%%g\n",/* HACK */ maildir ? maildir : "/usr/spool/mail"); fprintf (fp, "s%%@@(MHMANDIR)%%%s%%g\n", mandir); fprintf (fp, "s%%@@(MHCATMAN)%%%s%%g\n", strcmp(mancat, "cat") == 0 ? "| nroff -man" : ""); if (strcmp (manuals, "standard") == 0 || strcmp (manuals, "gen") == 0) for (i = 1; i <= 8; i++) { fprintf (fp, "s%%@@(MHMANDIR%d)%%%s%d%%g\n", i, mancat, i); fprintf (fp, "s%%@@(MHMANEXT%d)%%%d%%g\n", i, i); } else for (i = 1; i <= 8; i++) { fprintf (fp, "s%%@@(MHMANDIR%d)%%%s%c%%g\n", i, mancat, strcmp (manuals, "new") == 0 ? 'n' : strcmp (manuals, "old") == 0 ? 'o' : strcmp (manuals, "bsd44") == 0 ? i + '0' : 'l'); fprintf (fp, "s%%@@(MHMANEXT%d)%%%c%%g\n", i, strcmp (manuals, "new") == 0 ? 'n' : strcmp (manuals, "old") == 0 ? 'o' : strcmp (manuals, "bsd44") == 0 ? '0' : 'l'); } /* */ if (strcmp (regtest, "on") == 0) fprintf (fp, "s%%@@(MHHOSTVER)%%%s%%g\n", "-n"); else fprintf (fp, "s%%@@(MHHOSTVER)%%%s%%g\n", ""); if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "none") == 0) fprintf (fp, "s%%@@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */ else fprintf (fp, "s%%@@(MHMANGEN)%%%s%%g\n", ""); fprintf (fp, "s%%@@(MHEDITOR)%%%s%%g\n", SVAL (editor)); fprintf (fp, "s%%@@(MHCONFIG)%%%s%%g\n", SVAL (myopts)); fprintf (fp, "s%%@@(MHCOMPILER)%%%s%%g\n", SVAL (compiler)); fprintf (fp, "s%%@@(CP)%%%s%%g\n", SVAL (copy)); fprintf (fp, "s%%@@(LN)%%%s%%g\n", SVAL (ln)); fprintf (fp, "s%%@@(LEX)%%%s%%g\n", SVAL (lex)); if (ccoptions) fprintf (fp, "s%%@@(MHOPTIONS)%%%s %s%%g\n", SVAL (options), SVAL (ccoptions)); else fprintf (fp, "s%%@@(MHOPTIONS)%%%s %s%%g\n", SVAL (options), "-O"); fprintf (fp, "s%%@@(LDOPTIONS)%%%s%%g\n", SVAL (ldoptions)); fprintf (fp, "s%%@@(LDOPTLIB)%%%s%%g\n", SVAL (ldoptlibs)); fprintf (fp, "s%%@@(LDCURSES)%%%s%%g\n", SVAL (curses)); if (strcmp (bboards, "off") == 0) fprintf (fp, "/^@@BEGIN: BBOARDS$/,/^@@END: BBOARDS$/d\n"); else fprintf (fp, "/^@@BEGIN: BBOARDS$/d\n/^@@END: BBOARDS$/d\n"); fprintf (fp, "s%%@@(BBHOME)%%%s%%g\n", SVAL (bbhome)); if (strcmp (bbdelivery, "off") == 0) fprintf (fp, "/^@@BEGIN: BBSERVER$/,/^@@END: BBSERVER$/d\n"); else fprintf (fp, "/^@@BEGIN: BBSERVER$/d\n/^@@END: BBSERVER$/d\n"); if (strcmp (debug, "on") == 0) { fprintf (fp, "/^@@BEGIN: DEBUG$/d\n/^@@END: DEBUG$/d\n"); fprintf (fp, "/^@@BEGIN: OPTIM$/,/^@@END: OPTIM$/d\n"); } else { fprintf (fp, "/^@@BEGIN: DEBUG$/,/^@@END: DEBUG$/d\n"); fprintf (fp, "/^@@BEGIN: OPTIM$/d\n/^@@END: OPTIM$/d\n"); } if (strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */ fprintf (fp, "/^@@BEGIN: MAILGROUP$/d\n/^@@END: MAILGROUP$/d\n"); fprintf (fp, "s%%@@(MAILGROUP)%%%s%%g\n", SVAL (mailgroup)); } else fprintf (fp, "/^@@BEGIN: MAILGROUP$/,/^@@END: MAILGROUP$/d\n"); if (strcmp (oldload, "on") == 0) fprintf (fp, "/^@@BEGIN: OLDLOAD$/d\n/^@@END: OLDLOAD$/d\n"); else fprintf (fp, "/^@@BEGIN: OLDLOAD$/,/^@@END: OLDLOAD$/d\n"); if (strcmp (oldload, "off") == 0) fprintf (fp, "/^@@BEGIN: NEWLOAD$/d\n/^@@END: NEWLOAD$/d\n"); else fprintf (fp, "/^@@BEGIN: NEWLOAD$/,/^@@END: NEWLOAD$/d\n"); /* */ if (strcmp (ranlib, "on") == 0) { fprintf (fp, "/^@@BEGIN: RANLIB$/d\n/^@@END: RANLIB$/d\n"); fprintf (fp, "/^@@BEGIN: LORDER$/,/^@@END: LORDER$/d\n"); } else { fprintf (fp, "/^@@BEGIN: LORDER$/d\n/^@@END: LORDER$/d\n"); fprintf (fp, "/^@@BEGIN: RANLIB$/,/^@@END: RANLIB$/d\n"); } if (strcmp (sharedlib, "off")) { /* if not off */ fprintf (fp, "/^@@BEGIN: SHAREDLIB$/d\n/^@@END: SHAREDLIB$/d\n"); fprintf (fp, "/^@@BEGIN: STDLIB$/,/^@@END: STDLIB$/d\n"); fprintf (fp, "s%%@@(SLIBDIR)%%%s%%g\n", slibdir); fprintf (fp, "s%%@@(SLIBVER)%%%s%%g\n", MHSLIBVER); fprintf (fp, "s%%@@(SLFLAGS)%%%s%%g\n", SVAL(slflags)); if (strcmp (sharedlib, "secure") == 0) fprintf (fp, "s%%@@(SLDFLAG)%%-L%s%%g\n",slibdir); else fprintf (fp, "s%%@@(SLDFLAG)%%%%g\n"); } else { fprintf (fp, "/^@@BEGIN: STDLIB$/d\n/^@@END: STDLIB$/d\n"); fprintf (fp, "/^@@BEGIN: SHAREDLIB$/,/^@@END: SHAREDLIB$/d\n"); } if (strcmp (sharedlib, "sun4") == 0 || strcmp (sharedlib, "on") == 0) fprintf (fp, "/^@@BEGIN: SUN4SHLIB$/d\n/^@@END: SUN4SHLIB$/d\n"); else fprintf (fp, "/^@@BEGIN: SUN4SHLIB$/,/^@@END: SUN4SHLIB$/d\n"); if (strcmp (sharedlib, "sys5") == 0) fprintf (fp, "/^@@BEGIN: SYS5SHLIB$/d\n/^@@END: SYS5SHLIB$/d\n"); else fprintf (fp, "/^@@BEGIN: SYS5SHLIB$/,/^@@END: SYS5SHLIB$/d\n"); /* */ if (flag || ((mtsnum == mmdf || mtsnum == mmdf2) && !smtp)) { fprintf (fp, "/^@@BEGIN: MMDFMTS$/d\n/^@@END: MMDFMTS$/d\n"); if (mtsnum == mmdf) fprintf (fp, "/^@@BEGIN: MMDFIMTS$/d\n/^@@END: MMDFIMTS$/d\n"); else fprintf (fp, "/^@@BEGIN: MMDFIMTS$/,/^@@END: MMDFIMTS$/d\n"); if (mtsnum == mmdf2) fprintf (fp, "/^@@BEGIN: MMDFIIMTS$/d\n/^@@END: MMDFIIMTS$/d\n"); else fprintf (fp, "/^@@BEGIN: MMDFIIMTS$/,/^@@END: MMDFIIMTS$/d\n"); } else { fprintf (fp, "/^@@BEGIN: MMDFMTS$/,/^@@END: MMDFMTS$/d\n"); fprintf (fp, "/^@@BEGIN: MMDFIMTS$/,/^@@END: MMDFIMTS$/d\n"); fprintf (fp, "/^@@BEGIN: MMDFIIMTS$/,/^@@END: MMDFIIMTS$/d\n"); } if (mtsnum == mh) fprintf (fp, "/^@@BEGIN: MHMTS$/d\n/^@@END: MHMTS$/d\n"); else fprintf (fp, "/^@@BEGIN: MHMTS$/,/^@@END: MHMTS$/d\n"); if (!flag && (mtsnum == sendmail || smtp)) fprintf (fp, "/^@@BEGIN: SENDMTS$/d\n/^@@END: SENDMTS$/d\n"); else fprintf (fp, "/^@@BEGIN: SENDMTS$/,/^@@END: SENDMTS$/d\n"); switch (mtsnum) { case mh: case sendmail: case mmdf: fprintf (fp, "/^@@BEGIN: SENDMTSHACK$/d\n/^@@END: SENDMTSHACK$/d\n"); break; default: fprintf (fp, "/^@@BEGIN: SENDMTSHACK$/,/^@@END: SENDMTSHACK$/d\n"); break; } /* */ /* special hack for support/pop/popser.c */ fprintf (fp, "s%%@@(POPUUMBOX)%%%s%%g\n", mtsnum == sendmail ? "-DPOPUUMBOX" : ""); if (smtp) fprintf (fp, "/^@@BEGIN: SMTP$/d\n/^@@END: SMTP$/d\n"); else fprintf (fp, "/^@@BEGIN: SMTP$/,/^@@END: SMTP$/d\n"); if (strcmp (pop, "on") == 0) fprintf (fp, "/^@@BEGIN: POP$/d\n/^@@END: POP$/d\n"); else fprintf (fp, "/^@@BEGIN: POP$/,/^@@END: POP$/d\n"); if (strcmp (bboards, "pop") == 0) fprintf (fp, "/^@@BEGIN: BPOP$/d\n/^@@END: BPOP$/d\n"); else fprintf (fp, "/^@@BEGIN: BPOP$/,/^@@END: BPOP$/d\n"); if (strcmp (bboards, "nntp") == 0) fprintf (fp, "/^@@BEGIN: NNTP$/d\n/^@@END: NNTP$/d\n"); else fprintf (fp, "/^@@BEGIN: NNTP$/,/^@@END: NNTP$/d\n"); if (strcmp (mf, "on") == 0) fprintf (fp, "/^@@BEGIN: MF$/d\n/^@@END: MF$/d\n"); else fprintf (fp, "/^@@BEGIN: MF$/,/^@@END: MF$/d\n"); fprintf (fp, "s%%@@(MHREMOVE)%%%s%%g\n", SVAL (removeit)); for (op = copts; op->c_name; op++) { fprintf (fp, op->c_value ? "/^@@BEGIN: %s$/d\n/^@@END: %s$/d\n" : "/^@@BEGIN: %s$/,/^@@END: %s$/d\n", op->c_name, op->c_name); } (void) fclose (fp); } /* */ static do_files () { char **pp; for (pp = files; *pp; pp++) shell ("rm -f %s; sed -f %s < config/%s > %s", *pp, SED, tail (*pp), *pp); } static do_doc () { shell ("./mhdoc"); } static do_make () { char buffer[BUFSIZ]; struct pair *pp; for (pp = makefiles; pp -> infile; pp++) { (void) sprintf (buffer, MAKE, pp -> outfile); shell ("rm -f %s; sed -f %s < %s > %s", buffer, SED, pp -> infile, buffer); } } /* */ /* VARARGS */ static shell (fmt, a, b, c, d) char *fmt, *a, *b, *c, *d; { char buffer[BUFSIZ]; (void) sprintf (buffer, fmt, a, b, c, d); printf ("%s\n", buffer); (void) fflush (stdout); if (system (buffer)) adios (NULLCP, "failed"); } /* */ static arginit (vec) char **vec; { int i; char *ap, *cp, *dp, buffer[BUFSIZ]; struct bind *bp; FILE * fp; myname = tail (*vec); printf (BANNER, myname); (void) fflush (stdout); for (vec++; *vec; vec++) { if (strcmp (*vec, "-D") == 0) { sedP = 1; filesP = makeP = 0; docP = 2; continue; } if (strcmp (*vec, "-s") == 0) { sedP = !sedP; continue; } if (strcmp (*vec, "-f") == 0) { filesP = !filesP; continue; } if (strcmp (*vec, "-d") == 0) { docP = !docP; continue; } if (strcmp (*vec, "-m") == 0) { makeP = !makeP; continue; } if (strcmp (*vec, "-help") == 0) { printf ("usage: %s [opt] file\n", myname); printf ("%s\n%s\n%s\n%s\n", " -s\tno sed files", " -f\tno config files", " -d\tno doc files", " -m\tno makefiles"); exit (0); } break; } if ((config = *vec) == NULL || vec[1] != NULL) /* no arg or too many */ adios (NULLCP, "usage: %s file", myname); /* */ if ((fp = fopen (config, "r")) == NULL) adios (config, "unable to read"); while (fgets (buffer, sizeof buffer, fp)) { if (ap = index (buffer, '\n')) *ap-- = '\0'; else ap = &buffer[strlen (buffer) - 1]; while (ap >= buffer) if (isspace (*ap)) *ap = '\0'; else break; for (cp = buffer; isspace (*cp); cp++) continue; if (*cp == '\0' || *cp == '#') continue; for (ap = cp; *ap; ap++) if (isspace (*ap) || *ap == ':') { *ap++ = '\0'; while (isspace (*ap)) ap++; break; } for (bp = binds; bp -> keyword; bp++) if (strcmp (bp -> keyword, cp) == 0) break; if (bp -> keyword == NULL) adios (NULLCP, "unknown option %s in %s", cp, config); else if (*(bp -> value) == NULL || !(bp -> flags & BD_ADD)) *(bp -> value) = strdup (ap); else *(bp -> value) = stradd (ap, stradd (" ", *(bp -> value))); } (void) fclose (fp); /* */ if (binpath == NULL) adios (NULLCP, "bin must be specified in %s", config); trim (binpath); if (strcmp (bboards, "on") && strcmp (bboards, "off") && strcmp (bboards, "pop") && strcmp (bboards, "nntp")) adios (NULLCP, "bboards should be %s not %s", "either \"on\", \"off\", \"pop\" or \"nntp\"", bboards); if (strcmp (bboards, "off") == 0 && strcmp (bbdelivery, "off")) adios (NULLCP, "you cannot have \"bbdelivery\" \"%s\" with \"bboards\" \"%s\"", bbdelivery, bboards); if (bbhome == NULL) adios (NULLCP, "bbhome must be specified in %s", config); trim (bbhome); if (strcmp (debug, "on") && strcmp (debug, "off")) adios (NULLCP, "debug should be either \"on\" or \"off\", not %s", debug); if (etcpath == NULL) adios (NULLCP, "etc must be specified in %s", config); trim (etcpath); if (strcmp (mailgroup, "off")) /* if not "off" */ add_option ("MAILGROUP"); if (mailpath == NULL) adios (NULLCP, "mail must be specified in %s", config); trim (mailpath); if (*mailpath == '/') maildir = mailpath; else mailfile = mailpath; if (cp = index (manuals, '/')) { /* "standard/cat" */ *cp++ = 0; mancat = cp; if (strcmp (mancat, "cat")) adios (NULLCP,"invalid manuals setting: %s/%s",manuals, mancat); } if (strcmp (manuals, "standard") && strcmp (manuals, "bsd44") && strcmp (manuals, "local") && strcmp (manuals, "new") && strcmp (manuals, "old") && strcmp (manuals, "gen") && strcmp (manuals, "none")) adios (NULLCP,"invalid manuals setting: %s",manuals); if (mts == NULL) adios (NULLCP, "mts must be specified in %s", config); for (i = 0; mtsopts[i].mtskey; i++) if (strcmp (mts, mtsopts[i].mtskey) == 0) break; if ((mtsnum = mtsopts[i].code) == unknown) adios (NULLCP, "invalid mts setting: %s", mts); add_option (mtsopts[i].optval); smtp = mtsopts[i].mtsflags & DOSMTP; if (mtsopts[i].mtsflags & NOMF) mf = "off"; /* hack... */ if (strcmp (pop, "on") && strcmp (pop, "off")) adios (NULLCP, "pop should be either \"on\" or \"off\", not %s", pop); if (strcmp (pop, "on") == 0) add_option ("POP"); if (strcmp (bboards, "pop") == 0) { add_option ("BPOP"); if (strcmp (pop, "on")) adios (NULLCP, "bboards \"pop\" requires pop \"on\""); } else if (strcmp (bboards, "nntp") == 0) { add_option ("BPOP");/* used by msh.c & bbc.c, but see also pshsbr.c */ add_option ("NNTP"); if (mpop) adios (NULLCP, "bboards \"nntp\" is incompatible with \"options MPOP\""); } if (strcmp (mf, "on") && strcmp (mf, "off")) adios (NULLCP, "mf should be either \"on\" or \"off\", not %s", mf); if (strcmp (mf, "on") == 0) add_option ("MF"); if (sprntf && strcmp (sprntf, "char *")) {/* this defaults to "char *" */ if (strcmp (sprntf, "int")) adios (NULLCP, "sprintf should be either \"int\" or \"char *\", not %s", sprntf); add_option ("SPRINTFTYPE=int"); } if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off") && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5") && strcmp (sharedlib, "secure")) adios (NULLCP, "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s", sharedlib); (void) sprintf(buffer, "TYPESIG=%s", signl); add_option (buffer); /* loop over options string and add -D ccoptions */ begin_myopt (); if (cp = options) { for (ap = cp; *ap; ap++) if (isspace (*ap)) *ap = ' '; options = NULL; for (ap = cp; dp = index (ap, ' '); ap = dp) { *dp++ = '\0'; add_myopt (ap); (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap); ap = buffer; options = stradd (ap, options); while (isspace (*dp)) dp++; } if (*ap) { add_myopt (ap); (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap); ap = buffer; options = stradd (ap, options); } free (cp); } end_myopt (); if (strcmp (bboards, "nntp") == 0 && mpop) adios (NULLCP, "bboards \"nntp\" is incompatible with \"options MPOP\""); } /* */ static add_option (s) char *s; { options = options ? stradd (s, stradd (" ", options)) : strdup (s); } begin_myopt () { myopts = strdup ("char *options[] = {"); } add_myopt (s) char *s; { int len; char *bp, buffer[BUFSIZ]; struct copt *op; static int nameoutput = 0; static int linepos = 0; static int outputlinelen = 72; for (op = copts; op->c_name; op++) if (!strncmp (op->c_name,s,strlen(op->c_name))) { op->c_value = 1; break; } if (strcmp (s, "MPOP") == 0) mpop = 1; if (smtp && strcmp (s, "BERK") == 0) { fprintf (stderr, "\"options BERK\" overriding smtp suffix...\n"); smtp = 0; } if (!nameoutput) { printf ("%s: ", bp = "options"); linepos += (nameoutput = strlen (bp) + 2); } len = strlen (s); if (linepos != nameoutput) if (len + linepos + 3 > outputlinelen) printf ("\n%*s", linepos = nameoutput, ""); else printf (" "), linepos++; printf ("[%s]", s); linepos += len + 2; (void) fflush (stdout); bp = buffer; *bp++ = '"'; while (*s) { if (*s == '"') *bp++ = QUOTE, *bp++ = QUOTE; *bp++ = *s++; } (void) strcpy (bp, "\", "); insopt (buffer); } end_myopt () { printf ("\n"); (void) fflush (stdout); mkopts(); myopts = stradd ("NULL};", myopts); } /* */ static trim (s) char *s; { char *p; if (s == NULL || (p = rindex (s, '/')) == NULL) return; if (*++p == '\0') *--p = '\0'; } static char *tail (s) char *s; { char *p; if (p = rindex (s, '/')) p++; return ((p == NULL || *p == '\0') ? s : p); } /* */ static char *stradd (s1, s2) char *s1, *s2; { char *p; if (s1 == NULL || *s1 == '\0') return s2; if (s2 == NULL) return strdup (s1); if ((p = malloc ((unsigned) (strlen (s1) + strlen (s2) + 2))) == NULL) adios (NULLCP, "insufficient memory"); (void) sprintf (p, "%s%s", s2, s1); if (s2) free (s2); return p; } static char *strdup (s) char *s; { char *p; if ((p = malloc ((unsigned) (strlen (s) + 1))) == NULL) adios (NULLCP, "insufficient memory"); (void) strcpy (p, s); return p; } /* */ #ifdef notdef /* these used to be for SYS5 machines, but now this is compiled * with -DSYS5 which redefines the SYS5 str[r]chr names to [r]index. */ static char *index (s, c) char *s, c; { char i; while (i = *s++) if (i == c) return (s - 1); return NULL; } static char *rindex (s, c) char *s, c; { char i, *t; t = NULL; while (i = *s++) if (i == c) t = s - 1; return t; } #endif /* notdef */ /* */ /* VARARGS */ adios (what, fmt, a, b, c) char *what, *fmt, *a, *b, *c; { (void) fflush (stdout); fprintf (stderr, "%s: ", myname); fprintf (stderr, fmt, a, b, c); if (what) { (void) fputc (' ', stderr); perror (what); } else (void) fputc ('\n', stderr); exit (1); } /* quick and dirty ordering of options for readability */ struct opt { char *s; struct opt *n; }; static struct opt *optp = (struct opt *)NULL; static void insopt(s) char *s; /* string for sorting */ { struct opt *p, *np, *lp = (struct opt *)NULL; if ((np = (struct opt *) malloc ((unsigned) sizeof (struct opt))) == (struct opt *)NULL) adios (NULL, "unable to malloc opt"); np -> s = strdup(s); np -> n = (struct opt *)NULL; for (p = optp; p; lp = p, p = p -> n) { if (strcmp (p->s, s) > 0) break; } if (p) np -> n = p; if (lp) lp -> n = np; else optp = np; } static void mkopts() { struct opt *p; for (p = optp; p; p = p -> n) myopts = stradd (p->s, myopts); } @ 2.72 log @add BSD44 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.71 1993/11/30 22:01:04 jromine Exp jromine $"; d32 1 a32 1 #define MHRELEASE "6.8.3" /* for version: "Maj.min.pat" */ @ 2.71 log @update for MH 6.8.3 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.70 1993/08/25 18:07:10 jromine Exp jromine $"; d135 1 @ 2.70 log @update to MH 6.8.2 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.69 1993/08/20 19:47:46 jromine Exp jromine $"; d32 1 a32 1 #define MHRELEASE "6.8.2" /* for version: "Maj.min.pat" */ @ 2.69 log @update version @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.68 1993/08/19 23:51:43 jromine Exp jromine $"; d32 1 a32 1 #define MHRELEASE "6.8.1" /* for version: "Maj.min.pat" */ @ 2.68 log @add bsd44 hacks @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.67 1993/06/03 17:59:55 jromine Exp $"; d32 1 a32 1 #define MHRELEASE "6.8" /* for version: "Maj.min.pat" */ @ 2.67 log @fixup @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.66 1993/06/03 17:43:20 jromine Exp jromine $"; d353 1 d358 1 d724 1 @ 2.66 log @allow manuals to be installed "pre-nroff'd" (manuals: standard/cat) @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp $"; d715 3 a717 2 if (mancat = index (manuals, '/')) { /* "standard/cat" */ *mancat++ = '\0'; @ 2.65 log @add NORUSERPASS for 386BSD @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.64 1992/12/16 21:01:07 jromine Exp jromine $"; d79 1 d341 2 d345 1 a345 1 fprintf (fp, "s%%@@(MHMANDIR%d)%%man%d%%g\n", i, i); d350 1 a350 1 fprintf (fp, "s%%@@(MHMANDIR%d)%%man%c%%g\n", i, d715 5 @ 2.64 log @typo -- fix "manuals: none" @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp jromine $"; d139 1 @ 2.63 log @changes for release 6.8 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.62 1992/11/13 00:55:38 jromine Exp jromine $"; d363 1 a363 1 if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "gen") == 0) @ 2.62 log @add TTYD config @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.61 1992/11/12 22:48:51 jromine Exp jromine $"; d32 2 a33 2 #define MHRELEASE "6.7" /* for version: "Maj.min.pat" */ #define MHCENTERFOOT "MH.6.7.5beta" /* for nroff page footers */ @ 2.61 log @typo @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.60 1992/11/11 22:58:07 jromine Exp jromine $"; d140 1 @ 2.60 log @typo add slflags for "-pic" or "-K pic" @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.59 1992/11/11 21:26:23 jromine Exp $"; d188 1 a189 1 "slflags", &slflags, BD_NIL, @ 2.59 log @typo @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.58 1992/11/10 22:40:56 jromine Exp jromine $"; d93 1 d189 1 d432 1 a432 1 fprintf (fp, "s%%@@(SLIBDIR)%%%s%%g\n",slibdir); d434 1 d769 1 a769 1 add_options (buffer); @ 2.58 log @add "signal"--defines TYPESIG @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.57 1992/11/09 17:37:20 jromine Exp jromine $"; d267 1 a267 1 printf ("Don't forget to run \"make clean\" before compiling\n"); @ 2.57 log @typo "link" -> "ln" @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.56 1992/11/06 00:46:48 jromine Exp jromine $"; d91 1 d186 1 d764 3 @ 2.56 log @allow "directive: value" @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.55 1992/11/05 19:25:27 jromine Exp jromine $"; d170 1 a170 1 "link", &ln, BD_NIL, @ 2.55 log @add "ln" @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.54 1992/11/05 17:20:49 jromine Exp jromine $"; d649 1 a649 1 if (isspace (*ap)) { @ 2.54 log @add "popdir" @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.53 1992/11/04 03:00:54 jromine Exp jromine $"; d74 1 d170 1 d367 1 @ 2.53 log @slib 3.2 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.52 1992/10/31 07:56:48 jromine Exp jromine $"; d178 1 a178 1 "poppath", &poppath, BD_NIL, @ 2.52 log @fix in m_getfld -> libver 3.1 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.51 1992/10/27 20:22:26 jromine Exp jromine $"; d35 1 a35 1 #define MHSLIBVER "3.1" /* SunOS4 shared library version */ @ 2.51 log @add MSGID @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.50 1992/10/27 18:10:15 jromine Exp jromine $"; d35 1 a35 1 #define MHSLIBVER "3.0" /* SunOS4 shared library version */ @ 2.50 log @force incompatibility between NNTP & MPOP @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.49 1992/10/26 22:32:44 jromine Exp jromine $"; d135 1 @ 2.49 log @make it clearer what are bad args @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.48 1992/10/21 02:06:58 jromine Exp jromine $"; d48 1 d734 3 d785 3 d821 2 @ 2.48 log @release 6.7.5beta @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.47 1992/10/20 23:49:51 jromine Exp jromine $"; d621 1 a621 1 if ((config = *vec++) == NULL || *vec != NULL) @ 2.47 log @add MHPOPDPATH @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.46 1992/10/20 20:40:19 jromine Exp jromine $"; d33 1 a33 1 #define MHCENTERFOOT "MH.6.7.3" /* for nroff page footers */ @ 2.46 log @sharedlib ver 3.0 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.45 1992/10/19 21:59:33 jromine Exp jromine $"; d81 1 d176 1 d318 1 @ 2.45 log @MH 6.7.3 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.44 1992/10/19 19:57:22 jromine Exp jromine $"; d35 1 a35 1 #define MHSLIBVER "2.0" /* SunOS4 shared library version */ @ 2.44 log @add struct copts for "special" options @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.43 1992/10/19 16:46:32 jromine Exp jromine $"; d33 1 a33 1 #define MHCENTERFOOT "MH.6.7.2" /* for nroff page footers */ @ 2.43 log @add page breaks @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.42 1992/05/12 21:45:45 jromine Exp jromine $"; a46 1 static int bsd43 = 0; a47 1 static int uci = 0; d73 1 a73 1 static char *mailgroup = NULL; a85 2 static char *kpop = "off"; static char *hesiod = "off"; a89 1 static char *tma = "off"; d121 19 a174 2 "kpop", &kpop, BD_NIL, "hesiod", &hesiod, BD_NIL, a180 1 "tma", &tma, BD_NIL, d297 1 d390 1 a390 1 if (mailgroup && strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */ a439 5 if (strcmp (tma, "on") == 0) fprintf (fp, "/^@@BEGIN: TMA$/d\n/^@@END: TMA$/d\n"); else fprintf (fp, "/^@@BEGIN: TMA$/,/^@@END: TMA$/d\n"); a486 10 if (bsd43) /* for sgid(tty)-rcvtty */ fprintf (fp, "/^@@BEGIN: BSD43$/d\n/^@@END: BSD43$/d\n"); else fprintf (fp, "/^@@BEGIN: BSD43$/,/^@@END: BSD43$/d\n"); if (uci) fprintf (fp, "/^@@BEGIN: UCI$/d\n/^@@END: UCI$/d\n"); else fprintf (fp, "/^@@BEGIN: UCI$/,/^@@END: UCI$/d\n"); a496 10 if (strcmp (kpop, "on") == 0) fprintf (fp, "/^@@BEGIN: KPOP$/d\n/^@@END: KPOP$/d\n"); else fprintf (fp, "/^@@BEGIN: KPOP$/,/^@@END: KPOP$/d\n"); if (strcmp (hesiod, "on") == 0) fprintf (fp, "/^@@BEGIN: HESIOD$/d\n/^@@END: HESIOD$/d\n"); else fprintf (fp, "/^@@BEGIN: HESIOD$/,/^@@END: HESIOD$/d\n"); d514 6 d687 1 a687 1 if (mailgroup && strcmp (mailgroup, "off")) /* if not "off" */ d752 1 a752 4 if (strcmp (tma, "on") && strcmp (tma, "off")) adios (NULLCP, "tma should be either \"on\" or \"off\", not %s", tma); if (strcmp (tma, "on") == 0) add_option ("TMA"); d800 1 d805 6 a814 2 if (strcmp (s, "UCI") == 0) uci = 1; if (strcmp (s, "BSD43") == 0) bsd43 = 1; @ 2.42 log @fix ifdefs @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.41 1992/03/03 17:09:57 jromine Exp jromine $"; d96 2 d126 2 d173 1 d278 2 d331 3 d394 2 d432 3 d473 3 d627 2 @ 2.41 log @fixes from mtr @ text @d4 2 a5 2 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.40 1992/03/03 17:07:48 jromine Exp jromine $"; #endif lint d15 1 a15 1 #endif SYS5 d268 1 a268 1 "#endif \\1\\", d925 1 a925 1 #endif notdef @ 2.40 log @nroff page footer -> MH.6.7.2 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.39 1992/02/09 23:30:11 jromine Exp jromine $"; d674 1 a674 1 if (strcmp (mailgroup, "off")) /* if not "off" */ @ 2.39 log @fix for "manuals none" from Jos Vos @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.38 1992/02/08 00:02:59 jromine Exp $"; d33 1 a33 1 #define MHCENTERFOOT "MH.6.7" /* for nroff page footers */ @ 2.38 log @add MAILGROUP auto-option @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.37 1992/02/07 19:12:39 jromine Exp $"; d329 1 a329 1 if (strcmp (manuals, "gen") == 0) @ 2.37 log @add SYS5 shared libs @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.36 1992/02/05 22:10:00 jromine Exp jromine $"; d674 2 @ 2.36 log @add zmailer support @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.35 1992/02/05 21:52:46 jromine Exp jromine $"; d393 1 a393 1 if (strcmp (sharedlib, "on") == 0 || strcmp (sharedlib, "secure") == 0) { d407 8 d731 1 d734 1 a734 1 "sharedlib should be either \"on\", \"off\", or \"secure\", not %s", @ 2.35 log @add "regtest: on/off" to not include hostname and date in version.c @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.34 1992/02/05 21:10:45 jromine Exp jromine $"; d119 2 @ 2.34 log @update MHSLIBVER @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.33 1992/01/31 22:47:36 jromine Exp jromine $"; d84 1 d159 1 d322 5 @ 2.33 log @add "cp" option @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.32 1992/01/31 21:07:51 jromine Exp jromine $"; d35 1 a35 1 #define MHSLIBVER "1.1" /* SunOS4 shared library version */ @ 2.32 log @kerberos @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.31 1992/01/27 17:34:29 jromine Exp jromine $"; d67 1 d137 1 d328 1 @ 2.31 log @shared libs changes @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.30 1991/01/25 14:48:44 mh Exp jromine $"; d86 2 d152 2 d462 10 d595 1 a595 1 *ap-- = NULL; d600 1 a600 1 *ap = NULL; d605 1 a605 1 if (*cp == NULL || *cp == '#') d609 1 a609 1 *ap++ = NULL; d728 1 a728 1 *dp++ = NULL; d819 2 a820 2 if (*++p == NULL) *--p = NULL; d831 1 a831 1 return ((p == NULL || *p == NULL) ? s : p); d842 1 a842 1 if (s1 == NULL || *s1 == NULL) @ 2.30 log @sort options ./ @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.29 90/12/18 14:13:31 mh Exp Locker: mh $"; d35 1 d57 1 a57 1 d280 1 d381 1 a534 1 *config, @ 2.29 log @jlr @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.28 90/12/18 13:38:31 mh Exp Locker: mh $"; d9 3 a11 1 d17 2 d783 1 a783 1 myopts = stradd (buffer, myopts); d790 1 a790 1 d911 44 @ 2.28 log @jlr @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.27 90/12/18 13:36:49 mh Exp Locker: mh $"; d375 1 a375 1 if (strcmp (sharedlib, "secure") == 0) d377 2 @ 2.27 log @sharedlib: secure jlr @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.26 90/11/05 16:24:55 mh Exp Locker: mh $"; d688 5 a692 3 if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")) adios (NULLCP, "sharedlib should be either \"on\" or \"off\", not %s", sharedlib); @ 2.26 log @fix @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.25 90/11/05 16:05:46 mh Exp Locker: mh $"; d371 1 a371 1 if (strcmp (sharedlib, "on") == 0) { d375 2 @ 2.25 log @typo @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.24 90/11/05 15:56:27 mh Exp Locker: mh $"; a412 2 case sendmail: /* special hack for support/pop/popser.c */ fprintf (fp, "s%%@@(POPUUMBOX)%%%s%%g\n", "-DPOPUUMBOX"); d414 1 d423 3 @ 2.24 log @special hack for popser.c -- yuk! /JLR @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.23 90/04/08 10:57:33 sources Exp Locker: mh $"; d414 1 a414 1 fprintf (fp, "s%%@@(UUCPMBOX)%%%s%%g\n", "-DUUCPMBOX"); @ 2.23 log @*** empty log message *** @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.22 90/04/06 09:54:00 sources Exp Locker: sources $"; d413 2 a415 1 case sendmail: @ 2.22 log @update to MH.6.7 @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.21 90/04/05 22:20:02 sources Exp Locker: sources $"; d246 1 a246 1 ".ti -.25i\\", d252 1 a252 1 ".ti -.25in\\", @ 2.21 log @version changes @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.20 90/04/05 15:29:12 sources Exp Locker: sources $"; d28 2 a29 2 #define MHRELEASE "6.6" /* for version: "Maj.min.pat" */ #define MHCENTERFOOT "MH.6.6" /* for nroff page footers */ @ 2.20 log @add ID @ text @d4 1 a4 1 static char ident[] = "@@(#)$Id:$"; d28 2 a29 1 #define MHCENTERFOOT "MH.6.6" /* for man page footers */ d276 1 @ 2.19 log @add ID @ text @d4 1 a4 1 static char ident[] = "$Id:"; @ 2.18 log @remove spurious warnding @ text @d3 3 @ 2.17 log @add sprintf config option remove include of strings.h, try to declare things ourselves @ text @d220 1 d222 1 @ 2.16 log @"bbdeliver: {on,off}" @ text @d2 1 a3 1 #include "../h/strings.h" d7 10 d80 1 d145 1 d667 8 @ 2.15 log @add footers for man pages @ text @d44 1 d110 1 d313 4 d592 4 @ 2.14 log @add special '-D' option for making developer manual set. @ text @a6 1 d15 2 d224 2 a225 2 fprintf (fp, "%s\n%s\n%s\n%s\n", "s!^@@BEGIN: \\(.*\\)$!.br\\", d250 1 a250 1 printf ("using special all-doc format.\n"); d253 1 a253 1 } d256 2 @ 2.13 log @merge "nntpbboards" and "popbboards" into "bboards: nntp/pop" @ text @d215 2 a216 1 do_sedfile (SED, 0); d220 16 d248 6 d503 4 @ 2.12 log @reminder to edit config/mtstailor @ text @a60 1 static char *nntpbboards = "off"; a64 1 static char *popbboards = "off"; a123 1 "nntpbboards", &nntpbboards, BD_NIL, a126 1 "popbboards", &popbboards, BD_NIL, d280 3 a282 1 if (strcmp (bboards, "on") == 0) a283 2 else fprintf (fp, "/^@@BEGIN: BBOARDS$/,/^@@END: BBOARDS$/d\n"); d393 1 a393 1 if (strcmp (popbboards, "on") == 0) d398 1 a398 1 if (strcmp (nntpbboards, "on") == 0) d552 4 a555 3 if (strcmp (bboards, "on") && strcmp (bboards, "off")) adios (NULLCP, "bboards should be either \"on\" or \"off\", not %s", bboards); d601 1 a601 4 if (strcmp (popbboards, "on") && strcmp (popbboards, "off")) adios (NULLCP, "popbboards should be either \"on\" or \"off\", not %s", popbboards); if (strcmp (popbboards, "on") == 0) { d603 2 a604 3 if (strcmp (bboards, "on") || strcmp (pop, "on")) adios (NULLCP, "popbboards \"on\" requires both bboards and pop \"on\""); d606 1 a606 5 if (strcmp (nntpbboards, "on") && strcmp (nntpbboards, "off")) adios (NULLCP, "nntpbboards should be either \"on\" or \"off\", not %s", nntpbboards); if (strcmp (nntpbboards, "on") == 0) { a608 2 if (strcmp (bboards, "on")) adios (NULLCP, "nntpbboards \"on\" requires bboards \"on\""); a609 2 if (strcmp (popbboards, "on") == 0 && strcmp (nntpbboards, "on") == 0) adios (NULLCP, "you can't have both nntpbboards and popbboards \"on\""); @ 2.11 log @BSD43 for rcvtty (sgid-tty) @ text @d209 1 d211 1 a211 1 printf ("Don't forget to run \"make clean\" before proceeding\n"); @ 2.10 log @fix "remove" for new K&R defn @ text @d27 1 d277 2 a278 1 fprintf (fp, "s%%@@(MHOPTIONS)%%%s%%g\n", SVAL (options)); d376 5 d694 1 @ 2.9 log @add master Makefile @ text @d61 1 a61 1 static char *remove = "mv -f"; d131 1 a131 1 "remove", &remove, BD_NIL, d404 1 a404 1 fprintf (fp, "s%%@@(MHREMOVE)%%%s%%g\n", SVAL (remove)); @ 2.8 log @add -help @ text @d157 1 @ 2.7 log @minor fix, and usage message improvement @ text @d491 7 d501 1 a501 1 adios (NULLCP, "usage: %s [-s -f -d -m] file", myname); @ 2.6 log @typo @ text @d474 1 a474 1 for (vec++;; vec++) { d494 1 a494 1 adios (NULLCP, "usage: %s file", myname); @ 2.5 log @fix to MAILGROUP @ text @d51 1 a51 1 static char *lex = "lex -nt" @ 2.4 log @MAILGROUP stuff @ text @d295 1 a295 1 if (mailgroup) { /* for SYS5 sgid-inc */ @ 2.3 log @add "lex" (lex -nt) option @ text @d52 1 d120 1 d294 7 @ 2.2 log @ANSI Compilance @ text @d51 1 d117 1 d268 1 @ 2.1 log @try to run "mhdoc" in current directory (for those without . in their path). @ text @a12 2 #define MFIL(f) "makefiles/f", "f" #define MMFIL(f,g) "makefiles/f", "g" d44 1 d109 1 d153 19 a171 19 MFIL (config), MFIL (dist), MFIL (doc), MMFIL (mtsM,mts), MFIL (mts/mh), MFIL (mts/mmdf), MFIL (mts/sendmail), MFIL (papers), MFIL (sbr), MMFIL (supportM,support), MFIL (support/bboards), MFIL (support/general), MFIL (support/pop), MFIL (uip), MMFIL (zotnetM,zotnet), MFIL (zotnet/bboards), MFIL (zotnet/mf), MFIL (zotnet/mts), MFIL (zotnet/tws), d176 2 a177 1 char *stradd (), *strdup (), *tail (); d179 2 d265 1 d760 4 d792 1 @ 2.0 log @changes for SUN40 shared libraries and NNTP under bbc @ text @d404 1 a404 1 shell ("mhdoc"); @ 1.2 log @*** empty log message *** @ text @d59 1 d121 1 d377 5 d582 12 d600 2 a601 2 adios (NULLCP, "sharedlib should be either \"on\" or \"off\", not %s" , sharedlib); @ 1.1 log @Initial revision @ text @d30 1 d65 2 d126 2 d302 10 d355 5 d580 4 d643 1 @