Merging changes from base to nib compatibility branch.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/NibCompatibility@22769 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2006-04-09 16:16:07 +00:00
parent cba5e8a1a4
commit 82d81e046e
165 changed files with 125046 additions and 118156 deletions

View file

@ -1,7 +1,7 @@
Announcement
************
The GNUstep Base Library, version 1.11.2, is now available.
The GNUstep Base Library, version 1.12.0, is now available.
What is the GNUstep Base Library?
=================================
@ -18,27 +18,26 @@ portion of the OpenStep standard (the Foundation library).
There is more information available at the GNUstep homepage at
`http://www.gnustep.org'.
Noteworthy changes in version `1.11.2'
Noteworthy changes in version `1.12.0'
======================================
* Support for GNUstep.conf and relocation of the filesystem is much
improved in this release.
There have been a number of API changes and several methods have been
depreciated in this release. Although current GNUstep programs that use
these methods will still work in this version, there are enough changes
that a new library version was considered useful. See the release notes
for more details
* The WM_QUIT message is now intercepted to allow an application to
terminate cleanly.
New NSStream classes where added to the library.
* NSMessagePort was implemented on Windows platforms.
* Deprecated support for system-wide GNUsteprc files has been
removed.
* Some support for keeping user defaults in the Windows registry
implemented.
User defaults were restructured to create the defaults lazily and
can be set to not write to an external file at all, for developers who
wish to use the library as a stand-alone library or in other situations
where using external resources is not desired.
Where can you get it? How can you compile it?
==============================================
The gnustep-base-1.11.2.tar.gz distribution file has been placed at
The gnustep-base-1.12.0.tar.gz distribution file has been placed at
<ftp://ftp.gnustep.org/pub/gnustep/core>.
Please log bug reports on the GNUstep project page

460
ChangeLog
View file

@ -3,6 +3,466 @@
* Source/NSKeyedUnarchiver.m: Added private method replaceObject:
withObject:.
2006-04-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSXML.m: ([GSSAXHandler-dealloc]) fix memory leak.
2006-04-02 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBundle.m: When loading localisation striong files, check
the character encoding used and warn if it's not portable and may
be producing incorrect messages due to the current default C string
encoding not being the same as the one the file was created in.
2006-04-01 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSCharacterSetData.h: Updated to version with comments.
2006-03-31 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSObjCRuntime.m: Add a class for autoreleased
memory so it is clearer when using object allocation debugging.
2006-03-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSString.m: Fix error initialising mutable string from
unicode char array conmtaining ascii characters.
Fix a few memory mleaks.
2006-03-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/win32/NSStreamWin32.m: Various tidyups for pipe streams.
* Source/NSDictionary.m: Avoid compiler warning.
* Headers/Additions/GNUstepBase/Unicode.h: Add validation function.
* Source/Additions/Unicode.m: Add unicode validation function and
alter UTF8 handling to be stricter.
* Source/GSString.m: validate unicode when initialising a string.
Also create 8bit data strings rather than 16bit where possible.
2006-03-24 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSRunLoopCtxt.h:
* Source/unix/GSRunLoopCtxt.m:
* Source/win32/GSRunLoopCtxt.m:
Tidy/improve removal of triggered watchers from outer contexts.
* Source/NSDictionary.m: ([valueForKey:]) conform to MacOS spec
2006-03-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/unix/GSRunLoopWatcher.m: deleted
* Source/win32/GSRunLoopWatcher.m: deleted
* Source/GSRunLoopWatcher.m: combine drom subdirectories.
* Source/GNUmakefile:
* Source/NSSocketPort.m:
* Source/NSRunLoop.m:
* Source/GSRunLoopWatcher.h:
* Source/GSStream.h:
* Source/GSStream.m:
* Source/unix/GSRunLoopCtxt.m:
* Source/unix/GNUmakefile:
* Source/unix/NSStream.m:
* Source/GSRunLoopCtxt.h:
* Source/NSMessagePort.m:
* Source/win32/GSRunLoopCtxt.m:
* Source/win32/GNUmakefile:
* Source/win32/NSStreamWin32.m:
* Source/NSThread.m:
* Source/GSFileHandle.m:
* Headers/Foundation/NSRunLoop.h:
* Headers/Additions/GNUstepBase/GSFileHandle.h:
Remove timeout facility for runloop watchers ... can use standard
timers instead. This simplifies api/code somewhat.
Added new watcher type ET_TRIGGER to count as an input source for
the runloop but work by polling rather than waiting for I/O events.
This allows NSStream objects to be added to the runloop even if
they don't do real I/O (eg memory streams).
Added private internal API to allow watchers to adjust how the loop
deals with them for each iteration... needed to simulate unix like
level-triggered events on windows where events are edge triggered.
Rewrote NSStream code to put handling of runloop scheduling in the
abstract classes rather than repeat in every subclass.
Rewrote NSStream stuff to use new runloop mechanisms to support
memory and file streams in runloops.
Implemented pipe base NSStream for windows.
2006-03-18 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSOutput.m: Get rid of bogus '&nbsp;'
* Tools/AGSHtml.m: Fix error in display of category method index.
2006-03-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/cifframe.h: Add code to try to get ffi muld to work on
mingw32
* GNUmakefile: Don't build SSL subproject for mingw32 as it
doesn't work.
2006-03-17 Andrew Sveikauskas <asveikau@mail.rochester.edu>
* Source/thr-mach.h: include objc/objc-api.h
* Source/thr-pthread.m: use pthread_yield() except for apple
* Source/GNUmakefile: link pthread library on openbsd where it isn't
linked to the objc runtime.
2006-03-13 Adam Fedor <fedor@gnu.org>
* Version 1.12.0
2006-03-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSKeyValueCoding.m: Attempt to fix problems introduced into
keypath code and reported by Helge ... ensure kvc mnethods are called
for each element in the path.
* Source/inet_pton.c: fixup for mingw32
* Source/NSTimeZone.m: add missing include
2006-03-12 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPropertyList.m: Allow for quoting of numeric/date values
in property lists. Fixes bug #16068
2006-03-11 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Additions/GNUstepBase/GSXML.h: clarify documentation of
xml entity escaping methods.
* Headers/Foundation/NSInvocation.h: don't use 'class' as macro
argument ... should be hermless but is confusing to C++ programmers.
2006-03-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSTimeZone.m:
* Source/NSCalendarDate.m:
* Source/GSPrivate.h:
* Source/NSDate.m:
Reorganise/tidy to avoid making some private symbols external.
2006-03-08 Richard Frith-Macdonald <rfm@gnu.org>
* Source/unix/GSRunLoopCtxt.m: Don't hanlde windows messages unless
required.
* Source/win32/NSStreamWin32.m: Use fileSystemRepresentation rather
than cStringUsingEncoding:
* Source/NSCalendarDate.m: Support '%T' and '%t' in description.
* Source/NSFileManager.m: don't abort directory copy just because
we can't set attributes of destination directory. Don't try to
copy directories with their old owners.
* Source/Additions/GSXML.m: Support #x and #X unescaping.
* Source/NSSocketPortNameServer.m:
* Source/NSBundle.m:
* Source/NSProcessInfo.m:
* Source/NSAttributedString.m:
* Source/NSArray.m:
* Source/NSMessagePortNameServer.m:
* Source/GSPrivate.h:
* Source/NSInvocation.m:
* Source/NSNotificationCenter.m:
* Source/NSCoder.m:
* Source/mframe.m:
* Source/Additions/GSCategories.m:
* Source/NSConnection.m:
* Source/GSPortPrivate.h:
* Source/NSThread.m:
* Source/NSNull.m:
* Source/NSDistantObject.m:
* Source/NSTask.m:
* Source/NSPortNameServer.m:
* Headers/Foundation/NSTimeZone.h:
* Headers/Foundation/NSHashTable.h:
* Headers/Foundation/NSRange.h:
* Headers/Foundation/NSCoder.h:
* Headers/Foundation/NSException.h:
* Headers/Foundation/NSByteOrder.h:
* Headers/Foundation/NSPortCoder.h:
* Headers/Foundation/NSURL.h:
* Headers/Foundation/NSObject.h:
* Headers/Foundation/NSCalendarDate.h:
* Headers/Foundation/NSDecimalNumber.h:
* Headers/Foundation/NSKeyValueCoding.h:
* Headers/Foundation/NSBundle.h:
* Headers/Foundation/NSSerialization.h:
* Headers/Foundation/NSURLHandle.h:
* Headers/Foundation/NSPropertyList.h:
* Headers/Foundation/NSTimer.h:
* Headers/Foundation/NSNotification.h:
* Headers/Foundation/NSScanner.h:
* Headers/Foundation/NSProcessInfo.h:
* Headers/Foundation/NSDistributedNotificationCenter.h:
* Headers/Foundation/NSGeometry.h:
* Headers/Foundation/NSAttributedString.h:
* Headers/Foundation/NSDecimal.h:
* Headers/Foundation/NSConnection.h:
* Headers/Foundation/NSUndoManager.h:
* Headers/Foundation/NSDateFormatter.h:
* Headers/Foundation/NSMethodSignature.h:
* Headers/Foundation/NSAutoreleasePool.h:
* Headers/Foundation/NSFormatter.h:
* Headers/Foundation/NSUserDefaults.h:
* Headers/Foundation/NSThread.h:
* Headers/Foundation/NSData.h:
* Headers/Foundation/NSDate.h:
* Headers/Foundation/NSHost.h:
* Headers/Foundation/NSArray.h:
* Headers/Foundation/NSProxy.h:
* Headers/Foundation/NSObjCRuntime.h:
* Headers/Foundation/NSKeyedArchiver.h:
* Headers/Foundation/NSProtocolChecker.h:
* Headers/Foundation/NSDebug.h:
* Headers/Foundation/NSPortMessage.h:
* Headers/Foundation/NSError.h:
* Headers/Foundation/NSDistributedLock.h:
* Headers/Foundation/NSFileHandle.h:
* Headers/Foundation/NSKeyValueObserving.h:
* Headers/Foundation/NSDictionary.h:
* Headers/Foundation/NSClassDescription.h:
* Headers/Foundation/NSNull.h:
* Headers/Foundation/NSZone.h:
* Headers/Foundation/NSValue.h:
* Headers/Foundation/NSIndexSet.h:
* Headers/Foundation/NSPort.h:
* Headers/Foundation/NSSortDescriptor.h:
* Headers/Foundation/NSLock.h:
* Headers/Foundation/NSSet.h:
* Headers/Foundation/NSDistantObject.h:
* Headers/Foundation/NSTask.h:
* Headers/Foundation/NSCharacterSet.h:
* Headers/Foundation/NSInvocation.h:
* Headers/Foundation/NSUtilities.h:
* Headers/Foundation/NSPortNameServer.h:
* Headers/Foundation/NSNumberFormatter.h:
* Headers/Foundation/NSXMLParser.h:
* Headers/Foundation/NSEnumerator.h:
* Headers/Foundation/NSMapTable.h:
* Headers/Additions/GNUstepBase/DistributedObjects.h:
* Headers/Additions/GNUstepBase/GSCategories.h:
Tidied a bit ... wrap some long lines.
Remove some old deprecated API.
Move some internal API out of external headers.
Deprecate a few non-standard API features.
Move a bit of non-standard API to the additions library.
2006-03-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSRunLoop.m:
* Source/unix/GSRunLoopCtxt.m:
* Source/win32/GSRunLoopWatcher.m:
* Source/win32/GSRunLoopCtxt.m:
* Headers/Foundation/NSRunLoop.h:
Add initial attempt at code for adding streams to runloops ...
as yet untested and not integrated into the NSStream code.
Remove documentation for GNUstep specific loop watcher API and
add comments to say that it may be deprecated in a later
release if/when we move to using NSStream throughout.
* configure.ac: minor documentation corrections.
Don't allow environment variable to confuse setup of file location.
* configure: regenerated
2006-03-05 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSRunLoop.m: Optimise timer handling a little and fix very
minor bug which would cause runloop to run an extra time on some
occasions.
* Tools/gdomap.c: Include config.h
* configure.ac: Support config file environment variable by default
* configure: Regenerate
* Documentation/Base.gsdoc: Document default setting for env variable
2006-03-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSRunLoop.m: Rewrite housekeeping timer.
* Source/GSRunLoopCtxt.h: Remove obsolete message/selector.
* Source/win32/GSRunLoopCtxt.m: Add housekeeping timer.
* Source/win32/NSRunLoopWin32.m: remove unused code.
* Source/win32/GNUmakefile: remove /NSRunLoopWin32.m
* Source/win32/NSStreamWin32.m: minor tidyups
* Source/NSThread.m: Use new internal API for housekeeping timer.
* Headers/Foundation/NSRunLoop.h: Remove deprecated mingw api
Basically, remove deprecated mingw32 specific api, and change
housekeeper to try to make it as invisible as possible in terms of
side effects.
* Source/NSFileManager.m: Fix mingw determination of the ownership
of a directory.
2006-03-03 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/gdomap.c: Check for HAVE_STDINT_H for safety of include
2006-03-01 Adam Fedor <fedor@gnu.org>
* configure.ac: Add check for inet_pton. Also check for make-
specified GNUstep.conf file
* config.make.in: Add variable for inet_pton
* Source/inet_pton.c: New file
* GNUmakefile: Use it if needed.
2006-03-01 Derek Zhou <dzhou@nvidea.com>
* Source/GSStream.m: Typo fixes
* Source/win32/NSStreamWin32.m: rewrite
2006-03-01 Richard Frith-Macdonald <rfm@gnu.org>
* Source/unix/NSStream.m: Final (hopefully) ifdef to disable ipv6
so systems which don't have it can compile.
2006-02-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/unix/NSStream.m: More portability fixups ... use
AF_UNIX and PF_UNIX if AF_LOCAL and PF_LOCAL are not avaulable.
Check for PF_INET6
* Tools/gdomap.c: include stdint.h for uint32_t on systems
where it's not included by other headers.
2006-02-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSXML.m: Helge spotted thread safety issues with
the code controlling warnings and the external entity loader.
Changed code to modify internals of the parser context and SAX
context to set the values in there directly rather than using the
global setter mechanism (strangely recommended in the libxml2 docs),
so that all setup is made to the individual parser and should not
effect other parsers in other threads.
* Source/NSUndoManager.m: ([-removeAllActions]) fixed to remove any
grouping in progress.
2006-02-27 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSString.h: Correct return type for
([getCString:maxLength:encoding])
* Source/NSString.m: ([getCString:maxLength:encoding]) make
implementation match MacOS-X implementation rather than their docs.
Change API for setting path handling mode to be a function we can
call before any string/path operations. Maybe final API to be made
public?
Path handling tweaks based on discussion at FOSDEM
* Source/GSString.m: ([getCString:maxLength:encoding]) implemented.
* Source/unix/NSStream.m: Portabiulity fixups ... use EPROTO only
if defined and use dummy implementations of inet6 cclasses if AF_INET6
is not defined.
* Source/NSKeyValueCoding.m: Some optimisation suggested by Helge ...
rewrite key path methods to loop rather than recurse.
* Source/GSFFIInvocation.m: Avoid compiler warning
* Source/NSURL.m: use new getCString... method
* Source/NSSerializer.m: ditto
* Documentation/Base.gsdoc: Remove env variable to set path handling.
* Headers/Additions/GNUstepBase/GSObjCRuntime.h: Slight change to
functions for KVC to allow faster implementation.
* Source/Additions/GSObjCRuntime.m: ditto
2006-02-24 Richard Frith-Macdonald <rfm@gnu.org>
* NSTimeZone.m: Fix bug in GMT+/-NNNN timezone initialisation so that
negative offsets work. Implement GMT and synonyms as internal
absolute timezones. Implement GMT-14 to GMT+14 as absolute timezones.
2006-02-23 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSUserDefaults.m: Restructure for lazy creation of defaults
database ... only create when we attempt to write.
* Source\NSSocketPort.m: Include GSPrivate.h
* Source\NSRunLoop.m: ditto
* Source\unix\GSRunLoopCtxt.m: ditto
* Source\GSPrivate.h: ditto
* Source\win32\GSFileHandleWin32.m: ditto
* Source\win32\GSRunLoopCtxt.m: ditto
* Headers\Foundation\NSNotificationQueue.h: Move library internal
function declarations to GSPrivate.h, thanks to Lloyd Dupont for
spotting problem.
2006-02-23 Sheldon Gill <sheldon@westnet.net.au>
* Source/Additions/GSXML.m: URL munging for local DTD cache fixed for
Win32 filesystems
2006-02-22 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSXML.m: Fix parsing error .. was not recognising
base64 elements.
* Headers/Foundation/NSPathUtilitites.h: Expand config documentation
* NSTimeZone.m:
* NSPathUtilities.m:
* NSPage.m:
* NSException.m:
* NSLog.m:
Fix some MINGW32 conditional compilation to use __MINGW32__
2006-02-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: Ensure that NSBundle is initialised before
changing the current directory.
* Source/NSBundle.m: Restructure for lazy evaluation of path to
executable ... lots of apps never need it.
* Source/NSTimeZone.m: Protect some class methods using locking, and
provide (slow) fallback mechanisms if some of the files are missing,
including fallback to posix stuff in zoneinfo directory if we really
have to.
2006-02-20 Richard Frith-Macdonald <rfm@gnu.org>
* NSTimeZones/NSTimeZones.tar: regenerated.
2006-02-19 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPathUtilities.m: Make config functions public.
* Headers/Foundation/NSPathUtilities.h: Declare config functions.
* Source/NSUserDefaults.m: Use config functions and add support
for new option to turn off external config file.
2006-02-18 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: Fix bug dereferencing nul pointer under
some conditions.
2006-02-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: Implement method to get name of files
owner on mingw32.
* Source/NSPathUtilities.m: Check that user specific config file
is owned by user, as suggested by Sheldon.
2006-02-16 Derek Zhou <dzhou@nvidea.com>
* Source/GSStream.h:
* Source/GSStream.m:
* Source/unix/NSStream.m:
* Source/win32/NSStreamWin32.m:
* Headers/Foundation/NSStream.h:
Add server side and pipe stream extensions along with a few fixes.
2006-02-15 Andrew Ruder <aeruder@ksu.edu>
* Headers/Foundation/NSStream.h: NSRunLoop was not defined in
the NSStream header file. (Added @class NSRunLoop;)
2006-02-15 Derek Zhou <dzhou@nvidea.com> Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSStream.h: New NSStream, NSInputStream and
NSOutputStream classes and constants.
* Headers/Foundation/Foundation.h: include NSStream.h
* Source/GSStream.h: Internal headers for GSStream and subclasses
* Source/GSStream.m: System independent parts of NSStream
* Source/unix/NSStream.m: Unix specific class implementations
* Source/unix/GNUmakefile: Build NSStream.m
* Source/win32/NSStreamWin32.m: Win32 placeholders
* Source/win32/GNUmakefile: Build NSStreamWin32.m
* Source/GNUmakefile: Build GSStream.m
* Source/DocMakefile: Build NSStream documentation
Partial implementation of NSStream ... missing SSL, SOCKS, and
Win32 (apart from memory streams).
2006-02-15 Andrew Ruder <aeruder@ksu.edu>
* Headers/Foundation/NSString.h: Fixing the oldest bug in GNUstep?
The header has says NSObject since Andrew McCallum added the file
on March 18th, 1995 (Just short of 11 years ago).
2006-02-14 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFileHandle.m: ([-availabledata]) fix error in last change
as we should block, but not for more than a single byte.
2006-02-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSCategories.m: Fix MD5 digest for 64bit CPU
>>>>>>> .merge-right.r22748
2006-02-12 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSIndexPath.m: new

View file

@ -276,21 +276,6 @@ notice and this notice are preserved.
GNUstep defaults to NSISOLatin1StringEncoding.
</p>
</desc>
<term>GNUSTEP_PATH_HANDLING</term>
<desc>
<p>
May be set to <code>unix</code> to enforce unix style path
handling, or <code>windows</code> to enforce mswindows style
path handling, or any other value (including unset) for the
default behavior where both styles of paths should be
managed in the best way possible.
</p>
<p>
The option to enforce either pure unix or pure windows style
path handling (and hence this environment variable) may be
removed in a later release.
</p>
</desc>
<term>GNUSTEP_HOST_CPU</term>
<desc>
<p>
@ -344,26 +329,29 @@ notice and this notice are preserved.
</desc>
<term>GNUSTEP_CONFIG_FILE</term>
<desc>
This has no effect unless the base library has been
configured/built with the
<code>--enable-environment-config-file</code> option.<br />
If it is operational, the environment variable overrides the
normal path to the gnustep config file used to determine the
locations of paths for the gnustep system (see later).<br />
This is provided to support the odd situation where you may
want to simultaneously run applications using different sets
of resources but linked to a lingle copy of the base library.
<p>
This functionality may have been disabled if the base library
was configured/built with the
<code>--disable-environment-config-file</code> option.<br />
If it is operational, the environment variable overrides the
normal path to the gnustep config file used to determine the
locations of paths for the gnustep system (see later).<br />
This is provided to support the odd situation where you may
want to simultaneously run applications using different sets
of resources but linked to a single copy of the base library,
or you want to use an alternative config file for some reason.
</p>
</desc>
<term>HOMEDRIVE</term>
<desc>
<p>
Used on windoze to locate the home directory.
Used on ms-windows to locate the home directory.
</p>
</desc>
<term>HOMEPATH</term>
<desc>
<p>
Used on windoze to locate the home directory.
Used on ms-windows to locate the home directory.
</p>
</desc>
<term>LANGUAGES</term>
@ -516,7 +504,10 @@ notice and this notice are preserved.
Relative to the user's home directory.<br />
On mswindows this may be set to be ':REGISTRY:' to have defaults
stored in the windows registry rather than in the standard file
format.
format.<br />
On any system this may be set to ':INTERNAL:' to use only
internal defaults domains (NSArgumentDomain, NSRegistrationDomain,
and GSConfigDomain).
</desc>
</deflist>
<p>
@ -612,8 +603,8 @@ notice and this notice are preserved.
<p>
Secondly, If the value of the path built in to the base library
as the location of the config file (or specified by
the GNUSTEP_CONFIG_FILE environment variable if that option
was enabled when the base library was configured)
the GNUSTEP_CONFIG_FILE environment variable unless that option
was disabled when the base library was configured)
begins with a dot and slash (./) then the path used for that
file is made relative to the base library.<br />
ie the text after the dot-slash is appended to the path of the
@ -672,7 +663,10 @@ notice and this notice are preserved.
<code>GNUstep/Defaults</code> subdirectory).
On mswindows this may be set to be ':REGISTRY:' to have defaults
stored in the windows registry rather than in the standard file
format.
format.<br />
On any system this may be set to ':INTERNAL:' to use only
internal defaults domains (NSArgumentDomain, NSRegistrationDomain,
and GSConfigDomain).
</p>
</subsect>
</section>

View file

@ -24,6 +24,94 @@ notice and this notice are preserved.
changes and other information that might help developers and users
migrate to using a newer version of the library.
</p>
<section>
<heading>Version 1.12.0</heading>
<p> There have been a number of API changes and several
methods have been depreciated in this release. Although
current GNUstep programs that use these methods will still
work in this version, there are enough changes that a new
library version was considered useful.
</p>
<deflist>
<term>NSCoder deprecated methods</term>
<desc>
Several methods using the old libObjects style scheme
<code>withName:</code> are now deprecated. You can use the new
NSKeyedArchiver and NSKeyedUnarchiver functionality to perform
the same function in a much more portable way.
</desc>
<term>NSPortCoder, NSPortMessage private methods</term>
<desc>
The private method <code>_components</code> was removed
from the public interface.
</desc>
<term>NSString -getCString:maxLength:encoding:</term>
<desc>
The return type of this function was changed to BOOL.
</desc>
<term>NSBundle deprecated and private methods</term>
<desc>
Several deprecated and private methods were removed from
the public interface including
<code>+gnustepBundle</code>, and
<code>+pathForGNUstepResource:ofTpye:inDirectory:</code>.
</desc>
<term>NSNotificationCenter deprecated method</term>
<desc>
The GNUstep method <code>setLockingDisabled:</code> method
was deprecated.
</desc>
<term>NSNotificationQueue private functions</term>
<desc>
Private functions <code>GSNotifyASAP</code>,
<code>GSNotifyIdle</code>, and <code>GSNotifyMore</core>
were removed from public interface.
</desc>
<term>NSRunLoop watcher API updates and other changes</term>
<desc>
We are starting to integrate the Cocoa NSStream classes
into GNUstep, which allow you to do much the same things
as the GNUstep-specific run loop watcher API was
intended. At some point the watcher API will be deprecated
as it will be redundant with NSStream functionality. Also
the deprecated win32 specific methods for NSRunLoop were
removed.
</desc>
<term>NSAttribtedString deprecated method</term>
<desc>
The non-standard
<code>attributedSubstringWithRange:</code> method (just a
synonym for the real method) was deprecated.
</desc>
<term>NSConnection, NSDistantObject method removal</term>
<desc>
Several legacy methods from the original GNU Connection
class were removed or moved to the additions category of
the library.
</desc>
<term>NSAutoreleasePool private methods</term>
<desc>
The private method <code>_endThread:</code> was removed
from the public interface.
</desc>
<term>NSPortNameServer private methods</term>
<desc>
Several private methods were removed from the public interface.
</desc>
<term>NSStream, NSIndexPath</term>
<desc>
New classes added to the library.
</desc>
<term>NSUserDefaults improvements</term>
<desc>
User defaults were restructured to create the defaults
lazily and can be set to not write to an external file at
all, for developers who wish to use the library as a
stand-alone library or in other situations where using
external resources is not desired.
</desc>
</deflist>
</section>
<section>
<heading>Version 1.11.2</heading>
<deflist>

View file

@ -11,6 +11,25 @@ The currently released version of the library is
See the @url{ReleaseNotes.html} document for more information.
@end ifclear
@section Noteworthy changes in version @samp{1.12.0}
There have been a number of API changes and several
methods have been depreciated in this release. Although
current GNUstep programs that use these methods will still
work in this version, there are enough changes that a new
library version was considered useful. See the release notes for more
details
New NSStream classes where added to the library.
User defaults were restructured to create the defaults
lazily and can be set to not write to an external file at
all, for developers who wish to use the library as a
stand-alone library or in other situations where using
external resources is not desired.
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{1.11.2}
@itemize @bullet
@ -24,8 +43,6 @@ terminate cleanly.
implemented.
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{1.11.1}
@itemize @bullet

View file

@ -35,6 +35,8 @@ RPM_DISABLE_RELOCATABLE=YES
PACKAGE_NEEDS_CONFIGURE = YES
CVS_MODULE_NAME = base
SVN_MODULE_NAME = base
SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/libs
#
# Include local (new) configuration - this will prevent the old one
@ -50,7 +52,11 @@ PACKAGE_NAME = gnustep-base
#
# The list of subproject directories
#
SUBPROJECTS = Source SSL Tools NSTimeZones Resources
SUBPROJECTS = Source
ifneq ($(GNUSTEP_TARGET_OS), mingw32)
SUBPROJECTS += SSL
endif
SUBPROJECTS += Tools NSTimeZones Resources
-include Makefile.preamble

View file

@ -74,6 +74,13 @@ enum {
- (NSDistantObject*) locateLocalTarget: (unsigned)target;
- (NSDistantObject*) proxyForTarget: (unsigned)target;
- (void) retainTarget: (unsigned)target;
- (retval_t) forwardForProxy: (NSDistantObject*)object
selector: (SEL)sel
argFrame: (arglist_t)argframe;
- (void) forwardInvocation: (NSInvocation *)inv
forProxy: (NSDistantObject*)object;
- (const char *) typeForSelector: (SEL)sel remoteTarget: (unsigned)target;
@end
@interface NSPort (Internal)

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
AutogsdocSource: Additions/GSCategories.m
@ -246,6 +247,15 @@ typedef enum _NSGNUstepStringEncoding
@interface NSArray (GSCompatibility)
- (id) initWithArray: (NSArray*)array copyItems: (BOOL)shouldCopy;
- (unsigned) insertionPosition: (id)item
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
context: (void *)context;
- (unsigned) insertionPosition: (id)item
usingSelector: (SEL)comp;
@end
@interface NSAttributedString (GSCategories)
- (NSAttributedString*) attributedSubstringWithRange: (NSRange)aRange;
@end
@interface NSBundle(GSCompatibility)
@ -286,7 +296,7 @@ typedef enum _NSGNUstepStringEncoding
@end
@interface NSLock (GSCategories)
+ (id)newLockAt:(id *)location;
+ (id) newLockAt: (id *)location;
@end
@interface NSLock (GSCompatibility)

View file

@ -97,9 +97,6 @@
extra: (void*)extra
forMode: (NSString*)mode;
- (void) setAddr: (struct sockaddr_in *)sin;
- (NSDate*) timedOutEvent: (void*)data
type: (RunLoopEventType)type
forMode: (NSString*)mode;
- (BOOL) useCompression;
- (void) watchReadDescriptorForModes: (NSArray*)modes;
- (void) watchWriteDescriptor;

View file

@ -804,7 +804,11 @@ GSIMapAddKey(GSIMapTable map, GSIMapKey key)
}
#endif
static INLINE void
/**
* Removes the item for the specified key from the map.
* If the key was present, returns YES, otherwise returns NO.
*/
static INLINE BOOL
GSIMapRemoveKey(GSIMapTable map, GSIMapKey key)
{
GSIMapBucket bucket = GSIMapBucketForKey(map, key);
@ -815,7 +819,9 @@ GSIMapRemoveKey(GSIMapTable map, GSIMapKey key)
{
GSIMapRemoveNodeFromMap(map, bucket, node);
GSIMapFreeNode(map, node);
return YES;
}
return NO;
}
static INLINE void

View file

@ -135,12 +135,12 @@ GSObjCAddClasses(NSArray *classes);
* scalar types of data.
*/
GS_EXPORT id
GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
const char *type, unsigned size, int offset);
GSObjCGetVal(NSObject *self, const char *key, SEL sel,
const char *type, unsigned size, int offset);
GS_EXPORT void
GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
const char *type, unsigned size, int offset);
GSObjCSetVal(NSObject *self, const char *key, id val, SEL sel,
const char *type, unsigned size, int offset);
#include <GNUstepBase/objc-gnu2next.h>

View file

@ -56,13 +56,25 @@
*/
@interface NSString (GSXML)
/**
* Convert XML special characters in the receiver (like '&amp;' and '&quot;')
* to their escaped equivalents, and return the escaped string.
* Deals with standard XML internal entities.<br />
* Converts the five XML special characters in the receiver ('&gt;', '&lt;',
* '&amp;', '&apos;' and '&quot;') to their escaped equivalents, and return
* the escaped string.<br />
* Also converts non-ascii characters to the corresponding numeric
* entity escape sequences.<br />
* You should perform any non-standard entity substitution you require
* <em>after</em> you have called this method.
*/
- (NSString*) stringByEscapingXML;
/**
* Convert XML escape sequences (like '&amp;'amp; and '&amp;quot;')
* to their unescaped equivalents, and return the unescaped string.
* Deals with standard XML internal entities.<br />
* Converts the five XML escape sequences ('&amp;gt;', '&amp;lt;', '&amp;amp;',
* '&amp;apos;' and '&amp;quot;') to the unicode characters they represent,
* and returns the unescaped string.<br />
* Also converts numeric entity escape sequences to the corresponding unicode
* characters.<br />
* You should perform any non-standard entity substitution you require
* <em>before</em> you have called this method.
*/
- (NSString*) stringByUnescapingXML;
@end

View file

@ -64,6 +64,8 @@ GS_EXPORT unichar *uni_is_decomp(unichar u);
#define GSUniBOM 0x08
#define GSUniShortOk 0x10
GS_EXPORT unsigned GSUnicode(const unichar *chars, unsigned length,
BOOL *isASCII, BOOL *isLatin1);
GS_EXPORT BOOL GSFromUnicode(unsigned char **dst, unsigned int *size,
const unichar *src, unsigned int slen, NSStringEncoding enc, NSZone *zone,
unsigned int options);

View file

@ -84,6 +84,7 @@
#include <Foundation/NSSerialization.h>
#include <Foundation/NSSet.h>
#include <Foundation/NSSortDescriptor.h>
#include <Foundation/NSStream.h>
#include <Foundation/NSString.h>
#include <Foundation/NSTask.h>
#include <Foundation/NSThread.h>

View file

@ -150,7 +150,7 @@
@end
@interface NSArray (GNUstep)
@interface NSArray (GSCategories)
/*
* Extension methods for working with sorted arrays - use a binary chop
* to determine the insertion location for an nobject. If equal objects

View file

@ -84,13 +84,6 @@
//Extracting a substring
- (NSAttributedString*) attributedSubstringFromRange: (NSRange)aRange;
#ifndef NO_GNUSTEP
/*
* Synonym for attributedSubstringFromRange: - for consistency with NSString
*/
- (NSAttributedString*) attributedSubstringWithRange: (NSRange)aRange;
#endif
@end //NSAttributedString
@ -127,6 +120,16 @@
@end //NSMutableAttributedString
#ifndef NO_GNUSTEP
@interface NSAttributedString (GSCategories)
/**
* Dep[recated synonym for attributedSubstringFromRange:
* for consistency with NSString
*/
- (NSAttributedString*) attributedSubstringWithRange: (NSRange)aRange;
@end
#endif
#endif //STRICT_OPENSTEP
#endif //_NSXKit_H_NSAttributedString

View file

@ -162,7 +162,9 @@ typedef struct autorelease_array_list
* Methods whose names begin with copy create a copy of the receiver
* which is owned by the caller.
* </desc>
* <term>[NSObject-mutableCopy], [(NSMutableCopying)-mutableCopyWithZone:]</term>
* <term>
* [NSObject-mutableCopy], [(NSMutableCopying)-mutableCopyWithZone:]
* </term>
* <desc>
* Methods whose names begin with mutableCopy create a copy of the receiver
* which is owned by the caller.
@ -278,13 +280,6 @@ typedef struct autorelease_array_list
*/
+ (void) setPoolCountThreshhold: (unsigned)c;
/**
* Destroys all the autorelease pools in the thread.<br />
* You should not call this directly, it's called automatically
* when a thread exits.
*/
+ (void) _endThread: (NSThread*)thread;
/**
* Return the number of objects in this pool.
*/

View file

@ -369,26 +369,11 @@ GS_EXPORT NSString* const NSLoadedClasses;
*/
+ (NSBundle *) bundleForLibrary: (NSString *)libraryName;
+ (NSString *) _absolutePathOfExecutable: (NSString *)path;
+ (NSString*) _gnustep_target_cpu;
+ (NSString*) _gnustep_target_dir;
+ (NSString*) _gnustep_target_os;
+ (NSString*) _library_combo;
/** Find a resource in the "Library" directory. */
+ (NSString*) pathForLibraryResource: (NSString*)name
ofType: (NSString*)ext
inDirectory: (NSString*)bundlePath;
/** Deprecated. Use +bundleForLibrary: instead. */
+ (NSBundle*) gnustepBundle;
/** Deprecated. Use +pathForLibraryResource:ofType:inDirectory:
or +bundleForLibrary: instead. */
+ (NSString*) pathForGNUstepResource: (NSString*)name
ofType: (NSString*)ext
inDirectory: (NSString*)bundlePath;
@end
/** Warning - do not use this. */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSByteOrder_h_GNUSTEP_BASE_INCLUDE

View file

@ -134,12 +134,6 @@
@end
void
GSBreakTime(NSTimeInterval when, int *year, int *month, int *day, int *hour,
int *minute, int *second, int *mil);
NSTimeInterval
GSTime(int day, int month, int year, int hour, int minute, int second, int mil);
#endif
#ifndef STRICT_MACOS_X

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSCharacterSet_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSClassDescription_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSCoder_h_GNUSTEP_BASE_INCLUDE
@ -352,6 +353,7 @@
/**
* GNUstep extensions to [NSCoder], supporting compatibility with libObjects.
* DEPRECATED
*/
@interface NSCoder (GNUstep)
/* Compatibility with libObjects */

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSConnection_h_GNUSTEP_BASE_INCLUDE
@ -178,45 +179,6 @@ GS_EXPORT NSString* const NSConnectionProxyCount; /* Objects received */
@end
/**
* This category contains legacy methods from the original GNU 'Connection'
* class, and useful extensions to [NSConnection].
*/
@interface NSConnection (GNUstepExtensions) <GCFinalization>
/**
* Alternative convenience constructor, not specified in OpenStep, where you
* register root anObject under given name in one step.
*/
+ (NSConnection*) newRegisteringAtName: (NSString*)name
withRootObject: (id)anObject;
/**
* Performs local and remote cleanup.
*/
- (void) gcFinalize;
/**
* [NSDistantObject -forward::] calls this to send the message over the wire.
*/
- (retval_t) forwardForProxy: (NSDistantObject*)object
selector: (SEL)sel
argFrame: (arglist_t)argframe;
/**
* [NSDistantObject -forwardInvocation:] calls this to send the message over
* the wire.
*/
- (void) forwardInvocation: (NSInvocation *)inv
forProxy: (NSDistantObject*)object;
/**
* Returns type code (@encode()-compatible) for given remote method.
*/
- (const char *) typeForSelector: (SEL)sel remoteTarget: (unsigned)target;
@end
/**
* This category represents an informal protocol to which NSConnection
* delegates may conform ... These methods are not actually implemented

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSData_h_GNUSTEP_BASE_INCLUDE

View file

@ -15,7 +15,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDate_h_GNUSTEP_BASE_INCLUDE

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDateFormatter_h_GNUSTEP_BASE_INCLUDE
@ -57,7 +58,8 @@
* <term>%d</term>
* <desc>day of the month as a decimal number (01-31)</desc>
* <term>%e</term>
* <desc>same as %d but does not print the leading 0 for days 1 through 9 (unlike strftime(), does not print a leading space)</desc>
* <desc>same as %d but does not print the leading 0 for days 1 through 9
* (unlike strftime(), does not print a leading space)</desc>
* <term>%F</term>
* <desc>milliseconds as a decimal number (000-999)</desc>
* <term>%H</term>
@ -77,15 +79,18 @@
* <term>%w</term>
* <desc>weekday as a decimal number (0-6), where Sunday is 0</desc>
* <term>%x</term>
* <desc>date using the date representation for the locale, including the time zone (produces different results from strftime())</desc>
* <desc>date using the date representation for the locale, including the
* time zone (produces different results from strftime())</desc>
* <term>%X</term>
* <desc>time using the time representation for the locale (produces different results from strftime())</desc>
* <desc>time using the time representation for the locale (produces
* different results from strftime())</desc>
* <term>%y</term>
* <desc>year without century (00-99)</desc>
* <term>%Y</term>
* <desc>year with century (such as 1990)</desc>
* <term>%Z</term>
* <desc>time zone name (such as Pacific Daylight Time; produces different results from strftime())</desc>
* <desc>time zone name (such as Pacific Daylight Time; produces different
* results from strftime())</desc>
* <term>%z</term>
* <desc>time zone offset in hours and minutes from GMT (HHMM)</desc>
* </deflist>

View file

@ -20,7 +20,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDebug_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDecimalNumber_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef _NSDictionary_h_GNUSTEP_BASE_INCLUDE

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDistantObject_h_GNUSTEP_BASE_INCLUDE
@ -59,12 +60,4 @@
@end
@interface NSDistantObject(GNUstepExtensions) <GCFinalization>
- (Class) classForPortCoder;
- (const char *) selectorTypeForProxy: (SEL)selector;
- (id) forward: (SEL)aSel :(arglist_t)frame;
- (void) gcFinalize;
@end
#endif /* __NSDistantObject_h_GNUSTEP_BASE_INCLUDE */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDistributedLock_h_GNUSTEP_BASE_INCLUDE
@ -42,7 +43,6 @@
- (BOOL) tryLock;
- (void) unlock;
@end
#endif /* __NSDistributedLock_h_GNUSTEP_BASE_INCLUDE */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSDistributedNotificationCenter_h_GNUSTEP_BASE_INCLUDE

View file

@ -20,7 +20,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSEnumerator_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSError.m
*/

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
<title>NSException and NSAssertionHandler class reference</title>

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSFileHandle.m
AutogsdocSource: NSPipe.m

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSFormatter_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. */
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02111 USA. */
#ifndef __NSGeometry_h_GNUSTEP_BASE_INCLUDE
#define __NSGeometry_h_GNUSTEP_BASE_INCLUDE

View file

@ -21,7 +21,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02111 USA.
*/
#ifndef __NSHashTable_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSHost_h_GNUSTEP_BASE_INCLUDE
#define __NSHost_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSIndexSet.m

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSInvocation_h_GNUSTEP_BASE_INCLUDE
@ -92,12 +93,17 @@
#ifndef NO_GNUSTEP
@interface NSInvocation (GNUstep)
- (id) initWithArgframe: (arglist_t)frame selector: (SEL)aSelector;
- (id) initWithMethodSignature: (NSMethodSignature*)aSignature;
- (id) initWithSelector: (SEL)aSelector;
- (id) initWithTarget: (id)anObject selector: (SEL)aSelector, ...;
- (void*) returnFrame: (arglist_t)argFrame;
/**
* Returns the status of the flag set by -setSendsToSuper:
*/
- (BOOL) sendsToSuper;
/**
* Sets the flag to tell the invocation that it should actually invoke a
* method in the superclass of the target rather than the method of the
* target itself.<br />
* This extension permits an invocation to act like a regular method
* call sent to <em>super</em> in the method of a class.
*/
- (void) setSendsToSuper: (BOOL)flag;
@end
#endif
@ -107,6 +113,11 @@
+ (id) _newProxyForInvocation: (id)target;
+ (id) _newProxyForMessage: (id)target;
+ (NSInvocation*) _returnInvocationAndDestroyProxy: (id)proxy;
- (id) initWithArgframe: (arglist_t)frame selector: (SEL)aSelector;
- (id) initWithMethodSignature: (NSMethodSignature*)aSignature;
- (id) initWithSelector: (SEL)aSelector;
- (id) initWithTarget: (id)anObject selector: (SEL)aSelector, ...;
- (void*) returnFrame: (arglist_t)argFrame;
@end
/**
@ -116,8 +127,8 @@
* call.<br />
* Before using the returned invocation, you need to set its target.
*/
#define NS_INVOCATION(class, message...) ({\
id __proxy = [NSInvocation _newProxyForInvocation: class]; \
#define NS_INVOCATION(aClass, message...) ({\
id __proxy = [NSInvocation _newProxyForInvocation: aClass]; \
[__proxy message]; \
[NSInvocation _returnInvocationAndDestroyProxy: __proxy]; \
})

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSKeyValueCoding_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSKeyValueObserving_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSKeyedArchiver.m
AutogsdocSource: NSKeyedUnarchiver.m

View file

@ -251,7 +251,7 @@
*
* </example>
*/
+ (id)newLockAt:(id *)location;
+ (id) newLockAt: (id *)location;
@end
/**
@ -281,7 +281,7 @@
*
* </example>
*/
+ (id)newLockAt:(id *)location;
+ (id) newLockAt: (id *)location;
@end
#endif /* NO_GNUSTEP */

View file

@ -21,7 +21,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. */
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02111 USA. */
#ifndef __NSMapTable_h_GNUSTEP_BASE_INCLUDE
#define __NSMapTable_h_GNUSTEP_BASE_INCLUDE 1

View file

@ -20,7 +20,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSMethodSignature_h_GNUSTEP_BASE_INCLUDE

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSNotification.m
AutogsdocSource: NSNotificationCenter.m
@ -85,15 +86,11 @@
#ifndef NO_GNUSTEP
/**
* Defines an extension for maximising posting performance - this option
* is NOT adjustable for the default notification center.
*/
@interface NSNotificationCenter (GNUstep)
/**
* You can disable locking in a multi-threaded program if you KNOW that only
* one thread will ever use the notification center.
* one thread will ever use the notification center.<br />
* DEPRECATED
*/
- (BOOL) setLockingDisabled: (BOOL)flag;
@end

View file

@ -125,13 +125,4 @@ struct _NSNotificationQueueList;
@end
#ifndef NO_GNUSTEP
/*
* Functions used by the NSRunLoop
*/
extern void GSNotifyASAP(void);
extern void GSNotifyIdle(void);
extern BOOL GSNotifyMore(void);
#endif
#endif /* __NSNotificationQueue_h__ */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSNull_h_GNUSTEP_BASE_INCLUDE

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef _NSNumberFormatter_h__

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSObjCRuntime.m
AutogsdocSource: NSLog.m

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSObject.m
AutogsdocSource: Additions/GSCategories.m

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
AutogsdocSource: NSPathUtilities.m
*/
@ -29,6 +30,8 @@
#include <Foundation/NSString.h>
#ifndef NO_GNUSTEP
@class NSDictionary;
@class NSMutableDictionary;
/**
* This extension permits a change of username from that specified in the
* LOGNAME environment variable. Using it will almost certainly cause
@ -38,9 +41,57 @@
* [NSUserDefaults +resetUserDefaults] extension to reset the defaults system
* to use the defaults belonging to the new user.
*/
GS_EXPORT void GSSetUserName(NSString *aName);
GS_EXPORT void
GSSetUserName(NSString *aName);
GS_EXPORT NSString *GSDefaultsRootForUser(NSString *userName);
/**
* Returns a mutable copy of the system-wide configuration used to
* determine paths to locate files etc.<br />
* If the newConfig argument is non-nil it is used to set the config
* overriding any other version. You should not change the config
* after the user defaults system has been initialised as the new
* config will not be picked up by the defaults system.<br />
* <br />
* A typical sequence of operation might be to<br />
* Call the function with a nil argument to obtain the configuration
* information currently in use (usually obtained from the main GNUstep
* configuration file).<br />
* Modify the dictionary contents.<br />
* Call the function again passing back in the modified config.<br />
* <br />
* If you call this function with a non-nil argument before the system
* configuration file has been read, you will prevent the file from
* being read. However, you must take care doing this that creation
* of the config dictionary you are going to pass in to the function
* does not have any side-effects which would cause the config file
* to be read earlier.<br />
* If you want to prevent the user specific config file from being
* read, you must set the GNUSTEP_USER_CONFIG_FILE value in the
* dictionary to be an empty string.
*/
GS_EXPORT NSMutableDictionary*
GNUstepConfig(NSDictionary *newConfig);
/**
* Returns the location of the defaults database for the specified user.
* This uses the same information you get from GNUstepConfig() and
* GNUstepUserConfig() and builds the path to the defaults database
* fromm it.
*/
GS_EXPORT NSString*
GSDefaultsRootForUser(NSString *userName);
/**
* The config dictionary passed to this function should be a
* system-wide config as provided by GNUstepConfig() ... and
* this function merges in user specific configuration file
* information if such a file exists and is owned by the user.<br />
* NB. If the GNUSTEP_USER_CONFIG_FILE value in the system-wide
* config is an empty string, no user-specifc config will be
* read.
*/
GS_EXPORT void
GNUstepUserConfig(NSMutableDictionary *config, NSString *userName);
#endif
GS_EXPORT NSString *NSUserName(void);

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSPort.m
AutogsdocSource: NSSocketPort.m

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSPortCoder_h
@ -172,9 +173,4 @@
@end
@interface NSPortCoder (Private)
- (NSMutableArray*) _components;
@end
#endif /* __NSPortCoder_h */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSPortMessage_h_GNUSTEP_BASE_INCLUDE
@ -99,10 +100,5 @@
- (unsigned) msgid;
@end
#ifndef NO_GNUSTEP
@interface NSPortMessage (private)
- (NSMutableArray*) _components;
@end
#endif
#endif

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
<title>NSPortNameServer class reference</title>
@ -48,17 +49,6 @@
- (BOOL) removePortForName: (NSString*)name;
@end
#ifndef NO_GNUSTEP
@interface NSPortNameServer (GNUstep)
- (NSArray*) namesForPort: (NSPort*)port; /* return all names for port */
- (BOOL) removePort: (NSPort*)port; /* remove all names for port */
/* Remove the name if and only if it is registered by the given port. */
- (BOOL) removePort: (NSPort*)port forName: (NSString*)name;
@end
#endif
@interface NSSocketPortNameServer : NSPortNameServer
{
NSMapTable *_portMap; /* Registered ports information. */

View file

@ -20,7 +20,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSProcessInfo_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSPropertyList.m

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSProtocolChecker_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSProxy_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. */
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02111 USA. */
#ifndef __NSRange_h_GNUSTEP_BASE_INCLUDE
#define __NSRange_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSRunLoop_h_GNUSTEP_BASE_INCLUDE
@ -91,129 +92,57 @@ GS_EXPORT NSString * const NSDefaultRunLoopMode;
@end
/*
* GNUstep extensions
*/
/**
* Enumeration of event types that an [NSRunLoop] watcher
* can watch for. See [NSRunLoop-addEvent:type:watcher:forMode:].
* This is a GNUstep extension.
<example>
{
ET_RDESC, // Watch for descriptor becoming readable.
ET_WDESC, // Watch for descriptor becoming writeable.
ET_RPORT, // Watch for message arriving on port.
ET_EDESC // Watch for descriptor with out-of-band data.
}
</example>
* The following interface is not yet deprecated,
* but may be deprecated in the next release and
* removed thereafter.
*
* The run loop watcher API was originally intended to perform two
* tasks ...
* 1. provide the most efficient API reasonably possible to integrate
* unix networking code into the runloop.
* 2. provide a standard mechanism to allow people to contribute
* code to add new I/O mechanisms to GNUstep (OpenStep didn't allow this).
* It succeeded in 1, and partially succeeded in 2 (adding support
* for the win32 API).
*
* However, several years on, CPU's are even faster with respect to I/O
* and the performance issue is less significant, and Apple have provided
* the NSStream API which allows yoiu to write stream subclasses and add
* them to the run loop.
*
* We are likely to follow Apple for compatibility, and restructure code
* using NSStream, at which point this API will be redundant.
*/
typedef enum {
#ifdef __MINGW32__
ET_HANDLE, /* Watch for an I/O event on a handle. */
ET_RPORT, /* Watch for message arriving on port. */
ET_WINMSG, /* Watch for a message on a window handle. */
ET_TRIGGER /* Trigger immediately when the loop runs. */
#else
ET_RDESC, /* Watch for descriptor becoming readable. */
ET_WDESC, /* Watch for descriptor becoming writeable. */
ET_RPORT, /* Watch for message arriving on port. */
ET_EDESC /* Watch for descriptor with out-of-band data. */
ET_EDESC, /* Watch for descriptor with out-of-band data. */
ET_TRIGGER /* Trigger immediately when the loop runs. */
#endif
} RunLoopEventType;
/**
* This protocol documents the callback messages that an object
* receives if it has registered to receive run loop events using
* [NSRunLoop-addEvent:type:watcher:forMode:]
*/
@protocol RunLoopEvents
/**
* Callback message sent to object waiting for an event in the
* runloop when the limit-date for the operation is reached.
* If an NSDate object is returned, the operation is restarted
* with the new limit-date, otherwise it is removed from the
* run loop.
*/
- (NSDate*) timedOutEvent: (void*)data
type: (RunLoopEventType)type
forMode: (NSString*)mode;
/**
* Callback message sent to object when the event it it waiting
* for occurs. The 'data' and 'type' values are those passed in the
* original -addEvent:type:watcher:forMode: method.<br />
* The 'extra' value may be additional data returned depending on the type
* of event. In the case of <code>ET_WINMSG</code> 'extra' is a pointer
* to a windows <code>MSG</code> structure containing the received event.
*/
- (void) receivedEvent: (void*)data
type: (RunLoopEventType)type
extra: (void*)extra
forMode: (NSString*)mode;
@end
/**
* These are general purpose methods for letting objects ask
* the runloop to watch for events for them. Only one object
* at a time may be watching for a particular event in a mode, but
* that object may add itself as a watcher many times as long as
* each addition is matched by a removal (the run loop keeps count).
* Alternatively, the 'removeAll' parameter may be set to 'YES' for
* [-removeEvent:type:forMode:all:] in order to remove the watcher
* irrespective of the number of times it has been added.
*/
@class NSStream;
@interface NSRunLoop(GNUstepExtensions)
/**
* Adds a runloop watcher matching the specified data and type in this
* runloop. If the mode is nil, either the -currentMode is used (if the
* loop is running) or NSDefaultRunLoopMode is used.<br />
* NB. The watcher is <em>not</em> retained by the run loop and must
* be removed from the loop before deallocation ... otherwise the loop
* might try to send a message to the deallocated watcher object
* resulting in a crash. You use -removeEvent:type:forMode:all: to do this.
*/
- (void) addEvent: (void*)data
type: (RunLoopEventType)type
watcher: (id<RunLoopEvents>)watcher
forMode: (NSString*)mode;
/**
* Removes a runloop watcher matching the specified data and type in this
* runloop. If the mode is nil, either the -currentMode is used (if the
* loop is running) or NSDefaultRunLoopMode is used.<br />
* The additional removeAll flag may be used to remove all instances of
* the watcher rather than just a single one.
*/
- (void) removeEvent: (void*)data
type: (RunLoopEventType)type
forMode: (NSString*)mode
all: (BOOL)removeAll;
@end
/**
* Defines implementation-helper method -getFds:count:.
* <strong>This interface will probably change. Do not rely on it.</strong>
*/
// xxx This interface will probably change.
@interface NSObject (OptionalPortRunLoop)
/** If a InPort object responds to this, it is sent just before we are
about to wait listening for input.
This interface will probably change. */
- (void) getFds: (int*)fds count: (int*)count;
@end
#if defined(__MINGW32__)
/**
* Obsolete interface that add method to set target for win32 messages.<br />
*/
@interface NSRunLoop(mingw32)
/** Deprecated ... will be removed
*/
- (void) addMsgTarget: (id)target
withMethod: (SEL)selector
forMode: (NSString*)mode;
/** Deprecated ... will be removed
*/
- (void) removeMsgForMode: (NSString*)mode;
@end
#endif
#endif /*__NSRunLoop_h_GNUSTEP_BASE_INCLUDE */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSScanner_h_GNUSTEP_INCLUDE

View file

@ -20,7 +20,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSSerialization_h_GNUSTEP_BASE_INCLUDE
@ -68,16 +69,19 @@
/**
* <p>Serialize given property list (NSArray or NSDictionary plus limited
* contents) into byte array.</p> <p><em>Deprecated in favor of
* [NSPropertyListSerialization+dataFromPropertyList:format:errorDescription:].</em></p>
* contents) into byte array.</p>
* <p><em>Deprecated in favor of
* [NSPropertyListSerialization+dataFromPropertyList:format:errorDescription:].
* </em></p>
*/
+ (NSData*) serializePropertyList: (id)propertyList;
/**
* <p>Serialize given property list (NSArray or NSDictionary plus limited
* contents) into given mutable byte array.</p> <p><em>Deprecated in favor of
* [NSPropertyListSerialization+dataFromPropertyList:format:errorDescription:].</em></p>
* contents) into given mutable byte array.</p>
* <p><em>Deprecated in favor of
* [NSPropertyListSerialization+dataFromPropertyList:format:errorDescription:].
* </em></p>
*/
+ (void) serializePropertyList: (id)propertyList
intoData: (NSMutableData*)d;
@ -124,8 +128,10 @@
/**
* Recover a property list (NSArray or NSDictionary plus limited
* contents) from a byte array. <em>Deprecated in favor of
* [NSPropertyListSerialization+propertyListFromData:mutabilityOption:format:errorDescription:].</em>
* contents) from a byte array.
* <em>Deprecated in favor of
* [NSPropertyListSerialization
* +propertyListFromData:mutabilityOption:format:errorDescription:].</em>
*/
+ (id) deserializePropertyListFromData: (NSData*)data
atCursor: (unsigned int*)cursor
@ -133,8 +139,10 @@
/**
* Recover a property list (NSArray or NSDictionary plus limited
* contents) from a byte array. <em>Deprecated in favor of
* [NSPropertyListSerialization+propertyListFromData:mutabilityOption:format:errorDescription:].</em>
* contents) from a byte array.
* <em>Deprecated in favor of
* [NSPropertyListSerialization
* +propertyListFromData:mutabilityOption:format:errorDescription:].</em>
*/
+ (id) deserializePropertyListFromData: (NSData*)data
mutableContainers: (BOOL)flag;
@ -145,7 +153,8 @@
* length, a proxy is substituted for the actual property list as long as the
* constituent objects of that property list are not accessed.
* <em>Deprecated in favor of
* [NSPropertyListSerialization+propertyListFromData:mutabilityOption:format:errorDescription:].</em>
* [NSPropertyListSerialization
* +propertyListFromData:mutabilityOption:format:errorDescription:].</em>
*/
+ (id) deserializePropertyListLazilyFromData: (NSData*)data
atCursor: (unsigned*)cursor

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSSet.m
AutogsdocSource: NSCountedSet.m

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSSortDescriptor_h_GNUSTEP_BASE_INCLUDE

View file

@ -0,0 +1,324 @@
/** Interface for NSStream for GNUStep
Copyright (C) 2006 Free Software Foundation, Inc.
Written by: Derek Zhou <derekzhou@gmail.com>
Date: 2006
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; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSStream_h_GNUSTEP_BASE_INCLUDE
#define __NSStream_h_GNUSTEP_BASE_INCLUDE
#include <Foundation/NSObject.h>
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
typedef enum {
NSStreamStatusNotOpen = 0,
NSStreamStatusOpening = 1,
NSStreamStatusOpen = 2,
NSStreamStatusReading = 3,
NSStreamStatusWriting = 4,
NSStreamStatusAtEnd = 5,
NSStreamStatusClosed = 6,
NSStreamStatusError = 7
} NSStreamStatus;
typedef enum {
NSStreamEventNone = 0,
NSStreamEventOpenCompleted = 1,
NSStreamEventHasBytesAvailable = 2,
NSStreamEventHasSpaceAvailable = 4,
NSStreamEventErrorOccurred = 8,
NSStreamEventEndEncountered = 16
} NSStreamEvent;
@class NSError;
@class NSHost;
@class NSInputStream;
@class NSOutputStream;
@class NSString;
@class NSRunLoop;
/**
* NSStream is an abstract class for objects representing streams.
*/
@interface NSStream : NSObject
/**
* Creates and returns by reference an NSInputStream object and NSOutputStream
* object for a socket connection with the specified port on host.
*/
+ (void) getStreamsToHost: (NSHost *)host
port: (int)port
inputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream;
/**
* Closes the receiver.
*/
- (void) close;
/**
* Returns the receiver's delegate.
*/
- (id) delegate;
/**
* Opens the receiving stream.
*/
- (void) open;
/**
* Returns the receiver's property for the specified key.
*/
- (id) propertyForKey: (NSString *)key;
/**
* Removes the receiver from the NSRunLoop specified by aRunLoop
* running in the mode.
*/
- (void) removeFromRunLoop: (NSRunLoop *)aRunLoop forMode: (NSString *)mode;
/**
* Schedules the receiver on aRunLoop using the specified mode.
*/
- (void) scheduleInRunLoop: (NSRunLoop *)aRunLoop forMode: (NSString *)mode;
/**
* Sets the receiver's delegate.
*/
- (void) setDelegate: (id)delegate;
/**
* Sets the value of the property specified by key to property, returns YES
* if the key-value pair are accepted by the receiver.
*/
- (BOOL) setProperty: (id)property forKey: (NSString *)key;
/**
* Returns an NSError object representing the stream error, or nil if no error
* has been encountered.
*/
- (NSError *) streamError;
/**
* Returns the receiver's status.
*/
- (NSStreamStatus) streamStatus;
@end
@class NSData;
/**
* NSInputStream is a subclass of NSStream that provides read-only
* stream functionality.
*/
@interface NSInputStream : NSStream
/**
* Creates and returns an initialized NSInputStream object
* for reading from data.
*/
+ (id) inputStreamWithData: (NSData *)data;
/**
* Creates and returns an initialized NSInputStream object that reads data from
* the file at the specified path.
*/
+ (id) inputStreamWithFileAtPath: (NSString *)path;
/**
* Returns a pointer to the read buffer in buffer and, by reference, the number
* of bytes available in len.
*/
- (BOOL) getBuffer: (uint8_t **)buffer length: (unsigned int *)len;
/**
* Returns YES if the receiver has bytes available to read.
* The receiver may also return YES if a read must be attempted
* in order to determine the availability of bytes.
*/
- (BOOL) hasBytesAvailable;
/**
* Returns an initialized NSInputStream object for reading from data.
*/
- (id) initWithData: (NSData *)data;
/**
* Returns an initialized NSInputStream object for reading from the file at the
* specified path.
*/
- (id) initWithFileAtPath: (NSString *)path;
/**
* Reads up to len bytes into buffer, returning the actual number of bytes read.
*/
- (int) read: (uint8_t *)buffer maxLength: (unsigned int)len;
@end
/**
* NSOutputStream is a subclass of NSStream that provides
* write-only stream functionality.
*/
@interface NSOutputStream : NSStream
/**
* Creates and returns an initialized NSOutputStream object
* that can write to buffer, up to a maximum of capacity bytes.
*/
+ (id) outputStreamToBuffer: (uint8_t *)buffer capacity: (unsigned int)capacity;
/**
* Creates and returns an initialized NSOutputStream object
* for writing to the file specified by path.
*/
+ (id) outputStreamToFileAtPath: (NSString *)path append: (BOOL)shouldAppend;
/**
* Creates and returns an initialized NSOutputStream object
* that will write stream data to memory.
*/
+ (id) outputStreamToMemory;
/**
* Returns YES if the receiver can be written to,
* or if a write must be attempted
* in order to determine if space is available.
*/
- (BOOL) hasSpaceAvailable;
/**
* Returns an initialized NSOutputStream object that can write to buffer,
* up to a maximum of capacity bytes.
*/
- (id) initToBuffer: (uint8_t *)buffer capacity: (unsigned int)capacity;
/**
* Returns an initialized NSOutputStream object for writing to the file
* specified by path.<br />
* If shouldAppend is YES, newly written data will be appended to any
* existing file contents.
*/
- (id) initToFileAtPath: (NSString *)path append: (BOOL)shouldAppend;
/**
* Returns an initialized NSOutputStream object that will write to memory.
*/
- (id) initToMemory;
/**
* Writes the contents of buffer, up to a maximum of len bytes,
* to the receiver.
*/
- (int) write: (const uint8_t *)buffer maxLength: (unsigned int)len;
@end
/**
* the additional interface defined for gnustep
*/
@interface NSStream (GNUstepExtensions)
/**
* Creates and returns by reference an NSInputStream object and
* NSOutputStream object for a local socket connection with the
* specified path. To use them you need to open them and wait
* on the NSStreamEventOpenCompleted event on one of them
*/
+ (void) getLocalStreamsToPath: (NSString *)path
inputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream;
/**
* Creates and returns by reference an NSInputStream object and NSOutputStream
* object for a anonymous local socket. Although you still need to open them,
* the open will be instantanious, and no NSStreamEventOpenCompleted event
* will be delivered.
*/
+ (void) pipeWithInputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream;
@end
/**
* GSServerStream is a subclass of NSStream that encapsulate a "server" stream;
* that is a stream that binds to a socket and accepts incoming connections
*/
@interface GSServerStream : NSStream
/**
* Createe a ip (ipv6) server stream
*/
+ (id) serverStreamToAddr: (NSString*)addr port: (int)port;
/**
* Create a local (unix domain) server stream
*/
+ (id) serverStreamToAddr: (NSString*)addr;
/**
* This is the method that accepts a connection and generates two streams
* as the server side inputStream and OutputStream.
* Although you still need to open them, the open will be
* instantanious, and no NSStreamEventOpenCompleted event will be delivered.
*/
- (void) acceptWithInputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream;
/**
* the designated initializer for a ip (ipv6) server stream
*/
- (id) initToAddr: (NSString*)addr port: (int)port;
/**
* the designated initializer for a local (unix domain) server stream
*/
- (id) initToAddr: (NSString*)addr;
@end
@protocol GSStreamListener
/**
* The delegate receives this message when streamEvent
* has occurred on theStream.
*/
- (void) stream: (NSStream *)theStream handleEvent: (NSStreamEvent)streamEvent;
@end
GS_EXPORT NSString * const NSStreamDataWrittenToMemoryStreamKey;
GS_EXPORT NSString * const NSStreamFileCurrentOffsetKey;
GS_EXPORT NSString * const NSStreamSocketSecurityLevelKey;
GS_EXPORT NSString * const NSStreamSocketSecurityLevelNone;
GS_EXPORT NSString * const NSStreamSocketSecurityLevelSSLv2;
GS_EXPORT NSString * const NSStreamSocketSecurityLevelSSLv3;
GS_EXPORT NSString * const NSStreamSocketSecurityLevelTLSv1;
GS_EXPORT NSString * const NSStreamSocketSecurityLevelNegotiatedSSL;
GS_EXPORT NSString * const NSStreamSocketSSLErrorDomain;
GS_EXPORT NSString * const NSStreamSOCKSErrorDomain;
GS_EXPORT NSString * const NSStreamSOCKSProxyConfigurationKey;
GS_EXPORT NSString * const NSStreamSOCKSProxyHostKey;
GS_EXPORT NSString * const NSStreamSOCKSProxyPasswordKey;
GS_EXPORT NSString * const NSStreamSOCKSProxyPortKey;
GS_EXPORT NSString * const NSStreamSOCKSProxyUserKey;
GS_EXPORT NSString * const NSStreamSOCKSProxyVersion4;
GS_EXPORT NSString * const NSStreamSOCKSProxyVersion5;
GS_EXPORT NSString * const NSStreamSOCKSProxyVersionKey;
#endif
#endif /* __NSStream_h_GNUSTEP_BASE_INCLUDE */

View file

@ -1,4 +1,4 @@
/* Interface for NSObject for GNUStep
/* Interface for NSString for GNUstep
Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSString_h_GNUSTEP_BASE_INCLUDE
@ -176,7 +177,7 @@ enum {
+ (id) string;
+ (id) stringWithCharacters: (const unichar*)chars
length: (unsigned int)length;
#ifndef STRICT_OPENSTEP
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
+ (id) stringWithCString: (const char*)byteString
encoding: (NSStringEncoding)encoding;
#endif
@ -188,7 +189,7 @@ enum {
// Initializing Newly Allocated Strings
- (id) init;
#ifndef STRICT_OPENSTEP
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
- (id) initWithBytes: (const void*)bytes
length: (unsigned int)length
encoding: (NSStringEncoding)encoding;
@ -285,7 +286,7 @@ enum {
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
- (const char*) cStringUsingEncoding: (NSStringEncoding)encoding;
- (void) getCString: (char*)buffer
- (BOOL) getCString: (char*)buffer
maxLength: (unsigned int)maxLength
encoding: (NSStringEncoding)encoding;
- (id) initWithCString: (const char*)byteString

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSTask_h_GNUSTEP_BASE_INCLUDE

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSThread_h_GNUSTEP_BASE_INCLUDE

View file

@ -15,7 +15,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSTimeZone_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSTimer_include__

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef _NSURL_h__

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef _NSURLHandle_h__

View file

@ -17,7 +17,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSUndoManager_h_OBJECTS_INCLUDE

View file

@ -19,7 +19,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSUserDefaults_h_OBJECTS_INCLUDE
@ -55,6 +56,13 @@ GS_EXPORT NSString* const NSGlobalDomain;
*/
GS_EXPORT NSString* const NSRegistrationDomain;
#ifndef NO_GNUSTEP
/**
* User defaults domain for GNUstep config file.
*/
GS_EXPORT NSString* const GSConfigDomain;
#endif
/* Public notification */

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSUtilties_h_GNUSTEP_BASE_INCLUDE

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __NSValue_h_GNUSTEP_BASE_INCLUDE
@ -344,18 +345,20 @@
/**
* Cache info for internal use by NSNumber concrete subclasses.
* DO NOT USE.
*/
typedef struct {
int typeLevel;
void (*getValue)(NSNumber*, SEL, void*);
} GSNumberInfo;
/** Internal method for caching. */
/** Internal method for caching. DO NOT USE. */
GSNumberInfo *GSNumberInfoFromObject(NSNumber *o);
#define GS_SMALL 16
/**
* Internal method: get cached values for integers in the range
* - GS_SMALL to + GS_SMALL
* <br />DO NOT USE
*/
unsigned GSSmallHash(int n);
#endif

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSXMLParser.m
*/

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
AutogsdocSource: NSZone.m
AutogsdocSource: NSPage.m
@ -64,7 +65,8 @@ typedef struct _NSZone NSZone;
* type <code>size_t</code>-
* <deflist>
* <term><code>bytes_total</code></term>
* <desc>This is the total size of memory managed by the zone, in bytes.</desc>
* <desc>
* This is the total size of memory managed by the zone, in bytes.</desc>
* <term><code>chunks_used</code></term>
* <desc>This is the number of memory chunks in use in the zone.</desc>
* <term><code>bytes_used</code></term>
@ -72,7 +74,9 @@ typedef struct _NSZone NSZone;
* <term><code>chunks_free</code></term>
* <desc>This is the number of memory chunks that are not in use.</desc>
* <term><code>bytes_free</code></term>
* <desc>This is the number of bytes managed by the zone that are not in use.</desc>
* <desc>
* This is the number of bytes managed by the zone that are not in use.
* </desc>
* </deflist>
*/
struct NSZoneStats

18
NEWS
View file

@ -1,10 +1,26 @@
News
****
The currently released version of the library is `1.11.2'.
The currently released version of the library is `1.12.0'.
See the <ReleaseNotes.html> document for more information.
Noteworthy changes in version `1.12.0'
======================================
There have been a number of API changes and several methods have been
depreciated in this release. Although current GNUstep programs that use
these methods will still work in this version, there are enough changes
that a new library version was considered useful. See the release notes
for more details
New NSStream classes where added to the library.
User defaults were restructured to create the defaults lazily and
can be set to not write to an external file at all, for developers who
wish to use the library as a stand-alone library or in other situations
where using external resources is not desired.
Noteworthy changes in version `1.11.2'
======================================

View file

@ -1,8 +1,8 @@
#############################################################################
THIS DIRECTORY IS OBSOLETE AND IS NO LONGER USED
The NSCharacterSetData.h file (in CVS in core/base/Source) is generated
using the tools in dev-apps/charsets and the library in dev-libs/ucsdata
The NSCharacterSetData.h file (in SVN in libs/base/Source) is generated
using the tools in tools/charsets and the library in libs/ucsdata
#############################################################################

Binary file not shown.

View file

@ -18,7 +18,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#include "config.h"
@ -30,6 +31,137 @@
/* Test for ASCII whitespace which is safe for unicode characters */
#define space(C) ((C) > 127 ? NO : isspace(C))
@implementation NSArray (GSCategories)
- (unsigned) insertionPosition: (id)item
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
context: (void *)context
{
unsigned count = [self count];
unsigned upper = count;
unsigned lower = 0;
unsigned index;
SEL oaiSel;
IMP oai;
if (item == nil)
{
[NSException raise: NSGenericException
format: @"Attempt to find position for nil object in array"];
}
if (sorter == 0)
{
[NSException raise: NSGenericException
format: @"Attempt to find position with null comparator"];
}
oaiSel = @selector(objectAtIndex:);
oai = [self methodForSelector: oaiSel];
/*
* Binary search for an item equal to the one to be inserted.
*/
for (index = upper/2; upper != lower; index = lower+(upper-lower)/2)
{
NSComparisonResult comparison;
comparison = (*sorter)(item, (*oai)(self, oaiSel, index), context);
if (comparison == NSOrderedAscending)
{
upper = index;
}
else if (comparison == NSOrderedDescending)
{
lower = index + 1;
}
else
{
break;
}
}
/*
* Now skip past any equal items so the insertion point is AFTER any
* items that are equal to the new one.
*/
while (index < count && (*sorter)(item, (*oai)(self, oaiSel, index), context)
!= NSOrderedAscending)
{
index++;
}
return index;
}
- (unsigned) insertionPosition: (id)item
usingSelector: (SEL)comp
{
unsigned count = [self count];
unsigned upper = count;
unsigned lower = 0;
unsigned index;
NSComparisonResult (*imp)(id, SEL, id);
SEL oaiSel;
IMP oai;
if (item == nil)
{
[NSException raise: NSGenericException
format: @"Attempt to find position for nil object in array"];
}
if (comp == 0)
{
[NSException raise: NSGenericException
format: @"Attempt to find position with null comparator"];
}
imp = (NSComparisonResult (*)(id, SEL, id))[item methodForSelector: comp];
if (imp == 0)
{
[NSException raise: NSGenericException
format: @"Attempt to find position with unknown method"];
}
oaiSel = @selector(objectAtIndex:);
oai = [self methodForSelector: oaiSel];
/*
* Binary search for an item equal to the one to be inserted.
*/
for (index = upper/2; upper != lower; index = lower+(upper-lower)/2)
{
NSComparisonResult comparison;
comparison = (*imp)(item, comp, (*oai)(self, oaiSel, index));
if (comparison == NSOrderedAscending)
{
upper = index;
}
else if (comparison == NSOrderedDescending)
{
lower = index + 1;
}
else
{
break;
}
}
/*
* Now skip past any equal items so the insertion point is AFTER any
* items that are equal to the new one.
*/
while (index < count
&& (*imp)(item, comp, (*oai)(self, oaiSel, index)) != NSOrderedAscending)
{
index++;
}
return index;
}
@end
@implementation NSAttributedString (GSCategories)
- (NSAttributedString*) attributedSubstringWithRange: (NSRange)aRange
{
GSOnceMLog(@"This method is deprecated, use -attributedSubstringFromRange:");
return [self attributedSubstringFromRange: aRange];
}
@end
/**
* Extension methods for the NSCalendarDate class
*/
@ -227,15 +359,15 @@
struct MD5Context
{
unsigned long buf[4];
unsigned long bits[2];
unsigned char in[64];
uint32_t buf[4];
uint32_t bits[2];
uint8_t in[64];
};
static void MD5Init (struct MD5Context *context);
static void MD5Update (struct MD5Context *context, unsigned char const *buf,
unsigned len);
static void MD5Final (unsigned char digest[16], struct MD5Context *context);
static void MD5Transform (unsigned long buf[4], unsigned long const in[16]);
static void MD5Transform (uint32_t buf[4], uint32_t const in[16]);
/*
* This code implements the MD5 message-digest algorithm.
@ -257,15 +389,25 @@ static void MD5Transform (unsigned long buf[4], unsigned long const in[16]);
/*
* Ensure data is little-endian
*/
static void littleEndian (void *buf, unsigned longs)
static void littleEndian (void *buf, unsigned words)
{
unsigned long *ptr = (unsigned long*)buf;
uint32_t *ptr = (uint32_t*)buf;
#if (INT_MAX == 2147483647)
do
{
*ptr = NSSwapHostIntToLittle(*ptr);
ptr++;
}
while (--words);
#else
do
{
*ptr = NSSwapHostLongToLittle(*ptr);
ptr++;
}
while (--longs);
while (--words);
#endif
}
/*
@ -290,12 +432,12 @@ static void MD5Init (struct MD5Context *ctx)
static void MD5Update (struct MD5Context *ctx, unsigned char const *buf,
unsigned len)
{
unsigned long t;
uint32_t t;
/* Update bitcount */
t = ctx->bits[0];
if ((ctx->bits[0] = t + ((unsigned long) len << 3)) < t)
if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t)
ctx->bits[1]++; /* Carry from low to high */
ctx->bits[1] += len >> 29;
@ -315,7 +457,7 @@ static void MD5Update (struct MD5Context *ctx, unsigned char const *buf,
}
memcpy (p, buf, t);
littleEndian (ctx->in, 16);
MD5Transform (ctx->buf, (unsigned long *) ctx->in);
MD5Transform (ctx->buf, (uint32_t *) ctx->in);
buf += t;
len -= t;
}
@ -325,7 +467,7 @@ static void MD5Update (struct MD5Context *ctx, unsigned char const *buf,
{
memcpy (ctx->in, buf, 64);
littleEndian (ctx->in, 16);
MD5Transform (ctx->buf, (unsigned long *) ctx->in);
MD5Transform (ctx->buf, (uint32_t *) ctx->in);
buf += 64;
len -= 64;
}
@ -361,7 +503,7 @@ static void MD5Final (unsigned char digest[16], struct MD5Context *ctx)
/* Two lots of padding: Pad the first block to 64 bytes */
memset (p, 0, count);
littleEndian (ctx->in, 16);
MD5Transform (ctx->buf, (unsigned long *) ctx->in);
MD5Transform (ctx->buf, (uint32_t *) ctx->in);
/* Now fill the next block with 56 bytes */
memset (ctx->in, 0, 56);
@ -374,10 +516,10 @@ static void MD5Final (unsigned char digest[16], struct MD5Context *ctx)
littleEndian (ctx->in, 14);
/* Append length in bits and transform */
((unsigned long *) ctx->in)[14] = ctx->bits[0];
((unsigned long *) ctx->in)[15] = ctx->bits[1];
((uint32_t *) ctx->in)[14] = ctx->bits[0];
((uint32_t *) ctx->in)[15] = ctx->bits[1];
MD5Transform (ctx->buf, (unsigned long *) ctx->in);
MD5Transform (ctx->buf, (uint32_t *) ctx->in);
littleEndian ((unsigned char *) ctx->buf, 4);
memcpy (digest, ctx->buf, 16);
memset (ctx, 0, sizeof (ctx)); /* In case it's sensitive */
@ -397,12 +539,12 @@ static void MD5Final (unsigned char digest[16], struct MD5Context *ctx)
/*
* The core of the MD5 algorithm, this alters an existing MD5 hash to
* reflect the addition of 16 longwords of new data. MD5Update blocks
* the data and converts bytes into longwords for this routine.
* reflect the addition of 16 43bit words of new data. MD5Update blocks
* the data and converts bytes into 43bit words for this routine.
*/
static void MD5Transform (unsigned long buf[4], unsigned long const in[16])
static void MD5Transform (uint32_t buf[4], uint32_t const in[16])
{
register unsigned long a, b, c, d;
register uint32_t a, b, c, d;
a = buf[0];
b = buf[1];

View file

@ -1476,12 +1476,12 @@ GSObjCAddClassBehavior(Class receiver, Class behavior)
#endif
/** Deprecated ... use GSObjCGetValue() */
/** Deprecated ... use GSObjCGetVal() */
id
GSGetValue(NSObject *self, NSString *key, SEL sel,
const char *type, unsigned size, int offset)
{
return GSObjCGetValue(self, key, sel, type, size, offset);
return GSObjCGetVal(self, [key UTF8String], sel, type, size, offset);
}
/**
* This is used internally by the key-value coding methods, to get a
@ -1494,7 +1494,7 @@ GSGetValue(NSObject *self, NSString *key, SEL sel,
* to get a value.
*/
id
GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
GSObjCGetVal(NSObject *self, const char *key, SEL sel,
const char *type, unsigned size, int offset)
{
if (sel != 0)
@ -1510,7 +1510,7 @@ GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
}
if (type == NULL)
{
return [self valueForUndefinedKey: key];
return [self valueForUndefinedKey: [NSString stringWithUTF8String: key]];
}
else
{
@ -1792,13 +1792,22 @@ GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
return val;
}
}
/**
* Calls GSObjCGetVal()
*/
id
GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
const char *type, unsigned size, int offset)
{
return GSObjCGetVal(self, [key UTF8String], sel, type, size, offset);
}
/** Deprecated ... use GSObjCSetValue() */
/** Deprecated ... use GSObjCSetVal() */
void
GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
const char *type, unsigned size, int offset)
{
GSObjCSetValue(self, key, val, sel, type, size, offset);
GSObjCSetVal(self, [key UTF8String], val, sel, type, size, offset);
}
/**
* This is used internally by the key-value coding methods, to set a
@ -1811,8 +1820,8 @@ GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
* to set a value.
*/
void
GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
const char *type, unsigned size, int offset)
GSObjCSetVal(NSObject *self, const char *key, id val, SEL sel,
const char *type, unsigned size, int offset)
{
static NSNull *null = nil;
@ -1833,11 +1842,12 @@ GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
}
if (type == NULL)
{
[self setValue: val forUndefinedKey: key];
[self setValue: val
forUndefinedKey: [NSString stringWithUTF8String: key]];
}
else if ((val == nil || val == null) && *type != _C_ID && *type != _C_CLASS)
{
[self setNilValueForKey: key];
[self setNilValueForKey: [NSString stringWithUTF8String: key]];
}
else
{
@ -2121,6 +2131,15 @@ GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
}
}
}
/**
* Calls GSObjCSetVal()
*/
void
GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
const char *type, unsigned size, int offset)
{
GSObjCSetVal(self, [key UTF8String], val, sel, type, size, offset);
}
/** Returns an autoreleased array of subclasses of Class cls, including
@ -2178,6 +2197,11 @@ NSArray *GSObjCDirectSubclassesOfClass(Class cls)
}
}
@interface GSAutoreleasedMemory : NSObject
@end
@implementation GSAutoreleasedMemory
@end
void *
GSAutoreleasedBuffer(unsigned size)
{
@ -2189,22 +2213,22 @@ GSAutoreleasedBuffer(unsigned size)
#endif
#define ALIGN __alignof__(double)
static Class nsobject_class = 0;
static Class buffer_class = 0;
static Class autorelease_class;
static SEL autorelease_sel;
static IMP autorelease_imp;
static int offset;
NSObject *o;
if (nsobject_class == 0)
if (buffer_class == 0)
{
nsobject_class = [NSObject class];
offset = nsobject_class->instance_size % ALIGN;
buffer_class = [GSAutoreleasedMemory class];
offset = buffer_class->instance_size % ALIGN;
autorelease_class = [NSAutoreleasePool class];
autorelease_sel = @selector(addObject:);
autorelease_imp = [autorelease_class methodForSelector: autorelease_sel];
}
o = (NSObject*)NSAllocateObject(nsobject_class,
o = (NSObject*)NSAllocateObject(buffer_class,
size + offset, NSDefaultMallocZone());
(*autorelease_imp)(autorelease_class, autorelease_sel, o);
return ((void*)&o[1]) + offset;

View file

@ -166,8 +166,8 @@ setupCache()
}
static xmlParserInputPtr
loadEntityFunction(const unsigned char *url, const unsigned char *eid,
xmlParserCtxtPtr ctxt);
loadEntityFunction(void *ctx,
const unsigned char *eid, const unsigned char *url);
@interface GSXPathObject(Private)
+ (id) _newWithNativePointer: (xmlXPathObject *)lib
@ -987,7 +987,7 @@ static NSMapTable *nodeNames = 0;
/**
* This performs the same function as the -content method, but retains
* escaped character information (like the standard five entities &amp;lt;,
* escaped character information (the standard five entities &amp;lt;,
* &amp;gt;, &amp;apos;, &amp;quot;, and &amp;amp;) which are normally
* replaced with their standard equivalents
* (&lt;, &gt;, &apos;, &quot;, and &amp;).
@ -1609,8 +1609,6 @@ static NSMapTable *nodeNames = 0;
*/
@implementation GSXMLParser
static NSHashTable *warnings = 0;
static NSString *endMarker = @"At end of incremental parse";
+ (void) initialize
@ -1622,7 +1620,6 @@ static NSString *endMarker = @"At end of incremental parse";
beenHere = YES;
if (cacheDone == NO)
setupCache();
warnings = NSCreateHashTable(NSNonRetainedObjectHashCallBacks, 0);
}
}
@ -1864,7 +1861,6 @@ static NSString *endMarker = @"At end of incremental parse";
- (void) dealloc
{
NSHashRemove(warnings, self);
RELEASE(messages);
RELEASE(src);
RELEASE(saxHandler);
@ -1912,20 +1908,17 @@ static NSString *endMarker = @"At end of incremental parse";
*/
- (BOOL) getWarnings: (BOOL)yesno
{
BOOL old = YES;
BOOL old = (((xmlParserCtxtPtr)lib)->vctxt.warning) ? YES : NO;
if (NSHashGet(warnings, self) == nil)
if (yesno == YES)
{
old = NO;
((xmlParserCtxtPtr)lib)->vctxt.warning = xmlParserValidityWarning;
}
if (yesno == YES && old == NO)
else
{
NSHashInsert(warnings, self);
}
else if (yesno == NO && old == YES)
{
NSHashRemove(warnings, self);
((xmlParserCtxtPtr)lib)->vctxt.warning = 0;
}
return old;
}
@ -2305,6 +2298,11 @@ static NSString *endMarker = @"At end of incremental parse";
* the GSSAXHandler to use in our SAX C Functions.
*/
((xmlParserCtxtPtr)lib)->_private = saxHandler;
/*
* Set the entity loading function for this parser to be our one.
*/
((xmlParserCtxtPtr)lib)->sax->resolveEntity = loadEntityFunction;
}
return YES;
}
@ -2317,38 +2315,11 @@ static NSString *endMarker = @"At end of incremental parse";
// nil data allowed
- (void) _parseChunk: (NSData*)data
{
xmlExternalEntityLoader oldLoader;
int oldWarnings;
if (lib == NULL || ((xmlParserCtxtPtr)lib)->disableSAX != 0)
{
return; // Parsing impossible or disabled.
}
oldLoader = xmlGetExternalEntityLoader();
oldWarnings = xmlGetWarningsDefaultValue;
NS_DURING
{
if (NSHashGet(warnings, self) == nil)
{
xmlGetWarningsDefaultValue = 0;
}
else
{
xmlGetWarningsDefaultValue = 1;
}
xmlSetExternalEntityLoader((xmlExternalEntityLoader)loadEntityFunction);
xmlParseChunk(lib, [data bytes], [data length], data == nil);
xmlSetExternalEntityLoader(oldLoader);
xmlGetWarningsDefaultValue = oldWarnings;
}
NS_HANDLER
{
xmlSetExternalEntityLoader(oldLoader);
xmlGetWarningsDefaultValue = oldWarnings;
[localException raise];
}
NS_ENDHANDLER
xmlParseChunk(lib, [data bytes], [data length], data == nil);
}
@end
@ -2436,8 +2407,8 @@ static NSString *endMarker = @"At end of incremental parse";
#define HANDLER ((GSSAXHandler*)(((xmlParserCtxtPtr)ctx)->_private))
static xmlParserInputPtr
loadEntityFunction(const unsigned char *url, const unsigned char *eid,
xmlParserCtxtPtr ctx)
loadEntityFunction(void *ctx,
const unsigned char *eid, const unsigned char *url)
{
extern xmlParserInputPtr xmlNewInputFromFile();
NSString *file;
@ -2473,6 +2444,10 @@ loadEntityFunction(const unsigned char *url, const unsigned char *eid,
}
[local appendString: [components objectAtIndex: index]];
}
/* Also replace ':' which isn't legal on some file systems */
[local replaceOccurrencesOfString: @":" withString: @"+"
options: NSLiteralSearch
range: NSMakeRange(0, [local length])];
/*
* Now ask the SAXHandler callback for the name of a local file
@ -2592,7 +2567,7 @@ loadEntityFunction(const unsigned char *url, const unsigned char *eid,
#else
path = [file fileSystemRepresentation];
#endif
ret = xmlNewInputFromFile(ctx, path);
ret = xmlNewInputFromFile((xmlParserCtxtPtr)ctx, path);
}
else
{
@ -2601,6 +2576,7 @@ loadEntityFunction(const unsigned char *url, const unsigned char *eid,
return ret;
}
#define TREEFUN(NAME,ARGS) ((HANDLER->isHtmlHandler == YES) ? (*(htmlDefaultSAXHandler.NAME))ARGS : (*(xmlDefaultSAXHandler.NAME))ARGS)
#define START(SELNAME, RET, ARGS) \
static SEL sel; \
@ -2978,7 +2954,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
- (void) dealloc
{
if (parser == nil && lib != NULL)
if (lib != NULL)
{
free(lib);
}
@ -4283,7 +4259,15 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
{
unichar u;
if ([s hasPrefix: @"&#0x"] || [s hasPrefix: @"&#0X"])
if ([s hasPrefix: @"&#x"] || [s hasPrefix: @"&#X"])
{
unsigned val = 0;
s = [s substringFromIndex: 3];
sscanf([s UTF8String], "%x", &val);
u = val;
}
else if ([s hasPrefix: @"&#0x"] || [s hasPrefix: @"&#0X"])
{
unsigned val = 0;
@ -4658,7 +4642,7 @@ static void indentation(unsigned level, NSMutableString *str)
return [NSNumber numberWithDouble: [str doubleValue]];
}
if ([name isEqualToString: @"data"])
if ([name isEqualToString: @"base64"])
{
NSData *d;

View file

@ -1090,6 +1090,67 @@ int encode_cstrtoustr(unichar *dst, int dl, const char *src, int sl,
}
/**
* Function to check a block of data for validity as a unicode string and
* say whether it contains solely ASCII or solely Latin1 data.<br />
* Any leading BOM must already have been removed and the data must already
* be in native byte order.<br />
* Returns the number of characters which were found valid.
*/
unsigned
GSUnicode(const unichar *chars, unsigned length,
BOOL *isASCII, BOOL *isLatin1)
{
unsigned i = 0;
unichar c;
if (isASCII) *isASCII = YES;
if (isLatin1) *isLatin1 = YES;
while (i < length)
{
if ((c = chars[i++]) > 127)
{
if (isASCII) *isASCII = NO;
i--;
while (i < length)
{
if ((c = chars[i++]) > 255)
{
if (isLatin1) *isLatin1 = NO;
i--;
while (i < length)
{
c = chars[i++];
if (c == 0xfffe || c == 0xffff
|| (c >= 0xfdd0 && c <= 0xfdef))
{
return i - 1; // Non-characters.
}
if (c >= 0xdc00 && c <= 0xdfff)
{
return i - 1; // Second half of a surrogate pair.
}
if (c >= 0xd800 && c <= 0xdbff)
{
// First half of a surrogate pair.
if (i >= length)
{
return i - 1; // Second half missing
}
c = chars[i];
if (c < 0xdc00 || c > 0xdfff)
{
return i - 1; // Second half missing
}
i++; // Step past second half
}
}
}
}
}
}
return i;
}
#define GROW() \
if (dst == 0) \
@ -1288,6 +1349,22 @@ GSToUnicode(unichar **dst, unsigned int *size, const unsigned char *src,
}
u = u & ~(0xffffffff << ((5 * sle) + 1));
spos += sle;
/*
* We discard invalid codepoints here.
*/
if (u > 0x10ffff || u == 0xfffe || u == 0xffff
|| (u >= 0xfdd0 && u <= 0xfdef))
{
result = NO; // Invalid character.
break;
}
if ((u >= 0xd800) && (u <= 0xdfff))
{
result = NO; // Unmatched half of surrogate pair.
break;
}
}
else
{
@ -1297,26 +1374,12 @@ GSToUnicode(unichar **dst, unsigned int *size, const unsigned char *src,
/*
* Add codepoint as either a single unichar for BMP
* or as a pair of surrogates for codepoints over 16 bits.
* We also discard invalid codepoints here.
*/
if ((u >= 0xd800) && (u <= 0xdfff))
{
result = NO;
break;
}
if (u > 0x10ffff)
{
result = NO;
break;
}
if (dpos >= bsize)
{
GROW();
}
if (u < 0x10000)
{
ptr[dpos++] = u;
@ -1840,14 +1903,29 @@ GSFromUnicode(unsigned char **dst, unsigned int *size, const unichar *src,
{
u1 = ((u1 & 0xff00 >> 8) + ((u1 & 0x00ff) << 8));
}
if (u1 == 0xfffe || u1 == 0xffff // unexpcted BOM
|| (u1 >= 0xfdd0 && u1 <= 0xfdef) // invalid character
|| (u1 >= 0xdc00 && u1 <= 0xdfff)) // bad pairing
{
if (strict)
{
result = NO;
break;
}
continue; // Skip invalid character.
}
/* possibly get second character and calculate 'u' */
if ((u1 >= 0xd800) && (u1 < 0xdc00))
{
if (spos >= slen)
{
result = NO;
break;
if (strict)
{
result = NO;
break;
}
continue; // At end.
}
/* get second unichar */
@ -1860,8 +1938,12 @@ GSFromUnicode(unsigned char **dst, unsigned int *size, const unichar *src,
if ((u2 < 0xdc00) && (u2 > 0xdfff))
{
spos--;
result = NO;
break;
if (strict)
{
result = NO;
break;
}
continue; // Skip bad half of surrogate pair.
}
/* make the full value */

View file

@ -92,6 +92,7 @@ NSRunLoop.h \
NSScanner.h \
NSSerialization.h \
NSSet.h \
NSStream.h \
NSString.h \
NSTask.h \
NSThread.h \

View file

@ -19,7 +19,8 @@
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02111 USA.
#
# Install into the system root by default
@ -83,6 +84,11 @@ GSLocale.m \
preface.m \
mframe.m
ifeq ($(findstring openbsd, $(GNUSTEP_TARGET_OS)), openbsd)
GNU_MFILES += thr-pthread.m
OBJC_LIBS += -lpthread
endif
ifneq ($(OBJC_RUNTIME_LIB), gnu)
GNU_MFILES += objc-gnu2next.m
ifeq ($(HAVE_PTHREAD_H), yes)
@ -132,7 +138,9 @@ GSDictionary.m \
GSFormat.m \
GSFTPURLHandle.m \
GSHTTPURLHandle.m \
GSRunLoopWatcher.m \
GSSet.m \
GSStream.m \
GSString.m \
GSValue.m \
NSAttributedString.m \
@ -321,6 +329,7 @@ NSScanner.h \
NSSerialization.h \
NSSet.h \
NSSortDescriptor.h \
NSStream.h \
NSString.h \
NSTask.h \
NSThread.h \
@ -354,9 +363,14 @@ $(GNUSTEP_TARGET_DIR)/mframe.h \
$(GNUSTEP_TARGET_DIR)/config.h \
$(GNUSTEP_TARGET_DIR)/GSConfig.h
ifeq ($(HAVE_INET_PTON), no)
GNU_CFILES += inet_pton.c
endif
# The Objective-C source files to be compiled
libgnustep-base_OBJC_FILES = $(GNU_MFILES) \
$(BASE_MFILES) $(NSVALUE_MFILES) $(NSNUMBER_MFILES)
libgnustep-base_C_FILES = $(GNU_CFILES)
# Extra DLL exports file
libgnustep-base_DLL_DEF = libgnustep-base.def

View file

@ -235,7 +235,6 @@ static IMP gs_objc_msg_forward (SEL sel)
frame: (cifframe_t *)frame
signature: (NSMethodSignature*)aSignature
{
int i;
_sig = RETAIN(aSignature);
_numArgs = [aSignature numberOfArguments];
_info = [aSignature methodInfo];
@ -243,6 +242,8 @@ static IMP gs_objc_msg_forward (SEL sel)
((cifframe_t *)_cframe)->cif = *cif;
#if MFRAME_STRUCT_BYREF
{
int i;
/* Fix up some of the values. Do this on all processors that pass
structs by reference. Is there an automatic way to determine this? */
for (i = 0; i < ((cifframe_t *)_cframe)->nargs; i++)
@ -260,6 +261,7 @@ static IMP gs_objc_msg_forward (SEL sel)
((cifframe_t *)_cframe)->arg_types[i]->size);
}
}
}
#else
((cifframe_t *)_cframe)->values = vals;
#endif

View file

@ -1260,13 +1260,13 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
int len;
[self checkRead];
if (isNonBlocking == NO)
{
[self setNonBlocking: YES];
}
d = [NSMutableData dataWithCapacity: 0];
if (isStandardFile)
{
if (isNonBlocking == YES)
{
[self setNonBlocking: NO];
}
while ((len = [self read: buf length: sizeof(buf)]) > 0)
{
[d appendBytes: buf length: len];
@ -1274,7 +1274,40 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
}
else
{
if (isNonBlocking == NO)
{
[self setNonBlocking: YES];
}
len = [self read: buf length: sizeof(buf)];
if (len <= 0)
{
if (errno == EAGAIN || errno == EINTR)
{
/*
* Read would have blocked ... so try to get a single character
* in non-blocking mode (to ensure we wait until data arrives)
* and then try again.
* This ensures that we block for *some* data as we should.
*/
[self setNonBlocking: NO];
len = [self read: buf length: 1];
[self setNonBlocking: YES];
if (len == 1)
{
len = [self read: &buf[1] length: sizeof(buf) - 1];
if (len <= 0)
{
len = 1;
}
else
{
len = len + 1;
}
}
}
}
if (len > 0)
{
[d appendBytes: buf length: len];
@ -2069,13 +2102,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
}
}
- (NSDate*) timedOutEvent: (void*)data
type: (RunLoopEventType)type
forMode: (NSString*)mode
{
return nil; /* Don't restart timed out events */
}
- (void) setAddr: (struct sockaddr_in *)sin
{
address = [[NSString alloc] initWithCString: (char*)inet_ntoa(sin->sin_addr)];

View file

@ -17,12 +17,22 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __GSPortPrivate_h_
#define __GSPortPrivate_h_
/*
* Nameserver deregistration methods
*/
@interface NSPortNameServer (GNUstep)
- (NSArray*) namesForPort: (NSPort*)port; /* return all names for port */
- (BOOL) removePort: (NSPort*)port; /* remove all names for port */
- (BOOL) removePort: (NSPort*)port forName: (NSString*)name;
@end
#if defined(__MINGW32__)
@interface NSMessagePort(Private)
+ (id) newWithName: (NSString*)name;

View file

@ -17,12 +17,26 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02111 USA.
*/
#ifndef __GSPrivate_h_
#define __GSPrivate_h_
/* Absolute Gregorian date for NSDate reference date Jan 01 2001
*
* N = 1; // day of month
* N = N + 0; // days in prior months for year
* N = N + // days this year
* + 365 * (year - 1) // days in previous years ignoring leap days
* + (year - 1)/4 // Julian leap days before this year...
* - (year - 1)/100 // ...minus prior century years...
* + (year - 1)/400 // ...plus prior years divisible by 400
*/
#define GREGORIAN_REFERENCE 730486
#include "GNUstepBase/GSObjCRuntime.h"
/**
@ -210,5 +224,13 @@ BOOL GSEnvironmentFlag(const char *name, BOOL def);
- (const char*) type;
@end
/*
* Functions used by the NSRunLoop and friends for processing
* queued notifications.
*/
extern void GSNotifyASAP(void);
extern void GSNotifyIdle(void);
extern BOOL GSNotifyMore(void);
#endif /* __GSPrivate_h_ */

View file

@ -30,6 +30,7 @@ typedef struct{
#endif
@class NSString;
@class GSRunLoopWatcher;
@interface GSRunLoopCtxt : NSObject
{
@ -39,10 +40,7 @@ typedef struct{
GSIArray performers; /** The actions to perform regularly. */
GSIArray timers; /** The timers set for the runloop mode */
GSIArray watchers; /** The inputs set for the runloop mode */
#if defined(__MINGW32__)
id msgTarget; /** Target to raise a win32 message */
SEL msgSelector; /** method of target */
#endif
NSTimer *housekeeper; /** Housekeeping timer for loop. */
@private
#if defined(__MINGW32__)
NSMapTable *handleMap;
@ -51,8 +49,9 @@ typedef struct{
NSMapTable *_efdMap;
NSMapTable *_rfdMap;
NSMapTable *_wfdMap;
int fairStart; // For trying to ensure fair handling.
#endif
GSIArray _trigger; // Watchers to trigger unconditionally.
int fairStart; // For trying to ensure fair handling.
BOOL completed; // To mark operation as completed.
#ifdef HAVE_POLL
unsigned int pollfds_capacity;
@ -61,10 +60,14 @@ typedef struct{
#endif
}
- (void) endEvent: (void*)data
type: (RunLoopEventType)type;
for: (GSRunLoopWatcher*)watcher;
- (void) endPoll;
- (id) initWithMode: (NSString*)theMode extra: (void*)e;
- (BOOL) pollUntil: (int)milliseconds within: (NSArray*)contexts;
@end
@interface NSRunLoop (Housekeeper)
- (void) _setHousekeeper: (NSTimer*)timer;
@end
#endif /* __GSRunLoopCtxt_h_GNUSTEP_BASE_INCLUDE */

View file

@ -10,14 +10,14 @@
*
* The internal variables if the GSRunLoopWatcher are used as follows -
*
* The '_date' variable contains a date after which the event is useless
* and the watcher can be removed from the runloop.
*
* If '_invalidated' is set, the watcher should be disabled and should
* be removed from the runloop when next encountered.
*
* If 'checkBlocking' is set, the run loop should ask the watcher
* whether it should block and/or trigger each loop iteration.
*
* The 'data' variable is used to identify the resource/event that the
* watcher is interested in.
* watcher is interested in. Its meaning is system dependent.
*
* The 'receiver' is the object which should be told when the event
* occurs. This object is retained so that we know it will continue
@ -27,10 +27,6 @@
* NSRunLoops [-acceptInputForMode: beforeDate: ] method MUST contain
* code to watch for events of each type.
*
* To set this variable, the method adding the GSRunLoopWatcher to the
* runloop must ask the 'receiver' (or its delegate) to supply a date
* using the '[-limitDateForMode: ]' message.
*
* NB. This class is private to NSRunLoop and must not be subclassed.
*/
@ -40,14 +36,11 @@
@class NSDate;
extern SEL eventSel; /* Initialized in [NSRunLoop +initialize] */
@interface GSRunLoopWatcher: NSObject
{
@public
NSDate *_date; /* First to match layout of NSTimer */
BOOL _invalidated; /* 2nd to match layout of NSTimer */
IMP handleEvent; /* New-style event handling */
BOOL _invalidated;
BOOL checkBlocking;
void *data;
id receiver;
RunLoopEventType type;
@ -56,21 +49,13 @@ extern SEL eventSel; /* Initialized in [NSRunLoop +initialize] */
- (id) initWithType: (RunLoopEventType)type
receiver: (id)anObj
data: (void*)data;
/**
* Returns a boolean indicating whether the receiver needs the loop to
* block to wait for input, or whether the loop can run through at once.
* It also sets *trigger to say whether the receiver should be triggered
* once the input test has been done or not.
*/
- (BOOL) runLoopShouldBlock: (BOOL*)trigger;
@end
/*
* Two optimisation functions that depend on a hack that the layout of
* the NSTimer class is known to be the same as GSRunLoopWatcher for the
* first two elements.
*/
static inline NSDate* timerDate(NSTimer* timer)
{
return ((GSRunLoopWatcher*)timer)->_date;
}
static inline BOOL timerInvalidated(NSTimer* timer)
{
return ((GSRunLoopWatcher*)timer)->_invalidated;
}
#endif /* __GSRunLoopWatcher_h_GNUSTEP_BASE_INCLUDE */

Some files were not shown because too many files have changed in this diff Show more