blob: ee7efa2ab9c1d3a63b9dd41f8305b3a5cafcc96f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#include "q3_lauxlib.h"
#include <sys/types.h>
#include <cstdarg>
#include <iostream>
#include "sys/sys_shared.h"
#include "cvar.h"
#include "msg.h"
#include "net.h"
#include "q_shared.h"
#include "qcommon.h"
size_t qlua_writestring(const char* string, size_t n)
{
#ifndef DEDICATED
CL_ConsolePrint( string );
#endif
Q_StripIndentMarker( const_cast<char*>(string) );
Sys_Print( string );
return n;
}
int qlua_writeline(void)
{
#ifndef DEDICATED
CL_ConsolePrint( "\n" );
#endif
Sys_Print( "\n" );
return 0;
}
int qlua_writestringerror(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
char m[MAXPRINTMSG];
Q_vsnprintf(m, sizeof(m), fmt, ap);
va_end (ap);
Com_Printf(S_COLOR_YELLOW "%s\n", m);
return 0;
}
|