/* $Header: /cvsroot/fbmuck/fbmuck/src_docs/interface.c.txt,v 1.2 2004/01/12 09:42:50 wolfwings Exp $ */ Function Name: show_program_usage Arguments: char * (name of program) Returns: never Called from: main (interface.c) Calls: fprintf, exit Does: Prints program command usage to standard error, and exits with error status (1). #ifdefs: none Notes: 1) This is about as simple as a function can get. No branches. Function Name: main Arguments: int (argument count) char ** (argument values) char ** (environment values) Returns: int (0 on success) Called from: Calls: strcmp, show_program_usage, chdir, atoi, fprintf, fclose, fopen, log_status, freopen, setbuf, setsid, spgrp, setpgid, getpid, open, ioctl, close, spawn_resolver, do_setuid, mcp_initialize, gui_initialize, init_game, set_signals, sanity, sanfix, shovechars, close_sockets, do_dequeue, rwhocli_shutdown, san_main, dump_database, tune_save_parmsfile, kill_resolver, db_free, free_old_macros, purge_all_free_frames, purge_mfns, unlink, CrT_summarize_to_file, execl, exit, return Does: Starts up the MUCK, verifies that it's in a sane environment (and checks the database to see if it's in a sane state), does a few other things depending on what the commandline asked for, starts the MUCK listening, and then shuts everything down when the MUCK stops listening. #ifdefs: DETACH, DISKBASE, DETACH, SYS_POSIX, SYSV, TIOCNOTTY, SPAWN_HOST_RESOLVER, MUD_ID, MALLOC_PROFILING, DELTADUMPS Defines used: TINYPORT, VERSION, TIOCNOTTY, MUD_ID, AMBIGUOUS, DELTAFILE_NAME Notes: 1) Generic startup-in-our-environment multiple-branching codepathing. Function Name: queue_ansi Arguments: struct descriptor_data * (descriptor info) const char * (string to be sent) called from: calls: FLAGS, strip_bad_ansi, strip_ansi, mcp_frame_output_inband, strlen Does: If player is set CHOWN_OK (COLOR_OK is the term for this usage), and the descriptor that's causing it to be called is connected, the string passed is stripped of only bad ansi codes (by strip_bad_ansi), and then is queued. If the descriptor is not connected, or the player is NOT set CHOWN_OK (COLOR_OK), all ansi codes are stripped from the string (by strip_ansi), before the string is queued for output to the descriptor passed. (Essentially, if the player doesn't want to see color, he can set himself !C and this is the place that preference will be implemented.) #ifdefs: none Defines used: BUFFER_LEN, CHOWN_OK, FLAGS Notes: 1) Implementation for COLOR_OK or !COLOR_OK on a player. Function Name: notify_nolisten Arguments: dbref (object to notify) const char * (string to notify) int (isprivate) Called From: Calls: uncompress, queue_ansi, Typeof, FLAGS, OWNER, Wizard, getloc, GETPECHO, do_parse_mesg, NAME, sprintf, strlen Does: #ifdefs: COMPRESS Defines Used: Notes: 1) This is (appears to be) the primary notifier for things that should not be echoed to anything other than the descriptor (or the player's descriptor, in the case of zombies and so on). Function Name: notify_from_echo Arguments: dbref (from) dbref (player) const char * (string to tell) int (isprivate) Called From: Calls: Does: #ifdefs: Notes: Caveats: 1) If BOOLEXP_DEBUGGING is #define'd, neither show_program_usage() or main() get compiled.