mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Added some property list parsing fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11834 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
70d9f361be
commit
6e5edd5259
10 changed files with 211 additions and 125 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2001-12-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/GSXML.m: Check validation status at parse completion.
|
||||||
|
* Source/NSUserDefaults.m: Ensure flags are initialised.
|
||||||
|
* Source/GSCompatibility.m: Set GNUstep DTD for propertyLists.
|
||||||
|
* Tools/plist-0_9.dtd: GNUstep property list DTD.
|
||||||
|
|
||||||
Wed Dec 19 02:17:09 2001 Nicola Pero <n.pero@mi.flashnet.it>
|
Wed Dec 19 02:17:09 2001 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
* Source/NSThread.m (GSRegisterCurrentThread): Use @defs to
|
* Source/NSThread.m (GSRegisterCurrentThread): Use @defs to
|
||||||
|
|
|
@ -111,7 +111,6 @@
|
||||||
- (BOOL) scanPastSpace: (NSScanner*)scanner;
|
- (BOOL) scanPastSpace: (NSScanner*)scanner;
|
||||||
- (NSString*) scanSpecial: (NSScanner*)scanner;
|
- (NSString*) scanSpecial: (NSScanner*)scanner;
|
||||||
- (NSString*) scanToken: (NSScanner*)scanner;
|
- (NSString*) scanToken: (NSScanner*)scanner;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,14 +57,11 @@
|
||||||
#ifndef NO_GNUSTEP
|
#ifndef NO_GNUSTEP
|
||||||
|
|
||||||
@interface NSProcessInfo (GNUstep)
|
@interface NSProcessInfo (GNUstep)
|
||||||
/* This method returns a set of debug levels set using the
|
|
||||||
* --GNU-Debug=... command line option. */
|
|
||||||
- (NSMutableSet*) debugSet;
|
- (NSMutableSet*) debugSet;
|
||||||
|
|
||||||
/* When non using the other argument initialization hacks... */
|
+ (void) initializeWithArguments: (char**)argv
|
||||||
+ (void)initializeWithArguments: (char**)argv
|
count: (int)argc
|
||||||
count: (int)argc
|
environment: (char**)env;
|
||||||
environment: (char**)env;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -424,7 +424,8 @@ GSXMLPlMake(id obj, NSDictionary *loc)
|
||||||
|
|
||||||
dest = [NSMutableString stringWithCString:
|
dest = [NSMutableString stringWithCString:
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist "
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist "
|
||||||
"SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">\n"
|
"PUBLIC \"-//GNUstep//DTD plist 0.9//EN\" "
|
||||||
|
"\"http://www.gnustep.org/plist-0_9.xml\">\n"
|
||||||
"<plist version=\"0.9\">\n"];
|
"<plist version=\"0.9\">\n"];
|
||||||
|
|
||||||
XMLPlObject(dest, obj, loc, 0);
|
XMLPlObject(dest, obj, loc, 0);
|
||||||
|
|
|
@ -100,9 +100,11 @@ static void debugRead(NSData *data)
|
||||||
d = open(debugFile, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
d = open(debugFile, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
||||||
if (d >= 0)
|
if (d >= 0)
|
||||||
{
|
{
|
||||||
s = [NSString stringWithFormat: @"\nRead %@ -\n", [NSDate date]];
|
s = [NSString stringWithFormat: @"\nRead %@ %u bytes - '",
|
||||||
|
[NSDate date], [data length]];
|
||||||
write(d, [s cString], [s cStringLength]);
|
write(d, [s cString], [s cStringLength]);
|
||||||
write(d, [data bytes], [data length]);
|
write(d, [data bytes], [data length]);
|
||||||
|
write(d, "'", 1);
|
||||||
close(d);
|
close(d);
|
||||||
}
|
}
|
||||||
[debugLock unlock];
|
[debugLock unlock];
|
||||||
|
@ -116,9 +118,11 @@ static void debugWrite(NSData *data)
|
||||||
d = open(debugFile, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
d = open(debugFile, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
||||||
if (d >= 0)
|
if (d >= 0)
|
||||||
{
|
{
|
||||||
s = [NSString stringWithFormat: @"\nWrite %@ -\n", [NSDate date]];
|
s = [NSString stringWithFormat: @"\nWrite %@ %u bytes - '",
|
||||||
|
[NSDate date], [data length]];
|
||||||
write(d, [s cString], [s cStringLength]);
|
write(d, [s cString], [s cStringLength]);
|
||||||
write(d, [data bytes], [data length]);
|
write(d, [data bytes], [data length]);
|
||||||
|
write(d, "'", 1);
|
||||||
close(d);
|
close(d);
|
||||||
}
|
}
|
||||||
[debugLock unlock];
|
[debugLock unlock];
|
||||||
|
|
216
Source/GSMime.m
216
Source/GSMime.m
|
@ -63,6 +63,7 @@
|
||||||
#include <Foundation/NSValue.h>
|
#include <Foundation/NSValue.h>
|
||||||
#include <Foundation/NSURL.h>
|
#include <Foundation/NSURL.h>
|
||||||
#include <Foundation/NSURLHandle.h>
|
#include <Foundation/NSURLHandle.h>
|
||||||
|
#include <Foundation/NSDebug.h>
|
||||||
#include <Foundation/GSMime.h>
|
#include <Foundation/GSMime.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -223,17 +224,31 @@ parseCharacterSet(NSString *token)
|
||||||
return NSASCIIStringEncoding;
|
return NSASCIIStringEncoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most rudimentary context ... this is used for decoding plain
|
||||||
|
* text and binary dat (ie data which is not really decoded at all)
|
||||||
|
* and all other decoding work is done by a subclass.
|
||||||
|
*/
|
||||||
@implementation GSMimeCodingContext
|
@implementation GSMimeCodingContext
|
||||||
|
/**
|
||||||
|
* Returns the current value of the 'atEnd' flag.
|
||||||
|
*/
|
||||||
- (BOOL) atEnd
|
- (BOOL) atEnd
|
||||||
{
|
{
|
||||||
return atEnd;
|
return atEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copying is implemented as a simple retain.
|
||||||
|
*/
|
||||||
- (id) copyWithZone: (NSZone*)z
|
- (id) copyWithZone: (NSZone*)z
|
||||||
{
|
{
|
||||||
return RETAIN(self);
|
return RETAIN(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current value of the 'atEnd' flag.
|
||||||
|
*/
|
||||||
- (void) setAtEnd: (BOOL)flag
|
- (void) setAtEnd: (BOOL)flag
|
||||||
{
|
{
|
||||||
atEnd = flag;
|
atEnd = flag;
|
||||||
|
@ -297,33 +312,6 @@ parseCharacterSet(NSString *token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface GSMimeBinaryDecoderContext : GSMimeCodingContext
|
|
||||||
@end
|
|
||||||
@implementation GSMimeBinaryDecoderContext
|
|
||||||
- (id) autorelease
|
|
||||||
{
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
- (id) copyWithZone: (NSZone*)z
|
|
||||||
{
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
- (void) dealloc
|
|
||||||
{
|
|
||||||
NSLog(@"Error - attempt to deallocate GSMimeBinaryDecoderContext");
|
|
||||||
}
|
|
||||||
- (id) retain
|
|
||||||
{
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
- (void) release
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface GSMimeParser (Private)
|
@interface GSMimeParser (Private)
|
||||||
- (BOOL) _decodeBody: (NSData*)data;
|
- (BOOL) _decodeBody: (NSData*)data;
|
||||||
- (NSString*) _decodeHeader;
|
- (NSString*) _decodeHeader;
|
||||||
|
@ -369,9 +357,9 @@ parseCharacterSet(NSString *token)
|
||||||
* <list>
|
* <list>
|
||||||
* <item>base64</item>
|
* <item>base64</item>
|
||||||
* <item>quoted-printable</item>
|
* <item>quoted-printable</item>
|
||||||
* <item>binary</item>
|
* <item>binary (no coding actually performed)</item>
|
||||||
* <item>7bit</item>
|
* <item>7bit (no coding actually performed)</item>
|
||||||
* <item>8bit</item>
|
* <item>8bit (no coding actually performed)</item>
|
||||||
* <item>chunked (for HTTP/1.1)</item>
|
* <item>chunked (for HTTP/1.1)</item>
|
||||||
* </list>
|
* </list>
|
||||||
*/
|
*/
|
||||||
|
@ -382,7 +370,7 @@ parseCharacterSet(NSString *token)
|
||||||
|
|
||||||
if (info == nil)
|
if (info == nil)
|
||||||
{
|
{
|
||||||
return AUTORELEASE([GSMimeBinaryDecoderContext new]);
|
return AUTORELEASE([GSMimeCodingContext new]);
|
||||||
}
|
}
|
||||||
|
|
||||||
name = [info objectForKey: @"Name"];
|
name = [info objectForKey: @"Name"];
|
||||||
|
@ -393,7 +381,7 @@ parseCharacterSet(NSString *token)
|
||||||
if ([value length] == 0)
|
if ([value length] == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Bad value for %@ header - assume binary encoding", name);
|
NSLog(@"Bad value for %@ header - assume binary encoding", name);
|
||||||
return AUTORELEASE([GSMimeBinaryDecoderContext new]);
|
return AUTORELEASE([GSMimeCodingContext new]);
|
||||||
}
|
}
|
||||||
if ([value isEqualToString: @"base64"] == YES)
|
if ([value isEqualToString: @"base64"] == YES)
|
||||||
{
|
{
|
||||||
|
@ -405,15 +393,15 @@ parseCharacterSet(NSString *token)
|
||||||
}
|
}
|
||||||
else if ([value isEqualToString: @"binary"] == YES)
|
else if ([value isEqualToString: @"binary"] == YES)
|
||||||
{
|
{
|
||||||
return AUTORELEASE([GSMimeBinaryDecoderContext new]);
|
return AUTORELEASE([GSMimeCodingContext new]);
|
||||||
}
|
}
|
||||||
else if ([value characterAtIndex: 0] == '7')
|
else if ([value characterAtIndex: 0] == '7')
|
||||||
{
|
{
|
||||||
return AUTORELEASE([GSMimeBinaryDecoderContext new]);
|
return AUTORELEASE([GSMimeCodingContext new]);
|
||||||
}
|
}
|
||||||
else if ([value characterAtIndex: 0] == '8')
|
else if ([value characterAtIndex: 0] == '8')
|
||||||
{
|
{
|
||||||
return AUTORELEASE([GSMimeBinaryDecoderContext new]);
|
return AUTORELEASE([GSMimeCodingContext new]);
|
||||||
}
|
}
|
||||||
else if ([value isEqualToString: @"chunked"] == YES)
|
else if ([value isEqualToString: @"chunked"] == YES)
|
||||||
{
|
{
|
||||||
|
@ -422,7 +410,7 @@ parseCharacterSet(NSString *token)
|
||||||
}
|
}
|
||||||
|
|
||||||
NSLog(@"contextFor: - unknown header (%@) ... assumed binary encoding", name);
|
NSLog(@"contextFor: - unknown header (%@) ... assumed binary encoding", name);
|
||||||
return AUTORELEASE([GSMimeBinaryDecoderContext new]);
|
return AUTORELEASE([GSMimeCodingContext new]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -828,7 +816,7 @@ parseCharacterSet(NSString *token)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Append any data.
|
* Correct size of output buffer.
|
||||||
*/
|
*/
|
||||||
[dData setLength: size + dst - beg];
|
[dData setLength: size + dst - beg];
|
||||||
}
|
}
|
||||||
|
@ -840,7 +828,6 @@ parseCharacterSet(NSString *token)
|
||||||
[dData setLength: size + (end - src)];
|
[dData setLength: size + (end - src)];
|
||||||
dst = (unsigned char*)[dData mutableBytes];
|
dst = (unsigned char*)[dData mutableBytes];
|
||||||
memcpy(&dst[size], src, (end - src));
|
memcpy(&dst[size], src, (end - src));
|
||||||
[dData setLength: size + end - src];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -923,19 +910,22 @@ parseCharacterSet(NSString *token)
|
||||||
* <p>
|
* <p>
|
||||||
* Since it is not always possible to determine if the end of a
|
* Since it is not always possible to determine if the end of a
|
||||||
* MIME document has been reached from its content, the method
|
* MIME document has been reached from its content, the method
|
||||||
* may need to be called with a nil argument after you have
|
* may need to be called with a nil or empty argument after you have
|
||||||
* passed all the data to it ... this tells it that the data
|
* passed all the data to it ... this tells it that the data
|
||||||
* is complete.
|
* is complete.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
- (BOOL) parse: (NSData*)d
|
- (BOOL) parse: (NSData*)d
|
||||||
{
|
{
|
||||||
|
unsigned l = [d length];
|
||||||
|
|
||||||
if (complete == YES)
|
if (complete == YES)
|
||||||
{
|
{
|
||||||
return NO; /* Already completely parsed! */
|
return NO; /* Already completely parsed! */
|
||||||
}
|
}
|
||||||
if ([d length] > 0)
|
if (l > 0)
|
||||||
{
|
{
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parse %u bytes - '%*.*s'", l, l, l, [d bytes]);
|
||||||
if (inBody == NO)
|
if (inBody == NO)
|
||||||
{
|
{
|
||||||
[data appendBytes: [d bytes] length: [d length]];
|
[data appendBytes: [d bytes] length: [d length]];
|
||||||
|
@ -961,6 +951,11 @@ parseCharacterSet(NSString *token)
|
||||||
{
|
{
|
||||||
return NO; /* Header not parsed properly. */
|
return NO; /* Header not parsed properly. */
|
||||||
}
|
}
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parsed header '%@'", header);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parsed end of headers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -996,6 +991,7 @@ parseCharacterSet(NSString *token)
|
||||||
* This is an intermediary response ... so we have
|
* This is an intermediary response ... so we have
|
||||||
* to restart the parsing operation!
|
* to restart the parsing operation!
|
||||||
*/
|
*/
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parsed http continuation");
|
||||||
inBody = NO;
|
inBody = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1007,13 +1003,18 @@ parseCharacterSet(NSString *token)
|
||||||
{
|
{
|
||||||
if (inBody == YES)
|
if (inBody == YES)
|
||||||
{
|
{
|
||||||
[self _decodeBody: d];
|
/*
|
||||||
|
* We can't just re-call -parse: ...
|
||||||
|
* that would lead to recursion.
|
||||||
|
*/
|
||||||
|
return [self _decodeBody: d];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return [self parse: d];
|
return [self parse: d];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return YES; /* Want more data for body */
|
return YES; /* Want more data for body */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1277,69 +1278,66 @@ parseCharacterSet(NSString *token)
|
||||||
* work generally -
|
* work generally -
|
||||||
* </p>
|
* </p>
|
||||||
* <deflist>
|
* <deflist>
|
||||||
*
|
* <term>content-disposition</term>
|
||||||
* <term>content-disposition</term>
|
* <desc>
|
||||||
* <desc>
|
* <deflist>
|
||||||
* <deflist>
|
* <term>Parameters</term>
|
||||||
* <term>Parameters</term>
|
* <desc>
|
||||||
* <desc>
|
* A dictionary containing parameters as key-value pairs
|
||||||
* A dictionary containing parameters as key-value pairs
|
* in lowercase
|
||||||
* in lowercase
|
* </desc>
|
||||||
* </desc>
|
* <term>Value</term>
|
||||||
* <term>Value</term>
|
* <desc>
|
||||||
* <desc>
|
* The content disposition (excluding parameters) as a
|
||||||
* The content disposition (excluding parameters) as a
|
* lowercase string.
|
||||||
* lowercase string.
|
* </desc>
|
||||||
* </desc>
|
* </deflist>
|
||||||
* </deflist>
|
* </desc>
|
||||||
* </desc>
|
* <term>content-type</term>
|
||||||
* <term>content-type</term>
|
* <desc>
|
||||||
* <desc>
|
* <deflist>
|
||||||
* <deflist>
|
* <term>Parameters</term>
|
||||||
* <term>Parameters</term>
|
* <desc>
|
||||||
* <desc>
|
* A dictionary containing parameters as key-value pairs
|
||||||
* A dictionary containing parameters as key-value pairs
|
* in lowercase.
|
||||||
* in lowercase.
|
* </desc>
|
||||||
* </desc>
|
* <term>SubType</term>
|
||||||
* <term>SubType</term>
|
* <desc>The MIME subtype lowercase</desc>
|
||||||
* <desc>The MIME subtype lowercase</desc>
|
* <term>Type</term>
|
||||||
* <term>Type</term>
|
* <desc>The MIME type lowercase</desc>
|
||||||
* <desc>The MIME type lowercase</desc>
|
* <term>value</term>
|
||||||
* <term>value</term>
|
* <desc>The full MIME type (xxx/yyy) in lowercase</desc>
|
||||||
* <desc>The full MIME type (xxx/yyy) in lowercase</desc>
|
* </deflist>
|
||||||
* </deflist>
|
* </desc>
|
||||||
* </desc>
|
* <term>content-transfer-encoding</term>
|
||||||
*
|
* <desc>
|
||||||
* <term>content-transfer-encoding</term>
|
* <deflist>
|
||||||
* <desc>
|
* <term>Value</term>
|
||||||
* <deflist>
|
* <desc>The transfer encoding type in lowercase</desc>
|
||||||
* <term>Value</term>
|
* </deflist>
|
||||||
* <desc>The transfer encoding type in lowercase</desc>
|
* </desc>
|
||||||
* </deflist>
|
* <term>http</term>
|
||||||
* </desc>
|
* <desc>
|
||||||
*
|
* <deflist>
|
||||||
* <term>http</term>
|
* <term>HttpVersion</term>
|
||||||
* <desc>
|
* <desc>The HTTP protocol version number</desc>
|
||||||
* <deflist>
|
* <term>HttpMajorVersion</term>
|
||||||
* <term>HttpVersion</term>
|
* <desc>The first component of the version number</desc>
|
||||||
* <desc>The HTTP protocol version number</desc>
|
* <term>HttpMinorVersion</term>
|
||||||
* <term>HttpMajorVersion</term>
|
* <desc>The second component of the version number</desc>
|
||||||
* <desc>The first component of the version number</desc>
|
* <term>HttpStatus</term>
|
||||||
* <term>HttpMinorVersion</term>
|
* <desc>The response status value (numeric code)</desc>
|
||||||
* <desc>The second component of the version number</desc>
|
* <term>Value</term>
|
||||||
* <term>HttpStatus</term>
|
* <desc>The text message (if any)</desc>
|
||||||
* <desc>The response status value (numeric code)</desc>
|
* </deflist>
|
||||||
* <term>Value</term>
|
* </desc>
|
||||||
* <desc>The text message (if any)</desc>
|
* <term>transfer-encoding</term>
|
||||||
* </deflist>
|
* <desc>
|
||||||
* </desc>
|
* <deflist>
|
||||||
* <term>transfer-encoding</term>
|
* <term>Value</term>
|
||||||
* <desc>
|
* <desc>The transfer encoding type in lowercase</desc>
|
||||||
* <deflist>
|
* </deflist>
|
||||||
* <term>Value</term>
|
* </desc>
|
||||||
* <desc>The transfer encoding type in lowercase</desc>
|
|
||||||
* </deflist>
|
|
||||||
* </desc>
|
|
||||||
* </deflist>
|
* </deflist>
|
||||||
*/
|
*/
|
||||||
- (BOOL) scanHeader: (NSScanner*)scanner
|
- (BOOL) scanHeader: (NSScanner*)scanner
|
||||||
|
@ -1833,9 +1831,10 @@ parseCharacterSet(NSString *token)
|
||||||
|
|
||||||
- (BOOL) _decodeBody: (NSData*)d
|
- (BOOL) _decodeBody: (NSData*)d
|
||||||
{
|
{
|
||||||
BOOL result = NO;
|
unsigned l = [d length];
|
||||||
|
BOOL result = NO;
|
||||||
|
|
||||||
rawBodyLength += [d length];
|
rawBodyLength += l;
|
||||||
|
|
||||||
if (context == nil)
|
if (context == nil)
|
||||||
{
|
{
|
||||||
|
@ -1868,8 +1867,11 @@ parseCharacterSet(NSString *token)
|
||||||
}
|
}
|
||||||
context = [self contextFor: hdr];
|
context = [self contextFor: hdr];
|
||||||
RETAIN(context);
|
RETAIN(context);
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parse body expects %u bytes", expect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parse %u bytes - '%*.*s'", l, l, l, [d bytes]);
|
||||||
|
|
||||||
if ([context atEnd] == YES)
|
if ([context atEnd] == YES)
|
||||||
{
|
{
|
||||||
inBody = NO;
|
inBody = NO;
|
||||||
|
@ -1908,6 +1910,7 @@ parseCharacterSet(NSString *token)
|
||||||
inBody = NO;
|
inBody = NO;
|
||||||
complete = YES;
|
complete = YES;
|
||||||
|
|
||||||
|
NSDebugMLLog(@"GSMime", @"Parse body complete");
|
||||||
/*
|
/*
|
||||||
* If no content type is supplied, we assume text.
|
* If no content type is supplied, we assume text.
|
||||||
*/
|
*/
|
||||||
|
@ -2162,7 +2165,6 @@ parseCharacterSet(NSString *token)
|
||||||
}
|
}
|
||||||
return unwrappingComplete;
|
return unwrappingComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
Written by: Georg Tuparev <Tuparev@EMBL-Heidelberg.de>
|
Written by: Georg Tuparev <Tuparev@EMBL-Heidelberg.de>
|
||||||
Heidelberg, Germany
|
Heidelberg, Germany
|
||||||
Tuparev@EMBL-Heidelberg.de
|
|
||||||
Modified by: Richard Frith-Macdonald <rfm@gnu.org>
|
Modified by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
This file is part of the GNUstep Base Library.
|
This file is part of the GNUstep Base Library.
|
||||||
|
@ -522,12 +521,14 @@ int main(int argc, char *argv[], char *env[])
|
||||||
|
|
||||||
#endif /* HAS_LOAD_METHOD && HAS_PROCFS */
|
#endif /* HAS_LOAD_METHOD && HAS_PROCFS */
|
||||||
|
|
||||||
/* Fallback method. User must call this method if none of the other
|
/**
|
||||||
above hacks is being used
|
* Fallback method. The developer must call this method to initialize
|
||||||
*/
|
* the |NSProcessInfo system if none of the system-specific hacks to
|
||||||
+ (void)initializeWithArguments:(char**)argv
|
* auto initiailise it are working.
|
||||||
count:(int)argc
|
*/
|
||||||
environment:(char**)env
|
+ (void) initializeWithArguments: (char**)argv
|
||||||
|
count: (int)argc
|
||||||
|
environment: (char**)env
|
||||||
{
|
{
|
||||||
if (!_gnu_processName && !_gnu_arguments && !_gnu_environment)
|
if (!_gnu_processName && !_gnu_arguments && !_gnu_environment)
|
||||||
{
|
{
|
||||||
|
@ -563,6 +564,13 @@ int main(int argc, char *argv[], char *env[])
|
||||||
return _gnu_arguments;
|
return _gnu_arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns a set of debug levels set using the
|
||||||
|
* --GNU-Debug=... command line option.<br />
|
||||||
|
* You can modify this set to change the debug logging under
|
||||||
|
* your programs control ... but such modifications are not
|
||||||
|
* thread-safe.
|
||||||
|
*/
|
||||||
- (NSMutableSet*) debugSet
|
- (NSMutableSet*) debugSet
|
||||||
{
|
{
|
||||||
return _debug_set;
|
return _debug_set;
|
||||||
|
|
|
@ -349,6 +349,7 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
||||||
[sharedDefaults registerDefaults: [self _unlocalizedDefaults]];
|
[sharedDefaults registerDefaults: [self _unlocalizedDefaults]];
|
||||||
}
|
}
|
||||||
RETAIN(sharedDefaults);
|
RETAIN(sharedDefaults);
|
||||||
|
updateCache(sharedDefaults);
|
||||||
[classLock unlock];
|
[classLock unlock];
|
||||||
return AUTORELEASE(sharedDefaults);
|
return AUTORELEASE(sharedDefaults);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ include ../config.mak
|
||||||
|
|
||||||
# DTDs to install
|
# DTDs to install
|
||||||
dtddir = $(GNUSTEP_RESOURCES)/DTDs
|
dtddir = $(GNUSTEP_RESOURCES)/DTDs
|
||||||
DTD_FILES = gsdoc-0_6_5.dtd gsdoc-0_6_6.dtd gsdoc-0_6_7.dtd
|
DTD_FILES = plist-0_9.dtd gsdoc-0_6_5.dtd gsdoc-0_6_6.dtd gsdoc-0_6_7.dtd
|
||||||
|
|
||||||
# DocTemplates to install
|
# DocTemplates to install
|
||||||
doctemplatesdir = $(GNUSTEP_RESOURCES)/DocTemplates
|
doctemplatesdir = $(GNUSTEP_RESOURCES)/DocTemplates
|
||||||
|
|
67
Tools/plist-0_9.dtd
Normal file
67
Tools/plist-0_9.dtd
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
<!--
|
||||||
|
|
||||||
|
XML Document Type Definition for GNUstep property list (plist).
|
||||||
|
|
||||||
|
This is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This document 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General
|
||||||
|
Public License along with this software; if not, write to the
|
||||||
|
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
|
||||||
|
02139, USA.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
plist is an XML language - Typical usage:
|
||||||
|
<?xml version="1.0" encoding=\"UTF-8\"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN"
|
||||||
|
"http://www.gnustep.org/plist-0_9.xml">
|
||||||
|
<plist>
|
||||||
|
</plist>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!ENTITY % item "(array | data | date | dict | false | integer | real | string | true)">
|
||||||
|
|
||||||
|
<!ELEMENT plist %item;>
|
||||||
|
|
||||||
|
<!ATTLIST plist version CDATA "0.9" >
|
||||||
|
|
||||||
|
<!-- An array containing zero or more items -->
|
||||||
|
<!ELEMENT array (%item;)*>
|
||||||
|
|
||||||
|
<!-- A chunk of base-64 encoded data -->
|
||||||
|
<!ELEMENT data (#PCDATA)>
|
||||||
|
|
||||||
|
<!-- A date YYYY-MM-DD hh:mm:ss Z -->
|
||||||
|
<!ELEMENT date (#PCDATA)>
|
||||||
|
|
||||||
|
<!-- A dictionary of keys and items -->
|
||||||
|
<!ELEMENT dict (key, %item;)*>
|
||||||
|
|
||||||
|
<!-- A boolean constant -->
|
||||||
|
<!ELEMENT false EMPTY>
|
||||||
|
|
||||||
|
<!-- An integer in base ten, with an optional sign -->
|
||||||
|
<!ELEMENT integer (#PCDATA)>
|
||||||
|
|
||||||
|
<!-- A key ... treated just like a string -->
|
||||||
|
<!ELEMENT key (#PCDATA)>
|
||||||
|
|
||||||
|
<!-- A string of characters. -->
|
||||||
|
<!ELEMENT string (#PCDATA)>
|
||||||
|
|
||||||
|
<!-- A real number [+/-]n.p[E[+/-]m] -->
|
||||||
|
<!ELEMENT real (#PCDATA)>
|
||||||
|
|
||||||
|
<!-- A boolean constant -->
|
||||||
|
<!ELEMENT true EMPTY>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue