Removed newlines from error messages.
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
diff --git a/src/audio/nas/SDL_nasaudio.c b/src/audio/nas/SDL_nasaudio.c
index e15a394..d5a0caa 100644
--- a/src/audio/nas/SDL_nasaudio.c
+++ b/src/audio/nas/SDL_nasaudio.c
@@ -116,7 +116,7 @@ LoadNASLibrary(void)
char *err = (char *) alloca(len);
SDL_strlcpy(err, origerr, len);
retval = -1;
- SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s\n",
+ SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s",
nas_library, err);
} else {
retval = load_nas_syms();
diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c
index 0aa2c55..8b21066 100644
--- a/src/events/SDL_gesture.c
+++ b/src/events/SDL_gesture.c
@@ -374,7 +374,7 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points)
dist += d;
}
if (numPoints < DOLLARNPOINTS-1) {
- SDL_SetError("ERROR: NumPoints = %i\n",numPoints);
+ SDL_SetError("ERROR: NumPoints = %i", numPoints);
return 0;
}
/* copy the last point */
diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 74fd592..4493359 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -275,7 +275,7 @@ GL_LoadFunctions(GL_RenderData * data)
do { \
data->func = SDL_GL_GetProcAddress(#func); \
if ( ! data->func ) { \
- return SDL_SetError("Couldn't load GL function %s: %s\n", #func, SDL_GetError()); \
+ return SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
} \
} while ( 0 );
#endif /* __SDL_NOGETPROCADDR__ */
diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c
index 474583b..3eed9e4 100644
--- a/src/render/opengles/SDL_render_gles.c
+++ b/src/render/opengles/SDL_render_gles.c
@@ -197,7 +197,7 @@ static int GLES_LoadFunctions(GLES_RenderData * data)
do { \
data->func = SDL_GL_GetProcAddress(#func); \
if ( ! data->func ) { \
- return SDL_SetError("Couldn't load GLES function %s: %s\n", #func, SDL_GetError()); \
+ return SDL_SetError("Couldn't load GLES function %s: %s", #func, SDL_GetError()); \
} \
} while ( 0 );
#define SDL_PROC_OES(ret,func,params) \
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index a858f1f..b26d6ff 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -297,7 +297,7 @@ static int GLES2_LoadFunctions(GLES2_DriverContext * data)
do { \
data->func = SDL_GL_GetProcAddress(#func); \
if ( ! data->func ) { \
- return SDL_SetError("Couldn't load GLES2 function %s: %s\n", #func, SDL_GetError()); \
+ return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \
} \
} while ( 0 );
#endif /* __SDL_NOGETPROCADDR__ */
diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c
index d2714a1..bfe6d2d 100644
--- a/src/video/SDL_stretch.c
+++ b/src/video/SDL_stretch.c
@@ -102,7 +102,7 @@ generate_rowbytes(int src_w, int dst_w, int bpp)
store = STORE_WORD;
break;
default:
- return SDL_SetError("ASM stretch of %d bytes isn't supported\n", bpp);
+ return SDL_SetError("ASM stretch of %d bytes isn't supported", bpp);
}
#ifdef HAVE_MPROTECT
/* Make the code writeable */
diff --git a/src/video/android/SDL_androidwindow.c b/src/video/android/SDL_androidwindow.c
index a309ebd..c6da5b7 100644
--- a/src/video/android/SDL_androidwindow.c
+++ b/src/video/android/SDL_androidwindow.c
@@ -128,7 +128,7 @@ Android_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
info->info.android.surface = data->egl_surface;
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 50830fc..6d61867 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -1706,7 +1706,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
info->info.cocoa.window = nswindow;
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/directfb/SDL_DirectFB_render.c b/src/video/directfb/SDL_DirectFB_render.c
index 2a9baf4..795641a 100644
--- a/src/video/directfb/SDL_DirectFB_render.c
+++ b/src/video/directfb/SDL_DirectFB_render.c
@@ -530,7 +530,7 @@ DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
/* find the right pixelformat */
pixelformat = DirectFB_SDLToDFBPixelFormat(texture->format);
if (pixelformat == DSPF_UNKNOWN) {
- SDL_SetError("Unknown pixel format %d\n", data->format);
+ SDL_SetError("Unknown pixel format %d", data->format);
goto error;
}
diff --git a/src/video/directfb/SDL_DirectFB_window.c b/src/video/directfb/SDL_DirectFB_window.c
index b914125..a66aa59 100644
--- a/src/video/directfb/SDL_DirectFB_window.c
+++ b/src/video/directfb/SDL_DirectFB_window.c
@@ -469,7 +469,7 @@ DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
info->info.dfb.surface = windata->surface;
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/haiku/SDL_bframebuffer.cc b/src/video/haiku/SDL_bframebuffer.cc
index 04065bc..16f9a34 100644
--- a/src/video/haiku/SDL_bframebuffer.cc
+++ b/src/video/haiku/SDL_bframebuffer.cc
@@ -77,7 +77,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
if(bitmap->InitCheck() != B_OK) {
delete bitmap;
- return SDL_SetError("Could not initialize back buffer!\n");
+ return SDL_SetError("Could not initialize back buffer!");
}
diff --git a/src/video/haiku/SDL_bmodes.cc b/src/video/haiku/SDL_bmodes.cc
index c1cef9f..6d05951 100644
--- a/src/video/haiku/SDL_bmodes.cc
+++ b/src/video/haiku/SDL_bmodes.cc
@@ -310,7 +310,7 @@ int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
}
if(bscreen.SetMode(bmode) != B_OK) {
- return SDL_SetError("Bad video mode\n");
+ return SDL_SetError("Bad video mode");
}
free(bmode_list);
diff --git a/src/video/pandora/SDL_pandora.c b/src/video/pandora/SDL_pandora.c
index 242d5c8..4ccb08d 100644
--- a/src/video/pandora/SDL_pandora.c
+++ b/src/video/pandora/SDL_pandora.c
@@ -304,7 +304,7 @@ PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
} else {
- SDL_SetError("application not compiled with SDL %d.%d\n",
+ SDL_SetError("application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
@@ -637,7 +637,7 @@ PND_gl_createcontext(_THIS, SDL_Window * window)
if (wdata->gles_surface == 0) {
- SDL_SetError("Error : eglCreateWindowSurface failed;\n");
+ SDL_SetError("Error : eglCreateWindowSurface failed;");
return NULL;
}
diff --git a/src/video/psp/SDL_pspevents.c b/src/video/psp/SDL_pspevents.c
index 22d098f..83ff880 100644
--- a/src/video/psp/SDL_pspevents.c
+++ b/src/video/psp/SDL_pspevents.c
@@ -260,12 +260,12 @@ void PSP_EventInit(_THIS)
#endif
/* Start thread to read data */
if((event_sem = SDL_CreateSemaphore(1)) == NULL) {
- SDL_SetError("Can't create input semaphore\n");
+ SDL_SetError("Can't create input semaphore");
return;
}
running = 1;
if((thread = SDL_CreateThreadInternal(EventUpdate, "PSPInputThread", 4096, NULL)) == NULL) {
- SDL_SetError("Can't create input thread\n");
+ SDL_SetError("Can't create input thread");
return;
}
}
diff --git a/src/video/psp/SDL_pspvideo.c b/src/video/psp/SDL_pspvideo.c
index c0db2e8..2a47793 100644
--- a/src/video/psp/SDL_pspvideo.c
+++ b/src/video/psp/SDL_pspvideo.c
@@ -297,7 +297,7 @@ PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
} else {
- SDL_SetError("application not compiled with SDL %d.%d\n",
+ SDL_SetError("application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/raspberry/SDL_rpivideo.c b/src/video/raspberry/SDL_rpivideo.c
index ee32f61..c5492e5 100644
--- a/src/video/raspberry/SDL_rpivideo.c
+++ b/src/video/raspberry/SDL_rpivideo.c
@@ -373,7 +373,7 @@ RPI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
} else {
- SDL_SetError("application not compiled with SDL %d.%d\n",
+ SDL_SetError("application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m
index a2bcb95..46361d0 100644
--- a/src/video/uikit/SDL_uikitwindow.m
+++ b/src/video/uikit/SDL_uikitwindow.m
@@ -360,7 +360,7 @@ UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/vivante/SDL_vivantevideo.c b/src/video/vivante/SDL_vivantevideo.c
index 204ab04..a675b0d 100644
--- a/src/video/vivante/SDL_vivantevideo.c
+++ b/src/video/vivante/SDL_vivantevideo.c
@@ -376,7 +376,7 @@ VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
info->info.vivante.window = data->native_window;
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 0cb2a01..99d94c1 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -713,7 +713,7 @@ WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp
index 8071ec8..6f7e61f 100644
--- a/src/video/winrt/SDL_winrtvideo.cpp
+++ b/src/video/winrt/SDL_winrtvideo.cpp
@@ -771,7 +771,7 @@ WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index a16bdc2..0756484 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -566,7 +566,7 @@ X11_GL_ErrorHandler(Display * d, XErrorEvent * e)
}
else
{
- SDL_SetError("Could not %s: %i (Base %i)\n", errorHandlerOperation, errorCode, errorBase);
+ SDL_SetError("Could not %s: %i (Base %i)", errorHandlerOperation, errorCode, errorBase);
}
return (0);
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index 9082448..6362f16 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -1576,7 +1576,7 @@ X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
info->info.x11.window = data->xwindow;
return SDL_TRUE;
} else {
- SDL_SetError("Application not compiled with SDL %d.%d\n",
+ SDL_SetError("Application not compiled with SDL %d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
return SDL_FALSE;
}
diff --git a/test/testgl2.c b/test/testgl2.c
index baa76e0..114c141 100644
--- a/test/testgl2.c
+++ b/test/testgl2.c
@@ -56,7 +56,7 @@ static int LoadContext(GL_Context * data)
do { \
data->func = SDL_GL_GetProcAddress(#func); \
if ( ! data->func ) { \
- return SDL_SetError("Couldn't load GL function %s: %s\n", #func, SDL_GetError()); \
+ return SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
} \
} while ( 0 );
#endif /* __SDL_NOGETPROCADDR__ */
diff --git a/test/testgles2.c b/test/testgles2.c
index 5acc13d..282e0b6 100644
--- a/test/testgles2.c
+++ b/test/testgles2.c
@@ -59,7 +59,7 @@ static int LoadContext(GLES2_Context * data)
do { \
data->func = SDL_GL_GetProcAddress(#func); \
if ( ! data->func ) { \
- return SDL_SetError("Couldn't load GLES2 function %s: %s\n", #func, SDL_GetError()); \
+ return SDL_SetError("Couldn't load GLES2 function %s: %s", #func, SDL_GetError()); \
} \
} while ( 0 );
#endif /* __SDL_NOGETPROCADDR__ */