mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Various tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11964 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
215669b468
commit
167ea0f8ca
3 changed files with 326 additions and 13 deletions
304
Source/Base.gsdoc
Normal file
304
Source/Base.gsdoc
Normal file
|
@ -0,0 +1,304 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "http://www.gnustep.org/gsdoc-0_6_7.xml">
|
||||||
|
<gsdoc base="Base">
|
||||||
|
<head>
|
||||||
|
<title>GNUstep Base</title>
|
||||||
|
<author name="Richard Frith-Macdonald">
|
||||||
|
<email address="rfm@gnu.org"/>
|
||||||
|
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
||||||
|
</author>
|
||||||
|
<version>$Revision$</version>
|
||||||
|
<date>$Date$</date>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<chapter>
|
||||||
|
<heading>Base</heading>
|
||||||
|
<p>
|
||||||
|
The GNUstep base library is a free software package implementing
|
||||||
|
the API of the OpenStep Foundation Kit (tm), including later
|
||||||
|
additions.
|
||||||
|
</p>
|
||||||
|
<section>
|
||||||
|
<heading>Compatibility</heading>
|
||||||
|
<p>
|
||||||
|
GNUstep is generally compatible with the OpenStep specification and
|
||||||
|
with recent developments of the MacOS (cocoa) API. Where MacOS
|
||||||
|
deviates from the OpenStep API, GNUstep generally attempts to
|
||||||
|
support both versions. In some cases the newer MacOS APIs are
|
||||||
|
incompatible with OpenStep, and GNUstep usually supports the richer
|
||||||
|
version.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
In order to deal with compatiblity issues, GNUstep uses two
|
||||||
|
mechanisms - it provides conditionally compiled sections of
|
||||||
|
the library header files, so that software can be built that
|
||||||
|
will conform strictly to a particular API, and it provides
|
||||||
|
user default settings to control the behavior of the library
|
||||||
|
at runtime.
|
||||||
|
</p>
|
||||||
|
<subsect>
|
||||||
|
<heading>Conditional compilation</heading>
|
||||||
|
<p>
|
||||||
|
Adding an option to a makefile to define one of the following
|
||||||
|
preprocessor constants will modify the API visible to software
|
||||||
|
being compiled -
|
||||||
|
</p>
|
||||||
|
<deflist>
|
||||||
|
<term>NO_GNUSTEP</term>
|
||||||
|
<desc>
|
||||||
|
GNUstep specific extensions to the OpenStep and MacOS cocoa
|
||||||
|
APIs are excluded from the headers.
|
||||||
|
</desc>
|
||||||
|
<term>STRICT_MACOS_X</term>
|
||||||
|
<desc>
|
||||||
|
Only methods and classes that are part of the MacOS cocoa
|
||||||
|
API are made available in the headers.
|
||||||
|
</desc>
|
||||||
|
<term>STRICT_OPENSTEP</term>
|
||||||
|
<desc>
|
||||||
|
Only methods and classes that are part of the OpenStep
|
||||||
|
specification are made available in the headers.
|
||||||
|
</desc>
|
||||||
|
</deflist>
|
||||||
|
</subsect>
|
||||||
|
<subsect>
|
||||||
|
<heading>User defaults</heading>
|
||||||
|
<deflist>
|
||||||
|
<term>GSLogSyslog</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Setting the user default <code>GSLogSyslog</code> to
|
||||||
|
<code>YES</code> will cause log/debug output to be sent to
|
||||||
|
the syslog facility (on systems which support it), rather
|
||||||
|
than to the standard error stream. This is useful in
|
||||||
|
environments where stderr has been re-used strangely for
|
||||||
|
some reason.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GSMacOSXCompatible</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Setting the user default <code>GSMacOSXCompatible</code> to
|
||||||
|
<code>YES</code> will cause MacOS compatible behavior to be
|
||||||
|
the default at runtime. This default may however be overridden
|
||||||
|
to provide more fine grained control of system behavior.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GSOldStyleGeometry</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Specifies whether the functions for producing strings
|
||||||
|
describing geometric structures (NSStringFromPoint(),
|
||||||
|
NSStringFromSize(), and NSStringFromRect()) should produce
|
||||||
|
strings conforming to the OpenStep specification or to
|
||||||
|
MacOS-X behavior. The functions for parsing those strings
|
||||||
|
should cope with both cases anyway.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>NSWriteOldStylePropertyLists</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Specifies whether text property-list output should be in
|
||||||
|
the default MacOS-X format (XML), or in the more human
|
||||||
|
readable (but less powerful) original OpenStep format.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Reading of property lists is supported in either format,
|
||||||
|
but <em>only</em> if GNUstep is built with the libxml
|
||||||
|
library (which is needed to handle XML parsing).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
NB. MacOS-X generates illegal XML for some strings - those
|
||||||
|
which contain characters not legal in XML. GNUstep always
|
||||||
|
generates legal XML, at the cost of a certain degree of
|
||||||
|
compatibility. GNUstep XML property lists use a backslash
|
||||||
|
to escape illegal chatracters, and consequently any string
|
||||||
|
containing either a backslash or an illegal character will
|
||||||
|
be written differently to the same string on MacOS-X.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>NSLanguages</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
An array of strings that lists the users prefered languages,
|
||||||
|
in order or preference. If not found the default is just
|
||||||
|
English.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
</deflist>
|
||||||
|
</subsect>
|
||||||
|
<subsect>
|
||||||
|
<heading>Environment variables</heading>
|
||||||
|
<p>
|
||||||
|
There are some environment variables used by GNUstep base, where
|
||||||
|
there would be problems onbtaining data from the defaults asystem.
|
||||||
|
</p>
|
||||||
|
<deflist>
|
||||||
|
<term>CRASH_ON_ABORT</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
The default exception handler will either cause the program to
|
||||||
|
simply terminate, or to crash - leaving a core dump. The
|
||||||
|
standard behavior is to leave a core dump if the library was
|
||||||
|
built for debugging, and to simply exit if it was not.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The CRASH_ON_ABORT environment variable can be used to
|
||||||
|
override this behavior. If this is defined to <em>NO</em>,
|
||||||
|
<em>FALSE</em>, or <em>0</em> then the program will simply
|
||||||
|
exit when an exception occurs. Any other value of the
|
||||||
|
variable will cause the program to generate a core dump.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_STRING_ENCODING</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
This is used to specify the default encoding for 8-bit
|
||||||
|
strings. It defaults to NSISOLatin1StringEncoding, but
|
||||||
|
may be any of the 8-bit encodings supported by your system
|
||||||
|
(excluding multi-byte encodings).
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_HOST_CPU</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used in place of GNUSTEP_TARGET_CPU if the other is missing.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_HOST_DIR</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used in place of GNUSTEP_TARGET_DIR if the other is missing.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_HOST_OS</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used in place of GNUSTEP_TARGET_OS if the other is missing.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_LOCAL_ROOT</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to specify the GNUstep root directory for local
|
||||||
|
(non-system) resources. Typically all locally produced
|
||||||
|
or contributed software is installed relative to this.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_NETWORK_ROOT</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to specify the GNUstep root directory for local
|
||||||
|
(non-system) resources that are intended to be shared
|
||||||
|
across a local network. Typically this is an NFS exported
|
||||||
|
directory shared by many machines. It provides an
|
||||||
|
alternative to GNUSTEP_LOCAL_ROOT.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_SYSTEM_ROOT</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to specify the GNUstep system root directory ... all
|
||||||
|
system libraries, tools, applications, headers, resources
|
||||||
|
in general are located relative to this.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_USER_ROOT</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to specify the GNUstep directory in which resources
|
||||||
|
specific to the current user are located.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_TARGET_CPU</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Overrides the default value of the machine (hardware)
|
||||||
|
name used on this system.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_TARGET_DIR</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Overrides the default path used to locate subdirectories
|
||||||
|
for GNUstep binaries withing bundles and applications.
|
||||||
|
This is normally equivalent to a path made up of the
|
||||||
|
GNUSTEP_TARGET_CPU and GNUSTEP_TARGET_OS
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_TARGET_OS</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Overrides the default value of the operating system
|
||||||
|
name used on this system.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>GNUSTEP_TZ</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to specify the timezone to be used if there is no
|
||||||
|
timezone specified in the user defaults system.
|
||||||
|
The preferred
|
||||||
|
mechanism is to use the 'Local Time Zone' value from the
|
||||||
|
user defaults system.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>HOMEDRIVE</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used on windoze to locate the home directory.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>HOMEPATH</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used on windoze to locate the home directory.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>LANGUAGES</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
If there is no NSLanguages user default set, and there is
|
||||||
|
no language infromation available in the native system locale
|
||||||
|
mechanism, then this environment variable is used to provide
|
||||||
|
a list of the languages that the user prefers to use.
|
||||||
|
languages listed in this variable must be separated by
|
||||||
|
semicolons.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>LOGNAME</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
This is used as the default value for the current user
|
||||||
|
(as returned by the NSUserName() functions). If it is not
|
||||||
|
specified, or contains an illegal value, other methods are
|
||||||
|
used to get the user name.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>LIBRARY_COMBO</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to override the default value of the combination
|
||||||
|
of standard libraries used to build binaries. This
|
||||||
|
value locates the final subdirectory used to locate binaries.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
<term>TZ</term>
|
||||||
|
<desc>
|
||||||
|
<p>
|
||||||
|
Used to specify the timezone to be used if there is no
|
||||||
|
timezone specified by any other mechanism. The preferred
|
||||||
|
mechanism is to use the 'Local Time Zone' value from the
|
||||||
|
user defaults system.
|
||||||
|
</p>
|
||||||
|
</desc>
|
||||||
|
|
||||||
|
</deflist>
|
||||||
|
</subsect>
|
||||||
|
</section>
|
||||||
|
</chapter>
|
||||||
|
<back>
|
||||||
|
<index scope="project" type="title" />
|
||||||
|
</back>
|
||||||
|
</body>
|
||||||
|
</gsdoc>
|
|
@ -315,8 +315,7 @@ win32-load.h \
|
||||||
NSCallBacks.h \
|
NSCallBacks.h \
|
||||||
tzfile.h
|
tzfile.h
|
||||||
|
|
||||||
FOUNDATION_HEADERS = \
|
AUTOGSDOC_HEADERS = \
|
||||||
Foundation.h \
|
|
||||||
GSMime.h \
|
GSMime.h \
|
||||||
GSXML.h \
|
GSXML.h \
|
||||||
NSArchiver.h \
|
NSArchiver.h \
|
||||||
|
@ -379,14 +378,16 @@ NSTask.h \
|
||||||
NSThread.h \
|
NSThread.h \
|
||||||
NSTimeZone.h \
|
NSTimeZone.h \
|
||||||
NSTimer.h \
|
NSTimer.h \
|
||||||
|
NSURL.h \
|
||||||
|
NSURLHandle.h \
|
||||||
NSUndoManager.h \
|
NSUndoManager.h \
|
||||||
NSUserDefaults.h \
|
NSUserDefaults.h \
|
||||||
NSUtilities.h \
|
NSUtilities.h \
|
||||||
NSValue.h \
|
NSValue.h \
|
||||||
NSZone.h \
|
NSZone.h
|
||||||
objc-load.h \
|
|
||||||
NSURL.h \
|
FOUNDATION_HEADERS = Foundation.h $(AUTOGSDOC_HEADERS) objc-load.h
|
||||||
NSURLHandle.h
|
|
||||||
|
|
||||||
UNICODE_HEADERS = \
|
UNICODE_HEADERS = \
|
||||||
unicode/caseconv.h \
|
unicode/caseconv.h \
|
||||||
|
@ -428,7 +429,7 @@ libgnustep-base_HEADER_FILES = $(FOUNDATION_HEADERS)
|
||||||
|
|
||||||
DOCUMENT_NAME = Base
|
DOCUMENT_NAME = Base
|
||||||
|
|
||||||
Base_AGSDOC_FILES = $(FOUNDATION_HEADERS)
|
Base_AGSDOC_FILES = Base.gsdoc $(AUTOGSDOC_HEADERS)
|
||||||
Base_AGSDOC_FLAGS = \
|
Base_AGSDOC_FLAGS = \
|
||||||
-HeaderDirectory ../Headers/Foundation \
|
-HeaderDirectory ../Headers/Foundation \
|
||||||
-Declared Foundation \
|
-Declared Foundation \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/** Implementation for GSXMLDocument for GNUstep xmlparser
|
/** Implementation for GSXML classes
|
||||||
|
|
||||||
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
@ -24,6 +24,19 @@
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with this library; if not, write to the Free
|
License along with this library; if not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||||
|
|
||||||
|
<title>The XML and HTML parsing system</title>
|
||||||
|
<chapter>
|
||||||
|
<heading>The XML and HTML parsing system</heading>
|
||||||
|
<p>
|
||||||
|
The GNUstep XML parser is a collection Objective-C classes
|
||||||
|
wrapping the C XML parsing library (libxml).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The underlying C library handles high performance parsing, while
|
||||||
|
the ObjectiveC classes provide ease of use/integration.
|
||||||
|
</p>
|
||||||
|
</chapter>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -131,7 +144,6 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
||||||
/**
|
/**
|
||||||
* Create a new document with the specified version.
|
* Create a new document with the specified version.
|
||||||
* <example>
|
* <example>
|
||||||
*
|
|
||||||
* id d = [GSXMLDocument documentWithVersion: @"1.0"];
|
* id d = [GSXMLDocument documentWithVersion: @"1.0"];
|
||||||
*
|
*
|
||||||
* [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]];
|
* [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]];
|
||||||
|
@ -142,7 +154,6 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
||||||
* [n1 makeChildWithNamespace: nil name: @"key" content: @"Year Of Birth"];
|
* [n1 makeChildWithNamespace: nil name: @"key" content: @"Year Of Birth"];
|
||||||
* [n1 makeChildWithNamespace: nil name: @"integer" content: @"65"];
|
* [n1 makeChildWithNamespace: nil name: @"integer" content: @"65"];
|
||||||
* [n1 makeChildWithnamespace: nil name: @"key" content: @"Pets Names"];
|
* [n1 makeChildWithnamespace: nil name: @"key" content: @"Pets Names"];
|
||||||
*
|
|
||||||
* </example>
|
* </example>
|
||||||
*/
|
*/
|
||||||
+ (GSXMLDocument*) documentWithVersion: (NSString*)version
|
+ (GSXMLDocument*) documentWithVersion: (NSString*)version
|
||||||
|
@ -280,7 +291,6 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
||||||
/**
|
/**
|
||||||
* Creates a new node within the document.
|
* Creates a new node within the document.
|
||||||
* <example>
|
* <example>
|
||||||
*
|
|
||||||
* GSXMLNode *n1, *n2;
|
* GSXMLNode *n1, *n2;
|
||||||
* GSXMLDocument *d;
|
* GSXMLDocument *d;
|
||||||
*
|
*
|
||||||
|
@ -288,7 +298,6 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
||||||
* [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]];
|
* [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]];
|
||||||
* [[d root] setProp: @"version" value: @"0.9"];
|
* [[d root] setProp: @"version" value: @"0.9"];
|
||||||
* n1 = [[d root] makeChildWithNamespace: nil name: @"dict" content: nil];
|
* n1 = [[d root] makeChildWithNamespace: nil name: @"dict" content: nil];
|
||||||
*
|
|
||||||
* </example>
|
* </example>
|
||||||
*/
|
*/
|
||||||
- (GSXMLNode*) makeNodeWithNamespace: (GSXMLNamespace*)ns
|
- (GSXMLNode*) makeNodeWithNamespace: (GSXMLNamespace*)ns
|
||||||
|
@ -1366,7 +1375,6 @@ static NSMapTable *attrNames = 0;
|
||||||
* while ((a = [a next]) != nil)
|
* while ((a = [a next]) != nil)
|
||||||
* {
|
* {
|
||||||
* NSLog(@"n1 property name - %@ value - %@", [a name], [a value]); * }
|
* NSLog(@"n1 property name - %@ value - %@", [a name], [a value]); * }
|
||||||
*
|
|
||||||
* </example>
|
* </example>
|
||||||
*/
|
*/
|
||||||
- (GSXMLAttribute*) next
|
- (GSXMLAttribute*) next
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue