[Bf-blender-cvs] [24d2e46] master: Add missing newlines for debug prints

Campbell Barton noreply at git.blender.org
Mon Nov 16 05:28:05 CET 2015


Commit: 24d2e462962434468eca5b61ba6a8af47440a122
Author: Campbell Barton
Date:   Mon Nov 16 11:59:15 2015 +1100
Branches: master
https://developer.blender.org/rB24d2e462962434468eca5b61ba6a8af47440a122

Add missing newlines for debug prints

===================================================================

M	source/blender/blenkernel/intern/addon.c
M	source/blender/blenlib/intern/fileops.c
M	source/blender/blenlib/intern/winstuff.c
M	source/blender/gpu/intern/gpu_extensions.c
M	source/blender/imbuf/intern/dds/Image.cpp
M	source/blender/python/intern/bpy_driver.c

===================================================================

diff --git a/source/blender/blenkernel/intern/addon.c b/source/blender/blenkernel/intern/addon.c
index 811461b..0ef1239 100644
--- a/source/blender/blenkernel/intern/addon.c
+++ b/source/blender/blenkernel/intern/addon.c
@@ -53,7 +53,7 @@ bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet)
 	}
 	else {
 		if (!quiet) {
-			printf("search for empty addon-pref");
+			printf("search for empty addon-pref\n");
 		}
 	}
 
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index ef9a7c0..5dc1014 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -304,7 +304,7 @@ static bool delete_unique(const char *path, const bool dir)
 
 	if (dir) {
 		err = !RemoveDirectoryW(path_16);
-		if (err) printf("Unable to remove directory");
+		if (err) printf("Unable to remove directory\n");
 	}
 	else {
 		err = !DeleteFileW(path_16);
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 32ab16b..3b06b7d 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -198,7 +198,8 @@ void get_default_root(char *root)
 		/* if GetWindowsDirectory fails, something has probably gone wrong, 
 		 * we are trying the blender install dir though */
 		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[1] = ':';
 			root[2] = '\\';
@@ -209,7 +210,8 @@ void get_default_root(char *root)
 			int i;
 			int rc = 0;
 			/* 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();
 			for (i = 2; i < 26; i++) {
 				if ((tmp >> i) & 1) {
@@ -224,7 +226,7 @@ void get_default_root(char *root)
 				}
 			}
 			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[1] = ':';
 				root[2] = '\\';
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index e1dff03..4eef5a7 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -956,7 +956,7 @@ void GPU_texture_bind(GPUTexture *tex, int number)
 	GLenum arbnumber;
 
 	if (number >= GG.maxtextures) {
-		fprintf(stderr, "Not enough texture slots.");
+		fprintf(stderr, "Not enough texture slots.\n");
 		return;
 	}
 
@@ -991,7 +991,7 @@ void GPU_texture_unbind(GPUTexture *tex)
 	GLenum arbnumber;
 
 	if (tex->number >= GG.maxtextures) {
-		fprintf(stderr, "Not enough texture slots.");
+		fprintf(stderr, "Not enough texture slots.\n");
 		return;
 	}
 
@@ -1016,7 +1016,7 @@ void GPU_texture_filter_mode(GPUTexture *tex, bool compare, bool use_filter)
 	GLenum arbnumber;
 
 	if (tex->number >= GG.maxtextures) {
-		fprintf(stderr, "Not enough texture slots.");
+		fprintf(stderr, "Not enough texture slots.\n");
 		return;
 	}
 
@@ -1129,13 +1129,17 @@ int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, int slot
 	GLenum error;
 
 	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;
 	}
 
 	if ((G.debug & G_DEBUG)) {
 		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)
 {
 	if (!tex->fb) {
-		fprintf(stderr, "Error, texture not bound to framebuffer!");
+		fprintf(stderr, "Error, texture not bound to framebuffer!\n");
 		return;
 	}
 
@@ -1247,7 +1251,7 @@ void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
 	GLenum attachments[4];
 	
 	if (!fb->colortex[slot]) {
-		fprintf(stderr, "Error, framebuffer slot empty!");
+		fprintf(stderr, "Error, framebuffer slot empty!\n");
 		return;
 	}
 	
@@ -2155,7 +2159,7 @@ void GPU_shader_uniform_texture(GPUShader *UNUSED(shader), int location, GPUText
 	GLenum arbnumber;
 
 	if (tex->number >= GG.maxtextures) {
-		fprintf(stderr, "Not enough texture slots.");
+		fprintf(stderr, "Not enough texture slots.\n");
 		return;
 	}
 		
diff --git a/source/blender/imbuf/intern/dds/Image.cpp b/source/blender/imbuf/intern/dds/Image.cpp
index 6954030..363af61 100644
--- a/source/blender/imbuf/intern/dds/Image.cpp
+++ b/source/blender/imbuf/intern/dds/Image.cpp
@@ -76,7 +76,7 @@ uint Image::height() const
 const Color32 * Image::scanline(uint h) const
 {
 	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 + h * m_width;
@@ -85,7 +85,7 @@ const Color32 * Image::scanline(uint h) const
 Color32 * Image::scanline(uint h)
 {
 	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 + h * m_width;
@@ -104,7 +104,7 @@ Color32 * Image::pixels()
 const Color32 & Image::pixel(uint idx) const
 {
 	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[idx];
@@ -113,7 +113,7 @@ const Color32 & Image::pixel(uint idx) const
 Color32 & Image::pixel(uint idx)
 {
 	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[idx];
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index df848f6..b04457d 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -211,7 +211,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
 	/* init global dictionary for py-driver evaluation settings */
 	if (!bpy_pydriver_Dict) {
 		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)
 				PyGILState_Release(gilstate);
 			return 0.0f;




More information about the Bf-blender-cvs mailing list