diff options
| author | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-03-28 12:14:02 -0300 |
|---|---|---|
| committer | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-03-28 12:14:02 -0300 |
| commit | 3577eb6f136bf2b394c2ce839fc098da5faa9fd5 (patch) | |
| tree | b9a60ccf33e4da721dbad5f24a7d4701fc4af49b | |
| parent | 7f3d01c200df33b67d1f4b0198adae7ea7af8e10 (diff) | |
| download | lua-3577eb6f136bf2b394c2ce839fc098da5faa9fd5.tar.gz lua-3577eb6f136bf2b394c2ce839fc098da5faa9fd5.tar.bz2 lua-3577eb6f136bf2b394c2ce839fc098da5faa9fd5.zip | |
Acrescentar o include do gerenciador de memoria "mm".
| -rw-r--r-- | hash.c | 4 | ||||
| -rw-r--r-- | iolib.c | 4 | ||||
| -rw-r--r-- | mm.h | 39 | ||||
| -rw-r--r-- | opcode.c | 4 | ||||
| -rw-r--r-- | strlib.c | 4 |
5 files changed, 51 insertions, 4 deletions
| @@ -4,11 +4,13 @@ | |||
| 4 | ** Luiz Henrique de Figueiredo - 17 Aug 90 | 4 | ** Luiz Henrique de Figueiredo - 17 Aug 90 |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | char *rcs_hash="$Id: $"; | 7 | char *rcs_hash="$Id: hash.c,v 1.1 1993/12/17 18:41:19 celes Exp celes $"; |
| 8 | 8 | ||
| 9 | #include <string.h> | 9 | #include <string.h> |
| 10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
| 11 | 11 | ||
| 12 | #include "mm.h" | ||
| 13 | |||
| 12 | #include "opcode.h" | 14 | #include "opcode.h" |
| 13 | #include "hash.h" | 15 | #include "hash.h" |
| 14 | #include "inout.h" | 16 | #include "inout.h" |
| @@ -3,7 +3,7 @@ | |||
| 3 | ** Input/output library to LUA | 3 | ** Input/output library to LUA |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_iolib="$Id: iolib.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $"; | 6 | char *rcs_iolib="$Id: iolib.c,v 1.2 1993/12/30 14:52:18 roberto Exp celes $"; |
| 7 | 7 | ||
| 8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
| 9 | #include <string.h> | 9 | #include <string.h> |
| @@ -14,6 +14,8 @@ char *rcs_iolib="$Id: iolib.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $"; | |||
| 14 | #include <floatingpoint.h> | 14 | #include <floatingpoint.h> |
| 15 | #endif | 15 | #endif |
| 16 | 16 | ||
| 17 | #include "mm.h" | ||
| 18 | |||
| 17 | #include "lua.h" | 19 | #include "lua.h" |
| 18 | 20 | ||
| 19 | static FILE *in=stdin, *out=stdout; | 21 | static FILE *in=stdin, *out=stdout; |
| @@ -0,0 +1,39 @@ | |||
| 1 | /* | ||
| 2 | ** mm.h | ||
| 3 | ** Waldemar Celes Filho | ||
| 4 | ** Sep 16, 1992 | ||
| 5 | */ | ||
| 6 | |||
| 7 | |||
| 8 | #ifndef mm_h | ||
| 9 | #define mm_h | ||
| 10 | |||
| 11 | #include <stdlib.h> | ||
| 12 | |||
| 13 | #ifdef _MM_ | ||
| 14 | |||
| 15 | /* switch off the debugger functions */ | ||
| 16 | #define malloc(s) MmMalloc(s,__FILE__,__LINE__) | ||
| 17 | #define calloc(n,s) MmCalloc(n,s,__FILE__,__LINE__) | ||
| 18 | #define realloc(a,s) MmRealloc(a,s,__FILE__,__LINE__,#a) | ||
| 19 | #define free(a) MmFree(a,__FILE__,__LINE__,#a) | ||
| 20 | #define strdup(s) MmStrdup(s,__FILE__,__LINE__) | ||
| 21 | #endif | ||
| 22 | |||
| 23 | typedef void (*Ferror) (char *); | ||
| 24 | |||
| 25 | /* Exported functions */ | ||
| 26 | void MmInit (Ferror f, Ferror w); | ||
| 27 | void *MmMalloc (unsigned size, char *file, int line); | ||
| 28 | void *MmCalloc (unsigned n, unsigned size, char *file, int line); | ||
| 29 | void MmFree (void *a, char *file, int line, char *var); | ||
| 30 | void *MmRealloc (void *old, unsigned size, char *file, int line, char *var); | ||
| 31 | char *MmStrdup (char *s, char *file, int line); | ||
| 32 | unsigned MmGetBytes (void); | ||
| 33 | void MmListAllocated (void); | ||
| 34 | void MmCheck (void); | ||
| 35 | void MmStatistics (void); | ||
| 36 | |||
| 37 | |||
| 38 | #endif | ||
| 39 | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 1.2 1994/02/13 20:36:51 roberto Exp celes $"; |
| 7 | 7 | ||
| 8 | #include <stdio.h> | 8 | #include <stdio.h> |
| 9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| @@ -12,6 +12,8 @@ char *rcs_opcode="$Id: opcode.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $"; | |||
| 12 | #include <floatingpoint.h> | 12 | #include <floatingpoint.h> |
| 13 | #endif | 13 | #endif |
| 14 | 14 | ||
| 15 | #include "mm.h" | ||
| 16 | |||
| 15 | #include "opcode.h" | 17 | #include "opcode.h" |
| 16 | #include "hash.h" | 18 | #include "hash.h" |
| 17 | #include "inout.h" | 19 | #include "inout.h" |
| @@ -3,12 +3,14 @@ | |||
| 3 | ** String library to LUA | 3 | ** String library to LUA |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_strlib="$Id: $"; | 6 | char *rcs_strlib="$Id: strlib.c,v 1.1 1993/12/17 18:41:19 celes Exp celes $"; |
| 7 | 7 | ||
| 8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
| 9 | #include <string.h> | 9 | #include <string.h> |
| 10 | #include <ctype.h> | 10 | #include <ctype.h> |
| 11 | 11 | ||
| 12 | #include "mm.h" | ||
| 13 | |||
| 12 | 14 | ||
| 13 | #include "lua.h" | 15 | #include "lua.h" |
| 14 | 16 | ||
