Cube  Diff

Differences From Artifact [dd3dab2434]:

To Artifact [2a75e21fbb]:


41
42
43
44
45
46
47
48
49
50
51

52
53
54
55
56
57
58
		cl.cref[0] = '\f';
		cl.cref[1] = 0;
		strcat_s(cl.cref, sf);
	} else {
		strcpy_s(cl.cref, sf);
	};
	puts(cl.cref);
#ifndef _WIN32
	fflush(stdout);
#endif
};


void
conoutf(OFString *str, ...)
{
	sprintf_sdv(sf, str.UTF8String);
	const char *s = sf;
	int n = 0;







|


<
>







41
42
43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58
		cl.cref[0] = '\f';
		cl.cref[1] = 0;
		strcat_s(cl.cref, sf);
	} else {
		strcpy_s(cl.cref, sf);
	};
	puts(cl.cref);
#ifndef OF_WINDOWS
	fflush(stdout);
#endif

}

void
conoutf(OFString *str, ...)
{
	sprintf_sdv(sf, str.UTF8String);
	const char *s = sf;
	int n = 0;
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
	@autoreleasepool {
		strn0cpy(hdr.maptitle, s.UTF8String, 128);
	}
}
COMMAND(mapmsg, ARG_1STR)

#ifndef _WIN32
# include <SDL_syswm.h>
# include <X11/Xlib.h>
#endif

void
pasteconsole()
{
#ifdef _WIN32
	if (!IsClipboardFormatAvailable(CF_TEXT))
		return;
	if (!OpenClipboard(NULL))
		return;
	char *cb = (char *)GlobalLock(GetClipboardData(CF_TEXT));
	strcat_s(commandbuf, cb);
	GlobalUnlock(cb);
	CloseClipboard();
#else
	SDL_SysWMinfo wminfo;
	SDL_VERSION(&wminfo.version);
	wminfo.subsystem = SDL_SYSWM_X11;
	if (!SDL_GetWMInfo(&wminfo))
		return;
	int cbsize;
	char *cb = XFetchBytes(wminfo.info.x11.display, &cbsize);







|







|








|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
	@autoreleasepool {
		strn0cpy(hdr.maptitle, s.UTF8String, 128);
	}
}
COMMAND(mapmsg, ARG_1STR)

#if !defined(OF_WINDOWS) && !defined(OF_MACOS)
# include <SDL_syswm.h>
# include <X11/Xlib.h>
#endif

void
pasteconsole()
{
#if defined(OF_WINDOWS)
	if (!IsClipboardFormatAvailable(CF_TEXT))
		return;
	if (!OpenClipboard(NULL))
		return;
	char *cb = (char *)GlobalLock(GetClipboardData(CF_TEXT));
	strcat_s(commandbuf, cb);
	GlobalUnlock(cb);
	CloseClipboard();
#elif !defined(OF_MACOS)
	SDL_SysWMinfo wminfo;
	SDL_VERSION(&wminfo.version);
	wminfo.subsystem = SDL_SYSWM_X11;
	if (!SDL_GetWMInfo(&wminfo))
		return;
	int cbsize;
	char *cb = XFetchBytes(wminfo.info.x11.display, &cbsize);