From 29ce1ddd8a233417a4334adff3f55e19c7e9bd3b Mon Sep 17 00:00:00 2001 From: netc Date: Fri, 28 Nov 1997 20:13:58 +0000 Subject: [PATCH] Install headers in gnustep not gnustep/base. Minor bug fixes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2662 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 18 ++++++++++++++ Source/GNUmakefile | 2 +- Source/Makefile.postamble | 1 - Source/Makefile.preamble | 9 +++---- Source/NSTimeZone.m | 8 +++--- Source/o_map.m | 47 +++++++++++++++++++----------------- Testing/nsattributedstring.m | 5 ++++ Tools/GNUmakefile | 2 +- Tools/Makefile.postamble | 2 +- 9 files changed, 59 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2805e925d..392eed1b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Fri Nov 28 12:52:06 1997 Scott Christley + + * Tools/GNUmakefile (OBJC_PROGRAM_NAME): Reverse prior change. + * Tools/Makefile.postamble (after-install): Install gdomap + from the proper directory. + * checks/nsattributesstring.m (NSFontAttributeName): New variable. + (NSForegroundColorAttributeName): New variable. + (NSBackgroundColorAttributeName): New variable. + + * src/GNUmakefile: Install headers in gnustep not gnustep/base. + * src/Makefile.preamble (ADDITIONAL_INSTALL_DIRS): Likewise. + + * src/NSTimeZone.m (LOCALDBKEY, ZONES_DIR): Make NSStrings. + (+getTimeZoneFile:): ZONES_DIR is NSString. + + * src/o_map.m (INLINE): Use macro so its easy to un-inline + functions if debugging. + Wed Nov 26 16:08:20 1997 Adam Fedor * Tools/GNUmakefile (OBJC-PROGRAM_NAME): Change from underscore. diff --git a/Source/GNUmakefile b/Source/GNUmakefile index a58853e16..99c76137a 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -485,7 +485,7 @@ libgnustep-base_OBJC_FILES = $(GNU_MFILES) $(NEXTSTEP_MFILES) \ $(BASE_MFILES) $(NSVALUE_MFILES) $(NSNUMBER_MFILES) libgnustep-base_HEADER_FILES_DIR = . -libgnustep-base_HEADER_FILES_INSTALL_DIR = /gnustep/base +libgnustep-base_HEADER_FILES_INSTALL_DIR = /gnustep libgnustep-base_HEADER_FILES = $(NEXTSTEP_HEADERS) $(BASE_HEADERS) diff --git a/Source/Makefile.postamble b/Source/Makefile.postamble index 65de299d5..0a1950b56 100644 --- a/Source/Makefile.postamble +++ b/Source/Makefile.postamble @@ -225,4 +225,3 @@ copy-dist: $(DIST_FILES) ln AUTHORS ../snap FORCE: - diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index 831f43e14..421d8e5bf 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -62,8 +62,7 @@ ADDITIONAL_LIB_DIRS = # # Additional directories to be created during installation -ADDITIONAL_INSTALL_DIRS = $(GNUSTEP_HEADERS)/gnustep \ - $(GNUSTEP_HEADERS)/gnustep/base \ - $(GNUSTEP_HEADERS)/gnustep/base/Foundation \ - $(GNUSTEP_HEADERS)/gnustep/base/objc \ - $(GNUSTEP_HEADERS)/gnustep/base/unicode \ +ADDITIONAL_INSTALL_DIRS = $(GNUSTEP_HEADERS)/gnustep/base \ + $(GNUSTEP_HEADERS)/gnustep/Foundation \ + $(GNUSTEP_HEADERS)/gnustep/objc \ + $(GNUSTEP_HEADERS)/gnustep/unicode \ diff --git a/Source/NSTimeZone.m b/Source/NSTimeZone.m index d47f068cd..59f0a546a 100644 --- a/Source/NSTimeZone.m +++ b/Source/NSTimeZone.m @@ -66,7 +66,7 @@ /* Key for local time zone in user defaults. */ -#define LOCALDBKEY "Local Time Zone" +#define LOCALDBKEY @"Local Time Zone" /* Directory that contains the time zone data. */ #define TIME_ZONE_DIR @"gnustep/NSTimeZones" @@ -87,7 +87,7 @@ #define LOCAL_TIME_FILE @"localtime" /* Directory that contains the actual time zones. */ -#define ZONES_DIR "zones/" +#define ZONES_DIR @"zones/" @class NSInternalTimeTransition; @@ -519,7 +519,7 @@ decode (const void *ptr) zoneDictionary = [[NSMutableDictionary alloc] init]; localZoneString = [[NSUserDefaults standardUserDefaults] - stringForKey: @LOCALDBKEY]; + stringForKey: LOCALDBKEY]; if (localZoneString == nil) /* Try to get timezone from environment. */ localZoneString = [[[NSProcessInfo processInfo] @@ -892,7 +892,7 @@ decode (const void *ptr) + (NSString*)getTimeZoneFile: (NSString *)name { - NSString *fileName = [NSString stringWithFormat: @"%s%@", + NSString *fileName = [NSString stringWithFormat: @"%@%@", ZONES_DIR, name]; return [NSBundle pathForGNUstepResource: fileName diff --git a/Source/o_map.m b/Source/o_map.m index 34c9f6916..f6ab6f6ed 100644 --- a/Source/o_map.m +++ b/Source/o_map.m @@ -30,11 +30,14 @@ #include #include +/* To easily un-inline functions for debugging */ +#define INLINE inline + /**** Function Implementations ***********************************************/ /** Background functions **/ -static inline o_map_bucket_t * +static INLINE o_map_bucket_t * _o_map_pick_bucket_for_key(o_map_t *map, o_map_bucket_t *buckets, size_t bucket_count, @@ -45,7 +48,7 @@ _o_map_pick_bucket_for_key(o_map_t *map, % bucket_count); } -static inline o_map_bucket_t * +static INLINE o_map_bucket_t * _o_map_pick_bucket_for_node(o_map_t *map, o_map_bucket_t *buckets, size_t bucket_count, @@ -56,21 +59,21 @@ _o_map_pick_bucket_for_node(o_map_t *map, % bucket_count); } -static inline o_map_bucket_t * +static INLINE o_map_bucket_t * _o_map_bucket_for_key(o_map_t *map, const void *key) { return _o_map_pick_bucket_for_key(map, map->buckets, map->bucket_count, key); } -static inline o_map_bucket_t * +static INLINE o_map_bucket_t * _o_map_bucket_for_node(o_map_t *map, o_map_node_t *node) { return _o_map_pick_bucket_for_node(map, map->buckets, map->bucket_count, node); } -static inline void +static INLINE void _o_map_link_node_into_bucket(o_map_bucket_t *bucket, o_map_node_t *node) { @@ -84,7 +87,7 @@ _o_map_link_node_into_bucket(o_map_bucket_t *bucket, return; } -static inline void +static INLINE void _o_map_unlink_node_from_its_bucket(o_map_node_t *node) { if (node == node->bucket->first_node) @@ -100,7 +103,7 @@ _o_map_unlink_node_from_its_bucket(o_map_node_t *node) return; } -static inline void +static INLINE void _o_map_link_node_into_map(o_map_t *map, o_map_node_t *node) { @@ -114,7 +117,7 @@ _o_map_link_node_into_map(o_map_t *map, return; } -static inline void +static INLINE void _o_map_unlink_node_from_its_map(o_map_node_t *node) { if (node == node->map->first_node) @@ -130,7 +133,7 @@ _o_map_unlink_node_from_its_map(o_map_node_t *node) return; } -static inline void +static INLINE void _o_map_add_node_to_bucket(o_map_bucket_t *bucket, o_map_node_t *node) { @@ -147,7 +150,7 @@ _o_map_add_node_to_bucket(o_map_bucket_t *bucket, return; } -static inline void +static INLINE void _o_map_add_node_to_its_bucket(o_map_t *map, o_map_node_t *node) { @@ -156,7 +159,7 @@ _o_map_add_node_to_its_bucket(o_map_t *map, return; } -static inline void +static INLINE void _o_map_add_node_to_map(o_map_t *map, o_map_node_t *node) { if (map != 0) @@ -174,7 +177,7 @@ _o_map_add_node_to_map(o_map_t *map, o_map_node_t *node) return; } -static inline void +static INLINE void _o_map_remove_node_from_its_bucket(o_map_node_t *node) { if (node->bucket != 0) @@ -188,7 +191,7 @@ _o_map_remove_node_from_its_bucket(o_map_node_t *node) return; } -static inline void +static INLINE void _o_map_remove_node_from_its_map(o_map_node_t *node) { if (node->map != 0) @@ -204,7 +207,7 @@ _o_map_remove_node_from_its_map(o_map_node_t *node) return; } -static inline o_map_bucket_t * +static INLINE o_map_bucket_t * _o_map_new_buckets(o_map_t *map, size_t bucket_count) { return (o_map_bucket_t *)NSZoneCalloc(o_map_zone(map), @@ -212,7 +215,7 @@ _o_map_new_buckets(o_map_t *map, size_t bucket_count) sizeof(o_map_bucket_t)); } -static inline void +static INLINE void _o_map_free_buckets(o_map_t *map, o_map_bucket_t *buckets) { if (buckets != 0) @@ -220,7 +223,7 @@ _o_map_free_buckets(o_map_t *map, o_map_bucket_t *buckets) return; } -static inline void +static INLINE void _o_map_remangle_buckets(o_map_t *map, o_map_bucket_t *old_buckets, size_t old_bucket_count, @@ -246,7 +249,7 @@ _o_map_remangle_buckets(o_map_t *map, return; } -static inline o_map_node_t * +static INLINE o_map_node_t * _o_map_new_node(o_map_t *map, const void *key, const void *value) { o_map_node_t *node; @@ -277,7 +280,7 @@ _o_map_new_node(o_map_t *map, const void *key, const void *value) return node; } -static inline void +static INLINE void _o_map_free_node(o_map_node_t *node) { if (node != 0) @@ -301,7 +304,7 @@ _o_map_free_node(o_map_node_t *node) return; } -static inline o_map_node_t * +static INLINE o_map_node_t * _o_map_node_for_key(o_map_t *map, const void *key) { o_map_bucket_t *bucket; @@ -323,7 +326,7 @@ _o_map_node_for_key(o_map_t *map, const void *key) return node; } -/* A non--static-inline version for use in NSObject. +/* A non--static-INLINE version for use in NSObject. xxx Figure out if this change should be generalized. */ o_map_node_t * o_map_node_for_key (o_map_t *map, const void *key) @@ -331,7 +334,7 @@ o_map_node_for_key (o_map_t *map, const void *key) return _o_map_node_for_key (map, key); } -/* A non--static-inline version for use in NSObject. +/* A non--static-INLINE version for use in NSObject. xxx Figure out if this change should be generalized. */ void o_map_remove_node (o_map_node_t *node) @@ -508,7 +511,7 @@ o_map_contains_value(o_map_t *map, const void *value) * for MAP is placed there; * (3) if VALUE is non-zero, then the the "not a value marker" * for MAP is placed there. */ -inline int +INLINE int o_map_key_and_value_at_key(o_map_t *map, const void **old_key, const void **value, diff --git a/Testing/nsattributedstring.m b/Testing/nsattributedstring.m index 1c0bbd883..614e787dd 100644 --- a/Testing/nsattributedstring.m +++ b/Testing/nsattributedstring.m @@ -34,6 +34,11 @@ #include #include +// These are normally defined in the AppKit +NSString *NSFontAttributeName = @"NSFont"; +NSString *NSForegroundColorAttributeName = @"NSForegroundColor"; +NSString *NSBackgroundColorAttributeName = @"NSBackgroundColor"; + void printAttrString(NSAttributedString *attrStr) { NSDictionary *tmpAttrDict; diff --git a/Tools/GNUmakefile b/Tools/GNUmakefile index cd2cd664e..9198262e7 100644 --- a/Tools/GNUmakefile +++ b/Tools/GNUmakefile @@ -27,7 +27,7 @@ include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/common.make # The application to be compiled TOOL_NAME = dread dwrite dremove -OBJC-PROGRAM_NAME = gdomap +OBJC_PROGRAM_NAME = gdomap # The source files to be compiled gdomap_C_FILES = gdomap.c diff --git a/Tools/Makefile.postamble b/Tools/Makefile.postamble index b1d952c9c..7d0abc7db 100644 --- a/Tools/Makefile.postamble +++ b/Tools/Makefile.postamble @@ -19,7 +19,7 @@ # Things to do after installing after-install:: - $(INSTALL) -m 05755 gdomap $(GNUSTEP_INSTALLATION_DIR)/Tools/$(GNUSTEP_TARGET_DIR) + $(INSTALL) -m 05755 $(GNUSTEP_OBJ_DIR)/gdomap $(GNUSTEP_INSTALLATION_DIR)/Tools/$(GNUSTEP_TARGET_DIR) # Things to do before uninstalling # before-uninstall::