home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / GNU_ATP_1_40.lzh / EDITLINE / editline.h < prev    next >
Text File  |  1993-05-01  |  3KB  |  143 lines

  1. /*  $Revision: 1.3 $
  2. **
  3. **  Internal header file for editline library.
  4. */
  5. #include <stdio.h>
  6. #if    defined(HAVE_STDLIB)
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #endif    /* defined(HAVE_STDLIB) */
  10.  
  11. #ifdef MSDOS
  12. #ifndef __MSDOS__
  13. #define __MSDOS__
  14. #endif
  15. #endif
  16.  
  17. #ifdef DJD
  18. #ifndef __MSDOS__
  19. #define __MSDOS__
  20. #endif
  21. #endif
  22.  
  23. #ifdef __MSDOS__
  24. #ifndef DJD
  25. #include "dos.h"
  26. #endif
  27. #define SEPST "\\"
  28. #define SEPCH '\\'
  29. #endif
  30.  
  31. #if    defined(SYS_UNIX)
  32. #include "unix.h"
  33. #ifndef DJD
  34. #define SEPST "/"
  35. #define SEPCH '/'
  36. #endif
  37. #endif    /* defined(SYS_UNIX) */
  38.  
  39. #if    defined(SYS_OS9)
  40. #include "os9.h"
  41. #endif    /* defined(SYS_OS9) */
  42.  
  43. #if    !defined(SIZE_T)
  44. #define SIZE_T    unsigned int
  45. #endif    /* !defined(SIZE_T) */
  46.  
  47. typedef unsigned char    CHAR; 
  48. typedef int UNSI;
  49. #if    defined(HIDE)
  50. #define STATIC    static
  51. #else
  52. #define STATIC    /* NULL */
  53. #endif    /* !defined(HIDE) */
  54.  
  55. #if    !defined(CONST)
  56. #if    defined(__STDC__)
  57. #define CONST    const
  58. #else
  59. #define CONST
  60. #endif    /* defined(__STDC__) */
  61. #endif    /* !defined(CONST) */
  62.  
  63.  
  64. #define MEM_INC        64
  65. #define SCREEN_INC    256
  66.  
  67. #define DISPOSE(p)    free((char *)(p))
  68. #define NEW(T, c) ((T *)malloc((unsigned int)(sizeof (T) * (c))))
  69. #define RENEW(p, T, c) (p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c))))
  70. #define COPYFROMTO(new, p, len) (void)memcpy((char *)(new), (char *)(p), (int)(len))
  71.  
  72. /* ms_dos key codes 
  73. #define KLT 0x4b
  74. #define KRT 0x4d
  75. #define KUP 0x48
  76. #define KDN 0x50
  77. #define KHM 0x47
  78. #define KPU 0x49
  79. #define KPD 0x51
  80. #define KEN 0x4f
  81. #define KIN 0x52
  82. #define KDL 0x53
  83. #define KCE 0x4c
  84. #define KF1 0x3b
  85. #define KF2 0x3c
  86. #define KF3 0x3d
  87. #define KF4 0x3e
  88. */
  89.  
  90. /* ansi */
  91.  
  92. #define ESC 0x1b
  93. #define KLT 'D' /* left */
  94. #define KRT 'C' /* right */
  95. #define KUP 'A' /* up */
  96. #define KDN 'B' /* down */
  97. #define KCE 'G' /* center */
  98. #define KHM 'H' /* home */
  99. #define KPU '5' /* page up */
  100. #define KPD '6' /* page down */
  101. #define KEN 'Y' /* end */
  102. #define KIN '2' /* insert */
  103. #define KDL '3' /* delete */
  104. #define KF1 'P' /* f1 */
  105. #define KF2 'Q' /* f2 */
  106. #define KF3 'R' /* f3 */
  107. #define KF4 'S' /* f4 */
  108. #define KF5 'T' /* f5 */
  109. #define KF6 'U' /* f6 */
  110. #define KF7 'V' /* f7 */
  111. #define KF8 'W' /* f8 */
  112. #define KF9 'X' /* f9 */
  113. #define KF0 'O' /* f10 */
  114.  
  115.  
  116. /*
  117. **  Variables and routines internal to this package.
  118. */
  119. extern int    rl_eof;
  120. extern int    rl_erase;
  121. extern int    rl_intr;
  122. extern int    rl_kill;
  123. extern int    rl_quit;
  124. extern char    *rl_complete();
  125. extern int    rl_list_possib();
  126. extern void    rl_ttyset();
  127. extern void    rl_add_slash();
  128.  
  129. #if    !defined(HAVE_STDLIB)
  130. extern char    *getenv();
  131. extern char    *malloc();
  132. extern char    *realloc();
  133. extern char    *memcpy();
  134. extern char    *strcat();
  135. extern char    *strchr();
  136. extern char    *strrchr();
  137. extern char    *strcpy();
  138. extern char    *strdup();
  139. extern int    strcmp();
  140. extern int    strlen();
  141. extern int    strncmp();
  142. #endif    /* !defined(HAVE_STDLIB) */
  143.