void clear() { check_caller(WRITE_ACCESS); ::clear(); top = insert_node(nil); }
void set_type(int new_type) { check_caller(WRITE_ACCESS); ASSERT(type == 0); switch (new_type) { case T_INT: case T_FLOAT: case T_STRING: break; default: error("Invalid type for bigstruct map key"); } type = new_type; }
int main(int argc, char** argv, char** env) { int status; /* sanity check arguments */ if (argc < 2) fatal(logident, MAIL_USAGE_ERROR, "Usage: %s program [args...]", argv[0]); if (!check_command(argv[1])) fatal(logident, MAIL_ILLEGAL_COMMAND, "Illegal command: %s", argv[1]); check_caller(logident, parentgroup); /* If we got here, everything must be OK */ status = run_script(argv[1], argc, argv, env); fatal(logident, status, "%s", strerror(errno)); return status; }
int main(int argc, char** argv, char** env) { int status; char* fake_argv[3]; running_as_cgi = 1; check_caller(logident, parentgid); /* for these CGI programs, we can ignore argc and argv since they * don't contain anything useful. `script' will always be the driver * program and argv will always just contain the name of the real * script for the driver to import and execute (padded with two dummy * values in argv[0] and argv[1] that are ignored by run_script(). */ fake_argv[0] = NULL; fake_argv[1] = NULL; fake_argv[2] = script; status = run_script("driver", 3, fake_argv, env); fatal(logident, status, "%s", strerror(errno)); return status; }