Debug
Debug++;
else if (Debug >= 1)
#define DPRINTF(l,x) { if (Debug >= l) fprintf x; }
if (Debug >= 1)
static int Debug = 0; /* print debug messages */
Debug(DSCH, ("[%d] tick(%d,%d,%d,%d,%d,%d)\n",
Debug(DSCH|DEXT, ("user [%s:%d:%d:...] cmd=\"%s\"\n",
Debug(DSCH, ("[%d] TargetTime=%ld, sec-to-wait=%d\n",
Debug(DSCH, ("[%d] sleeping for %d seconds\n",
Debug(DPROC,
Debug(DPROC,
Debug(DPROC,
Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n",
Debug(DLOAD, ("unlinking old database:\n"))
Debug(DLOAD, ("\t%s\n", u->name))
Debug(DLOAD, ("load_database is done\n"))
Debug(DLOAD, ("\t%s:", fname))
Debug(DLOAD, (" [no change, using old data]"))
Debug(DLOAD, (" [delete old data]"))
Debug(DLOAD, (" [done]\n"))
Debug(DLOAD, ("[%d] load_database()\n", getpid()))
Debug(DPROC, ("[%d] child_process('%s')\n", getpid(), e->cmd))
Debug(DPROC, ("[%d] checking account with PAM\n", getpid()))
Debug(DPROC, ("[%d] grandchild process fork()'ed\n",
Debug(DPROC, ("[%d] do_command(%s, (%s,%d,%d))\n",
Debug(DPROC, ("[%d] child continues, closing pipes\n", getpid()))
Debug(DPROC, ("[%d] child2 sending data to grandchild\n", getpid()))
Debug(DPROC, ("[%d] child2 done sending to grandchild\n", getpid()))
Debug(DPROC, ("[%d] child reading output from grandchild\n", getpid()))
Debug(DPROC, ("[%d] child process done, exiting\n", getpid()))
Debug(DPROC|DEXT,
Debug(DPROC, ("[%d] main process forked child #%d, "
Debug(DPROC, ("[%d] got EOF from grandchild\n", getpid()))
Debug(DPROC, ("[%d] %s executed successfully, mail suppressed\n",
Debug(DPROC, ("[%d] closing pipe to mail\n",
Debug(DPROC, ("[%d] main process returning to work\n", getpid()))
Debug(DPROC, ("[%d] waiting for %s (%d) to finish\n",
Debug(DPROC, ("[%d] %s (%d) finished, status=%04x",
Debug(DPROC, (", dumped core"))
Debug(DPROC, ("\n"))
#define Set_LineNum(ln) {Debug(DPARS|DEXT,("linenum=%d\n",ln)); \
Debug(DPARS, ("...load_user() done\n"))
Debug(DPARS, ("load_user()\n"))
Debug(DMISC, ("user=%s, file=%s, option=%s\n",
Debug(DPARS, ("load_entry()...about to eat comments\n"))
Debug(DPARS, ("load_entry()...about to test shortcuts\n"))
Debug(DPARS, ("load_entry()...reboot shortcut\n"))
Debug(DPARS, ("load_entry()...yearly shortcut\n"))
Debug(DPARS, ("load_entry()...monthly shortcut\n"))
Debug(DPARS, ("load_entry()...weekly shortcut\n"))
Debug(DPARS, ("load_entry()...daily shortcut\n"))
Debug(DPARS, ("load_entry()...hourly shortcut\n"))
Debug(DPARS, ("load_entry()...every_minute shortcut\n"))
Debug(DPARS, ("load_entry()...every_second shortcut\n"))
Debug(DPARS, ("load_entry()... %ld seconds "
Debug(DPARS, ("load_entry()...about to parse numerics\n"))
Debug(DPARS, ("load_entry()...about to parse username\n"))
Debug(DPARS, ("load_entry()...got %s\n",username))
Debug(DPARS, ("load_entry()...uid %d, gid %d\n",pw->pw_uid,pw->pw_gid))
Debug(DPARS, ("load_entry()...class %s\n",e->class))
Debug(DPARS, ("load_entry()...checking for command options\n"))
Debug(DPARS|DEXT, ("load_entry()...expecting option\n"))
Debug(DPARS|DEXT, ("load_entry()...got MAIL_WHEN_ERR ('n') option\n"))
Debug(DPARS|DEXT, ("load_entry()...duplicate MAIL_WHEN_ERR ('n') option\n"))
Debug(DPARS|DEXT, ("load_entry()...got DONT_LOG ('q') option\n"))
Debug(DPARS|DEXT, ("load_entry()...duplicate DONT_LOG ('q') option\n"))
Debug(DPARS|DEXT, ("load_entry()...invalid option '%c'\n", ch))
Debug(DPARS, ("load_entry()...about to parse command\n"))
Debug(DPARS, ("load_entry()...returning successfully\n"))
Debug(DPARS|DEXT, ("get_list()...entered\n"))
Debug(DPARS|DEXT, ("get_list()...exiting w/ %02x\n", ch))
Debug(DPARS|DEXT, ("get_range()...entering, exit won't show\n"))
Debug(DPARS|DEXT,
Debug(DPARS|DEXT, ("set_element(?,%d,%d,%d)\n", low, high, number))
Debug(DPARS, ("load_env, read <%s>\n", envstr));
Debug(DPARS, ("load_env, parse error, state = %d\n", state))
Debug(DPARS, ("load_env, <%s> <%s> -> <%s>\n", name, val, envstr))
Debug(DMISC, ("allow/deny enabled, %d/%d\n", !!allow, !!deny))
#define dprintf if (Debug) printf
if (Debug) {
if (Debug) {
static bool Debug; /* debug flag */
if (Debug) {
if (!Debug)
Debug = true;
if (!Foreground && !Debug)
else if (Debug)
if (!Foreground && !Debug)