Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-11-13 17:26:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-11-13 17:26:22 +0300
commit400e8c6449c88d11187fda6ea880d0126bc7c26b (patch)
tree266f1c8cb9b0e8e658a7ee6209df2c11a7fd77af /source/blender/blenkernel/intern/report.c
parent6d497d4f3b874b29d61db63c27bfa252da00e388 (diff)
Cleanup: readfile: cleanup a bit error messages.
Printing those twice is already not so nice, but at least let's try to print same thing, and avoid repetition of 'ERROR' in it.
Diffstat (limited to 'source/blender/blenkernel/intern/report.c')
-rw-r--r--source/blender/blenkernel/intern/report.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index 3b371ce1e2f..67b076c0153 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -43,7 +43,7 @@
#include "BKE_report.h"
#include "BKE_global.h" /* G.background only */
-static const char *report_type_str(int type)
+const char *BKE_report_type_str(ReportType type)
{
switch (type) {
case RPT_DEBUG:
@@ -109,7 +109,7 @@ void BKE_report(ReportList *reports, ReportType type, const char *_message)
/* in background mode always print otherwise there are cases the errors wont be displayed,
* but still add to the report list since this is used for python exception handling */
if (G.background || !reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
- printf("%s: %s\n", report_type_str(type), message);
+ printf("%s: %s\n", BKE_report_type_str(type), message);
fflush(stdout); /* this ensures the message is printed before a crash */
}
@@ -117,7 +117,7 @@ void BKE_report(ReportList *reports, ReportType type, const char *_message)
char *message_alloc;
report = MEM_callocN(sizeof(Report), "Report");
report->type = type;
- report->typestr = report_type_str(type);
+ report->typestr = BKE_report_type_str(type);
len = strlen(message);
message_alloc = MEM_callocN(sizeof(char) * (len + 1), "ReportMessage");
@@ -136,7 +136,7 @@ void BKE_reportf(ReportList *reports, ReportType type, const char *_format, ...)
const char *format = TIP_(_format);
if (G.background || !reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
- printf("%s: ", report_type_str(type));
+ printf("%s: ", BKE_report_type_str(type));
va_start(args, _format);
vprintf(format, args);
va_end(args);
@@ -157,7 +157,7 @@ void BKE_reportf(ReportList *reports, ReportType type, const char *_format, ...)
BLI_dynstr_free(ds);
report->type = type;
- report->typestr = report_type_str(type);
+ report->typestr = BKE_report_type_str(type);
BLI_addtail(&reports->list, report);
}