#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#include <winsock.h>
#include <richedit.h>
#include <stdarg.h>
#include <errno.h>
#include "NanoMud.h"
Include dependency graph for nanomud-IOstuff.c:

Go to the source code of this file.
Functions | |
| void | LOG (unsigned char *fmt,...) |
| int | read_string (char buf[], FILE *fp) |
| void | write_buffer (const char *str) |
|
||||||||||||
|
Definition at line 48 of file nanomud-IOstuff.c. References write_buffer(). Referenced by _except_handler(), check_grammar(), compile_script(), del_heap(), do_hex(), eval_expression(), fetch_line(), fix_line(), get_line(), init_scripts(), log_html(), terminal_initialize(), and walk_heap(). 00049 {
00050
00051 char buf[200000];
00052 va_list args;
00053 va_start (args, fmt);
00054 vsprintf (buf, fmt, args);
00055 va_end (args);
00056 write_buffer(buf);
00057
00058
00059 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 64 of file nanomud-IOstuff.c. Referenced by do_nasty(), load_scripts(), and load_settings(). 00065 {
00066
00067 int c;
00068 int len=0;
00069 if (fp == NULL)
00070 return -1;
00071 len = 0;
00072 while (!feof(fp))
00073 {
00074
00075 c = getc(fp);
00076 if (c == '\0')
00077 return len;
00078
00079 buf[len++] = c;
00080 if (c == '\n')
00081 return len;
00082
00083 if (c == '\r')
00084 return len;
00085
00086
00087
00088 }
00089 return EOF;
00090 }
|
|
|
Definition at line 32 of file nanomud-IOstuff.c. References DEBUG_FILE, FALSE, and GiveError(). Referenced by LOG(). 00033 {
00034 FILE *fp;
00035
00036 if (str == NULL)
00037 return;
00038
00039 if ((fp = fopen(DEBUG_FILE, "a")) == NULL)
00040 {
00041 GiveError("Unable to open debug file. Please restart with debugging support off.", FALSE);
00042 return;
00043 }
00044
00045 fprintf(fp, "%s\n", str);
00046 fclose (fp);
00047 }
|
Here is the call graph for this function:

1.3.9.1