35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
cline cl;
// constrain the buffer size
cl.cref = conlines.length() > 100 ? conlines.pop().cref
: (char *)calloc(_MAXDEFSTR, 1);
// for how long to keep line on screen
cl.outtime = lastmillis;
conlines.insert(0, cl);
if (highlight) // show line in a different colour, for chat etc.
{
cl.cref[0] = '\f';
cl.cref[1] = 0;
strcat_s(cl.cref, sf.UTF8String);
} else {
strcpy_s(cl.cref, sf.UTF8String);
}
puts(cl.cref);
|
>
|
<
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
cline cl;
// constrain the buffer size
cl.cref = conlines.length() > 100 ? conlines.pop().cref
: (char *)calloc(_MAXDEFSTR, 1);
// for how long to keep line on screen
cl.outtime = lastmillis;
conlines.insert(0, cl);
if (highlight) {
// show line in a different colour, for chat etc.
cl.cref[0] = '\f';
cl.cref[1] = 0;
strcat_s(cl.cref, sf.UTF8String);
} else {
strcpy_s(cl.cref, sf.UTF8String);
}
puts(cl.cref);
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
}
COMMAND(saycommand, ARG_VARI)
void
mapmsg(OFString *s)
{
@autoreleasepool {
strn0cpy(hdr.maptitle, s.UTF8String, 128);
}
}
COMMAND(mapmsg, ARG_1STR)
void
pasteconsole()
{
|
>
|
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
}
COMMAND(saycommand, ARG_VARI)
void
mapmsg(OFString *s)
{
@autoreleasepool {
memset(hdr.maptitle, '\0', sizeof(hdr.maptitle));
strncpy(hdr.maptitle, s.UTF8String, 127);
}
}
COMMAND(mapmsg, ARG_1STR)
void
pasteconsole()
{
|