From a77949a8e6372b67121bbd29d5b1e87e2b04739a Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Thu, 2 Aug 2001 14:51:41 +0000 Subject: [PATCH] MinGW cleanup git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10640 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 13 +++++++++++++ Headers/gnustep/gui/NSApplication.h | 3 --- Headers/gnustep/gui/nsimage-tiff.h | 28 ++++++++++++++-------------- Source/tiff.m | 12 ++++++------ Tools/example.m | 4 ++++ 5 files changed, 37 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24a11564d..c65f0ccd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2001-08-02 Adam Fedor + + * Headers/gnustep/gui/NSApplication.h: Remove duplicate + NSOpenStepRoorDirectory decl. + + * Headers/gnustep/gui/nsimage-tiff.h: Use TIFF defined types + for variables. + * Source/tiff.m: Likewise. + + * Model/GNUmakefile: Add -lobjc to ...LIBRARIES_DEPEND. + + * Tools/example.m: Don't use certain signals and fork on MINGW. + 2001-08-01 Fred Kiefer * Headers/gnustep/gui/NSEvent.h diff --git a/Headers/gnustep/gui/NSApplication.h b/Headers/gnustep/gui/NSApplication.h index 9480381ed..fc8952bcb 100644 --- a/Headers/gnustep/gui/NSApplication.h +++ b/Headers/gnustep/gui/NSApplication.h @@ -368,9 +368,6 @@ NSUnRegisterServicesProvider(NSString *name); APPKIT_EXPORT int NSApplicationMain(int argc, const char **argv); -APPKIT_EXPORT NSString* -NSOpenStepRootDirectory(void); - APPKIT_EXPORT void NSShowSystemInfoPanel(NSDictionary *options); diff --git a/Headers/gnustep/gui/nsimage-tiff.h b/Headers/gnustep/gui/nsimage-tiff.h index 9d629ffba..0258d200e 100644 --- a/Headers/gnustep/gui/nsimage-tiff.h +++ b/Headers/gnustep/gui/nsimage-tiff.h @@ -39,16 +39,16 @@ /* Structure to store common information about a tiff. */ typedef struct { - u_long imageNumber; - u_long subfileType; - u_long width; - u_long height; - u_short bitsPerSample; /* number of bits per data channel */ - u_short samplesPerPixel; /* number of channels per pixel */ - u_short planarConfig; /* meshed or separate */ - u_short photoInterp; /* photometric interpretation of bitmap data, */ - u_short compression; - u_short extraSamples; /* Alpha */ + uint32 imageNumber; + uint32 subfileType; + uint32 width; + uint32 height; + uint16 bitsPerSample; /* number of bits per data channel */ + uint16 samplesPerPixel; /* number of channels per pixel */ + uint16 planarConfig; /* meshed or separate */ + uint16 photoInterp; /* photometric interpretation of bitmap data, */ + uint16 compression; + uint16 extraSamples; /* Alpha */ int assocAlpha; int quality; /* compression quality (for jpeg) 1 to 255 */ int numImages; /* number of images in tiff */ @@ -56,10 +56,10 @@ typedef struct { } NSTiffInfo; typedef struct { - u_int size; - u_short *red; - u_short *green; - u_short *blue; + uint32 size; + uint16 *red; + uint16 *green; + uint16 *blue; } NSTiffColormap; typedef char* realloc_data_callback(char* data, long size); diff --git a/Source/tiff.m b/Source/tiff.m index 60c39b726..0d7743de9 100644 --- a/Source/tiff.m +++ b/Source/tiff.m @@ -259,7 +259,7 @@ NSTiffInfo * NSTiffGetInfo(int imageNumber, TIFF* image) { NSTiffInfo* info; - u_short *sample_info = NULL; + uint16 *sample_info = NULL; if (image == NULL) return NULL; @@ -337,9 +337,9 @@ NSTiffRead(TIFF* image, NSTiffInfo* info, char* data) int row, col; int maxval; int error = 0; - u_char* outP; - u_char* buf; - u_char* raster; + uint8* outP; + uint8* buf; + uint8* raster; NSTiffColormap* map; int scan_line_size; @@ -358,7 +358,7 @@ NSTiffRead(TIFF* image, NSTiffInfo* info, char* data) scan_line_size = TIFFScanlineSize(image); buf = _TIFFmalloc(scan_line_size); - raster = (u_char *)data; + raster = (uint8 *)data; outP = raster; switch (info->photoInterp) { @@ -388,7 +388,7 @@ NSTiffRead(TIFF* image, NSTiffInfo* info, char* data) { for (row = 0; row < info->height; ++row) { - u_char *inP; + uint8 *inP; READ_SCANLINE(0); inP = buf; for (col = 0; col < info->width; col++) diff --git a/Tools/example.m b/Tools/example.m index 84cd8a02e..813cb23a6 100644 --- a/Tools/example.m +++ b/Tools/example.m @@ -188,10 +188,12 @@ init(int argc, char** argv) { signal(sym, ihandler); } +#ifndef __MINGW__ signal(SIGPIPE, SIG_IGN); signal(SIGTTOU, SIG_IGN); signal(SIGTTIN, SIG_IGN); signal(SIGHUP, SIG_IGN); +#endif signal(SIGTERM, ihandler); if (debug == 0) @@ -199,6 +201,7 @@ init(int argc, char** argv) /* * Now fork off child process to run in background. */ +#ifndef __MINGW__ switch (fork()) { case -1: @@ -223,6 +226,7 @@ init(int argc, char** argv) } exit(0); } +#endif } }