New TimeZone files/directory. Removed redundent methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2466 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1997-10-01 18:53:50 +00:00
parent 5a29032c27
commit ddeadf345e
7 changed files with 174 additions and 137 deletions

View file

@ -1,3 +1,15 @@
Wed Oct 1 14:44:17 1997 Adam Fedor <fedor@spanky.doc.com>
* src/NSConnection.m ([-registerName:]): Remove
duplicate method.
* src/NSDistantObject.m ([-encodeWithCoder:]): Likewise.
* src/Proxy.m: ([NSObject -selectorTypeForProxy]): Likewise.
* NSTimeZones: New directory.
* NSTimeZones/Makefile: New file.
* NSTimeZones/Makefile.postamble: Likewise.
* NSTimeZones/NSTimeZones.tar: Likewise.
Tue Sep 30 08:57:44 1997 Adam Fedor <fedor@doc.com>
* src/NSData.m: Remove obsolete includes.

41
NSTimeZones/Makefile Normal file
View file

@ -0,0 +1,41 @@
#
# NSTimeZones makefile for GNUstep Base Library
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
#
# Written by: Adam Fedor <fedor@doc.com>
#
# This file is part of the GNUstep Base Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make
include ../Version
include ../config.mak
resourcedir = $(GNUSTEP_RESOURCES)/gnustep
TIMEZONE_ARCHIVE = \
NSTimeZones.tar
DIST_FILES = Makefile Makefile.preamble $(TIMEZONE_ARCHIVE)
-include Makefile.preamble
# We don't actually build anything in this directory so
# just include the common makefile rules
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
-include Makefile.postamble

View file

@ -0,0 +1,84 @@
#
# Makefile.postamble
#
# Copyright (C) 1997 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@doc.com>
#
# This file is part of the GNUstep Base Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# If you are interested in a warranty or support for this source code,
# contact Scott Christley at scottc@net-community.com
#
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Makefile.postamble
#
# Project specific makefile rules
#
# Uncomment the targets you want.
# The double colons (::) are important, do not make them single colons
# otherwise the normal makefile rules will not be performed.
#
# Things to do before compiling
# before-all::
# Things to do after compiling
# after-all::
# Things to do before installing
before-install::
$(GNUSTEP_MAKEFILES)/mkinstalldirs $(timezonedir)
# Things to do after installing
after-install::
cp $(TIMEZONE_ARCHIVE) $(resourcedir); \
cd $(resourcedir); \
tar -xf $(TIMEZONE_ARCHIVE); \
rm -f $(TIMEZONE_ARCHIVE)
# Things to do before uninstalling
# before-uninstall::
# Things to do after uninstalling
after-uninstall::
cd $(resourcedir); rm -rf NSTimeZones
# Things to do before cleaning
# before-clean::
# Things to do after cleaning
# after-clean::
# Things to do before distcleaning
# before-distclean::
# Things to do after distcleaning
# after-distclean::
# Things to do before checking
# before-check::
# Things to do after checking
# after-check::
copy-dist: $(DIST_FILES)
mkdir ../snap/NSTimeZones
for file in $(INSTALL_FILES); do \
ln $$file ../snap/NSTimeZones/$$file ; \
done

BIN
NSTimeZones/NSTimeZones.tar Normal file

Binary file not shown.

View file

@ -431,12 +431,6 @@ static int messages_received_count;
return is_valid;
}
- (BOOL) registerName: (NSString*)name
{
[self notImplemented: _cmd];
return NO;
}
- (void) release
{
/*

View file

@ -119,24 +119,46 @@ format: @"NSDistantObject objects only encode with PortEncoder class"];
proxy_target = (unsigned int)_object;
if (encoder_connection == _connection) {
/*
* This proxy is a local object on the other side.
*/
proxy_tag = PROXY_LOCAL_FOR_RECEIVER;
if (_isLocal) {
/*
* This proxy is a local to us, remote to other side.
*/
proxy_tag = PROXY_LOCAL_FOR_SENDER;
if (debug_proxy)
fprintf(stderr, "Sending a proxy, will be local 0x%x "
"connection 0x%x\n",
(unsigned)_object,
(unsigned)_connection);
if (debug_proxy)
fprintf(stderr, "Sending a proxy, will be remote 0x%x "
"connection 0x%x\n",
(unsigned)_object,
(unsigned)_connection);
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
at: &proxy_tag
withName: @"Proxy is local for receiver"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
at: &proxy_tag
withName: @"Proxy is local for sender"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
at: &proxy_target
withName: @"Proxy target"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
at: &proxy_target
withName: @"Proxy target"];
}
else {
/*
* This proxy is a local object on the other side.
*/
proxy_tag = PROXY_LOCAL_FOR_RECEIVER;
if (debug_proxy)
fprintf(stderr, "Sending a proxy, will be local 0x%x "
"connection 0x%x\n",
(unsigned)_object,
(unsigned)_connection);
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
at: &proxy_tag
withName: @"Proxy is local for receiver"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
at: &proxy_target
withName: @"Proxy target"];
}
}
else {
/*
@ -428,104 +450,6 @@ format: @"NSDistantObject objects only decode with PortDecoder class"];
return nil;
}
- (void) encodeWithCoder: aRmc
{
unsigned int proxy_target;
unsigned char proxy_tag;
NSConnection *encoder_connection;
if ([aRmc class] != [PortEncoder class])
[NSException raise: NSGenericException
format: @"NSDistantObject objects only encode with PortEncoder class"];
encoder_connection = [aRmc connection];
assert (encoder_connection);
if (![encoder_connection isValid])
[NSException
raise: NSGenericException
format: @"Trying to encode to an invalid Connection.\n"
@"You should request NSConnectionDidDieNotification's and\n"
@"release all references to the proxy's of invalid Connections."];
proxy_target = (unsigned int)_object;
if (encoder_connection == _connection) {
if (_isLocal) {
/*
* This proxy is a local to us, remote to other side.
*/
proxy_tag = PROXY_LOCAL_FOR_SENDER;
if (debug_proxy)
fprintf(stderr, "Sending a proxy, will be remote 0x%x "
"connection 0x%x\n",
(unsigned)_object,
(unsigned)_connection);
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
at: &proxy_tag
withName: @"Proxy is local for sender"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
at: &proxy_target
withName: @"Proxy target"];
}
else {
/*
* This proxy is a local object on the other side.
*/
proxy_tag = PROXY_LOCAL_FOR_RECEIVER;
if (debug_proxy)
fprintf(stderr, "Sending a proxy, will be local 0x%x "
"connection 0x%x\n",
(unsigned)_object,
(unsigned)_connection);
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
at: &proxy_tag
withName: @"Proxy is local for receiver"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
at: &proxy_target
withName: @"Proxy target"];
}
}
else {
/*
* This proxy will still be remote on the other side
*/
NSPort *proxy_connection_out_port = [_connection sendPort];
assert (proxy_connection_out_port);
assert ([proxy_connection_out_port isValid]);
assert (proxy_connection_out_port != [encoder_connection sendPort]);
proxy_tag = PROXY_REMOTE_FOR_BOTH;
if (debug_proxy)
fprintf(stderr, "Sending triangle-connection proxy 0x%x "
"proxy-conn 0x%x to-conn 0x%x\n",
(unsigned)_object,
(unsigned)_connection, (unsigned)encoder_connection);
/*
* It's remote here, so we need to tell other side where to form
* triangle connection to
*/
[aRmc encodeValueOfCType: @encode(typeof(proxy_tag))
at: &proxy_tag
withName: @"Proxy is remote for both sender and receiver"];
[aRmc encodeValueOfCType: @encode(typeof(proxy_target))
at: &proxy_target
withName: @"Proxy target"];
[aRmc encodeBycopyObject: proxy_connection_out_port
withName: @"Proxy outPort"];
}
}
- (const char *) selectorTypeForProxy: (SEL)selector
{
#if NeXT_runtime

View file

@ -479,24 +479,6 @@ enum
@end
@implementation NSObject (ForProxy)
- (const char *) selectorTypeForProxy: (SEL)selector
{
#if NeXT_runtime
{
Method m = class_get_instance_method(isa, selector);
if (m)
return m->method_types;
else
return NULL;
}
#else
return sel_get_type (selector);
#endif
}
@end
@implementation Protocol (RemoteSelfCoding)