mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:10:37 +00:00
Remove internal NSLog() implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2224 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c47e7d474c
commit
1f73912776
20 changed files with 35 additions and 296 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
||||||
|
Tue Mar 4 09:28:57 1997 GNUstep Development <gnustep@net-community.com>
|
||||||
|
|
||||||
|
* Headers/gnustep/gui/NSEvent.h: Include needed header file.
|
||||||
|
* Headers/gnustep/gui/NSNibLoading.h: Likewise.
|
||||||
|
* Headers/gnustep/gui/NSPasteboard.h: Likewise.
|
||||||
|
* Headers/gnustep/gui/NSSpellServer.h: Likewise.
|
||||||
|
|
||||||
|
* Remove internal NSLog() implementation.
|
||||||
|
* Source/Functions.m: Remove file.
|
||||||
|
* Headers/gnustep/gui/LogFile.h: Remove file.
|
||||||
|
* Headers/gnustep/gui/NSWindow.h: Remove include file.
|
||||||
|
* Source/LogFile.m: Remove file.
|
||||||
|
* Source/NSActionCell.m: Remove include file.
|
||||||
|
* Source/NSApplication.m: Likewise.
|
||||||
|
* Source/NSButton.m: Likewise.
|
||||||
|
* Source/NSCell.m: Likewise.
|
||||||
|
* Source/NSControl.m: Likewise.
|
||||||
|
* Source/NSEvent.m: Likewise.
|
||||||
|
* Source/NSFontManager.m: Likewise.
|
||||||
|
* Source/NSResponder.m: Likewise.
|
||||||
|
* Source/tiff.m: Likewise.
|
||||||
|
* Source/Makefile.in: Remove LogFile.h and LogFile.m.
|
||||||
|
|
||||||
|
* Source/NSFont.m (getFont): Return font not font name.
|
||||||
|
|
||||||
Mon Feb 17 19:30:50 1997 Ovidiu Predescu <ovidiu@bx.logicnet.ro>
|
Mon Feb 17 19:30:50 1997 Ovidiu Predescu <ovidiu@bx.logicnet.ro>
|
||||||
|
|
||||||
* Source/NSButton.m: New methods -setAlignment: and -alignment,
|
* Source/NSButton.m: New methods -setAlignment: and -alignment,
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
/*
|
|
||||||
LogFile.h
|
|
||||||
|
|
||||||
Logfile for recording trace messages
|
|
||||||
|
|
||||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
Author: Scott Christley <scottc@net-community.com>
|
|
||||||
Date: 1996
|
|
||||||
|
|
||||||
This file is part of the GNUstep Application Library.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this library; see the file COPYING.LIB.
|
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _GNUstep_H_LogFile
|
|
||||||
#define _GNUstep_H_LogFile
|
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
@interface LogFile : NSObject
|
|
||||||
|
|
||||||
{
|
|
||||||
// Attributes
|
|
||||||
struct _MB_lflags
|
|
||||||
{
|
|
||||||
unsigned int is_locking:1;
|
|
||||||
unsigned int is_date_logging:1;
|
|
||||||
} l_flags;
|
|
||||||
FILE *the_log;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Call one of these to initialize the log file and open a stream
|
|
||||||
// to the standard output or a file.
|
|
||||||
//
|
|
||||||
// -init does not open a file
|
|
||||||
- init;
|
|
||||||
- initStdout;
|
|
||||||
- initStdoutWithLocking;
|
|
||||||
- initFile:(const char *)filename;
|
|
||||||
- initFileWithLocking:(const char *)filename;
|
|
||||||
|
|
||||||
// Instance methods
|
|
||||||
- writeLog:(const char *)logEntry;
|
|
||||||
- closeLog;
|
|
||||||
- (BOOL)isDateLogging;
|
|
||||||
- setDateLogging:(BOOL)flag;
|
|
||||||
- (BOOL)isLocking;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
#ifdef DEBUGLOG
|
|
||||||
#define NSDebugLog(format, args...) NSLog(format, ## args)
|
|
||||||
#else
|
|
||||||
#define NSDebugLog(format, args...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _GNUstep_H_LogFile
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
#include <Foundation/NSGeometry.h>
|
#include <Foundation/NSGeometry.h>
|
||||||
|
#include <Foundation/NSDate.h>
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#define _GNUstep_H_NSNibLoading
|
#define _GNUstep_H_NSNibLoading
|
||||||
|
|
||||||
#include <Foundation/NSBundle.h>
|
#include <Foundation/NSBundle.h>
|
||||||
|
#include <Foundation/NSDictionary.h>
|
||||||
|
|
||||||
@interface NSObject (NSNibAwaking)
|
@interface NSObject (NSNibAwaking)
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define _GNUstep_H_NSPasteboard
|
#define _GNUstep_H_NSPasteboard
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#include <Foundation/NSObject.h>
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSArray;
|
@class NSArray;
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define _GNUstep_H_NSSpellServer
|
#define _GNUstep_H_NSSpellServer
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#include <Foundation/NSObject.h>
|
||||||
|
#include <Foundation/NSArray.h>
|
||||||
|
|
||||||
@interface NSSpellServer : NSObject
|
@interface NSSpellServer : NSObject
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <AppKit/NSGraphics.h>
|
#include <AppKit/NSGraphics.h>
|
||||||
#include <AppKit/NSResponder.h>
|
#include <AppKit/NSResponder.h>
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
#include <AppKit/LogFile.h>
|
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSArray;
|
@class NSArray;
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
/*
|
|
||||||
Functions.m
|
|
||||||
|
|
||||||
Generic Functions for the GNUstep GUI Library.
|
|
||||||
|
|
||||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
Author: Scott Christley <scottc@net-community.com>
|
|
||||||
Date: 1996
|
|
||||||
|
|
||||||
This file is part of the GNUstep GUI Library.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this library; see the file COPYING.LIB.
|
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include <AppKit/NSGraphics.h>
|
|
||||||
|
|
||||||
#ifndef LIB_FOUNDATION_LIBRARY
|
|
||||||
|
|
||||||
#include <Foundation/NSString.h>
|
|
||||||
#include <gnustep/gui/LogFile.h>
|
|
||||||
|
|
||||||
// Should be in Foundation Kit
|
|
||||||
// Does not handle %@
|
|
||||||
// yuck, yuck, yuck
|
|
||||||
extern LogFile *logFile;
|
|
||||||
void NSLogV(NSString *format, va_list args)
|
|
||||||
{
|
|
||||||
char out[1024];
|
|
||||||
|
|
||||||
vsprintf(out, [format cString], args);
|
|
||||||
[logFile writeLog:out];
|
|
||||||
}
|
|
||||||
|
|
||||||
void NSLog(NSString *format, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, format);
|
|
||||||
NSLogV(format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
#endif /* LIB_FOUNDATION_LIBRARY */
|
|
||||||
|
|
||||||
void NSNullLog(NSString *format, ...)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Play the System Beep
|
|
||||||
//
|
|
||||||
void NSBeep(void)
|
|
||||||
{
|
|
||||||
#ifdef WIN32
|
|
||||||
MessageBeep(MB_OK);
|
|
||||||
#endif
|
|
||||||
}
|
|
131
Source/LogFile.m
131
Source/LogFile.m
|
@ -1,131 +0,0 @@
|
||||||
/*
|
|
||||||
LogFile.m
|
|
||||||
|
|
||||||
Logfile for recording trace messages
|
|
||||||
|
|
||||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
Author: Scott Christley <scottc@net-community.com>
|
|
||||||
Date: 1996
|
|
||||||
|
|
||||||
This file is part of the GNUstep GUI Library.
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this library; see the file COPYING.LIB.
|
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <AppKit/LogFile.h>
|
|
||||||
|
|
||||||
@implementation LogFile
|
|
||||||
|
|
||||||
// Class methods
|
|
||||||
+ (void)initialize
|
|
||||||
{
|
|
||||||
// Initial version
|
|
||||||
if (self == [LogFile class])
|
|
||||||
[self setVersion:1.0];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Instance methods
|
|
||||||
- init
|
|
||||||
{
|
|
||||||
[super init];
|
|
||||||
l_flags.is_locking = NO;
|
|
||||||
l_flags.is_date_logging = YES;
|
|
||||||
if (the_log) [self closeLog];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[self closeLog];
|
|
||||||
return [super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
- initStdout
|
|
||||||
{
|
|
||||||
[self init];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- initStdoutWithLocking
|
|
||||||
{
|
|
||||||
[self init];
|
|
||||||
l_flags.is_locking = YES;
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- initFile:(const char *)filename
|
|
||||||
{
|
|
||||||
[self init];
|
|
||||||
the_log = fopen(filename, "w");
|
|
||||||
if (the_log) [self writeLog: "Start of Log\n"];
|
|
||||||
if (!the_log)
|
|
||||||
return nil;
|
|
||||||
else
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- initFileWithLocking:(const char *)filename;
|
|
||||||
{
|
|
||||||
[self init];
|
|
||||||
l_flags.is_locking = YES;
|
|
||||||
the_log = fopen(filename, "w");
|
|
||||||
if (the_log) [self writeLog: "Start of Log\n"];
|
|
||||||
if (!the_log)
|
|
||||||
return nil;
|
|
||||||
else
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Instance methods
|
|
||||||
- writeLog:(const char *)logEntry
|
|
||||||
{
|
|
||||||
if (the_log == NULL)
|
|
||||||
printf("%s", logEntry);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fprintf(the_log, "%s", logEntry);
|
|
||||||
fflush(the_log);
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- closeLog
|
|
||||||
{
|
|
||||||
[self writeLog:"Log closed.\n"];
|
|
||||||
if (the_log) fclose(the_log);
|
|
||||||
the_log = NULL;
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)isDateLogging
|
|
||||||
{
|
|
||||||
return (BOOL)l_flags.is_date_logging;
|
|
||||||
}
|
|
||||||
|
|
||||||
- setDateLogging:(BOOL)flag
|
|
||||||
{
|
|
||||||
l_flags.is_date_logging = flag;
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)isLocking
|
|
||||||
{
|
|
||||||
return (BOOL)l_flags.is_locking;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
|
@ -85,15 +85,12 @@ INIT_FILE_OBJ=$(INIT_FILE)$(oext)
|
||||||
include $(srcdir)/../Version
|
include $(srcdir)/../Version
|
||||||
|
|
||||||
GNUSTEP1_HEADERS = gui/AppKit.h \
|
GNUSTEP1_HEADERS = gui/AppKit.h \
|
||||||
gui/Functions.h \
|
|
||||||
gui/LogFile.h \
|
|
||||||
gui/NSActionCell.h \
|
gui/NSActionCell.h \
|
||||||
gui/NSApplication.h \
|
gui/NSApplication.h \
|
||||||
gui/NSBitmapImageRep.h \
|
gui/NSBitmapImageRep.h \
|
||||||
gui/NSBox.h \
|
gui/NSBox.h \
|
||||||
gui/NSBrowser.h \
|
gui/NSBrowser.h \
|
||||||
gui/NSBrowserCell.h \
|
gui/NSBrowserCell.h \
|
||||||
gui/NSBundle.h \
|
|
||||||
gui/NSButton.h \
|
gui/NSButton.h \
|
||||||
gui/NSButtonCell.h \
|
gui/NSButtonCell.h \
|
||||||
gui/NSCStringText.h \
|
gui/NSCStringText.h \
|
||||||
|
@ -121,6 +118,7 @@ gui/NSFontManager.h \
|
||||||
gui/NSFontPanel.h \
|
gui/NSFontPanel.h \
|
||||||
gui/NSForm.h \
|
gui/NSForm.h \
|
||||||
gui/NSFormCell.h \
|
gui/NSFormCell.h \
|
||||||
|
gui/NSGraphics.h \
|
||||||
gui/NSHelpPanel.h \
|
gui/NSHelpPanel.h \
|
||||||
gui/NSImage.h \
|
gui/NSImage.h \
|
||||||
gui/NSImageRep.h \
|
gui/NSImageRep.h \
|
||||||
|
@ -233,7 +231,6 @@ NSWindow$(oext) \
|
||||||
NSWorkspace$(oext) \
|
NSWorkspace$(oext) \
|
||||||
Functions$(oext) \
|
Functions$(oext) \
|
||||||
TrackingRectangle$(oext) \
|
TrackingRectangle$(oext) \
|
||||||
LogFile$(oext) \
|
|
||||||
tiff$(oext)
|
tiff$(oext)
|
||||||
|
|
||||||
OBJS = $(OBJS_WITHOUT_INIT)
|
OBJS = $(OBJS_WITHOUT_INIT)
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
#include <AppKit/NSActionCell.h>
|
#include <AppKit/NSActionCell.h>
|
||||||
#include <AppKit/NSControl.h>
|
#include <AppKit/NSControl.h>
|
||||||
#include <AppKit/LogFile.h>
|
|
||||||
|
|
||||||
@implementation NSActionCell
|
@implementation NSActionCell
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include <AppKit/NSImage.h>
|
#include <AppKit/NSImage.h>
|
||||||
#include <AppKit/NSMenu.h>
|
#include <AppKit/NSMenu.h>
|
||||||
#include <AppKit/NSMenuCell.h>
|
#include <AppKit/NSMenuCell.h>
|
||||||
#include <AppKit/LogFile.h>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Class variables
|
// Class variables
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <AppKit/NSWindow.h>
|
#include <AppKit/NSWindow.h>
|
||||||
#include <AppKit/NSButtonCell.h>
|
#include <AppKit/NSButtonCell.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <gnustep/gui/LogFile.h>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// class variables
|
// class variables
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <AppKit/NSView.h>
|
#include <AppKit/NSView.h>
|
||||||
#include <AppKit/NSCell.h>
|
#include <AppKit/NSCell.h>
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
#include <AppKit/LogFile.h>
|
|
||||||
|
|
||||||
@implementation NSCell
|
@implementation NSCell
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <AppKit/NSControl.h>
|
#include <AppKit/NSControl.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSCell.h>
|
#include <AppKit/NSCell.h>
|
||||||
#include <AppKit/LogFile.h>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Class variables
|
// Class variables
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <gnustep/gui/LogFile.h>
|
|
||||||
|
|
||||||
@implementation NSEvent
|
@implementation NSEvent
|
||||||
|
|
||||||
|
|
|
@ -64,10 +64,10 @@ static NSMutableSet* fontsUsed = nil;
|
||||||
static NSFont* getFont(NSString* key, NSString* defaultFont, float fontSize)
|
static NSFont* getFont(NSString* key, NSString* defaultFont, float fontSize)
|
||||||
{
|
{
|
||||||
NSString* fontName;
|
NSString* fontName;
|
||||||
|
|
||||||
fontName = [[NSUserDefaults standardUserDefaults] objectForKey:key];
|
fontName = [[NSUserDefaults standardUserDefaults] objectForKey:key];
|
||||||
if (!fontName)
|
if (!fontName)
|
||||||
fontName = defaultFont;
|
return [NSFont fontWithName: defaultFont size: fontSize];
|
||||||
|
|
||||||
return [NSFont fontWithName:fontName size:fontSize];
|
return [NSFont fontWithName:fontName size:fontSize];
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <AppKit/NSFontManager.h>
|
#include <AppKit/NSFontManager.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSFont.h>
|
#include <AppKit/NSFont.h>
|
||||||
#include <gnustep/gui/LogFile.h>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Class variables
|
// Class variables
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
#include <AppKit/NSResponder.h>
|
#include <AppKit/NSResponder.h>
|
||||||
#include <AppKit/NSGraphics.h>
|
#include <AppKit/NSGraphics.h>
|
||||||
#include <gnustep/gui/LogFile.h>
|
|
||||||
|
|
||||||
@implementation NSResponder
|
@implementation NSResponder
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
#include <Foundation/NSUtilities.h>
|
#include <Foundation/NSUtilities.h>
|
||||||
#include <gnustep/gui/config.h>
|
#include <gnustep/gui/config.h>
|
||||||
#include <gnustep/gui/LogFile.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -250,7 +249,7 @@ NSTiffGetInfo(int imageNumber, TIFF* image)
|
||||||
|
|
||||||
#define READ_SCANLINE(sample) \
|
#define READ_SCANLINE(sample) \
|
||||||
if ( TIFFReadScanline( image, buf, row, sample ) < 0 ) { \
|
if ( TIFFReadScanline( image, buf, row, sample ) < 0 ) { \
|
||||||
fprintf(stderr, "tiff: bad data read on line %d\n", row ); \
|
NSLog(@"tiff: bad data read on line %d\n", row ); \
|
||||||
error = 1; \
|
error = 1; \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
|
@ -351,7 +350,7 @@ NSTiffRead(int imageNumber, TIFF* image, NSTiffInfo* info, char* data)
|
||||||
case PHOTOMETRIC_RGB:
|
case PHOTOMETRIC_RGB:
|
||||||
if (newinfo->planarConfig == PLANARCONFIG_CONTIG)
|
if (newinfo->planarConfig == PLANARCONFIG_CONTIG)
|
||||||
{
|
{
|
||||||
NSLog(@"PHOTOMETRIC_RGB: CONTIG\n");
|
NSDebugLog(@"PHOTOMETRIC_RGB: CONTIG\n");
|
||||||
for ( row = 0; row < newinfo->height; ++row )
|
for ( row = 0; row < newinfo->height; ++row )
|
||||||
{
|
{
|
||||||
READ_SCANLINE(0)
|
READ_SCANLINE(0)
|
||||||
|
@ -364,7 +363,7 @@ NSTiffRead(int imageNumber, TIFF* image, NSTiffInfo* info, char* data)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSLog(@"PHOTOMETRIC_RGB: NOT CONTIG\n");
|
NSDebugLog(@"PHOTOMETRIC_RGB: NOT CONTIG\n");
|
||||||
for (i = 0; i < newinfo->samplesPerPixel; i++)
|
for (i = 0; i < newinfo->samplesPerPixel; i++)
|
||||||
for ( row = 0; row < newinfo->height; ++row )
|
for ( row = 0; row < newinfo->height; ++row )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue