]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libsdl/lib/src/src/video/l4fb/SDL_l4fbvideowm.c
update
[l4.git] / l4 / pkg / libsdl / lib / src / src / video / l4fb / SDL_l4fbvideowm.c
1 #include <string.h>
2 #include <malloc.h>
3
4 #include "SDL.h"
5 #include "SDL_error.h"
6 #include "SDL_video.h"
7 #include "SDL_mouse.h"
8 #include "SDL_sysvideo.h"
9 #include "SDL_pixels_c.h"
10 #include "SDL_events_c.h"
11
12 #include "SDL_l4fbvideo.h"
13
14
15 char* GetEscaped(char *source) {
16         char *dest;
17         int len;
18         int s, d=0;
19
20         len = strlen(source);
21
22         // escaped one can be at most twice as long
23         dest = (char*) malloc(len*2+1);
24
25         if (dest) {
26                 for (s=0; s<=len; s++) {
27                         switch (source[s]) {
28                                 case '"':
29                                         dest[d++] = '\\';
30                                         break;
31                         }
32                         dest[d++] = source[s];
33                 }
34         }
35
36         return dest;
37 }
38
39 void L4FB_SetCaption(_THIS, const char *wintitle, const char *apptitle) {
40         (void)this;
41          /* TODO: */
42          /* is there a way to set l4fbs title? */
43          //printf("%s, %s\n", wintitle, apptitle);
44 }
45