home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / xdme_1.84_src.lha / XDME / include / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-22  |  2.1 KB  |  95 lines

  1.  
  2. /*
  3.  * DEFS.H
  4.  *
  5.  *    (C)Copyright 1987 by Matthew Dillon, All Rights Reserved
  6.  *
  7.  *    ARexx support added 03/19/88  -  Kim DeVaughn
  8.  *
  9.  */
  10.  
  11. #ifndef DEFS_H
  12. #define DEFS_H
  13.  
  14. #undef PATCH_RXVARS
  15.  
  16. #include "all.h"
  17. #include "null.h"
  18.  
  19. /* added for keys */
  20. #ifndef NOT_DEF
  21. #   include "keyhashes.h"
  22. #else
  23. #   define currenthash()
  24. #   define init_kb()
  25. #   define exit_kb()
  26. #endif
  27.  
  28. /* added for menus */
  29. #ifndef NOT_DEF
  30. #   include "menubase.h"
  31. #else
  32. #   define currentmenu()
  33. #   define do_itemadd do_menuadd
  34. #   define do_delitem do_menudel
  35. #endif
  36.  
  37. #ifndef VBASE
  38. #   define VBASE void*
  39. #endif
  40.  
  41. #ifndef MACRO
  42. #   define MACRO void
  43. #endif
  44.  
  45. /* Added so ActualBlock is const everywhere except block.c */
  46. #ifndef BLOCK_C
  47. #   define NOT_BLOCK_C_CONST const
  48. #else
  49. #   define NOT_BLOCK_C_CONST
  50. #endif
  51.  
  52. /* do this after all types have been defined */
  53. #undef    DEFUSERCMD
  54. #undef    DEFPROTO
  55. #define DEFUSERCMD(str,nargs,flags,ret,func,param,ext)  extern ret func param;
  56. #define DEFPROTO(ret,func,param)                        extern ret fund param;
  57. #include "commands.h"
  58. #include "prog-protos.h"
  59. #undef DEFUSERCMD
  60. #undef DEFPROTO
  61. #define DEFUSERCMD(str,nargs,flags,ret,func,param,ext)  ret func param ext
  62. #define DEFPROTO(ret,func,param)                        ret fund param
  63.  
  64. /* asm */
  65. BOOL WildCmp (const char *, const char *);
  66.  
  67. /* Macros are faster than Functions */
  68. #define alloclptr(lines)    AllocMem ((lines)*sizeof(LINE), 0)
  69. #define allocb(bytes)       AllocMem ((bytes), 0)
  70. #define allocl(lwords)      AllocMem ((lwords)<<2, 0)
  71. #define bmovl(s,d,n)        movmem ((s), (d), (n) << 2)
  72.  
  73. #define GETLINE(ed,nr)      ((ed)->list[(nr)])
  74. #define SETLINE(ed,nr,ptr)  (ed)->list[(nr)] = (ptr)
  75. #define LENGTH(line)        (strlen((char *)(line)))
  76. #define CONTENTS(line)      ((char *)(line))
  77. #define GETTEXT(ed,nr)      (CONTENTS(GETLINE((ed),(nr))))
  78.  
  79.  
  80. #define assert(exp)         if (!(exp)) printf ("%s %d\n", __FILE__, __LINE__), exiterr ("assert failed")
  81.  
  82. #define  PATHSIZE    256    /* HD added for Requesters */
  83.  
  84. #define SCROLL_LEFT    0
  85. #define SCROLL_RIGHT    1
  86.  
  87. #endif /* DEFS_H */
  88.  
  89. /*#ifdef MALLOC_DEBUG
  90. #include "malloc.h"
  91. #endif*/
  92.  
  93. extern struct List *pDBase;
  94. #define DBase      (*pDBase)
  95.