+Thu Feb 20 23:27:39 1997 Richard Basch <basch@lehman.com>
+
+ * memcache.c: Just use malloc/free, since _nmalloc isn't on
+ all versions of Windows.
+
Sun Feb 16 21:11:51 1997 Richard Basch <basch@lehman.com>
* Makefile.in: Win16/Win32 cleanup
#define noErr 0
#define cKrbCredsDontExist 12001
#define cKrbSessDoesntExist 12002
-#define OFFSETOF(x) x
-#define _nmalloc malloc
-#define _nrealloc realloc
-#define _nfree free
#define memFullErr ENOMEM
#endif
extern char *malloc (), *realloc ();
#endif
-#define _nmalloc malloc
-#define _nfree free
-#define _nrealloc realloc
-#define NPSTR char *
-#define OFFSETOF(x) x
-
typedef int OSErr;
#define noErr 0
#define memFullErr ENOMEM
{
Handle h;
- h = (char **) _nmalloc(sizeof(char *));
+ h = (char **) malloc(sizeof(char *));
if (h == NULL) {
memerror = memFullErr;
}
if (s > 0) {
- *h = _nmalloc(s);
+ *h = malloc(s);
if (*h == NULL) {
- _nfree((NPSTR) OFFSETOF(h));
+ free(h);
memerror = memFullErr;
return (NULL);
}
Handle h;
{
if (*h != NULL)
- _nfree((NPSTR) OFFSETOF(*h));
-
- _nfree((NPSTR) OFFSETOF(h));
+ free(*h);
+ free(h);
}
/*
{
if (*h != NULL) {
if (s > 0) {
- *h = _nrealloc((NPSTR) OFFSETOF(*h), s);
-
+ *h = realloc(*h, s);
if (*h == NULL) {
memerror = memFullErr;
return;
}
}
else {
- _nfree((NPSTR) OFFSETOF(*h));
+ free(*h);
*h = NULL;
}
}
else {
if (s > 0) {
- *h = _nmalloc(s);
-
+ *h = malloc(s);
if (*h == NULL) {
memerror = memFullErr;
return;