This is hashtable.c in view mode; [Download] [Up]
/* hashtable.c
*
* Copyright (C) 1993, 1994, 1995 The Board of Trustees of
* The Leland Stanford Junior University. All Rights Reserved.
*
* Authors: Paul Kunz
*
* This file is part of an Objective-C class library for a window system
* that is like OpenStep
*
* hashtable.c,v 1.7 1995/07/03 18:15:39 pfkeb Exp
*/
/* Implementation notes:
*
* This doesn't have much to do with hash tables but it is where
* NeXT put the string copy functions and some other things.
*/
#include "objc/hashtable.h"
#include <string.h>
#include <stdlib.h>
char *NXCopyStringBuffer(const char *buffer)
{
char *temp;
if (!buffer)
return NULL;
temp = (char *)malloc((strlen(buffer) + 1) * sizeof(char));
temp = strcpy(temp, buffer);
return (temp);
}
char *NXCopyStringBufferFromZone(const char *buffer, NSZone *zone)
{
char *temp;
if (!buffer) return NULL;
temp = (char *)NSZoneMalloc(zone,(strlen(buffer)+1)*sizeof(char));
temp = strcpy(temp,buffer);
return (temp);
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.