Fixed Open Watcom compilation of OpenGL samples; Code cleanup.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2003-11-15 04:21:10 +00:00
parent 9c157f38e3
commit 5cf036d017
7 changed files with 601 additions and 518 deletions

View File

@@ -253,14 +253,9 @@ int lw_is_lwobject(const char *lw_file)
lwObject *lw_object_read(const char *lw_file)
{
FILE *f = NULL;
lwObject *lw_object = NULL;
wxInt32 form_bytes = 0;
wxInt32 read_bytes = 0;
/* open file */
f = fopen(lw_file, "rb");
FILE *f = fopen(lw_file, "rb");
if (f == NULL) {
return NULL;
}
@@ -270,7 +265,10 @@ lwObject *lw_object_read(const char *lw_file)
fclose(f);
return NULL;
}
form_bytes = read_long(f);
wxInt32 read_bytes = 0;
wxInt32 form_bytes = read_long(f);
read_bytes += 4;
if (read_long(f) != ID_LWOB) {
@@ -279,7 +277,7 @@ lwObject *lw_object_read(const char *lw_file)
}
/* create new lwObject */
lw_object = (lwObject*) calloc(sizeof(lwObject),1);
lwObject *lw_object = (lwObject*) calloc(sizeof(lwObject),1);
/* read chunks */
while (read_bytes < form_bytes) {