home *** CD-ROM | disk | FTP | other *** search
/ ftp.uni-stuttgart.de/pub/systems/acorn/ / Acorn.tar / Acorn / acornet / dev / c / debug / mnemosyn.spk / !Mnemosyne / rcs / h / mnemconf next >
Text File  |  1991-04-24  |  7KB  |  287 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    gtoal:1.3;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.3
  10. date     91.04.17.18.37.15;  author gtoal;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     91.04.02.12.51.32;  author gtoal;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     91.04.02.12.31.27;  author gtoal;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @Internal header file for Mnemosyne
  27. (including porting assistance for RISC OS & DOS)
  28. @
  29.  
  30.  
  31. 1.3
  32. log
  33. @Tidied up alignment
  34. @
  35. text
  36. @/************************************************************************
  37.  *                                                                      *
  38.  *                      Copyright (c) 1985 by                           *
  39.  *              Digital Equipment Corporation, Maynard, MA              *
  40.  *                      All rights reserved.                            *
  41.  *                                                                      *
  42.  *   The information in this software is subject to change  without     *
  43.  *   notice  and should not be construed as a commitment by Digital     *
  44.  *   Equipment Corporation.                                             *
  45.  *                                                                      *
  46.  *   Digital assumes no responsibility for the use  or  reliability     *
  47.  *   of its software on equipment which is not supplied by Digital.     *
  48.  *                                                                      *
  49.  *   Redistribution and use in source and binary forms are permitted    *
  50.  *   provided that the above copyright notice and this paragraph are    *
  51.  *   duplicated in all such forms and that any documentation,           *
  52.  *   advertising materials, and other materials related to such         *
  53.  *   distribution and use acknowledge that the software was developed   *
  54.  *   by Digital Equipment Corporation. The name of Digital Equipment    *
  55.  *   Corporation may not be used to endorse or promote products derived *
  56.  *   from this software without specific prior written permission.      *
  57.  *   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR     *
  58.  *   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED     *
  59.  *   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.*
  60.  *   Do not take internally. In case of accidental ingestion, contact   *
  61.  *   your physician immediately.                                        *
  62.  *                                                                      *
  63.  ************************************************************************/
  64.  
  65. #ifndef _INCL_MNEMCONF_H
  66.  
  67. /*
  68. $Header: RCS.h.mnemconf 1.2 91/04/02 12:51:32 gtoal Exp Locker: gtoal $
  69. */
  70.  
  71. /*
  72. site specific and shared internal data structures used by mnemosyne.
  73. the only data structure that may need to be shared is the struct ptr,
  74. which is defined herein.
  75.  
  76.         Marcus J. Ranum, 1990. (mjr@@decuac.dec.com)
  77. */
  78.  
  79.  
  80.  
  81. /* size of internal hash tables - don't go wild - this is slow anyhow */
  82. #define HASHSIZ         127
  83.  
  84.  
  85. /* names of files to write */
  86. #define LINESFILE       "mnem.syms"
  87. #define PTRFILE         "mnem.dat"
  88.  
  89. #if defined(__MSDOS__) && !defined(MSDOS)
  90. #define MSDOS 1
  91. #endif
  92.  
  93. #ifdef MSDOS
  94. #define SYS_MSDOS 1
  95. #endif
  96.  
  97. #ifdef __ZTC__
  98. #define SYS_MSDOS 1
  99. #endif
  100.  
  101.  
  102. #if defined(SYS_MSDOS)
  103. #undef LINESFILE
  104. #define LINESFILE "mnem.sym"
  105. #endif
  106.  
  107.  
  108. #if defined(__STDC__) || defined(__cplusplus)
  109. #define MALLOC_IS_VOIDSTAR
  110. #endif
  111.  
  112. #ifdef __riscos
  113. #undef  LINESFILE
  114. #undef  PTRFILE
  115. #define LINESFILE       "mnem-syms"
  116. #define PTRFILE         "mnem-dat"
  117. #endif
  118.  
  119.  
  120. /* if your machine has malloc and all declared as a (void *) not a (char *) */
  121. #ifdef  MALLOC_IS_VOIDSTAR
  122. #define mall_t void *
  123. #else
  124. #define mall_t char *
  125. #endif
  126.  
  127. #if defined(__STDC__) || defined(__cplusplus)
  128. #include <stdlib.h>
  129. #else
  130. extern  mall_t  malloc();
  131. extern  mall_t  realloc();
  132. extern  mall_t  calloc();
  133. extern  void    free();
  134. extern  void    exit();
  135. #endif
  136.  
  137.  
  138. /*
  139. storage for a pointer map entry - the only data structure we share
  140. a whole mess of these get written to mnem.dat as calls to malloc and
  141. whatnot are made. the distinction between an *allocated* pointer and
  142. and unallocated one is that 'siz' is 0 in freed ptrs. this is used
  143. by the post-processor to look for memory leaks.
  144. */
  145. struct  s_ptr     {
  146.         mall_t          ptr;    /* pointer to allocated memory */
  147.         int             map;    /* this pointer's map # */
  148. #ifdef TOMBSTONES
  149.         int             warned; /* MUST MUST MUST squeeze this into a bit in the field above */
  150. #endif
  151.         struct  s_ptr  *next;
  152.  
  153.         /* only part that gets written to the disk */
  154.         struct  {
  155.                 unsigned        siz;    /* size allocated (or 0) */
  156.                 int             smap;   /* symbol map # */
  157.         } dsk;
  158. };
  159.  
  160. #define _INCL_MNEMCONF_H
  161. #endif
  162. @
  163.  
  164.  
  165. 1.2
  166. log
  167. @Expanded tabs in source to make it easier to edit
  168. on the Arch
  169. @
  170. text
  171. @d33 1
  172. a33 1
  173. $Header: rcs.h.MNEMCONF 1.1 91/04/02 12:31:27 gtoal Exp Locker: gtoal $
  174. d54 14
  175. a67 1
  176. #if defined(MSDOS) || defined(__ZTC__)
  177. d73 1
  178. a73 1
  179. #ifdef __arm
  180. d75 3
  181. d87 1
  182. a87 1
  183. typedef void    *mall_t;
  184. d89 1
  185. a89 1
  186. typedef char    *mall_t;
  187. d92 1
  188. d94 1
  189. a94 1
  190. #ifdef NEVER
  191. d99 1
  192. d110 1
  193. a110 1
  194. struct  ptr     {
  195. d113 4
  196. a116 1
  197.         struct  ptr     *next;
  198. @
  199.  
  200.  
  201. 1.1
  202. log
  203. @Initial revision
  204. @
  205. text
  206. @d2 22
  207. a23 22
  208.  *                                    *
  209.  *            Copyright (c) 1985 by                *
  210.  *        Digital Equipment Corporation, Maynard, MA        *
  211.  *            All rights reserved.                *
  212.  *                                    *
  213.  *   The information in this software is subject to change  without    *
  214.  *   notice  and should not be construed as a commitment by Digital    *
  215.  *   Equipment Corporation.                        *
  216.  *                                    *
  217.  *   Digital assumes no responsibility for the use  or  reliability    *
  218.  *   of its software on equipment which is not supplied by Digital.    *
  219.  *                                    *
  220.  *   Redistribution and use in source and binary forms are permitted    *
  221.  *   provided that the above copyright notice and this paragraph are    *
  222.  *   duplicated in all such forms and that any documentation,        *
  223.  *   advertising materials, and other materials related to such        *
  224.  *   distribution and use acknowledge that the software was developed    *
  225.  *   by Digital Equipment Corporation. The name of Digital Equipment    *
  226.  *   Corporation may not be used to endorse or promote products derived    *
  227.  *   from this software without specific prior written permission.    *
  228.  *   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR    *
  229.  *   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED    *
  230. d25 3
  231. a27 3
  232.  *   Do not take internally. In case of accidental ingestion, contact    *
  233.  *   your physician immediately.                    *
  234.  *                                    *
  235. d30 1
  236. a30 1
  237. #ifndef    _INCL_MNEMCONF_H
  238. d33 1
  239. a33 1
  240. $Header: mnemconf.h 1.1 90/12/25 mjr Rel $
  241. d41 1
  242. a41 1
  243.     Marcus J. Ranum, 1990. (mjr@@decuac.dec.com)
  244. d47 1
  245. a47 1
  246. #define    HASHSIZ        127
  247. d51 2
  248. a52 2
  249. #define    LINESFILE    "mnem.syms"
  250. #define    PTRFILE        "mnem.dat"
  251. d62 4
  252. a65 4
  253. #undef    LINESFILE
  254. #undef    PTRFILE
  255. #define    LINESFILE    "mnem-syms"
  256. #define    PTRFILE        "mnem-dat"
  257. d70 2
  258. a71 2
  259. #ifdef    MALLOC_IS_VOIDSTAR
  260. typedef    void    *mall_t;
  261. d73 1
  262. a73 1
  263. typedef    char    *mall_t;
  264. d78 4
  265. a81 4
  266. extern    mall_t    malloc();
  267. extern    mall_t    realloc();
  268. extern    mall_t    calloc();
  269. extern    void    free();
  270. d92 4
  271. a95 4
  272. struct    ptr    {
  273.     mall_t        ptr;    /* pointer to allocated memory */
  274.     int        map;    /* this pointer's map # */
  275.     struct    ptr    *next;
  276. d97 5
  277. a101 5
  278.     /* only part that gets written to the disk */
  279.     struct    {
  280.         unsigned    siz;    /* size allocated (or 0) */
  281.         int        smap;    /* symbol map # */
  282.     } dsk;
  283. d104 1
  284. a104 1
  285. #define    _INCL_MNEMCONF_H
  286. @
  287.