From 82702880dd40f8353e268bf76a4c7317ec70f0d7 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 20 Aug 1998 15:16:43 +0000 Subject: [PATCH] obj.cxx: use more explicit parenthases. texload.[ch]: use const in function definitions where appropriate. --- Scenery/obj.cxx | 6 +++++- Scenery/texload.c | 6 +++--- Scenery/texload.h | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Scenery/obj.cxx b/Scenery/obj.cxx index 60fbea0b5..1a2e3d265 100644 --- a/Scenery/obj.cxx +++ b/Scenery/obj.cxx @@ -231,7 +231,7 @@ int fgObjLoad(char *path, fgTILE *t) { "Ack! unknown usemtl name = %s in %s\n", material, path); } else { - fragment.material_ptr = &(*myfind).second; + fragment.material_ptr = &((*myfind).second); } // initialize the fragment transformation matrix @@ -490,6 +490,10 @@ int fgObjLoad(char *path, fgTILE *t) { // $Log$ +// Revision 1.23 1998/08/20 15:16:43 curt +// obj.cxx: use more explicit parenthases. +// texload.[ch]: use const in function definitions where appropriate. +// // Revision 1.22 1998/08/20 15:12:03 curt // Used a forward declaration of classes fgTILE and fgMATERIAL to eliminate // the need for "void" pointers and casts. diff --git a/Scenery/texload.c b/Scenery/texload.c index c3e62c1ec..e6ebbb137 100644 --- a/Scenery/texload.c +++ b/Scenery/texload.c @@ -73,7 +73,7 @@ ConvertUint(unsigned *array, unsigned int length) { } } -static ImageRec *ImageOpen(char *fileName) +static ImageRec *ImageOpen(const char *fileName) { union { int testWord; @@ -182,7 +182,7 @@ ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) { } GLubyte * -read_alpha_texture(char *name, int *width, int *height) +read_alpha_texture(const char *name, int *width, int *height) { unsigned char *base, *lptr; ImageRec *image; @@ -215,7 +215,7 @@ read_alpha_texture(char *name, int *width, int *height) } GLubyte * -read_rgb_texture(char *name, int *width, int *height) +read_rgb_texture(const char *name, int *width, int *height) { unsigned char *base, *ptr; unsigned char *rbuf, *gbuf, *bbuf, *abuf; diff --git a/Scenery/texload.h b/Scenery/texload.h index 358110272..e15e025cf 100644 --- a/Scenery/texload.h +++ b/Scenery/texload.h @@ -18,8 +18,8 @@ extern "C" { #endif -extern GLubyte *read_alpha_texture(char *name, int *width, int *height); -extern GLubyte * read_rgb_texture(char *name, int *width, int *height); +extern GLubyte *read_alpha_texture(const char *name, int *width, int *height); +extern GLubyte * read_rgb_texture(const char *name, int *width, int *height); #ifdef __cplusplus -- 2.39.2