Add missing newlines for debug prints

This commit is contained in:
Campbell Barton
2015-11-16 11:59:15 +11:00
parent 21195a9ea4
commit 24d2e46296
6 changed files with 24 additions and 18 deletions

View File

@@ -53,7 +53,7 @@ bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet)
} }
else { else {
if (!quiet) { if (!quiet) {
printf("search for empty addon-pref"); printf("search for empty addon-pref\n");
} }
} }

View File

@@ -304,7 +304,7 @@ static bool delete_unique(const char *path, const bool dir)
if (dir) { if (dir) {
err = !RemoveDirectoryW(path_16); err = !RemoveDirectoryW(path_16);
if (err) printf("Unable to remove directory"); if (err) printf("Unable to remove directory\n");
} }
else { else {
err = !DeleteFileW(path_16); err = !DeleteFileW(path_16);

View File

@@ -198,7 +198,8 @@ void get_default_root(char *root)
/* if GetWindowsDirectory fails, something has probably gone wrong, /* if GetWindowsDirectory fails, something has probably gone wrong,
* we are trying the blender install dir though */ * we are trying the blender install dir though */
if (GetModuleFileName(NULL, str, MAX_PATH + 1)) { if (GetModuleFileName(NULL, str, MAX_PATH + 1)) {
printf("Error! Could not get the Windows Directory - Defaulting to Blender installation Dir!"); printf("Error! Could not get the Windows Directory - "
"Defaulting to Blender installation Dir!\n");
root[0] = str[0]; root[0] = str[0];
root[1] = ':'; root[1] = ':';
root[2] = '\\'; root[2] = '\\';
@@ -209,7 +210,8 @@ void get_default_root(char *root)
int i; int i;
int rc = 0; int rc = 0;
/* now something has gone really wrong - still trying our best guess */ /* now something has gone really wrong - still trying our best guess */
printf("Error! Could not get the Windows Directory - Defaulting to first valid drive! Path might be invalid!"); printf("Error! Could not get the Windows Directory - "
"Defaulting to first valid drive! Path might be invalid!\n");
tmp = GetLogicalDrives(); tmp = GetLogicalDrives();
for (i = 2; i < 26; i++) { for (i = 2; i < 26; i++) {
if ((tmp >> i) & 1) { if ((tmp >> i) & 1) {
@@ -224,7 +226,7 @@ void get_default_root(char *root)
} }
} }
if (0 == rc) { if (0 == rc) {
printf("ERROR in 'get_default_root': can't find a valid drive!"); printf("ERROR in 'get_default_root': can't find a valid drive!\n");
root[0] = 'C'; root[0] = 'C';
root[1] = ':'; root[1] = ':';
root[2] = '\\'; root[2] = '\\';

View File

@@ -956,7 +956,7 @@ void GPU_texture_bind(GPUTexture *tex, int number)
GLenum arbnumber; GLenum arbnumber;
if (number >= GG.maxtextures) { if (number >= GG.maxtextures) {
fprintf(stderr, "Not enough texture slots."); fprintf(stderr, "Not enough texture slots.\n");
return; return;
} }
@@ -991,7 +991,7 @@ void GPU_texture_unbind(GPUTexture *tex)
GLenum arbnumber; GLenum arbnumber;
if (tex->number >= GG.maxtextures) { if (tex->number >= GG.maxtextures) {
fprintf(stderr, "Not enough texture slots."); fprintf(stderr, "Not enough texture slots.\n");
return; return;
} }
@@ -1016,7 +1016,7 @@ void GPU_texture_filter_mode(GPUTexture *tex, bool compare, bool use_filter)
GLenum arbnumber; GLenum arbnumber;
if (tex->number >= GG.maxtextures) { if (tex->number >= GG.maxtextures) {
fprintf(stderr, "Not enough texture slots."); fprintf(stderr, "Not enough texture slots.\n");
return; return;
} }
@@ -1129,13 +1129,17 @@ int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, int slot
GLenum error; GLenum error;
if (slot >= GPU_FB_MAX_SLOTS) { if (slot >= GPU_FB_MAX_SLOTS) {
fprintf(stderr, "Attaching to index %d framebuffer slot unsupported in blender use at most %d\n", slot, GPU_FB_MAX_SLOTS); fprintf(stderr,
"Attaching to index %d framebuffer slot unsupported. "
"Use at most %d\n", slot, GPU_FB_MAX_SLOTS);
return 0; return 0;
} }
if ((G.debug & G_DEBUG)) { if ((G.debug & G_DEBUG)) {
if (tex->number != -1) { if (tex->number != -1) {
fprintf(stderr, "Feedback loop warning!: Attempting to attach texture to framebuffer while still bound to texture unit for drawing!"); fprintf(stderr,
"Feedback loop warning!: "
"Attempting to attach texture to framebuffer while still bound to texture unit for drawing!\n");
} }
} }
@@ -1206,7 +1210,7 @@ void GPU_framebuffer_texture_detach(GPUTexture *tex)
void GPU_texture_bind_as_framebuffer(GPUTexture *tex) void GPU_texture_bind_as_framebuffer(GPUTexture *tex)
{ {
if (!tex->fb) { if (!tex->fb) {
fprintf(stderr, "Error, texture not bound to framebuffer!"); fprintf(stderr, "Error, texture not bound to framebuffer!\n");
return; return;
} }
@@ -1247,7 +1251,7 @@ void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
GLenum attachments[4]; GLenum attachments[4];
if (!fb->colortex[slot]) { if (!fb->colortex[slot]) {
fprintf(stderr, "Error, framebuffer slot empty!"); fprintf(stderr, "Error, framebuffer slot empty!\n");
return; return;
} }
@@ -2155,7 +2159,7 @@ void GPU_shader_uniform_texture(GPUShader *UNUSED(shader), int location, GPUText
GLenum arbnumber; GLenum arbnumber;
if (tex->number >= GG.maxtextures) { if (tex->number >= GG.maxtextures) {
fprintf(stderr, "Not enough texture slots."); fprintf(stderr, "Not enough texture slots.\n");
return; return;
} }

View File

@@ -76,7 +76,7 @@ uint Image::height() const
const Color32 * Image::scanline(uint h) const const Color32 * Image::scanline(uint h) const
{ {
if (h >= m_height) { if (h >= m_height) {
printf("DDS: scanline beyond dimensions of image"); printf("DDS: scanline beyond dimensions of image\n");
return m_data; return m_data;
} }
return m_data + h * m_width; return m_data + h * m_width;
@@ -85,7 +85,7 @@ const Color32 * Image::scanline(uint h) const
Color32 * Image::scanline(uint h) Color32 * Image::scanline(uint h)
{ {
if (h >= m_height) { if (h >= m_height) {
printf("DDS: scanline beyond dimensions of image"); printf("DDS: scanline beyond dimensions of image\n");
return m_data; return m_data;
} }
return m_data + h * m_width; return m_data + h * m_width;
@@ -104,7 +104,7 @@ Color32 * Image::pixels()
const Color32 & Image::pixel(uint idx) const const Color32 & Image::pixel(uint idx) const
{ {
if (idx >= m_width * m_height) { if (idx >= m_width * m_height) {
printf("DDS: pixel beyond dimensions of image"); printf("DDS: pixel beyond dimensions of image\n");
return m_data[0]; return m_data[0];
} }
return m_data[idx]; return m_data[idx];
@@ -113,7 +113,7 @@ const Color32 & Image::pixel(uint idx) const
Color32 & Image::pixel(uint idx) Color32 & Image::pixel(uint idx)
{ {
if (idx >= m_width * m_height) { if (idx >= m_width * m_height) {
printf("DDS: pixel beyond dimensions of image"); printf("DDS: pixel beyond dimensions of image\n");
return m_data[0]; return m_data[0];
} }
return m_data[idx]; return m_data[idx];

View File

@@ -211,7 +211,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
/* init global dictionary for py-driver evaluation settings */ /* init global dictionary for py-driver evaluation settings */
if (!bpy_pydriver_Dict) { if (!bpy_pydriver_Dict) {
if (bpy_pydriver_create_dict() != 0) { if (bpy_pydriver_create_dict() != 0) {
fprintf(stderr, "Pydriver error: couldn't create Python dictionary"); fprintf(stderr, "PyDriver error: couldn't create Python dictionary\n");
if (use_gil) if (use_gil)
PyGILState_Release(gilstate); PyGILState_Release(gilstate);
return 0.0f; return 0.0f;