diff -u -r xqf-1.0.5/src/Makefile.am xqf-1.0.5-patch/src/Makefile.am
old
|
new
|
|
34 | 34 | $(GDK_PIXBUF_LIBS) \ |
35 | 35 | -lz |
36 | 36 | |
37 | | xqf_LDFLAGS = -Wl,-rpath,$(pkglibdir) -Wl,--export-dynamic -Wl,--version-script=$(top_srcdir)/src/xqf.map |
| 37 | xqf_LDFLAGS = |
38 | 38 | |
39 | 39 | # we need to specify all deps manually due to dummy libs |
40 | 40 | xqf_DEPENDENCIES = \ |
diff -u -r xqf-1.0.5/src/Makefile.in xqf-1.0.5-patch/src/Makefile.in
old
|
new
|
|
313 | 313 | $(GDK_PIXBUF_LIBS) \ |
314 | 314 | -lz |
315 | 315 | |
316 | | xqf_LDFLAGS = -Wl,-rpath,$(pkglibdir) -Wl,--export-dynamic -Wl,--version-script=$(top_srcdir)/src/xqf.map |
| 316 | xqf_LDFLAGS = |
317 | 317 | |
318 | 318 | # we need to specify all deps manually due to dummy libs |
319 | 319 | xqf_DEPENDENCIES = $(top_builddir)/src/zip/libunzip.a \ |
diff -u -r xqf-1.0.5/src/game.c xqf-1.0.5-patch/src/game.c
old
|
new
|
|
189 | 189 | { NULL, UNKNOWN_SERVER } |
190 | 190 | }; |
191 | 191 | |
| 192 | /* space name in executable fix */ |
| 193 | gchar ** space_fix_strsplit( const gchar *string, |
| 194 | const gchar *delimiter, |
| 195 | gint max_tokens ) |
| 196 | { |
| 197 | int i,k,len, |
| 198 | hit = 0; |
| 199 | gchar * localstring = NULL; |
| 200 | gchar ** retvalue = NULL; |
| 201 | |
| 202 | /* make a local copy of string to manipulate it |
| 203 | we'll free the region just before leaving the main if */ |
| 204 | len = strlen(string); |
| 205 | localstring = (char *) malloc(len+1); |
| 206 | if ( localstring ) { |
| 207 | strcpy(localstring, string); |
| 208 | i=0; |
| 209 | while ( i<len-2-hit) { |
| 210 | if ( (localstring[i] == '\\') && (localstring[i+1] == ' ') ) { |
| 211 | localstring[i] = '\254'; |
| 212 | for ( k=i+1; k<=len-1; k++) |
| 213 | localstring[k]=localstring[k+1]; |
| 214 | hit += 1; |
| 215 | } |
| 216 | i += 1; |
| 217 | } |
| 218 | retvalue = g_strsplit( localstring, delimiter, max_tokens); |
| 219 | if (retvalue) |
| 220 | if (retvalue[0]) { |
| 221 | len = strlen(retvalue[0]); |
| 222 | for ( i=0; i<len-1; i++) |
| 223 | if ( retvalue[0][i] == '\254' ) |
| 224 | retvalue[0][i] = ' '; |
| 225 | } |
| 226 | free(localstring); |
| 227 | } |
| 228 | return retvalue; |
| 229 | } |
| 230 | |
192 | 231 | void init_games() |
193 | 232 | { |
194 | 233 | unsigned i, j; |
… |
… |
|
2331 | 2370 | enable_console = str2bool(game_get_attribute(g->type,"enable_console")); |
2332 | 2371 | pass_memory_options = str2bool(game_get_attribute(g->type,"pass_memory_options")); |
2333 | 2372 | |
2334 | | cmdtokens = g_strsplit(g->cmd," ",0); |
| 2373 | cmdtokens = space_fix_strsplit(g->cmd," ",0); |
2335 | 2374 | |
2336 | 2375 | if(cmdtokens && *cmdtokens[cmdi]) |
2337 | | cmd=cmdtokens[cmdi++]; |
| 2376 | cmd=cmdtokens[cmdi++]; |
2338 | 2377 | |
2339 | 2378 | /* |
2340 | 2379 | Figure out what protocal the server is running so we can try to connect |
diff -u -r xqf-1.0.5/src/launch.c xqf-1.0.5-patch/src/launch.c
old
|
new
|
|
285 | 285 | |
286 | 286 | execvp (argv[0], argv); |
287 | 287 | |
288 | | g_snprintf (msg, CLIENT_ERROR_BUFFER, "%sexec(%s) failed: %s", |
| 288 | g_snprintf (msg, CLIENT_ERROR_BUFFER, "%sexec(\"%s\") failed: %s", |
289 | 289 | CLIENT_ERROR_MSG_HEAD, argv[0], g_strerror (errno)); |
290 | 290 | |
| 291 | |
291 | 292 | error_out: |
292 | 293 | write (pipefds[1], msg, strlen (msg) + 1); |
293 | 294 | close (pipefds[1]); |
diff -u -r xqf-1.0.5/src/loadpixmap.c xqf-1.0.5-patch/src/loadpixmap.c
old
|
new
|
|
184 | 184 | *p++ = '_'; |
185 | 185 | } |
186 | 186 | |
187 | | xpm = dlsym(NULL, found_filename); |
| 187 | xpm = dlsym(RTLD_DEFAULT, found_filename); |
188 | 188 | if(xpm) |
189 | 189 | { |
190 | 190 | colormap = gtk_widget_get_colormap (widget); |