9 extern cvar_t timestamps;
10 extern cvar_t timeformat;
12 static int sys_nostdout = false;
14 /* The translation table between the graphical font and plain ASCII --KB */
15 static char qfont_table[256] = {
16 '\0', '#', '#', '#', '#', '.', '#', '#',
17 '#', 9, 10, '#', ' ', 13, '.', '.',
18 '[', ']', '0', '1', '2', '3', '4', '5',
19 '6', '7', '8', '9', '.', '<', '=', '>',
20 ' ', '!', '"', '#', '$', '%', '&', '\'',
21 '(', ')', '*', '+', ',', '-', '.', '/',
22 '0', '1', '2', '3', '4', '5', '6', '7',
23 '8', '9', ':', ';', '<', '=', '>', '?',
24 '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
25 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
26 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
27 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
28 '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
29 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
30 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
31 'x', 'y', 'z', '{', '|', '}', '~', '<',
33 '<', '=', '>', '#', '#', '.', '#', '#',
34 '#', '#', ' ', '#', ' ', '>', '.', '.',
35 '[', ']', '0', '1', '2', '3', '4', '5',
36 '6', '7', '8', '9', '.', '<', '=', '>',
37 ' ', '!', '"', '#', '$', '%', '&', '\'',
38 '(', ')', '*', '+', ',', '-', '.', '/',
39 '0', '1', '2', '3', '4', '5', '6', '7',
40 '8', '9', ':', ';', '<', '=', '>', '?',
41 '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
42 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
43 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
44 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
45 '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
46 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
47 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
48 'x', 'y', 'z', '{', '|', '}', '~', '<'
52 extern HANDLE hinput, houtput;
55 #define MAX_PRINT_MSG 16384
56 void Sys_Printf (char *fmt, ...)
59 char start[MAX_PRINT_MSG]; // String we started with
60 char stamp[MAX_PRINT_MSG]; // Time stamp
61 char final[MAX_PRINT_MSG]; // String we print
64 struct tm *local = NULL;
71 va_start (argptr, fmt);
73 vsnprintf (start, sizeof(start), fmt, argptr);
75 vsprintf (start, fmt, argptr);
82 if (timestamps.integer)
85 local = localtime (&mytime);
86 strftime (stamp, sizeof (stamp), timeformat.string, local);
88 snprintf (final, sizeof (final), "%s%s", stamp, start);
91 snprintf (final, sizeof (final), "%s", start);
93 // LordHavoc: make sure the string is terminated
94 final[MAX_PRINT_MSG - 1] = 0;
95 for (p = (unsigned char *) final;*p; p++)
98 if (cls.state == ca_dedicated)
99 WriteFile(houtput, final, strlen (final), &dummy, NULL);
105 char engineversion[40];
107 void Sys_Shared_EarlyInit(void)
109 #if defined(__linux__)
110 sprintf (engineversion, "%s Linux GL build %s", gamename, buildstring);
112 sprintf (engineversion, "%s Windows GL build %s", gamename, buildstring);
114 sprintf (engineversion, "%s Unknown GL build %s", gamename, buildstring);
117 if (COM_CheckParm("-nostdout"))
120 printf("%s\n", engineversion);
123 void Sys_Shared_LateInit(void)