mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-24 09:19:15 +00:00
Changes from home. See ChangeLog Aug 5 through Aug 25
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1662 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f51cb41150
commit
960c6fa4c6
16 changed files with 125 additions and 96 deletions
60
ChangeLog
60
ChangeLog
|
@ -1,3 +1,63 @@
|
|||
Sun Aug 25 16:12:49 1996 Andrew McCallum <mccallum@cs.cmu.edu>
|
||||
|
||||
* checks/Makefile.in (SRCS): Added nsscanner.m from Eric Norum.
|
||||
|
||||
* src/NSScanner.m: Fix indentation.
|
||||
([NSScanner +scannerWithString:]): Rewrite to avoid unnecessary
|
||||
local variable.
|
||||
([NSScanner -initWithString:]): Call [super init].
|
||||
([NSScanner -_scanCharactersFromSet:intoString:]): Method renamed to
|
||||
put underscore at the beginning, not in the middle of the method
|
||||
name. All callers changed.
|
||||
([NSScanner -_skipToNextField]): Likewise.
|
||||
([NSScanner +localizedScannerWithString:]): New method, unimplemented.
|
||||
([NSScanner -scanDouble:]): Initialize `unichar c' to avoid warning.
|
||||
([NSScanner -scanLongLong:]): Don't compare with -(LONG_LONG_MIN),
|
||||
this number is out of range since, in two-complement arithmetic,
|
||||
we have one more negative number than positive numbers.
|
||||
* src/include/NSScanner.h: Include <gnustep/base/preface.h>. Fix
|
||||
indentation. Standarize #define wrapper symbol.
|
||||
|
||||
* src/NSScanner.m, src/include/NSScanner.h: New files from Eric
|
||||
Norum.
|
||||
|
||||
Sun Aug 11 10:54:49 1996 Andrew McCallum <mccallum@cs.cmu.edu>
|
||||
|
||||
* src/NSUser.m (NSHomeDirectory): Use NSHomeDirectoryForUser
|
||||
instead of the HOME environment variable.
|
||||
|
||||
* src/NSUserDefaults.m: #include <Foundation/NSPathUtilities.h> to
|
||||
get declarations for NSUser* functions.
|
||||
(NSUserName): Function removed; it can already be found in
|
||||
NSUser.m.
|
||||
(NSHomeDirectory): Likewise.
|
||||
(NSHomeDirectoryForUser): Likewise.
|
||||
|
||||
* doc/Makefile.in: Fix typo: properly comment out section.
|
||||
|
||||
* doc/gnustep-faq.texi: English fixes, and move NSScanner to
|
||||
`implemented' list.
|
||||
|
||||
* doc/install.texi: English fixes, and mention --enable-shared
|
||||
with Base Library configure directions.
|
||||
|
||||
* README.foundation: Add note about making a soft link, instead of
|
||||
adding #ifdef's to the code.
|
||||
|
||||
* NSBundle.README: Change name from libobjects to GNUstep Base
|
||||
Library.
|
||||
* README.first: Likewise.
|
||||
|
||||
Wed Aug 7 09:06:10 1996 Andrew McCallum <mccallum@cs.cmu.edu>
|
||||
|
||||
* src/mframe.m (mframe_build_return): Remove comment about users
|
||||
responsibility to free returned char*'s; it's no longer true.
|
||||
|
||||
Mon Aug 5 11:25:30 1996 Andrew McCallum <mccallum@cs.cmu.edu>
|
||||
|
||||
* src/include/NSArray.h: Remove declaration of NonCore classes;
|
||||
just the category is sufficient.
|
||||
|
||||
Mon Sep 2 09:11:34 1996 Andrew McCallum <mccallum@cs.cmu.edu>
|
||||
|
||||
* src/mframe.m: Use gcc's __builtin_return smarts to find location
|
||||
|
|
|
@ -130,9 +130,8 @@ GNUstep-FAQ.html: gnustep-faq.texi version.texi
|
|||
> GNUstep-FAQ.texi
|
||||
texi2html -expandinfo $(MAKEINFO_FLAGS) GNUstep-FAQ.texi
|
||||
|
||||
# | awk -- '/@item/ { print "@br{}" } /@end itemize/ { print "@br{}" } ; { print }' \
|
||||
|
||||
<A HREF="http://www.cl.cam.ac.uk/texinfodoc/dir.html">GNU "info" manuals</A>
|
||||
# | awk -- '/@item/ { print "@br{}" } /@end itemize/ { print "@br{}" } ; { print }'
|
||||
#<A HREF="http://www.cl.cam.ac.uk/texinfodoc/dir.html">GNU "info" manuals</A>
|
||||
|
||||
TOP_DOC_FILES = README INSTALL NEWS
|
||||
RCS_FILES = $(TEXI_FILES) Makefile.in
|
||||
|
|
|
@ -239,10 +239,11 @@ The short answer is: On whichever platforms volunteers offer port it!
|
|||
The main target platforms is free operating systems, namely Linux and
|
||||
the Hurd. Much of the code is OS-independent, and should port quite
|
||||
easily to various UNIX-like OS's. There has been interest in a port to
|
||||
Linux on the Apple Macintosh, but I have not heard of any developers.
|
||||
Linux on the Apple Macintosh, but we have not heard from any developers
|
||||
working on this.
|
||||
|
||||
At least one of the current active developers is also working with
|
||||
WindowsNT. There has been some interest in an OS/2 port, but I've seen
|
||||
Windows NT. There has been some interest in an OS/2 port, but I've seen
|
||||
few code contributions for OS/2.
|
||||
|
||||
|
||||
|
@ -343,8 +344,8 @@ No. Unlike NeXT's @samp{cc}, GNU GCC does not support source files
|
|||
containing both Objective C and C++. People at Cygnus have mentioned
|
||||
that they would be willing to do the work---if they were paid for it, of
|
||||
course. Several people are interested in seeing this happen. Send
|
||||
email to @samp{discussion@gnustep.org} and
|
||||
@samp{gnu-objc@prep.ai.mit.edu} if you are interesting in pushing this
|
||||
email to @samp{discussion@@gnustep.org} and
|
||||
@samp{gnu-objc@@prep.ai.mit.edu} if you are interesting in pushing this
|
||||
issue, so that the efforts of all those people interested can be
|
||||
coordinated.
|
||||
|
||||
|
@ -385,8 +386,8 @@ and usable: NSArchiver, NSArray, NSAssertionHandler, NSAutoreleasePool,
|
|||
NSBitmapCharSet, NSBundle, NSCharacterSet, NSCoder, NSCountedSet,
|
||||
NSData, NSDate, NSDictionary, NSEnumerator, NSException, NSInvocation,
|
||||
NSLock, NSMethodSignature, NSNotification, NSNotificationCenter,
|
||||
NSNumber, NSObject, NSProcessInfo, NSRunLoop, NSSet, NSString, NSThread,
|
||||
NSTimeZone, NSTimer, NSUserDefaults, NSValue.
|
||||
NSNumber, NSObject, NSProcessInfo, NSRunLoop, NSScanner, NSSet,
|
||||
NSString, NSThread, NSTimeZone, NSTimer, NSUserDefaults, NSValue.
|
||||
|
||||
Most of the C functions are also implemented, including NSHashTable and
|
||||
NSMaptable.
|
||||
|
@ -397,7 +398,7 @@ not yet been made.
|
|||
|
||||
The following classes are unstarted or unusable: NSBTreeBlock,
|
||||
NSBTreeCursor, NSByteStore, NSByteStoreFile, NSCalendarDate,
|
||||
NSDeserializer, NSScanner, NSSerializer.
|
||||
NSDeserializer, NSSerializer.
|
||||
|
||||
|
||||
@item @b{In what ways is the Base Library different from OpenStep's FoundationKit?}
|
||||
|
@ -455,7 +456,7 @@ OpenStep's archiving system implements forward references, (that is,
|
|||
calls to @samp{encodeConditionalObject:} for which the object argument
|
||||
has not yet been encoded, but will be encoded later.) by making two
|
||||
passes through all the -encodeWithCoder: methods of the objects to be
|
||||
encoded GNU's archiving system, on the other hand, implements forward
|
||||
encoded. GNU's archiving system, on the other hand, implements forward
|
||||
references efficiently, without making two passes. It does this by
|
||||
using an object decoding method (@samp{-decodeObjectAt:..}) that
|
||||
back-patches @code{id}-pointers when the conditionally encoded objects
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
@include version.texi
|
||||
|
||||
@ifset INSTALL_ONLY
|
||||
This file documents the installation of the GNU Objective C
|
||||
Class Library, @samp{libgnustep-base}. Copyright (C) 1993, 1994, 1996 Free Software
|
||||
This file documents the installation of the GNUstep Base Library,
|
||||
@samp{libgnustep-base}. Copyright (C) 1993, 1994, 1996 Free Software
|
||||
Foundation, Inc. You may copy, distribute, and modify it freely as long
|
||||
as you preserve this copyright notice and permission notice.
|
||||
@chapter Installing @samp{libgnustep-base}
|
||||
|
@ -18,9 +18,9 @@ To compile and install @samp{libgnustep-base}:
|
|||
@enumerate
|
||||
|
||||
@item
|
||||
If you are running Linux, first install pthreads. gnustep-base has been
|
||||
tested with pthreads-0.9.2. You can just copying the libaries from the
|
||||
@file{lib} directory of the distribution to /usr/local/lib, and the
|
||||
If you are running GNU/Linux, first install pthreads. gnustep-base has
|
||||
been tested with pthreads-0.9.2. You can just copying the libaries from
|
||||
the @file{lib} directory of the distribution to /usr/local/lib, and the
|
||||
@file{pthreads} directory from the @file{include} directory of the
|
||||
distribution to /usr/local/include. For example:
|
||||
|
||||
|
@ -63,10 +63,10 @@ make
|
|||
make install
|
||||
@end example
|
||||
|
||||
If you are running GNU/Linux and have an older version of libc, then the
|
||||
Objective C runtime will not work unless you pass @samp{-lieee} to the
|
||||
linker. If you use the pthreads library that will also have to be
|
||||
linked in. You can do that like this:
|
||||
Alternatively, if you are running GNU/Linux and have an older version of
|
||||
libc, then the Objective C runtime will not work unless you pass
|
||||
@samp{-lieee} to the linker. If you use the pthreads library that will
|
||||
also have to be linked in. You can do that like this:
|
||||
|
||||
@example
|
||||
LIBS="-lieee -lpthreads" ./configure --prefix=/usr/local
|
||||
|
@ -74,7 +74,11 @@ make
|
|||
make install
|
||||
@end example
|
||||
|
||||
@item
|
||||
If your system supports dynamically loaded shared libraries, you can
|
||||
request the building and installation of a @samp{.so} version of the
|
||||
library by passing @samp{--enable-shared} to @samp{configure}. If in
|
||||
doubt, do not include this option.
|
||||
|
||||
If you have trouble with the Makefile, it may be that our makefiles use
|
||||
features that your @code{make} does not support; use GNU make.
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
@end
|
||||
|
||||
|
||||
@class NSArrayNonCore;
|
||||
@interface NSArray (NonCore) <NSCopying, NSMutableCopying>
|
||||
|
||||
+ array;
|
||||
|
@ -48,7 +47,6 @@
|
|||
- initWithObjects: firstObj, ...;
|
||||
- initWithArray: (NSArray*)array;
|
||||
|
||||
|
||||
- (unsigned) indexOfObjectIdenticalTo: anObject;
|
||||
- (unsigned) indexOfObject: anObject;
|
||||
- (BOOL) containsObject: anObject;
|
||||
|
@ -73,7 +71,6 @@
|
|||
@end
|
||||
|
||||
|
||||
@class NSMutableArrayNonCore;
|
||||
@interface NSMutableArray : NSArray
|
||||
- initWithCapacity: (unsigned)numItems;
|
||||
- (void) addObject: anObject;
|
||||
|
|
|
@ -12,8 +12,8 @@ directory has the extension "bundle" and the main object file that
|
|||
resides in the directory has the same name as the bundle directory,
|
||||
without any extension.
|
||||
|
||||
The NSBundle class provided with GNU libobjects is meant to run on a
|
||||
variety of systems. However, some set-up is required to use it.
|
||||
The NSBundle class provided with GNUstep Base Library is meant to run
|
||||
on a variety of systems. However, some set-up is required to use it.
|
||||
Currently it has been tested on only a few systems that support
|
||||
dynamic linking -- SunOS, Solaris. It configures for HP, but I
|
||||
haven't been able to get it to work yet. There are unconfirmed reports
|
||||
|
@ -21,14 +21,14 @@ it work on Linux systems.
|
|||
|
||||
NSBundle set-up:
|
||||
|
||||
To compile NSBundle into your programs, you need to make sure that
|
||||
libobjects was configured correctly for the dynamic linking system on
|
||||
your machine. This is done automatically in the configure script that
|
||||
comes with libobjects, but it is possible that the configuration is
|
||||
incorrect for your system (especially if it is not one of the systems
|
||||
listed above). In particular, the Makefile variable DYNAMIC_LINKER is
|
||||
set to link in the proper header file that prvides the dynamic linking
|
||||
for the system.
|
||||
To compile NSBundle into your programs, you need to make sure that the
|
||||
GNUstep Base Library was configured correctly for the dynamic linking
|
||||
system on your machine. This is done automatically in the configure
|
||||
script that comes with the Base Library, but it is possible that the
|
||||
configuration is incorrect for your system (especially if it is not
|
||||
one of the systems listed above). In particular, the Makefile variable
|
||||
DYNAMIC_LINKER is set to link in the proper header file that prvides
|
||||
the dynamic linking for the system.
|
||||
|
||||
You also need to configure your own program to take advantage of
|
||||
NSBundle, and also configure the compilation of any "bundles" you want
|
||||
|
@ -37,7 +37,7 @@ through you own customized configure script. The examples directory
|
|||
contains an example configure.example.in and Makefile.example.in which
|
||||
you can use as a template for configuring your system for compiling so
|
||||
that you can dynamically load object files into your running program.
|
||||
You will need the file aclocal.m4 that comes with the libobjects
|
||||
You will need the file aclocal.m4 that comes with the Base Library
|
||||
distribution in order to use configure.example.in in your system.
|
||||
In particular, the example configure script sets the following
|
||||
Makefile variables:
|
||||
|
@ -67,8 +67,8 @@ data files within a bundle.
|
|||
|
||||
If NSBundle does not work on systems that do support dynamic linking,
|
||||
it is likely that the Makefile variable DYNAMIC_BUNDLER_LINKER is not
|
||||
set-up correctly, or that libobjects did not link in the correct
|
||||
header file to use dynamic linking. Diagnosing and fixing these
|
||||
problems is not trivial and requires some knowledge of dynamic
|
||||
set-up correctly, or that the GNUstep Base Library did not link in the
|
||||
correct header file to use dynamic linking. Diagnosing and fixing
|
||||
these problems is not trivial and requires some knowledge of dynamic
|
||||
linking, object file formats and the Objective-C runtime. Contact Adam
|
||||
Fedor <fedor@boulder.colorado.edu> for help.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
This is a snapshot distribution of libobjects.
|
||||
This is a snapshot distribution of the GNUstep Base Library.
|
||||
|
||||
It is a totally untested "snapshot" of the source tree made on the
|
||||
date indicated by the filename.
|
||||
|
||||
This release is not intended for casual users of libobjects---it is
|
||||
meant for libobjects developers.
|
||||
This release is not intended for casual users of GNUstep---it is meant
|
||||
for GNUstep developers.
|
||||
|
||||
IMPORTANT:
|
||||
|
||||
|
|
|
@ -36,3 +36,5 @@ As I said, cumbersome, but it should work with ANY OpenStep complient
|
|||
foundation.
|
||||
|
||||
|
||||
[Alternatively, you could just make a soft link from `foundation' to
|
||||
`Foundation' -mccallum.]
|
||||
|
|
|
@ -386,6 +386,7 @@ NSPage.m \
|
|||
NSProcessInfo.m \
|
||||
NSRange.m \
|
||||
NSRunLoop.m \
|
||||
NSScanner.m \
|
||||
NSSet.m \
|
||||
NSString.m \
|
||||
NSThread.m \
|
||||
|
@ -457,6 +458,7 @@ include/NSPathUtilities.h \
|
|||
include/NSProcessInfo.h \
|
||||
include/NSRange.h \
|
||||
include/NSRunLoop.h \
|
||||
include/NSScanner.h \
|
||||
include/NSSerialization.h \
|
||||
include/NSSet.h \
|
||||
include/NSString.h \
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
Only supports C Strings. Some implementations will need to be
|
||||
changed when we get other string backing classes.
|
||||
|
||||
Does not support %@ in format strings on non-GNU-libc systems.
|
||||
Does not support all justification directives for `%@' in format strings
|
||||
on non-GNU-libc systems.
|
||||
|
||||
*/
|
||||
|
||||
|
@ -320,7 +321,7 @@ handle_printf_atsign (FILE *stream,
|
|||
/* We need a local copy since we change it. (Changing and undoing
|
||||
the change doesn't work because some format strings are constant
|
||||
strings, placed in a non-writable section of the executable, and
|
||||
can't be written to.) */
|
||||
writing to them will cause a segfault.) */
|
||||
char format_cp_copy[format_len+1];
|
||||
char *atsign_pos;
|
||||
char *format_to_go = format_cp_copy;
|
||||
|
|
|
@ -50,7 +50,9 @@ NSUserName ()
|
|||
NSString *
|
||||
NSHomeDirectory ()
|
||||
{
|
||||
return [NSString stringWithCString: getenv ("HOME")];
|
||||
return NSHomeDirectoryForUser (NSUserName ());
|
||||
/* xxx Was using this. Is there a reason to prefer it?
|
||||
return [NSString stringWithCString: getenv ("HOME")]; */
|
||||
}
|
||||
|
||||
/* Return LOGIN_NAME's home directory as an NSString object. */
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
#ifdef NeXT
|
||||
#include <foundation/NSUserDefaults.h>
|
||||
#include <foundation/NSPathUtilities.h>
|
||||
#include <foundation/NSDictionary.h>
|
||||
#include <foundation/NSArray.h>
|
||||
#include <foundation/NSDate.h>
|
||||
|
@ -47,6 +48,7 @@
|
|||
#include <foundation/NSProcessInfo.h>
|
||||
#else
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
|
@ -93,47 +95,6 @@ NSString *NSCurrencyString = @"NSCurrencyString";
|
|||
NSString *NSDecimalDigits = @"NSDecimalDigits";
|
||||
NSString *NSAMPMDesignation = @"NSAMPMDesignation";
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*** Get Information about a User
|
||||
*************************************************************************/
|
||||
#ifndef NeXT
|
||||
// The functions used below showld work with /etc/passwd file,
|
||||
// YP and NetInfo. I have no idea how this should be implemented
|
||||
// for Win-NT and I know that this cannot be implemented fow Win95
|
||||
|
||||
NSString *NSUserName(void)
|
||||
{
|
||||
NSString* processOwner = [NSString stringWithCString: getlogin()];
|
||||
return processOwner;
|
||||
}
|
||||
|
||||
NSString *NSHomeDirectory(void)
|
||||
{
|
||||
return NSHomeDirectoryForUser (NSUserName());
|
||||
}
|
||||
|
||||
NSString *NSHomeDirectoryForUser (NSString * userName)
|
||||
{
|
||||
struct passwd *pwd;
|
||||
|
||||
if (!userName)
|
||||
return nil;
|
||||
|
||||
setpwent(); // Start scanning the password file
|
||||
while ((pwd = getpwent ()))
|
||||
{
|
||||
if (strcmp(pwd->pw_name,[userName cString]) == 0)
|
||||
break;
|
||||
}
|
||||
endpwent(); // Finish scanning the password file
|
||||
|
||||
if (!pwd)
|
||||
return nil;
|
||||
return [NSString stringWithCString:pwd->pw_dir];
|
||||
}
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
*** Local method definitions
|
||||
*************************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Implementation for Objective-C TreeNode object
|
||||
Copyright (C) 1993,1994, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993,1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
||||
Date: May 1993
|
||||
|
@ -52,6 +52,12 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[_children release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: aCoder
|
||||
{
|
||||
[super encodeWithCoder:aCoder];
|
||||
|
@ -79,10 +85,8 @@
|
|||
|
||||
- (void) setChildren: (id <IndexedCollecting>)kids
|
||||
{
|
||||
/* xxx
|
||||
[kids retain];
|
||||
[_children release];
|
||||
*/
|
||||
_children = kids;
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -774,12 +774,7 @@ mframe_do_call (const char *encoded_types,
|
|||
functions after this one. The memory for the retframe is
|
||||
alloca()'ed, not malloc()'ed, and therefore is on the stack and can
|
||||
be tromped-on by future function calls.
|
||||
|
||||
xxx Pointer values returned by the method or non-const strings
|
||||
passed in will now point to newly malloc'ed memory. It is your
|
||||
responsibility to free it. This is thoroughly disgusting, and will
|
||||
be fixed as soon as we get rid of the -free method and replace it
|
||||
with something better. */
|
||||
*/
|
||||
|
||||
retval_t
|
||||
mframe_build_return (arglist_t argframe,
|
||||
|
|
|
@ -95,7 +95,8 @@ coder.m \
|
|||
cstream.m \
|
||||
fref.m \
|
||||
basic.m \
|
||||
release.m
|
||||
release.m \
|
||||
nsscanner.m
|
||||
|
||||
tcpport: FORCE
|
||||
(cd ../src; $(MAKE))
|
||||
|
|
|
@ -77,7 +77,7 @@ int main()
|
|||
|
||||
[foo removeObject:[foo minObject]];
|
||||
[foo addObject: [NSNumber numberWithInt: 99]];
|
||||
printf("Collections 0 and 9 should mismatch\n");
|
||||
printf("Collections 0 and 4 should mismatch\n");
|
||||
[collections printForDebugger];
|
||||
|
||||
checkSameContents([collections delegatePoolCollection]);
|
||||
|
|
Loading…
Reference in a new issue