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:
authorJoseph Eagar <joeedh@gmail.com>2010-07-19 08:44:37 +0400
committerJoseph Eagar <joeedh@gmail.com>2010-07-19 08:44:37 +0400
commitc11c196efadf5ef52293d782638497f86a209722 (patch)
tree43abcd60b2400d28db8686f4dbea68f17475ef58 /source/blender/readblenfile
parentf54aa7811029c90b6071ccc9e27e57a758e5884d (diff)
parent7f083c45bee15f7540e2a35a725efe28fc962239 (diff)
part 1 of merge from trunk at r30358; it compiles, but doesn't link quite yet :)
Diffstat (limited to 'source/blender/readblenfile')
-rw-r--r--source/blender/readblenfile/intern/BLO_readblenfile.c13
-rw-r--r--source/blender/readblenfile/test/test.c16
2 files changed, 11 insertions, 18 deletions
diff --git a/source/blender/readblenfile/intern/BLO_readblenfile.c b/source/blender/readblenfile/intern/BLO_readblenfile.c
index 5e43e44c6bd..57d16416dd8 100644
--- a/source/blender/readblenfile/intern/BLO_readblenfile.c
+++ b/source/blender/readblenfile/intern/BLO_readblenfile.c
@@ -36,10 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include <errno.h>
#ifdef WIN32
#include <io.h> // read, open
@@ -140,7 +137,7 @@ blo_read_runtime(
fd= open(path, O_BINARY|O_RDONLY, 0);
if (fd==-1) {
- BKE_report(reports, RPT_ERROR, "Unable to open");
+ BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno));
goto cleanup;
}
@@ -150,13 +147,13 @@ blo_read_runtime(
datastart= handle_read_msb_int(fd);
if (datastart==-1) {
- BKE_report(reports, RPT_ERROR, "Unable to read");
+ BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (problem seeking)", path);
goto cleanup;
} else if (read(fd, buf, 8)!=8) {
- BKE_report(reports, RPT_ERROR, "Unable to read");
+ BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (truncated header)", path);
goto cleanup;
} else if (memcmp(buf, "BRUNTIME", 8)!=0) {
- BKE_report(reports, RPT_ERROR, "File is not a Blender file");
+ BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (not a blend file)", path);
goto cleanup;
} else {
//printf("starting to read runtime from %s at datastart %d\n", path, datastart);
diff --git a/source/blender/readblenfile/test/test.c b/source/blender/readblenfile/test/test.c
index 86473c18687..1cb4f7e92f3 100644
--- a/source/blender/readblenfile/test/test.c
+++ b/source/blender/readblenfile/test/test.c
@@ -29,19 +29,15 @@
#include <string.h> // strlen
#include "BLO_readblenfile.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
struct streamGlueControlStruct *Global_streamGlueControl;
- int
+ int
streamGlueWrite(
- struct streamGlueControlStruct *streamGlueControl,
- struct streamGlueStruct **streamGlue,
- unsigned char *data,
- unsigned int dataIn,
- int finishUp)
+ struct streamGlueControlStruct *streamGlueControl,
+ struct streamGlueStruct **streamGlue,
+ unsigned char *data,
+ unsigned int dataIn,
+ int finishUp)
{
printf("called with %d bytes in buffer [%s]\n", dataIn, data);
return (0);