Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
alloc/ncalloc
- X-seq: zsh-workers 3057
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: alloc/ncalloc
- Date: Tue, 1 Apr 1997 01:02:34 +0100 (BST)
-----BEGIN PGP SIGNED MESSAGE-----
This patch makes a cosmetic change, moving the declarations of the
alloc and ncalloc function pointers into globals.h, where all the other
global variables are. (They were previously declared in prototypes.h,
and defined in mem.c, for no good reason.)
The only object affected by the header changes is init.o.
-zefram
*** Src/globals.h 1997/03/29 23:35:55 1.42
--- Src/globals.h 1997/03/31 00:47:49
***************
*** 516,522 ****
/* != 0 if we are allocating in the heaplist */
EXTERN int useheap;
!
/* != 0 if the line editor is active */
EXTERN int zleactive;
--- 516,528 ----
/* != 0 if we are allocating in the heaplist */
EXTERN int useheap;
!
! /* Current allocation pointers. ncalloc() is either zalloc() or halloc(); *
! * alloc() is either zcalloc() or hcalloc(). */
!
! EXTERN void *(*ncalloc) _((size_t));
! EXTERN void *(*alloc) _((size_t));
!
/* != 0 if the line editor is active */
EXTERN int zleactive;
*** Src/mem.c 1997/01/29 03:25:18 1.3
--- Src/mem.c 1997/03/31 00:45:19
***************
*** 31,41 ****
#include "zsh.h"
- void *(*alloc) _((size_t));
- void *(*ncalloc) _((size_t));
-
/*
-
There are two ways to allocate memory in zsh. The first way is
to call zalloc/zcalloc, which call malloc/calloc directly. It
is legal to call realloc() or free() on memory allocated this way.
--- 31,37 ----
*** Src/prototypes.h 1997/03/31 00:07:40 1.12
--- Src/prototypes.h 1997/03/31 00:44:33
***************
*** 57,68 ****
#include "watch.pro"
#include "module.pro"
- /* memory allocation routines - changed with permalloc()/heapalloc() */
-
- /* real things in mem.c */
- extern void *(*alloc) _((size_t));
- extern void *(*ncalloc) _((size_t));
-
#ifndef HAVE_STDLIB_H
char *malloc _((size_t));
char *realloc _((void *, size_t));
--- 57,62 ----
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii
iQCVAwUBMz8KsHD/+HJTpU/hAQHwYwP/aByCow1ty70jm7ojLFgYx9Tv7BmWM9VH
MM8bOJBFojCRgVlj0p/UPMhN72JhVozH2tAQvyEF4CYdtbb7qY5xZqjdTyk6gQQ1
T90q3jysKVK82xuTsfPv9+FvPzChc8sibGU0hDtZTBIzpLjPaRZrojn5H4V4sn99
26Fu66etzCg=
=lR39
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author