home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume44 / vim / part05 < prev    next >
Encoding:
Internet Message Format  |  1994-08-16  |  69.3 KB

  1. From: mool@oce.nl (Bram Moolenaar)
  2. Newsgroups: comp.sources.misc
  3. Subject: v44i024:  vim - Vi IMproved editor, v3.0, Part05/26
  4. Date: 16 Aug 1994 21:17:39 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <32rs03$kbk@sparky.sterling.com>
  9. X-Md4-Signature: 775b8a767f55e134633341b60d70d2f6
  10.  
  11. Submitted-by: mool@oce.nl (Bram Moolenaar)
  12. Posting-number: Volume 44, Issue 24
  13. Archive-name: vim/part05
  14. Environment: UNIX, AMIGA, MS-DOS, Windows NT
  15. Supersedes: vim: Volume 41, Issue 50-75
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  vim/src/arpbase.h vim/src/term.h vim/tools/ref
  22. # Wrapped by kent@sparky on Mon Aug 15 21:44:00 1994
  23. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 5 (of 26)."'
  26. if test -f 'vim/src/arpbase.h' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'vim/src/arpbase.h'\"
  28. else
  29.   echo shar: Extracting \"'vim/src/arpbase.h'\" \(49919 characters\)
  30.   sed "s/^X//" >'vim/src/arpbase.h' <<'END_OF_FILE'
  31. X#ifndef    LIBRARIES_ARPBASE_H
  32. X#define    LIBRARIES_ARPBASE_H 1
  33. X
  34. X/*
  35. X ************************************************************************
  36. X *                                    *
  37. X * 5/3/89    ARPbase.h    by MKSoft from ARPbase.i by SDB        *
  38. X *                                    *
  39. X ************************************************************************
  40. X *                                    *
  41. X *    AmigaDOS Resource Project -- Library Include File        *
  42. X *                     for Lattice C 5.x or Manx C 5.x    *
  43. X *                                    *
  44. X ************************************************************************
  45. X *                                    *
  46. X *    Copyright (c) 1987/1988/1989 by Scott Ballantyne        *
  47. X *                                    *
  48. X *    The arp.library, and related code and files may be freely used    *
  49. X *    by supporters of ARP.  Modules in the arp.library may not be    *
  50. X *    extracted for use in independent code, but you are welcome to    *
  51. X *    provide the arp.library with your work and call on it freely.    *
  52. X *                                    *
  53. X *    You are equally welcome to add new functions, improve the ones    *
  54. X *    within, or suggest additions.                    *
  55. X *                                    *
  56. X *    BCPL programs are not welcome to call on the arp.library.    *
  57. X *    The welcome mat is out to all others.                *
  58. X *                                    *
  59. X ************************************************************************
  60. X *                                    *
  61. X * N O T E !  You MUST! have IoErr() defined as LONG to use LastTracker *
  62. X *          If your compiler has other defines for this, you may wish *
  63. X *          to remove the prototype for IoErr() from this file.    *
  64. X *                                    *
  65. X ************************************************************************
  66. X */
  67. X
  68. X/*
  69. X ************************************************************************
  70. X *    First we need to include the Amiga Standard Include files...    *
  71. X ************************************************************************
  72. X */
  73. X#ifndef    EXEC_TYPES_H
  74. X#include <exec/types.h>
  75. X#endif    /* EXEC_TYPES_H */
  76. X
  77. X#ifndef    EXEC_LISTS_H
  78. X#include <exec/lists.h>
  79. X#endif    /* EXEC_LISTS_H */
  80. X
  81. X#ifndef    EXEC_ALERTS_H
  82. X#include <exec/alerts.h>
  83. X#endif    /* EXEC_ALERTS_H */
  84. X
  85. X#ifndef    EXEC_LIBRARIES_H
  86. X#include <exec/libraries.h>
  87. X#endif    /* EXEC_LIBRARIES_H */
  88. X
  89. X#ifndef    EXEC_SEMAPHORES_H
  90. X#include <exec/semaphores.h>
  91. X#endif    /* EXEC_SEMAPHORES_H */
  92. X
  93. X#ifndef    LIBRARIES_DOS_H
  94. X#include <libraries/dosextens.h>
  95. X#endif    /* LIBRARIES_DOS_H */
  96. X
  97. X/*
  98. X ************************************************************************
  99. X *    Check for MANX/Lattice and define the differences...        *
  100. X ************************************************************************
  101. X *    At the moment MANX 3.6 does not have prototypes or the        *
  102. X *    wonderful #pragma statements of Lattice 5.0...            *
  103. X *    And, no __stdargs in MANX either...                *
  104. X ************************************************************************
  105. X */
  106. X#ifdef    AZTEC_C
  107. X
  108. X    /* Do we have an old 3.6a compiler? -olsen */
  109. X
  110. X#ifndef __VERSION
  111. X#define __VERSION 360
  112. X#endif    /* __VERSION */
  113. X
  114. X    /* If this is an old compiler, don't confuse it with
  115. X     * ANSI prototypes and pragmas. -olsen
  116. X     */
  117. X
  118. X#if __VERSION < 500
  119. X#define    NO_PRAGMAS    1
  120. X#define NO_PROTOTYPES    1
  121. X#endif    /* __VERSION */
  122. X
  123. X#define    C_Args
  124. X
  125. X#endif    /* AZTEC_C */
  126. X
  127. X#ifdef    LATTICE
  128. X
  129. X#define    C_Args    __stdargs
  130. X
  131. X#endif    /* LATTICE */
  132. X
  133. X/*
  134. X ************************************************************************
  135. X *    Standard definitions for arp library information        *
  136. X ************************************************************************
  137. X */
  138. X#define    ArpName        "arp.library"    /* Name of library... */
  139. X#define    ArpVersion    39L        /* Current version... */
  140. X
  141. X/*
  142. X ************************************************************************
  143. X *    The current ARP library node...                    *
  144. X ************************************************************************
  145. X */
  146. Xstruct    ArpBase    {
  147. X    struct    Library            LibNode;     /* Standard library node        */
  148. X        APTR            DosRootNode;     /* Copy of dl_Root            */
  149. X        UBYTE            Flags;         /* See bitdefs below            */
  150. X        UBYTE            ESCChar;      /* Character to be used for escaping    */
  151. X        LONG            ArpReserved1;     /* ArpLib's use only!!            */
  152. X    struct    Library            *EnvBase;      /* Dummy library for MANX compatibility*/
  153. X    struct    Library            *DosBase;      /* Cached DosBase            */
  154. X    struct    Library            *GfxBase;      /* Cached GfxBase            */
  155. X    struct    Library            *IntuiBase;     /* Cached IntuitionBase        */
  156. X    struct    MinList            ResLists;     /* Resource trackers            */
  157. X    struct    ResidentProgramNode    *ResidentPrgList;/* Resident Programs.            */
  158. X    struct    SignalSemaphore        ResPrgProtection;/* protection for above        */
  159. X        BPTR            SegList;      /* Pointer to loaded libcode (a BPTR).    */
  160. X        };
  161. X
  162. X/*
  163. X ************************************************************************
  164. X *    The following is here *ONLY* for information and for        *
  165. X *    compatibility with MANX.  DO NOT use in new code!        *
  166. X ************************************************************************
  167. X */
  168. X#ifdef    ARP_PRIVATE
  169. Xstruct EnvBase {
  170. X    struct    Library    LibNode;    /* Standard library node for linkage    */
  171. X        BYTE    *EnvSpace;    /* Access only when Forbidden!        */
  172. X        ULONG    EnvSize;    /* Total allocated mem for EnvSpace    */
  173. X    struct    ArpBase    *ArpBase;    /* Added in V32 for Resource Tracking    */
  174. X        };
  175. X#endif    /* ARP_PRIVATE */
  176. X
  177. X/*
  178. X ************************************************************************
  179. X *    These are used in release 33.4 but not by the library code.    *
  180. X *    Instead, individual programs check for these flags.        *
  181. X ************************************************************************
  182. X */
  183. X#define    ARPB_WILD_WORLD 0L        ; Mixed BCPL/Normal wildcards.
  184. X#define    ARPB_WILD_BCPL  1L        ; Pure BCPL wildcards.
  185. X
  186. X#define    ARPF_WILD_WORLD (1L << ARPB_WILD_WORLD)
  187. X#define    ARPF_WILD_BCPL  (1L << ARPB_WILD_BCPL)
  188. X
  189. X/*
  190. X ************************************************************************
  191. X * The alert object is what you use if you really must return an alert    *
  192. X * to the user. You would normally OR this with another alert number    *
  193. X * from the alerts.h file. Generally, should be NON deadend alerts.    *
  194. X *                                    *
  195. X * For example, if you can't open ArpLibrary:                *
  196. X *    Alert( (AG_OpenLib|AO_ArpLib), 0L);                *
  197. X ************************************************************************
  198. X */
  199. X#define    AO_ArpLib    0x00008036L        /* Alert object */
  200. X
  201. X/*
  202. X ************************************************************************
  203. X *    Alerts that arp.library may return...                *
  204. X ************************************************************************
  205. X */
  206. X#define    AN_ArpLib    0x03600000L    /* Alert number                */
  207. X#define    AN_ArpNoMem    0x03610000L    /* No more memory            */
  208. X#define    AN_ArpInputMem    0x03610002L    /* No memory for input buffer        */
  209. X#define    AN_ArpNoMakeEnv    0x83610003L    /* No memory to make EnvLib        */
  210. X
  211. X#define    AN_ArpNoDOS    0x83630001L    /* Can't open dos.library        */
  212. X#define    AN_ArpNoGfx    0x83630002L    /* Can't open graphics.library        */
  213. X#define    AN_ArpNoIntuit    0x83630003L    /* Can't open intuition            */
  214. X#define    AN_BadPackBlues    0x83640000L    /* Bad packet returned to SendPacket()    */
  215. X#define    AN_Zombie    0x83600003L    /* Zombie roaming around system        */
  216. X
  217. X#define    AN_ArpScattered    0x83600002L    /* Scatter loading not allowed for arp    */
  218. X
  219. X
  220. X/*
  221. X ************************************************************************
  222. X *    Return codes you can get from calling ARP Assign()...        *
  223. X ************************************************************************
  224. X */
  225. X#define    ASSIGN_OK    0L    /* Everything is cool and groovey            */
  226. X#define    ASSIGN_NODEV    1L    /* "Physical" is not valid for assignment        */
  227. X#define    ASSIGN_FATAL    2L    /* Something really icky happened            */
  228. X#define    ASSIGN_CANCEL    3L    /* Tried to cancel something but it won't cancel    */
  229. X
  230. X/*
  231. X ************************************************************************
  232. X *    Size of buffer you need if you are going to call ReadLine()    *
  233. X ************************************************************************
  234. X */
  235. X#define    MaxInputBuf    256L
  236. X
  237. X/*
  238. X ************************************************************************
  239. X *    The ARP file requester data structure...            *
  240. X ************************************************************************
  241. X */
  242. X
  243. X    /* This whole part has to be skipped if libraries/asl.h is
  244. X     * pulled in before arpbase.h is included (which is the recommended
  245. X     * sequence). -olsen
  246. X     */
  247. X
  248. X#ifndef LIBRARIES_ASL_H
  249. X#define LIBRARIES_ASL_H 1    /* mool: don't use libraries/asl.h */
  250. X
  251. X    /* You know req.library? -olsen */
  252. X
  253. X#ifndef REQLIBRARY_H    
  254. X
  255. Xstruct FileRequester    {
  256. X            BYTE    *fr_Hail;        /* Hailing text            */
  257. X            BYTE    *fr_File;        /* Filename array (FCHARS + 1)    */
  258. X            BYTE    *fr_Dir;        /* Directory array (DSIZE + 1)    */
  259. X        struct    Window    *fr_Window;        /* Window requesting or NULL    */
  260. X            UBYTE    fr_FuncFlags;        /* Set bitdef's below        */
  261. X            UBYTE    fr_Flags2;        /* New flags...            */
  262. X            VOID    (*fr_Function)();    /* Your function, see bitdef's    */
  263. X            WORD    fr_LeftEdge;        /* To be used later...        */
  264. X            WORD    fr_TopEdge;
  265. X            };
  266. X
  267. X#endif    /* REQLIBRARY_H */
  268. X
  269. X/*
  270. X ************************************************************************
  271. X * The following are the defines for fr_FuncFlags.  These bits tell    *
  272. X * FileRequest() what your fr_UserFunc is expecting, and what        *
  273. X * FileRequest() should call it for.                    *
  274. X *                                    *
  275. X * You are called like so:                        *
  276. X * fr_Function(Mask, Object)                        *
  277. X * ULONG    Mask;                            *
  278. X * CPTR        *Object;                        *
  279. X *                                    *
  280. X * The Mask is a copy of the flag value that caused FileRequest() to    *
  281. X * call your function. You can use this to determine what action you    *
  282. X * need to perform, and exactly what Object is, so you know what to do    *
  283. X * and what to return.                            *
  284. X ************************************************************************
  285. X */
  286. X#define    FRB_DoWildFunc    7L /* Call me with a FIB and a name, ZERO return accepts.    */
  287. X#define    FRB_DoMsgFunc    6L /* You get all IDCMP messages not for FileRequest()        */
  288. X#define    FRB_DoColor    5L /* Set this bit for that new and different look        */
  289. X#define    FRB_NewIDCMP    4L /* Force a new IDCMP (only if fr_Window != NULL)        */
  290. X#define    FRB_NewWindFunc    3L /* You get to modify the newwindow structure.        */
  291. X#define    FRB_AddGadFunc    2L /* You get to add gadgets.                    */
  292. X#define    FRB_GEventFunc    1L /* Function to call if one of your gadgets is selected.    */
  293. X#define    FRB_ListFunc    0L /* Not implemented yet.                    */
  294. X
  295. X#define    FRF_DoWildFunc    (1L << FRB_DoWildFunc)
  296. X#define    FRF_DoMsgFunc    (1L << FRB_DoMsgFunc)
  297. X#define    FRF_DoColor    (1L << FRB_DoColor)
  298. X#define    FRF_NewIDCMP    (1L << FRB_NewIDCMP)
  299. X#define    FRF_NewWindFunc    (1L << FRB_NewWindFunc)
  300. X#define    FRF_AddGadFunc    (1L << FRB_AddGadFunc)
  301. X#define    FRF_GEventFunc    (1L << FRB_GEventFunc)
  302. X#define    FRF_ListFunc    (1L << FRB_ListFunc)
  303. X
  304. X/*
  305. X ************************************************************************
  306. X * The FR2B_ bits are for fr_Flags2 in the file requester structure    *
  307. X ************************************************************************
  308. X */
  309. X#define    FR2B_LongPath    0L /* Specify the fr_Dir buffer is 256 bytes long */
  310. X
  311. X#define    FR2F_LongPath    (1L << FR2B_LongPath)
  312. X
  313. X/*
  314. X ************************************************************************
  315. X *    The sizes of the different buffers...                *
  316. X ************************************************************************
  317. X */
  318. X#define    FCHARS        32L    /* Filename size                */
  319. X#define    DSIZE        33L    /* Directory name size if not FR2B_LongPath    */
  320. X
  321. X#define    LONG_DSIZE    254L    /* If FR2B_LongPath is set, use LONG_DSIZE    */
  322. X#define    LONG_FSIZE    126L    /* For compatibility with ARPbase.i        */
  323. X
  324. X#define    FR_FIRST_GADGET    0x7680L    /* User gadgetID's must be less than this value    */
  325. X
  326. X#endif    /* LIBRARIES_ASL_H */
  327. X
  328. X#ifndef DOS_DOSASL_H        /* mool: either this or dos/dosasl.h */
  329. X#define DOS_DOSASL_H
  330. X/*
  331. X ************************************************************************
  332. X * Structure expected by FindFirst()/FindNext()                *
  333. X *                                    *
  334. X * You need to allocate this structure and initialize it as follows:    *
  335. X *                                    *
  336. X * Set ap_BreakBits to the signal bits (CDEF) that you want to take a    *
  337. X * break on, or NULL, if you don't want to convenience the user.    *
  338. X *                                    *
  339. X * if you want to have the FULL PATH NAME of the files you found,    *
  340. X * allocate a buffer at the END of this structure, and put the size of    *
  341. X * it into ap_StrLen.  If you don't want the full path name, make sure    *
  342. X * you set ap_StrLen to zero.  In this case, the name of the file, and    *
  343. X * stats are available in the ap_Info, as per usual.            *
  344. X *                                    *
  345. X * Then call FindFirst() and then afterwards, FindNext() with this    *
  346. X * structure.  You should check the return value each time (see below)    *
  347. X * and take the appropriate action, ultimately calling            *
  348. X * FreeAnchorChain() when there are no more files and you are done.    *
  349. X * You can tell when you are done by checking for the normal AmigaDOS    *
  350. X * return code ERROR_NO_MORE_ENTRIES.                    *
  351. X *                                    *
  352. X * You will also have to check the DirEntryType variable in the ap_Info    *
  353. X * structure to determine what exactly you have received.        *
  354. X ************************************************************************
  355. X */
  356. Xstruct    AnchorPath    {
  357. X        struct    AChain        *ap_Base;    /* Pointer to first anchor            */
  358. X        struct    AChain        *ap_Last;    /* Pointer to last anchor            */
  359. X            LONG        ap_BreakBits;    /* Bits to break on                */
  360. X            LONG        ap_FoundBreak;    /* Bits we broke on. Also returns ERROR_BREAK    */
  361. X            BYTE        ap_Flags;    /* New use for the extra word...        */
  362. X            BYTE        ap_Reserved;    /* To fill it out...                */
  363. X            WORD        ap_StrLen;    /* This is what used to be ap_Length        */
  364. X        struct    FileInfoBlock    ap_Info;
  365. X            BYTE        ap_Buf[1];    /* Allocate a buffer here, if desired        */
  366. X            };
  367. X
  368. X#define ap_Length ap_StrLen
  369. X
  370. X/*
  371. X ************************************************************************
  372. X *    Bit definitions for the new ap_Flags...                *
  373. X ************************************************************************
  374. X */
  375. X#define    APB_DoWild    0L    /* User option ALL                */
  376. X#define    APB_ItsWild    1L    /* Set by FindFirst, used by FindNext        */
  377. X#define    APB_DoDir    2L    /* Bit is SET if a DIR node should be entered    */
  378. X                /* Application can RESET this bit to AVOID    */
  379. X                /* entering a dir.                */
  380. X#define    APB_DidDir    3L    /* Bit is set for an "expired" dir node        */
  381. X#define    APB_NoMemErr    4L    /* Set if there was not enough memory        */
  382. X#define    APB_DoDot    5L    /* If set, '.' (DOT) will convert to CurrentDir    */
  383. X
  384. X#define    APF_DoWild    (1L << APB_DoWild)
  385. X#define    APF_ItsWild    (1L << APB_ItsWild)
  386. X#define    APF_DoDir    (1L << APB_DoDir)
  387. X#define    APF_DidDir    (1L << APB_DidDir)
  388. X#define    APF_NoMemErr    (1L << APB_NoMemErr)
  389. X#define    APF_DoDot    (1L << APB_DoDot)
  390. X
  391. X/*
  392. X ************************************************************************
  393. X * Structure used by the pattern matching functions, no need to obtain,    *
  394. X * diddle or allocate this yourself.                    *
  395. X *                                    *
  396. X * Note:  If you did, you will now break as it has changed...        *
  397. X ************************************************************************
  398. X */
  399. X#ifdef    ARP_PRIVATE
  400. Xstruct    AChain    {
  401. X    struct    AChain        *an_Child;
  402. X    struct    AChain        *an_Parent;
  403. X    struct    FileLock    *an_Lock;
  404. X    struct    FileInfoBlock    *an_Info;
  405. X        BYTE        an_Flags;
  406. X        char        an_String[1];    /* Just as is .i file    */
  407. X        };                /* ???  Don't use this!    */
  408. X#endif    /* ARP_PRIVATE */
  409. X
  410. X#define    DDB_PatternBit    0L
  411. X#define    DDB_ExaminedBit    1L
  412. X#define    DDB_Completed    2L
  413. X#define    DDB_AllBit    3L
  414. X
  415. X#define    DDF_PatternBit    (1L << DDB_PatternBit)
  416. X#define    DDF_ExaminedBit    (1L << DDB_ExaminedBit)
  417. X#define    DDF_Completed    (1L << DDB_Completed)
  418. X#define    DDF_AllBit    (1L << DDB_AllBit)
  419. X
  420. X/*
  421. X ************************************************************************
  422. X * This structure takes a pointer, and returns FALSE if wildcard was    *
  423. X * not found by FindFirst()                        *
  424. X ************************************************************************
  425. X */
  426. X#define    IsWild( ptr )        ( *((LONG *)(ptr)) )
  427. X
  428. X/*
  429. X ************************************************************************
  430. X * Constants used by wildcard routines                    *
  431. X *                                    *
  432. X * These are the pre-parsed tokens referred to by pattern match.  It    *
  433. X * is not necessary for you to do anything about these, FindFirst()    *
  434. X * FindNext() handle all these for you.                    *
  435. X ************************************************************************
  436. X */
  437. X#define    P_ANY        0x80L    /* Token for '*' | '#?'    */
  438. X#define    P_SINGLE    0x81L    /* Token for '?'    */
  439. X
  440. X/*
  441. X ************************************************************************
  442. X * No need to muck with these as they may change...            *
  443. X ************************************************************************
  444. X */
  445. X#ifdef    ARP_PRIVATE
  446. X#define    P_ORSTART    0x82L    /* Token for '('    */
  447. X#define    P_ORNEXT    0x83L    /* Token for '|'    */
  448. X#define    P_OREND        0x84L    /* Token for ')'    */
  449. X#define    P_NOT        0x85L    /* Token for '~'    */
  450. X#define    P_NOTCLASS    0x87L    /* Token for '^'    */
  451. X#define    P_CLASS        0x88L    /* Token for '[]'    */
  452. X#define    P_REPBEG    0x89L    /* Token for '['    */
  453. X#define    P_REPEND    0x8AL    /* Token for ']'    */
  454. X#endif    /* ARP_PRIVATE */
  455. X
  456. X#define    ERROR_BUFFER_OVERFLOW    303L    /* User or internal buffer overflow    */
  457. X#define    ERROR_BREAK        304L    /* A break character was received    */
  458. X#define    ERROR_NOT_EXECUTABLE    305L    /* A file has E bit cleared        */
  459. X    /* dos/dosasl.h uses a good lot of the symbols and structures
  460. X     * defined here (AnchorPatch, AChain, ERROR_BREAK and the
  461. X     * like), so let's don't include it again.
  462. X     */
  463. X
  464. X/* #define DOS_DOSASL_H 1 */
  465. X#endif    /* added by mool */
  466. X
  467. X/*
  468. X ************************************************************************
  469. X * Structure used by AddDANode(), AddDADevs(), FreeDAList().        *
  470. X *                                    *
  471. X * This structure is used to create lists of names, which normally    *
  472. X * are devices, assigns, volumes, files, or directories.        *
  473. X ************************************************************************
  474. X */
  475. Xstruct    DirectoryEntry    {
  476. X        struct    DirectoryEntry    *de_Next;    /* Next in list                */
  477. X            BYTE        de_Type;    /* DLX_mumble                */
  478. X            BYTE        de_Flags;    /* For future expansion, DO NOT USE!    */
  479. X            BYTE        de_Name[1];    /* The name of the thing found        */
  480. X            };
  481. X
  482. X/*
  483. X ************************************************************************
  484. X * Defines you use to get a list of the devices you want to look at.    *
  485. X * For example, to get a list of all directories and volumes, do:    *
  486. X *                                    *
  487. X *    AddDADevs( mydalist, (DLF_DIRS | DLF_VOLUMES) )            *
  488. X *                                    *
  489. X * After this, you can examine the de_type field of the elements added    *
  490. X * to your list (if any) to discover specifics about the objects added.    *
  491. X *                                    *
  492. X * Note that if you want only devices which are also disks, you must    *
  493. X * (DLF_DEVICES | DLF_DISKONLY).                    *
  494. X ************************************************************************
  495. X */
  496. X#define    DLB_DEVICES    0L    /* Return devices                */
  497. X#define    DLB_DISKONLY    1L    /* Modifier for above: Return disk devices only    */
  498. X#define    DLB_VOLUMES    2L    /* Return volumes only                */
  499. X#define    DLB_DIRS    3L    /* Return assigned devices only            */
  500. X
  501. X#define    DLF_DEVICES    (1L << DLB_DEVICES)
  502. X#define    DLF_DISKONLY    (1L << DLB_DISKONLY)
  503. X#define    DLF_VOLUMES    (1L << DLB_VOLUMES)
  504. X#define    DLF_DIRS    (1L << DLB_DIRS)
  505. X
  506. X/*
  507. X ************************************************************************
  508. X * Legal de_Type values, check for these after a call to AddDADevs(),    *
  509. X * or use on your own as the ID values in AddDANode().            *
  510. X ************************************************************************
  511. X */
  512. X#define    DLX_FILE    0L    /* AddDADevs() can't determine this    */
  513. X#define    DLX_DIR        8L    /* AddDADevs() can't determine this    */
  514. X#define    DLX_DEVICE    16L    /* It's a resident device        */
  515. X
  516. X#define    DLX_VOLUME    24L    /* Device is a volume            */
  517. X#define    DLX_UNMOUNTED    32L    /* Device is not resident        */
  518. X
  519. X#define    DLX_ASSIGN    40L    /* Device is a logical assignment    */
  520. X
  521. X/*
  522. X ************************************************************************
  523. X *    This macro is to check for an error return from the Atol()    *
  524. X *    routine.  If Errno is ERRBADINT, then there was an error...    *
  525. X *    This was done to try to remain as close to source compatible    *
  526. X *    as possible with the older (rel 1.1) ARPbase.h            *
  527. X ************************************************************************
  528. X */
  529. X#define    ERRBADINT    1L
  530. X#define    Errno        (IoErr() ? ERRBADINT : 0)
  531. X
  532. X/*
  533. X ************************************************************************
  534. X *    Resource Tracking stuff...                    *
  535. X ************************************************************************
  536. X *                                    *
  537. X * There are a few things in arp.library that are only directly        *
  538. X * acessable from assembler.  The glue routines provided by us for    *
  539. X * all 'C' compilers use the following conventions to make these    *
  540. X * available to C programs.  The glue for other language's should use    *
  541. X * as similar a mechanism as possible, so that no matter what language    *
  542. X * or compiler we speak, when talk about arp, we will know what the    *
  543. X * other guy is saying.                            *
  544. X *                                    *
  545. X * Here are the cases:                            *
  546. X *                                    *
  547. X * Tracker calls...                            *
  548. X *        These calls return the Tracker pointer as a secondary    *
  549. X *        result in the register A1.  For C, there is no clean    *
  550. X *        way to return more than one result so the tracker    *
  551. X *        pointer is returned in IoErr().  For ease of use,    *
  552. X *        there is a define that typecasts IoErr() to the correct    *
  553. X *        pointer type.  This is called LastTracker and should    *
  554. X *        be source compatible with the earlier method of storing    *
  555. X *        the secondary result.                    *
  556. X *                                    *
  557. X * GetTracker() -                            *
  558. X *        Syntax is a bit different for C than the assembly call    *
  559. X *        The C syntax is GetTracker(ID).  The binding routines    *
  560. X *        will store the ID into the tracker on return.  Also,    *
  561. X *        in an effort to remain consistant, the tracker will    *
  562. X *        also be stored in LastTracker.                *
  563. X *                                    *
  564. X * In cases where you have allocated a tracker before you have obtained    *
  565. X * a resource (usually the most efficient method), and the resource has    *
  566. X * not been obtained, you will need to clear the tracker id.  The macro    *
  567. X * CLEAR_ID() has been provided for that purpose.  It expects a pointer    *
  568. X * to a DefaultTracker sort of struct.                    *
  569. X ************************************************************************
  570. X */
  571. X#define    CLEAR_ID(t)    ((SHORT *) t)[-1]=NULL
  572. X
  573. X/*
  574. X ************************************************************************
  575. X * You MUST prototype IoErr() to prevent the possible error in defining    *
  576. X * IoErr() and thus causing LastTracker to give you trash...        *
  577. X *                                    *
  578. X * N O T E !  You MUST! have IoErr() defined as LONG to use LastTracker *
  579. X *          If your compiler has other defines for this, you may wish *
  580. X *          to remove the prototype for IoErr().            *
  581. X ************************************************************************
  582. X */
  583. X#define    LastTracker    ((struct DefaultTracker *)IoErr())
  584. X
  585. X/*
  586. X ************************************************************************
  587. X * The rl_FirstItem list (ResList) is a list of TrackedResource (below)    *
  588. X * It is very important that nothing in this list depend on the task    *
  589. X * existing at resource freeing time (i.e., RemTask(0L) type stuff,    *
  590. X * DeletePort() and the rest).                        *
  591. X *                                    *
  592. X * The tracking functions return a struct Tracker *Tracker to you, this    *
  593. X * is a pointer to whatever follows the tr_ID variable.            *
  594. X * The default case is reflected below, and you get it if you call    *
  595. X * GetTracker() ( see DefaultTracker below).                *
  596. X *                                    *
  597. X * NOTE: The two user variables mentioned in an earlier version don't    *
  598. X * exist, and never did. Sorry about that (SDB).            *
  599. X *                                    *
  600. X * However, you can still use ArpAlloc() to allocate your own tracking    *
  601. X * nodes and they can be any size or shape you like, as long as the    *
  602. X * base structure is preserved. They will be freed automagically just    *
  603. X * like the default trackers.                        *
  604. X ************************************************************************
  605. X */
  606. Xstruct    TrackedResource    {
  607. X        struct    MinNode    tr_Node;    /* Double linked pointer        */
  608. X            BYTE    tr_Flags;    /* Don't touch                */
  609. X            BYTE    tr_Lock;    /* Don't touch, for Get/FreeAccess()    */
  610. X            SHORT    tr_ID;        /* Item's ID                */
  611. X
  612. X/*
  613. X ************************************************************************
  614. X * The struct DefaultTracker *Tracker portion of the structure.        *
  615. X * The stuff below this point can conceivably vary, depending        *
  616. X * on user needs, etc.  This reflects the default.            *
  617. X ************************************************************************
  618. X */
  619. X            union    {
  620. X                CPTR    tr_Resource;    /* Whatever                */
  621. X                    LONG    tg_Verify;    /* For use during TRAK_GENERIC        */
  622. X                }    tr_Object;    /* The thing being tracked        */
  623. X            union    {
  624. X                VOID    (*tg_Function)();/* Function to call for TRAK_GENERIC    */
  625. X            struct    Window    *tr_Window2;    /* For TRAK_WINDOW            */
  626. X                }    tr_Extra;    /* Only needed sometimes        */
  627. X            };
  628. X
  629. X#define    tg_Value tg_Verify    /* Ancient compatibility only!  Do NOT use in new CODE!!! */
  630. X
  631. X/*
  632. X ************************************************************************
  633. X * You get a pointer to a struct of the following type when you call    *
  634. X * GetTracker().  You can change this, and use ArpAlloc() instead of    *
  635. X * GetTracker() to do tracking. Of course, you have to take a wee bit    *
  636. X * more responsibility if you do, as well as if you use TRAK_GENERIC    *
  637. X * stuff.                                *
  638. X *                                    *
  639. X * TRAK_GENERIC folks need to set up a task function to be called when    *
  640. X * an item is freed.  Some care is required to set this up properly.    *
  641. X *                                    *
  642. X * Some special cases are indicated by the unions below, for        *
  643. X * TRAK_WINDOW, if you have more than one window opened, and don't    *
  644. X * want the IDCMP closed particularly, you need to set a ptr to the    *
  645. X * other window in dt_Window2.  See CloseWindowSafely() for more info.    *
  646. X * If only one window, set this to NULL.                *
  647. X ************************************************************************
  648. X */
  649. Xstruct    DefaultTracker    {
  650. X            union    {
  651. X                CPTR    dt_Resource;    /* Whatever                */
  652. X                LONG    tg_Verify;    /* For use during TRAK_GENERIC        */
  653. X                }    dt_Object;    /* The object being tracked        */
  654. X            union    {
  655. X                VOID    (*tg_Function)();/* Function to call for TRAK_GENERIC    */
  656. X            struct    Window    *dt_Window2;    /* For TRAK_WINDOW            */
  657. X                }    dt_Extra;
  658. X            };
  659. X
  660. X/*
  661. X ************************************************************************
  662. X *    Items the tracker knows what to do about            *
  663. X ************************************************************************
  664. X */
  665. X#define    TRAK_AAMEM    0L    /* Default (ArpAlloc) element        */
  666. X#define    TRAK_LOCK    1L    /* File lock                */
  667. X#define    TRAK_FILE    2L    /* Opened file                */
  668. X#define    TRAK_WINDOW    3L    /* Window -- see docs            */
  669. X#define    TRAK_SCREEN    4L    /* Screen                */
  670. X#define    TRAK_LIBRARY    5L    /* Opened library            */
  671. X#define    TRAK_DAMEM    6L    /* Pointer to DosAllocMem block        */
  672. X#define    TRAK_MEMNODE    7L    /* AllocEntry() node            */
  673. X#define    TRAK_SEGLIST    8L    /* Program segment            */
  674. X#define    TRAK_RESLIST    9L    /* ARP (nested) ResList            */
  675. X#define    TRAK_MEM    10L    /* Memory ptr/length            */
  676. X#define    TRAK_GENERIC    11L    /* Generic Element, your choice        */
  677. X#define    TRAK_DALIST    12L    /* DAlist ( aka file request )        */
  678. X#define    TRAK_ANCHOR    13L    /* Anchor chain (pattern matching)    */
  679. X#define    TRAK_FREQ    14L    /* FileRequest struct            */
  680. X#define    TRAK_FONT    15L    /* GfxBase CloseFont()            */
  681. X#define    TRAK_MAX    15L    /* Poof, anything higher is tossed    */
  682. X
  683. X#define    TRB_UNLINK    7L    /* Free node bit            */
  684. X#define    TRB_RELOC    6L    /* This may be relocated (not used yet)    */
  685. X#define    TRB_MOVED    5L    /* Item moved                */
  686. X
  687. X#define    TRF_UNLINK    (1L << TRB_UNLINK)
  688. X#define    TRF_RELOC    (1L << TRB_RELOC)
  689. X#define    TRF_MOVED    (1L << TRB_MOVED)
  690. X
  691. X/*
  692. X ************************************************************************
  693. X * Note: ResList MUST be a DosAllocMem'ed list!, this is done for    *
  694. X * you when you call CreateTaskResList(), typically, you won't need    *
  695. X * to access/allocate this structure.                    *
  696. X ************************************************************************
  697. X */
  698. Xstruct    ResList    {
  699. X    struct    MinNode        rl_Node;    /* Used by arplib to link reslists    */
  700. X    struct    Task        *rl_TaskID;    /* Owner of this list            */
  701. X    struct    MinList        rl_FirstItem;    /* List of Tracked Resources        */
  702. X    struct    ResList        *rl_Link;    /* SyncRun's use - hide list here    */
  703. X        };
  704. X
  705. X/*
  706. X ************************************************************************
  707. X *    Returns from CompareLock()                    *
  708. X ************************************************************************
  709. X */
  710. X#define    LCK_EQUAL    0L    /* The two locks refer to the same object    */
  711. X#define    LCK_VOLUME    1L    /* Locks are on the same volume            */
  712. X#define    LCK_DIFVOL1    2L    /* Locks are on different volumes        */
  713. X#define    LCK_DIFVOL2    3L    /* Locks are on different volumes        */
  714. X
  715. X/*
  716. X ************************************************************************
  717. X *    ASyncRun() stuff...                        *
  718. X ************************************************************************
  719. X * Message sent back on your request by an exiting process.        *
  720. X * You request this by putting the address of your message in        *
  721. X * pcb_LastGasp, and initializing the ReplyPort variable of your    *
  722. X * ZombieMsg to the port you wish the message posted to.        *
  723. X ************************************************************************
  724. X */
  725. Xstruct    ZombieMsg    {
  726. X        struct    Message        zm_ExecMessage;
  727. X            ULONG        zm_TaskNum;    /* Task ID            */
  728. X            LONG        zm_ReturnCode;    /* Process's return code    */
  729. X            ULONG        zm_Result2;    /* System return code        */
  730. X        struct    DateStamp    zm_ExitTime;    /* Date stamp at time of exit    */
  731. X            ULONG        zm_UserInfo;    /* For whatever you wish    */
  732. X            };
  733. X
  734. X/*
  735. X ************************************************************************
  736. X * Structure required by ASyncRun() -- see docs for more info.        *
  737. X ************************************************************************
  738. X */
  739. Xstruct    ProcessControlBlock    {
  740. X                ULONG        pcb_StackSize;    /* Stacksize for new process            */
  741. X                BYTE        pcb_Pri;    /* Priority of new task                */
  742. X                UBYTE        pcb_Control;    /* Control bits, see defines below        */
  743. X                APTR        pcb_TrapCode;    /* Optional Trap Code                */
  744. X                BPTR        pcb_Input;
  745. X                BPTR        pcb_Output;    /* Optional stdin, stdout            */
  746. X                union    {
  747. X                    BPTR    pcb_SplatFile;    /* File to use for Open("*")            */
  748. X                    BYTE    *pcb_ConName;    /* CON: filename                */
  749. X                    }    pcb_Console;
  750. X                CPTR        pcb_LoadedCode;    /* If not null, will not load/unload code    */
  751. X            struct    ZombieMsg    *pcb_LastGasp;    /* ReplyMsg() to be filled in by exit        */
  752. X            struct    MsgPort        *pcb_WBProcess;    /* Valid only when PRB_NOCLI            */
  753. X                };
  754. X
  755. X/*
  756. X ************************************************************************
  757. X * Formerly needed to pass NULLCMD to a child.  No longer needed.    *
  758. X * It is being kept here for compatibility only...            *
  759. X ************************************************************************
  760. X */
  761. X#define    NOCMD    "\n"
  762. X
  763. X/*
  764. X ************************************************************************
  765. X * The following control bits determine what ASyncRun() does on        *
  766. X * Abnormal Exits and on background process termination.        *
  767. X ************************************************************************
  768. X */
  769. X#define    PRB_SAVEIO    0L    /* Don't free/check file handles on exit    */
  770. X#define    PRB_CLOSESPLAT    1L    /* Close Splat file, must request explicitly    */
  771. X#define    PRB_NOCLI    2L    /* Don't create a CLI process            */
  772. X/*    PRB_INTERACTIVE    3L       This is now obsolete...            */
  773. X#define    PRB_CODE    4L    /* Dangerous yet enticing            */
  774. X#define    PRB_STDIO    5L    /* Do the stdio thing, splat = CON:Filename     */
  775. X
  776. X#define    PRF_SAVEIO    (1L << PRB_SAVEIO)
  777. X#define    PRF_CLOSESPLAT    (1L << PRB_CLOSESPLAT)
  778. X#define    PRF_NOCLI    (1L << PRB_NOCLI)
  779. X#define    PRF_CODE    (1L << PRB_CODE)
  780. X#define    PRF_STDIO    (1L << PRB_STDIO)
  781. X
  782. X/*
  783. X ************************************************************************
  784. X *    Error returns from SyncRun() and ASyncRun()            *
  785. X ************************************************************************
  786. X */
  787. X#define    PR_NOFILE    -1L    /* Could not LoadSeg() the file            */
  788. X#define    PR_NOMEM    -2L    /* No memory for something            */
  789. X/*    PR_NOCLI    -3L       This is now obsolete                */
  790. X#define    PR_NOSLOT    -4L    /* No room in TaskArray                */
  791. X#define    PR_NOINPUT    -5L    /* Could not open input file            */
  792. X#define    PR_NOOUTPUT    -6L    /* Could not get output file            */
  793. X/*    PR_NOLOCK    -7L       This is now obsolete                */
  794. X/*    PR_ARGERR    -8L       This is now obsolete                */
  795. X/*    PR_NOBCPL    -9L       This is now obsolete                */
  796. X/*    PR_BADLIB    -10L       This is now obsolete                */
  797. X#define    PR_NOSTDIO    -11L    /* Couldn't get stdio handles            */
  798. X
  799. X/*
  800. X ************************************************************************
  801. X *    Added V35 of arp.library                    *
  802. X ************************************************************************
  803. X */
  804. X#define    PR_WANTSMESSAGE    -12L    /* Child wants you to report IoErr() to user    */
  805. X                /* for SyncRun() only...            */
  806. X#define    PR_NOSHELLPROC    -13L    /* Can't create a shell/cli process        */
  807. X#define    PR_NOEXEC    -14L    /* 'E' bit is clear                */
  808. X#define    PR_SCRIPT    -15L    /* S and E are set, IoErr() contains directory    */
  809. X
  810. X/*
  811. X ************************************************************************
  812. X * Version 35 ASyncRun() allows you to create an independent        *
  813. X * interactive or background Shell/CLI. You need this variant of the    *
  814. X * pcb structure to do it, and you also have new values for nsh_Control,*
  815. X * see below.                                *
  816. X *                                    *
  817. X * Syntax for Interactive shell is:                    *
  818. X *                                    *
  819. X * rc=ASyncRun("Optional Window Name","Optional From File",&NewShell);    *
  820. X *                                    *
  821. X * Syntax for a background shell is:                    *
  822. X *                                    *
  823. X * rc=ASyncRun("Command line",0L,&NewShell);                *
  824. X *                                    *
  825. X * Same syntax for an Execute style call, but you have to be on drugs    *
  826. X * if you want to do that.                        *
  827. X ************************************************************************
  828. X */
  829. Xstruct    NewShell    {
  830. X            ULONG    nsh_StackSize;    /* stacksize shell will use for children    */
  831. X            BYTE    nsh_Pri;    /* ignored by interactive shells        */
  832. X            UBYTE    nsh_Control;    /* bits/values: see above            */
  833. X            CPTR    nsh_LogMsg;    /* Optional login message, if null, use default    */
  834. X            BPTR    nsh_Input;    /* ignored by interactive shells, but        */
  835. X            BPTR    nsh_Output;    /* used by background and execute options.    */
  836. X            LONG    nsh_RESERVED[5];
  837. X            };
  838. X
  839. X/*
  840. X ************************************************************************
  841. X * Bit Values for nsh_Control, you should use them as shown below, or    *
  842. X * just use the actual values indicated.                *
  843. X ************************************************************************
  844. X */
  845. X#define    PRB_CLI        0L    /* Do a CLI, not a shell    */
  846. X#define    PRB_BACKGROUND    1L    /* Background shell        */
  847. X#define    PRB_EXECUTE    2L    /* Do as EXECUTE...        */
  848. X#define    PRB_INTERACTIVE    3L    /* Run an interactive shell    */
  849. X#define    PRB_FB        7L    /* Alt function bit...        */
  850. X
  851. X#define    PRF_CLI        (1L << PRB_CLI)
  852. X#define    PRF_BACKGOUND    (1L << PRB_BACKGROUND)
  853. X#define    PRF_EXECUTE    (1L << PRB_EXECUTE)
  854. X#define    PRF_INTERACTIVE    (1L << PRB_INTERACTIVE)
  855. X#define    PRF_FB        (1L << PRB_FB)
  856. X
  857. X/*
  858. X ************************************************************************
  859. X *    Common values for sh_Control which allow you to do usefull    *
  860. X *    and somewhat "standard" things...                *
  861. X ************************************************************************
  862. X */
  863. X#define    INTERACTIVE_SHELL    (PRF_FB|PRF_INTERACTIVE)        /* Gimme a newshell!        */
  864. X#define    INTERACTIVE_CLI        (PRF_FB|PRF_INTERACTIVE|PRF_CLI)    /* Gimme that ol newcli!    */
  865. X#define    BACKGROUND_SHELL    (PRF_FB|PRF_BACKGROUND)            /* gimme a background shell    */
  866. X#define    EXECUTE_ME        (PRF_FB|PRF_BACKGROUND|PRF_EXECUTE)    /* aptly named, doncha think?    */
  867. X
  868. X/*
  869. X ************************************************************************
  870. X *    Additional IoErr() returns added by ARP...            *
  871. X ************************************************************************
  872. X */
  873. X#define    ERROR_NOT_CLI        400L    /* Program/function neeeds to be cli    */
  874. X
  875. X/*
  876. X ************************************************************************
  877. X *    Resident Program Support                    *
  878. X ************************************************************************
  879. X * This is the kind of node allocated for you when you AddResidentPrg()    *
  880. X * a code segment.  They are stored as a single linked list with the    *
  881. X * root in ArpBase.  If you absolutely *must* wander through this list    *
  882. X * instead of using the supplied functions, then you must first obtain    *
  883. X * the semaphore which protects this list, and then release it        *
  884. X * afterwards.  Do not use Forbid() and Permit() to gain exclusive    *
  885. X * access!  Note that the supplied functions handle this locking    *
  886. X * protocol for you.                            *
  887. X ************************************************************************
  888. X */
  889. Xstruct    ResidentProgramNode    {
  890. X            struct    ResidentProgramNode    *rpn_Next;    /* next or NULL            */
  891. X                LONG            rpn_Usage;    /* Number of current users    */
  892. X                UWORD            rpn_AccessCnt;    /* Total times used...        */
  893. X                ULONG            rpn_CheckSum;    /* Checksum of code        */
  894. X                BPTR            rpn_Segment;    /* Actual segment        */
  895. X                UWORD            rpn_Flags;    /* See definitions below...    */
  896. X                BYTE            rpn_Name[1];    /* Allocated as needed        */
  897. X                };
  898. X
  899. X/*
  900. X ************************************************************************
  901. X *    Bit definitions for rpn_Flags....                *
  902. X ************************************************************************
  903. X */
  904. X#define    RPNB_NOCHECK    0L    /* Set in rpn_Flags for no checksumming...    */
  905. X#define    RPNB_CACHE    1L    /* Private usage in v1.3...            */
  906. X
  907. X#define    RPNF_NOCHECK    (1L << RPNB_NOCHECK)
  908. X#define    RPNF_CACHE    (1L << RPNB_CACHE)
  909. X
  910. X/*
  911. X ************************************************************************
  912. X * If your program starts with this structure, ASyncRun() and SyncRun()    *
  913. X * will override a users stack request with the value in rpt_StackSize.    *
  914. X * Furthermore, if you are actually attached to the resident list, a    *
  915. X * memory block of size rpt_DataSize will be allocated for you, and    *
  916. X * a pointer to this data passed to you in register A4.  You may use    *
  917. X * this block to clone the data segment of programs, thus resulting in    *
  918. X * one copy of text, but multiple copies of data/bss for each process    *
  919. X * invocation.  If you are resident, your program will start at        *
  920. X * rpt_Instruction, otherwise, it will be launched from the initial    *
  921. X * branch.                                *
  922. X ************************************************************************
  923. X */
  924. Xstruct    ResidentProgramTag    {
  925. X                BPTR    rpt_NextSeg;    /* Provided by DOS at LoadSeg time    */
  926. X/*
  927. X ************************************************************************
  928. X * The initial branch destination and rpt_Instruction do not have to be    *
  929. X * the same.  This allows different actions to be taken if you are    *
  930. X * diskloaded or resident.  DataSize memory will be allocated only if    *
  931. X * you are resident, but StackSize will override all user stack        *
  932. X * requests.                                *
  933. X ************************************************************************
  934. X */
  935. X                UWORD    rpt_BRA;    /* Short branch to executable        */
  936. X                UWORD    rpt_Magic;    /* Resident majik value            */
  937. X                ULONG    rpt_StackSize;    /* min stack for this process        */
  938. X                ULONG    rpt_DataSize;    /* Data size to allocate if resident    */
  939. X                /*    rpt_Instruction;    Start here if resident        */
  940. X                };
  941. X
  942. X/*
  943. X ************************************************************************
  944. X * The form of the ARP allocated node in your tasks memlist when    *
  945. X * launched as a resident program. Note that the data portion of the    *
  946. X * node will only exist if you have specified a nonzero value for    *
  947. X * rpt_DataSize. Note also that this structure is READ ONLY, modify    *
  948. X * values in this at your own risk.  The stack stuff is for tracking,    *
  949. X * if you need actual addresses or stack size, check the normal places    *
  950. X * for it in your process/task struct.                    *
  951. X ************************************************************************
  952. X */
  953. Xstruct    ProcessMemory    {
  954. X        struct    Node    pm_Node;
  955. X            UWORD    pm_Num;        /* This is 1 if no data, two if data    */
  956. X            CPTR    pm_Stack;
  957. X            ULONG    pm_StackSize;
  958. X            CPTR    pm_Data;    /* Only here if pm_Num == 2        */
  959. X            ULONG    pm_DataSize;
  960. X            };
  961. X
  962. X/*
  963. X ************************************************************************
  964. X * To find the above on your memlist, search for the following name.    *
  965. X * We guarantee this will be the only arp.library allocated node on    *
  966. X * your memlist with this name.                        *
  967. X * i.e. FindName(task->tcb_MemEntry, PMEM_NAME);            *
  968. X ************************************************************************
  969. X */
  970. X#define    PMEM_NAME    "ARP_MEM"
  971. X
  972. X#define    RESIDENT_MAGIC    0x4AFC        /* same as RTC_MATCHWORD (trapf) */
  973. X
  974. X/*
  975. X ************************************************************************
  976. X *    Date String/Data structures                    *
  977. X ************************************************************************
  978. X */
  979. X#ifndef DOS_DATETIME_H        /* added by mool */
  980. X#define DOS_DATETIME_H
  981. X
  982. Xstruct    DateTime    {
  983. X        struct    DateStamp    dat_Stamp;    /* DOS Datestamp            */
  984. X            UBYTE        dat_Format;    /* controls appearance ot dat_StrDate    */
  985. X            UBYTE        dat_Flags;    /* See BITDEF's below            */
  986. X            BYTE        *dat_StrDay;    /* day of the week string        */
  987. X            BYTE        *dat_StrDate;    /* date string                */
  988. X            BYTE        *dat_StrTime;    /* time string                */
  989. X            };
  990. X
  991. X/*
  992. X ************************************************************************
  993. X *    Size of buffer you need for each DateTime strings:        *
  994. X ************************************************************************
  995. X */
  996. X#define    LEN_DATSTRING    10L
  997. X
  998. X/*
  999. X ************************************************************************
  1000. X *    For dat_Flags                            *
  1001. X ************************************************************************
  1002. X */
  1003. X#define    DTB_SUBST    0L    /* Substitute "Today" "Tomorrow" where appropriate    */
  1004. X#define    DTB_FUTURE    1L    /* Day of the week is in future                */
  1005. X
  1006. X#define    DTF_SUBST    (1L << DTB_SUBST)
  1007. X#define    DTF_FUTURE    (1L << DTB_FUTURE)
  1008. X
  1009. X/*
  1010. X ************************************************************************
  1011. X *    For dat_Format                            *
  1012. X ************************************************************************
  1013. X */
  1014. X#define    FORMAT_DOS    0L        /* dd-mmm-yy AmigaDOS's own, unique style        */
  1015. X#define    FORMAT_INT    1L        /* yy-mm-dd International format            */
  1016. X#define    FORMAT_USA    2L        /* mm-dd-yy The good'ol'USA.                */
  1017. X#define    FORMAT_CDN    3L        /* dd-mm-yy Our brothers and sisters to the north    */
  1018. X#define    FORMAT_MAX    FORMAT_CDN    /* Larger than this? Defaults to AmigaDOS        */
  1019. X
  1020. X    /* dos/datetime.h uses the same structures and defines, so
  1021. X     * keep the compiler from pulling it in. -olsen
  1022. X     */
  1023. X
  1024. X/* #define DOS_DATETIME_H 1 */
  1025. X#endif
  1026. X
  1027. X/*
  1028. X ************************************************************************
  1029. X * Define NO_PROTOTYPES if your compiler does not handle them...    *
  1030. X ************************************************************************
  1031. X */
  1032. X#if defined(NO_PROTOTYPES) || defined(__NO_PROTOS)
  1033. X#define    ARGs(x)    ()
  1034. X#else
  1035. X#define    ARGs(x)    x
  1036. X
  1037. X    /* Added ArpVPrintf, ArpVFPrintf and ArpVSPrintf, so will have to
  1038. X     * include the compiler specific stdarg header file. -olsen
  1039. X     */
  1040. X
  1041. X#include <stdarg.h>
  1042. X
  1043. X#endif    /* NO_PROTOTYPES */
  1044. X
  1045. X/*
  1046. X ************************************************************************
  1047. X * Note that C_Args is a #define that, in LATTICE does __stdargs    *
  1048. X ************************************************************************
  1049. X */
  1050. X
  1051. X/*
  1052. X ************************************************************************
  1053. X * This prototype is here to prevent the possible error in defining    *
  1054. X * IoErr() as LONG and thus causing LastTracker to give you trash...    *
  1055. X *                                    *
  1056. X * N O T E !  You MUST! have IoErr() defined as LONG to use LastTracker *
  1057. X *          If your compiler has other defines for this, you may wish *
  1058. X *          to move the prototype for IoErr() into the DO_ARP_COPIES    *
  1059. X ************************************************************************
  1060. X */
  1061. X    LONG            IoErr            ARGs(    (VOID)                            );
  1062. X
  1063. X/*
  1064. X ************************************************************************
  1065. X *    These duplicate the calls in dos.library            *
  1066. X *    Only include if you can use arp.library without dos.library    *
  1067. X ************************************************************************
  1068. X */
  1069. X#ifdef    DO_ARP_COPIES
  1070. X    BPTR            Open            ARGs(    (char *, LONG)                        );
  1071. X    VOID            Close            ARGs(    (BPTR)                            );
  1072. X    LONG            Read            ARGs(    (BPTR, char *, LONG)                    );
  1073. X    LONG            Write            ARGs(    (BPTR, char *, LONG)                    );
  1074. X    BPTR            Input            ARGs(    (VOID)                            );
  1075. X    BPTR            Output            ARGs(    (VOID)                            );
  1076. X    LONG            Seek            ARGs(    (BPTR, LONG, LONG)                    );
  1077. X    LONG            DeleteFile        ARGs(    (char *)                        );
  1078. X    LONG            Rename            ARGs(    (char *, char *)                    );
  1079. X    BPTR            Lock            ARGs(    (char *, LONG)                        );
  1080. X    VOID            UnLock            ARGs(    (BPTR)                            );
  1081. X    BPTR            DupLock            ARGs(    (BPTR)                            );
  1082. X    LONG            Examine            ARGs(    (BPTR, struct FileInfoBlock *)                );
  1083. X    LONG            ExNext            ARGs(    (BPTR, struct FileInfoBlock *)                );
  1084. X    LONG            Info            ARGs(    (BPTR, struct InfoData *)                );
  1085. X    BPTR            CreateDir        ARGs(    (char *)                        );
  1086. X    BPTR            CurrentDir        ARGs(    (BPTR)                            );
  1087. Xstruct    MsgPort            *CreateProc        ARGs(    (char *, LONG, BPTR, LONG)                );
  1088. X    VOID            Exit            ARGs(    (LONG)                            );
  1089. X    BPTR            LoadSeg            ARGs(    (char *)                        );
  1090. X    VOID            UnLoadSeg        ARGs(    (BPTR)                            );
  1091. Xstruct    MsgPort            *DeviceProc        ARGs(    (char *)                        );
  1092. X    LONG            SetComment        ARGs(    (char *, char *)                    );
  1093. X    LONG            SetProtection        ARGs(    (char *, LONG)                        );
  1094. X    LONG            *DateStamp        ARGs(    (LONG *)                        );
  1095. X    VOID            Delay            ARGs(    (LONG)                            );
  1096. X    LONG            WaitForChar        ARGs(    (BPTR, LONG)                        );
  1097. X    BPTR            ParentDir        ARGs(    (BPTR)                            );
  1098. X    LONG            IsInteractive        ARGs(    (BPTR)                            );
  1099. X    LONG            Execute            ARGs(    (char *, BPTR, BPTR)                    );
  1100. X#endif    /* DO_ARP_COPIES */
  1101. X
  1102. X/*
  1103. X ************************************************************************
  1104. X *    Now for the stuff that only exists in arp.library...        *
  1105. X ************************************************************************
  1106. X */
  1107. X    /* LONG        C_Args    Printf            ARGs(    (char *,...)                        ); */
  1108. X    /* LONG        C_Args    FPrintf            ARGs(    (BPTR, char *,...)                    ); */
  1109. X#ifdef SASC
  1110. X    LONG        C_Args    Printf            ARGs(    (UBYTE *,...)                        );
  1111. X    LONG        C_Args    FPrintf            ARGs(    (BPTR, UBYTE *,...)                    );
  1112. X#else
  1113. X    LONG        C_Args    Printf            ARGs(    (UBYTE *, long, ...)                        );
  1114. X    LONG        C_Args    FPrintf            ARGs(    (BPTR, UBYTE *, long, ...)                    );
  1115. X#endif
  1116. X    LONG            Puts             ARGs(    (char *)                        );
  1117. X    LONG            ReadLine        ARGs(    (char *)                        );
  1118. X    LONG            GADS             ARGs(    (char *, LONG, char *, char **, char *)            );
  1119. X    LONG            Atol            ARGs(    (char *)                        );
  1120. X    ULONG            EscapeString         ARGs(    (char *)                        );
  1121. X    LONG            CheckAbort        ARGs(    (VOID(*))                        );
  1122. X    LONG            CheckBreak        ARGs(    (LONG, VOID(*))                        );
  1123. X    BYTE            *Getenv            ARGs(    (char *, char *, LONG)                    );
  1124. X    BOOL            Setenv            ARGs(    (char *, char *)                    );
  1125. X    BYTE            *FileRequest         ARGs(    (struct FileRequester *)                );
  1126. X    VOID            CloseWindowSafely    ARGs(    (struct Window *, LONG)                    );
  1127. X/* struct    MsgPort            *CreatePort        ARGs(    (const char *, LONG)                        ); */
  1128. Xstruct    MsgPort            *CreatePort        ARGs(    (UBYTE *, LONG)                        );
  1129. X    VOID            DeletePort         ARGs(    (struct MsgPort *)                    );
  1130. X    LONG            SendPacket         ARGs(    (LONG, LONG *, struct MsgPort *)            );
  1131. X    VOID            InitStdPacket        ARGs(    (LONG, LONG *, struct DosPacket *, struct MsgPort *)    );
  1132. X    ULONG            PathName        ARGs(    (BPTR, char *,LONG)                    );
  1133. X    ULONG            Assign            ARGs(    (char *, char *)                    );
  1134. X    VOID            *DosAllocMem        ARGs(    (LONG)                            );
  1135. X    VOID            DosFreeMem        ARGs(    (VOID *)                        );
  1136. X    ULONG            BtoCStr            ARGs(    (char *, BSTR, LONG)                    );
  1137. X    ULONG            CtoBStr            ARGs(    (char *, BSTR, LONG)                    );
  1138. Xstruct    DeviceList        *GetDevInfo        ARGs(    (struct DeviceList *)                    );
  1139. X    BOOL            FreeTaskResList        ARGs(    (VOID)                            );
  1140. X    VOID            ArpExit         ARGs(    (LONG,LONG)                        );
  1141. X    VOID        C_Args    *ArpAlloc        ARGs(    (LONG)                            );
  1142. X    VOID        C_Args    *ArpAllocMem        ARGs(    (LONG, LONG)                        );
  1143. X    BPTR        C_Args    ArpOpen            ARGs(    (char *, LONG)                        );
  1144. X    BPTR        C_Args    ArpDupLock        ARGs(    (BPTR)                            );
  1145. X    BPTR        C_Args    ArpLock            ARGs(    (char *, LONG)                        );
  1146. X    VOID        C_Args    *RListAlloc        ARGs(    (struct ResList *, LONG)                );
  1147. Xstruct    Process            *FindCLI        ARGs(    (LONG)                            );
  1148. X    BOOL            QSort            ARGs(    (VOID *, LONG, LONG, int(*))                );
  1149. X    BOOL            PatternMatch        ARGs(    (char *,char *)                        );
  1150. X    LONG            FindFirst        ARGs(    (char *, struct AnchorPath *)                );
  1151. X    LONG            FindNext        ARGs(    (struct AnchorPath *)                    );
  1152. X    VOID            FreeAnchorChain        ARGs(    (struct AnchorPath *)                    );
  1153. X    ULONG            CompareLock        ARGs(    (BPTR, BPTR)                        );
  1154. Xstruct    ResList            *FindTaskResList    ARGs(    (VOID)                            );
  1155. Xstruct    ResList            *CreateTaskResList    ARGs(    (VOID)                            );
  1156. X    VOID            FreeResList        ARGs(    (struct ResList *)                    );
  1157. X    VOID            FreeTrackedItem        ARGs(    (struct DefaultTracker *)                );
  1158. Xstruct    DefaultTracker    C_Args    *GetTracker        ARGs(    (LONG)                            );
  1159. X    VOID            *GetAccess        ARGs(    (struct DefaultTracker *)                );
  1160. X    VOID            FreeAccess        ARGs(    (struct DefaultTracker *)                );
  1161. X    VOID            FreeDAList        ARGs(    (struct DirectoryEntry *)                );
  1162. Xstruct    DirectoryEntry        *AddDANode        ARGs(    (char *, struct DirectoryEntry **, LONG, LONG)        );
  1163. X    ULONG            AddDADevs        ARGs(    (struct DirectoryEntry **, LONG)            );
  1164. X    LONG            Strcmp            ARGs(    (char *, char *)                    );
  1165. X    LONG            Strncmp            ARGs(    (char *, char *, LONG)                    );
  1166. X    BYTE            Toupper            ARGs(    (BYTE)                            );
  1167. X    LONG            SyncRun            ARGs(    (char *, char *, BPTR, BPTR)                );
  1168. X
  1169. X/*
  1170. X ************************************************************************
  1171. X *    Added V32 of arp.library                    *
  1172. X ************************************************************************
  1173. X */
  1174. X    LONG            ASyncRun        ARGs(    (char *, char *, struct ProcessControlBlock *)        );
  1175. X    LONG            SpawnShell        ARGs(    (char *, char *, struct NewShell *)            );
  1176. X    BPTR            LoadPrg            ARGs(    (char *)                        );
  1177. X    BOOL            PreParse        ARGs(    (char *, char *)                    );
  1178. X
  1179. X/*
  1180. X ************************************************************************
  1181. X *    Added V33 of arp.library                    *
  1182. X ************************************************************************
  1183. X */
  1184. X    BOOL            StamptoStr        ARGs(    (struct DateTime *)                    );
  1185. X    BOOL            StrtoStamp        ARGs(    (struct DateTime *)                    );
  1186. Xstruct    ResidentProgramNode    *ObtainResidentPrg    ARGs(    (char *)                        );
  1187. Xstruct    ResidentProgramNode    *AddResidentPrg        ARGs(    (BPTR, char *)                        );
  1188. X    LONG            RemResidentPrg        ARGs(    (char *)                        );
  1189. X    VOID            UnLoadPrg        ARGs(    (BPTR)                            );
  1190. X    LONG            LMult            ARGs(    (LONG, LONG)                        );
  1191. X    LONG            LDiv            ARGs(    (LONG, LONG)                        );
  1192. X    LONG            LMod            ARGs(    (LONG, LONG)                        );
  1193. X    ULONG            CheckSumPrg        ARGs(    (struct ResidentProgramNode *)                );
  1194. X    VOID            TackOn            ARGs(    (char *, char *)                    );
  1195. X    BYTE            *BaseName        ARGs(    (char *)                        );
  1196. Xstruct    ResidentProgramNode    *ReleaseResidentPrg    ARGs(    (BPTR)                            );
  1197. X
  1198. X/*
  1199. X ************************************************************************
  1200. X *    Added V36 of arp.library                    *
  1201. X ************************************************************************
  1202. X */
  1203. X    LONG        C_Args    SPrintf            ARGs(    (char *, char *,...)                    );
  1204. X    LONG            GetKeywordIndex        ARGs(    (char *, char *)                    );
  1205. Xstruct    Library        C_Args    *ArpOpenLibrary        ARGs(    (char *, LONG)                        );
  1206. Xstruct    FileRequester    C_Args    *ArpAllocFreq        ARGs(    (VOID)                            );
  1207. X
  1208. X    /* This one's a cutie which is supported via bypassing the
  1209. X     * ??Printf glue routines. -olsen
  1210. X     */
  1211. X
  1212. X    LONG            ArpVPrintf        ARGs(    (char *, va_list)                    );
  1213. X    LONG            ArpVFPrintf        ARGs(    (BPTR, char *, va_list)                    );
  1214. X    LONG            ArpVSPrintf        ARGs(    (char *, char *, va_list)                );
  1215. X
  1216. X/*
  1217. X ************************************************************************
  1218. X *    Check if we should do the pragmas...                *
  1219. X ************************************************************************
  1220. X */
  1221. X
  1222. X#if !defined(NO_PRAGMAS) && !defined(__NO_PRAGMAS)
  1223. X#ifndef    PROTO_ARP_H
  1224. X#include <proto/arp.h>
  1225. X#endif    /* PROTO_ARP_H */
  1226. X#endif    /* NO_PRAGMAS */
  1227. X
  1228. X#endif    /* LIBRARIES_ARPBASE_H */
  1229. END_OF_FILE
  1230.   if test 49919 -ne `wc -c <'vim/src/arpbase.h'`; then
  1231.     echo shar: \"'vim/src/arpbase.h'\" unpacked with wrong size!
  1232.   fi
  1233.   # end of 'vim/src/arpbase.h'
  1234. fi
  1235. if test -f 'vim/src/term.h' -a "${1}" != "-c" ; then 
  1236.   echo shar: Will not clobber existing file \"'vim/src/term.h'\"
  1237. else
  1238.   echo shar: Extracting \"'vim/src/term.h'\" \(16147 characters\)
  1239.   sed "s/^X//" >'vim/src/term.h' <<'END_OF_FILE'
  1240. X/* vi:ts=4:sw=4
  1241. X *
  1242. X * VIM - Vi IMproved        by Bram Moolenaar
  1243. X *
  1244. X * Read the file "credits.txt" for a list of people who contributed.
  1245. X * Read the file "uganda.txt" for copying and usage conditions.
  1246. X */
  1247. X
  1248. X/*
  1249. X * This file contains the machine dependent escape sequences that the editor
  1250. X * needs to perform various operations. Some of the sequences here are
  1251. X * optional. Anything not available should be indicated by a null string. In
  1252. X * the case of insert/delete line sequences, the editor checks the capability
  1253. X * and works around the deficiency, if necessary.
  1254. X */
  1255. X
  1256. X#ifdef SASC
  1257. X/*
  1258. X * the SAS C compiler has a bug that makes typedefs being forget sometimes
  1259. X */
  1260. Xtypedef unsigned char char_u;
  1261. X#endif
  1262. X
  1263. X/*
  1264. X * the terminal capabilities are stored in this structure
  1265. X * keep in sync with array in term.c
  1266. X */
  1267. Xtypedef struct _tcarr
  1268. X{
  1269. X/* output codes */
  1270. X  char_u *t_name;    /* name of this terminal entry */
  1271. X  char_u *t_el;        /* el       ce    clear to end of line */
  1272. X  char_u *t_il;        /* il1      al    add new blank line */
  1273. X  char_u *t_cil;    /* il       AL    add number of blank lines */
  1274. X  char_u *t_dl;        /* dl1      dl    delete line */
  1275. X  char_u *t_cdl;    /* dl       DL    delete number of lines */
  1276. X  char_u *t_cs;        /*          cs    scroll region */
  1277. X  char_u *t_ed;        /* clear    cl    clear screen */
  1278. X  char_u *t_ci;        /* civis    vi    cursur invisible */
  1279. X  char_u *t_cv;        /* cnorm    ve    cursur visible */
  1280. X  char_u *t_cvv;    /* cvvis    vs  cursor very visible */
  1281. X  char_u *t_tp;        /* sgr0     me    normal mode */
  1282. X  char_u *t_ti;        /* rev      mr    reverse mode */
  1283. X  char_u *t_tb;        /* bold     md    bold mode */
  1284. X  char_u *t_se;        /* rmso     se    normal mode */
  1285. X  char_u *t_so;        /* smso     so    standout mode */
  1286. X  char_u *t_ms;        /* msgr     ms    save to move cursor in reverse mode */
  1287. X  char_u *t_cm;        /* cup      cm    cursor motion */
  1288. X  char_u *t_sr;        /* ri       sr    scroll reverse (backward) */
  1289. X  char_u *t_cri;    /* cuf      RI    cursor number of chars right */
  1290. X  char_u *t_vb;        /* flash    vb    visual bell */
  1291. X  char_u *t_ks;        /* smkx     ks    put terminal in "keypad transmit" mode */
  1292. X  char_u *t_ke;        /* rmkx     ke    out of "keypad transmit" mode */
  1293. X  char_u *t_ts;        /*          ti    put terminal in termcap mode */
  1294. X  char_u *t_te;        /*          te    out of termcap mode */
  1295. X
  1296. X/* key codes */
  1297. X  char_u *t_ku;        /* kcuu1    ku    arrow up */
  1298. X  char_u *t_kd;        /* kcud1    kd    arrow down */
  1299. X  char_u *t_kl;        /* kcub1    kl    arrow left */
  1300. X  char_u *t_kr;        /* kcuf1    kr    arrow right */
  1301. X  char_u *t_sku;    /* shift arrow up */
  1302. X  char_u *t_skd;    /* shift arrow down */
  1303. X  char_u *t_skl;    /* kLFT     #4    shift arrow left */
  1304. X  char_u *t_skr;    /* kRIT     %    shift arrow right */
  1305. X  char_u *t_f1;        /* kf1      k1    function key 1 */
  1306. X  char_u *t_f2;        /* kf2      k2    function key 2 */
  1307. X  char_u *t_f3;        /* kf3      k3    function key 3 */
  1308. X  char_u *t_f4;        /* kf4      k4    function key 4 */
  1309. X  char_u *t_f5;        /* kf5      k5    function key 5 */
  1310. X  char_u *t_f6;        /* kf6      k6    function key 6 */
  1311. X  char_u *t_f7;        /* kf7      k7    function key 7 */
  1312. X  char_u *t_f8;        /* kf8      k8    function key 8 */
  1313. X  char_u *t_f9;        /* kf9      k9    function key 9 */
  1314. X  char_u *t_f10;    /* kf10     k;    function key 10 */
  1315. X  char_u *t_sf1;    /* kf11     F1    shifted function key 1 */
  1316. X  char_u *t_sf2;    /* kf12     F2    shifted function key 2 */
  1317. X  char_u *t_sf3;    /* kf13     F3    shifted function key 3 */
  1318. X  char_u *t_sf4;    /* kf14     F4    shifted function key 4 */
  1319. X  char_u *t_sf5;    /* kf15     F5    shifted function key 5 */
  1320. X  char_u *t_sf6;    /* kf16     F6    shifted function key 6 */
  1321. X  char_u *t_sf7;    /* kf17     F7    shifted function key 7 */
  1322. X  char_u *t_sf8;    /* kf18     F8    shifted function key 8 */
  1323. X  char_u *t_sf9;    /* kf19     F9    shifted function key 9 */
  1324. X  char_u *t_sf10;    /* kf20     FA    shifted function key 10 */
  1325. X  char_u *t_help;    /* khlp     %1    help key */
  1326. X  char_u *t_undo;    /* kund     &8    undo key */
  1327. X  /* adjust inchar() for last key entry! */
  1328. X
  1329. X  char_u *t_csc;    /* -        -    cursor relative to scrolling region */
  1330. X} Tcarr;
  1331. X
  1332. Xextern Tcarr term_strings;    /* currently used terminal strings */
  1333. X
  1334. X/*
  1335. X * strings used for terminal
  1336. X */
  1337. X#define T_EL    (term_strings.t_el)
  1338. X#define T_IL    (term_strings.t_il)
  1339. X#define T_CIL    (term_strings.t_cil)
  1340. X#define T_DL    (term_strings.t_dl)
  1341. X#define T_CDL    (term_strings.t_cdl)
  1342. X#define T_CS    (term_strings.t_cs)
  1343. X#define T_ED    (term_strings.t_ed)
  1344. X#define T_CI    (term_strings.t_ci)
  1345. X#define T_CV    (term_strings.t_cv)
  1346. X#define T_CVV    (term_strings.t_cvv)
  1347. X#define T_TP    (term_strings.t_tp)
  1348. X#define T_TI    (term_strings.t_ti)
  1349. X#define T_TB    (term_strings.t_tb)
  1350. X#define T_SE    (term_strings.t_se)
  1351. X#define T_SO    (term_strings.t_so)
  1352. X#define T_MS    (term_strings.t_ms)
  1353. X#define T_CM    (term_strings.t_cm)
  1354. X#define T_SR    (term_strings.t_sr)
  1355. X#define T_CRI    (term_strings.t_cri)
  1356. X#define T_VB    (term_strings.t_vb)
  1357. X#define T_KS    (term_strings.t_ks)
  1358. X#define T_KE    (term_strings.t_ke)
  1359. X#define T_TS    (term_strings.t_ts)
  1360. X#define T_TE    (term_strings.t_te)
  1361. X#define T_CSC    (term_strings.t_csc)
  1362. X
  1363. X
  1364. X#ifndef TERMINFO
  1365. X# ifndef NO_BUILTIN_TCAPS
  1366. X/*
  1367. X * here are the builtin termcap entries.
  1368. X * They not stored as complete Tcarr structures, as such a structure 
  1369. X * is to big. 
  1370. X * Each termcap is a concatenated string of entries, where '\0' characters
  1371. X * followed by a skip character sepereate the capabilities. The skip 
  1372. X * character is the relative structure offset for the following entry.
  1373. X * See parse_builtin_tcap() in term.c for all details.
  1374. X */
  1375. X#  define AMIGA_TCAP "amiga\0\
  1376. X\0\033[K\0\
  1377. X\0\033[L\0\
  1378. X\0\033[%dL\0\
  1379. X\0\033[M\0\
  1380. X\0\033[%dM\0\
  1381. X\1\014\0\
  1382. X\0\033[0 p\0\
  1383. X\0\033[1 p\0\
  1384. X\1\033[0m\0\
  1385. X\0\033[7m\0\
  1386. X\0\033[1m\0\
  1387. X\0\033[0m\0\
  1388. X\0\033[33m\0\
  1389. X\0\001\0\
  1390. X\0\033[%i%d;%dH\0\
  1391. X\1\033[%dC\0\
  1392. X\5\233A\0\
  1393. X\0\233B\0\
  1394. X\0\233D\0\
  1395. X\0\233C\0\
  1396. X\0\233T\0\
  1397. X\0\233S\0\
  1398. X\0\233 A\0\
  1399. X\0\233 @\0\
  1400. X\0\233\060~\0\
  1401. X\0\233\061~\0\
  1402. X\0\233\062~\0\
  1403. X\0\233\063~\0\
  1404. X\0\233\064~\0\
  1405. X\0\233\065~\0\
  1406. X\0\233\066~\0\
  1407. X\0\233\067~\0\
  1408. X\0\233\070~\0\
  1409. X\0\233\071~\0\
  1410. X\0\233\061\060~\0\
  1411. X\0\233\061\061~\0\
  1412. X\0\233\061\062~\0\
  1413. X\0\233\061\063~\0\
  1414. X\0\233\061\064~\0\
  1415. X\0\233\061\065~\0\
  1416. X\0\233\061\066~\0\
  1417. X\0\233\061\067~\0\
  1418. X\0\233\061\070~\0\
  1419. X\0\233\061\071~\0\
  1420. X\0\233?~\0\
  1421. X\0\0"
  1422. X
  1423. X#  define ATARI_TCAP "atari\0\
  1424. X\0\033l\0\
  1425. X\0\033L\0\
  1426. X\1\033M\0\
  1427. X\2\033E\0\
  1428. X\0\033f\0\
  1429. X\0\033e\0\
  1430. X\0\0"
  1431. X
  1432. X#  define ANSI_TCAP "ansi\0\
  1433. X\0\033[2K\0\
  1434. X\0\033[L\0\
  1435. X\0\033[%dL\0\
  1436. X\0\033[M\0\
  1437. X\0\033[%dM\0\
  1438. X\1\033[2J\0\
  1439. X\3\033[0m\0\
  1440. X\0\033[7m\0\
  1441. X\3\001\0\
  1442. X\0\033[%i%d;%dH\0\
  1443. X\1\033[%dC\0\
  1444. X\0\0"
  1445. X
  1446. X/*
  1447. X * These codes are valid when nansi.sys or equivalent has been installed.
  1448. X * Function keys on a PC are preceded with a NUL. These are converted into
  1449. X * K_NUL '\316' in GetChars(), because we cannot handle NULs in key codes.
  1450. X * CTRL-arrow is used instead of SHIFT-arrow.
  1451. X */
  1452. X#  define PCANSI_TCAP "pcansi\0\
  1453. X\0\033[K\0\
  1454. X\0\033[L\0\
  1455. X\1\033[M\0\
  1456. X\2\033[2J\0\
  1457. X\3\033[0m\0\
  1458. X\0\033[7m\0\
  1459. X\3\001\0\
  1460. X\0\033[%i%d;%dH\0\
  1461. X\1\033[%dC\0\
  1462. X\5\316H\0\
  1463. X\0\316P\0\
  1464. X\0\316K\0\
  1465. X\0\316M\0\
  1466. X\2\316s\0\
  1467. X\0\316t\0\
  1468. X\0\316;\0\
  1469. X\0\316<\0\
  1470. X\0\316=\0\
  1471. X\0\316>\0\
  1472. X\0\316?\0\
  1473. X\0\316@\0\
  1474. X\0\316A\0\
  1475. X\0\316B\0\
  1476. X\0\316C\0\
  1477. X\0\316D\0\
  1478. X\0\316T\0\
  1479. X\0\316U\0\
  1480. X\0\316V\0\
  1481. X\0\316W\0\
  1482. X\0\316X\0\
  1483. X\0\316Y\0\
  1484. X\0\316Z\0\
  1485. X\0\316[\0\
  1486. X\0\316\\\0\
  1487. X\0\316]\0\
  1488. X\0\0"
  1489. X
  1490. X/*
  1491. X * These codes are valid for the pc video.
  1492. X * The entries that start with ESC | are translated into conio calls in msdos.c.
  1493. X */
  1494. X#  define PCTERM_TCAP "pcterm\0\
  1495. X\0\033|K\0\
  1496. X\0\033|L\0\
  1497. X\1\033|M\0\
  1498. X\1\033|%i%d;%dr\0\
  1499. X\0\033|J\0\
  1500. X\3\033|0m\0\
  1501. X\0\033|112m\0\
  1502. X\0\033|63m\0\
  1503. X\0\033|0m\0\
  1504. X\0\033|31m\0\
  1505. X\0\001\0\
  1506. X\0\033|%i%d;%dH\0\
  1507. X\7\316H\0\
  1508. X\0\316P\0\
  1509. X\0\316K\0\
  1510. X\0\316M\0\
  1511. X\2\316s\0\
  1512. X\0\316t\0\
  1513. X\0\316;\0\
  1514. X\0\316<\0\
  1515. X\0\316=\0\
  1516. X\0\316>\0\
  1517. X\0\316?\0\
  1518. X\0\316@\0\
  1519. X\0\316A\0\
  1520. X\0\316B\0\
  1521. X\0\316C\0\
  1522. X\0\316D\0\
  1523. X\0\316T\0\
  1524. X\0\316U\0\
  1525. X\0\316V\0\
  1526. X\0\316W\0\
  1527. X\0\316X\0\
  1528. X\0\316Y\0\
  1529. X\0\316Z\0\
  1530. X\0\316[\0\
  1531. X\0\316\\\0\
  1532. X\0\316]\0\
  1533. X\0\0"
  1534. X
  1535. X/*
  1536. X * These codes are valid for the NT Console 
  1537. X * The entries that start with ESC | are translated into console calls 
  1538. X * in winnt.c.
  1539. X */
  1540. X#  define NTCONSOLE_TCAP "ntconsole\0\
  1541. X\0\033|K\0\
  1542. X\0\033|L\0\
  1543. X\0\033|%dL\0\
  1544. X\0\033|M\0\
  1545. X\0\033|%dM\0\
  1546. X\1\033|J\0\
  1547. X\0\033|v\0\
  1548. X\0\033|V\0\
  1549. X\1\033|0m\0\
  1550. X\0\033|112m\0\
  1551. X\0\033|63m\0\
  1552. X\0\033|0m\0\
  1553. X\0\033|31m\0\
  1554. X\0\001\0\
  1555. X\0\033|%i%d;%dH\0\
  1556. X\7\316H\0\
  1557. X\0\316P\0\
  1558. X\0\316K\0\
  1559. X\0\316M\0\
  1560. X\2\316s\0\
  1561. X\0\316t\0\
  1562. X\0\316;\0\
  1563. X\0\316<\0\
  1564. X\0\316=\0\
  1565. X\0\316>\0\
  1566. X\0\316?\0\
  1567. X\0\316@\0\
  1568. X\0\316A\0\
  1569. X\0\316B\0\
  1570. X\0\316C\0\
  1571. X\0\316D\0\
  1572. X\0\316T\0\
  1573. X\0\316U\0\
  1574. X\0\316V\0\
  1575. X\0\316W\0\
  1576. X\0\316X\0\
  1577. X\0\316Y\0\
  1578. X\0\316Z\0\
  1579. X\0\316[\0\
  1580. X\0\316\\\0\
  1581. X\0\316]\0\
  1582. X\0\0"
  1583. X
  1584. X
  1585. X#  define VT52_TCAP "vt52\0\
  1586. X\0\033K\0\
  1587. X\0\033T\0\
  1588. X\1\033U\0\
  1589. X\2\014\0\
  1590. X\3\033SO\0\
  1591. X\0\033S2\0\
  1592. X\3\001\0\
  1593. X\0\033Y%+ %+ \0\
  1594. X\0\0"
  1595. X
  1596. X/*
  1597. X * The xterm termcap is missing F14 and F15, because they send the same
  1598. X * codes as the undo and help key, although they don't work on all keyboards.
  1599. X */
  1600. X#  define XTERM_TCAP "xterm\0\
  1601. X\0\033[K\0\
  1602. X\0\033[L\0\
  1603. X\0\033[%dL\0\
  1604. X\0\033[M\0\
  1605. X\0\033[%dM\0\
  1606. X\0\033[%i%d;%dr\0\
  1607. X\0\033[H\033[2J\0\
  1608. X\3\033[m\0\
  1609. X\0\033[7m\0\
  1610. X\0\033[1m\0\
  1611. X\2\001\0\
  1612. X\0\033[%i%d;%dH\0\
  1613. X\0\033M\0\
  1614. X\0\033[%dC\0\
  1615. X\1\033[?1h\033=\0\
  1616. X\0\033[?1l\033>\0\
  1617. X\0\0337\033[?47h\0\
  1618. X\0\033[2J\033[?47l\0338\0\
  1619. X\0\033OA\0\
  1620. X\0\033OB\0\
  1621. X\0\033OD\0\
  1622. X\0\033OC\0\
  1623. X\0\033Ox\0\
  1624. X\0\033Or\0\
  1625. X\0\033Ot\0\
  1626. X\0\033Ov\0\
  1627. X\0\033[11~\0\
  1628. X\0\033[12~\0\
  1629. X\0\033[13~\0\
  1630. X\0\033[14~\0\
  1631. X\0\033[15~\0\
  1632. X\0\033[17~\0\
  1633. X\0\033[18~\0\
  1634. X\0\033[19~\0\
  1635. X\0\033[20~\0\
  1636. X\0\033[21~\0\
  1637. X\0\033[23~\0\
  1638. X\0\033[24~\0\
  1639. X\0\033[25~\0\
  1640. X\2\033[29~\0\
  1641. X\0\033[31~\0\
  1642. X\0\033[32~\0\
  1643. X\0\033[33~\0\
  1644. X\0\033[34~\0\
  1645. X\0\033[28~\0\
  1646. X\0\033[26~\0\
  1647. X\0\0"
  1648. X
  1649. X#  define DEBUG_TCAP "debug\0\
  1650. X\0[EL]\0\
  1651. X\0[IL]\0\
  1652. X\0[CIL%d]\0\
  1653. X\0[DL]\0\
  1654. X\0[CDL%d]\0\
  1655. X\0[%dCS%d]\0\
  1656. X\0[ED]\0\
  1657. X\0[CI]\0\
  1658. X\0[CV]\0\
  1659. X\0[CVV]\0\
  1660. X\0[TP]\0\
  1661. X\0[TI]\0\
  1662. X\0[TB]\0\
  1663. X\0[SE]\0\
  1664. X\0[SO]\0\
  1665. X\0[MS]\0\
  1666. X\0[%dCM%d]\0\
  1667. X\0[SR]\0\
  1668. X\0[CRI%d]\0\
  1669. X\0[VB]\0\
  1670. X\0[KS]\0\
  1671. X\0[KE]\0\
  1672. X\0[TI]\0\
  1673. X\0[TE]\0\
  1674. X\0[KU]\0\
  1675. X\0[KD]\0\
  1676. X\0[KL]\0\
  1677. X\0[KR]\0\
  1678. X\0[SKU]\0\
  1679. X\0[SKD]\0\
  1680. X\0[SKL]\0\
  1681. X\0[SKR]\0\
  1682. X\0[F1]\0\
  1683. X\0[F2]\0\
  1684. X\0[F3]\0\
  1685. X\0[F4]\0\
  1686. X\0[F5]\0\
  1687. X\0[F6]\0\
  1688. X\0[F7]\0\
  1689. X\0[F8]\0\
  1690. X\0[F9]\0\
  1691. X\0[F10]\0\
  1692. X\0[SF1]\0\
  1693. X\0[SF2]\0\
  1694. X\0[SF3]\0\
  1695. X\0[SF4]\0\
  1696. X\0[SF5]\0\
  1697. X\0[SF6]\0\
  1698. X\0[SF7]\0\
  1699. X\0[SF8]\0\
  1700. X\0[SF9]\0\
  1701. X\0[SF10]\0\
  1702. X\0[HELP]\0\
  1703. X\0[UNDO]\0\
  1704. X\0\0"
  1705. X
  1706. X#  ifdef ATARI
  1707. X#   define DFLT_TCAP ATARI_TCAP
  1708. X#  endif /* ATARI */
  1709. X
  1710. X#  ifdef AMIGA
  1711. X#   define DFLT_TCAP AMIGA_TCAP
  1712. X#  endif /* AMIGA */
  1713. X
  1714. X#  ifdef NT
  1715. X#   define DFLT_TCAP NTCONSOLE_TCAP
  1716. X#  else
  1717. X#   ifdef MSDOS
  1718. X#    define DFLT_TCAP PCTERM_TCAP                       
  1719. X#   endif /* MSDOS */                                   
  1720. X#  endif /* NT */ 
  1721. X
  1722. X#  ifdef UNIX
  1723. X#   define DFLT_TCAP ANSI_TCAP
  1724. X#  endif /* UNIX */
  1725. X
  1726. X# else /* NO_BUILTIN_TCAPS */
  1727. X#  define DUMB_TCAP "dumb\0\
  1728. X\6\014\0\
  1729. X\9\033[%i%d;%dH\0\
  1730. X\0\0"
  1731. X# endif /* NO_BUILTIN_TCAPS */
  1732. X
  1733. X#else /* TERMINFO */
  1734. X# ifndef NO_BUILTIN_TCAPS
  1735. X/*
  1736. X * here are the builtin termcap entries.
  1737. X * They not stored as complete Tcarr structures, as such a structure 
  1738. X * is to big. 
  1739. X * Each termcap is a concatenated string of entries, where '\0' characters
  1740. X * followed by a skip character sepereate the capabilities. The skip 
  1741. X * character is the relative structure offset for the following entry.
  1742. X * See parse_builtin_tcap() in term.c for all details.
  1743. X */
  1744. X#  define AMIGA_TCAP "amiga\0\
  1745. X\0\033[K\0\
  1746. X\0\033[L\0\
  1747. X\0\033[%p1%dL\0\
  1748. X\0\033[M\0\
  1749. X\0\033[%p1%dM\0\
  1750. X\1\014\0\
  1751. X\0\033[0 p\0\
  1752. X\0\033[1 p\0\
  1753. X\1\033[0m\0\
  1754. X\0\033[7m\0\
  1755. X\0\033[1m\0\
  1756. X\0\033[0m\0\
  1757. X\0\033[33m\0\
  1758. X\0\001\0\
  1759. X\0\033[%i%p1%d;%p2%dH\0\
  1760. X\1\033[%p1%dC\0\
  1761. X\5\233A\0\
  1762. X\0\233B\0\
  1763. X\0\233D\0\
  1764. X\0\233C\0\
  1765. X\0\233T\0\
  1766. X\0\233S\0\
  1767. X\0\233 A\0\
  1768. X\0\233 @\0\
  1769. X\0\233\060~\0\
  1770. X\0\233\061~\0\
  1771. X\0\233\062~\0\
  1772. X\0\233\063~\0\
  1773. X\0\233\064~\0\
  1774. X\0\233\065~\0\
  1775. X\0\233\066~\0\
  1776. X\0\233\067~\0\
  1777. X\0\233\070~\0\
  1778. X\0\233\071~\0\
  1779. X\0\233\061\060~\0\
  1780. X\0\233\061\061~\0\
  1781. X\0\233\061\062~\0\
  1782. X\0\233\061\063~\0\
  1783. X\0\233\061\064~\0\
  1784. X\0\233\061\065~\0\
  1785. X\0\233\061\066~\0\
  1786. X\0\233\061\067~\0\
  1787. X\0\233\061\070~\0\
  1788. X\0\233\061\071~\0\
  1789. X\0\233?~\0\
  1790. X\0\0"
  1791. X
  1792. X#  define ATARI_TCAP "atari\0\
  1793. X\0\033l\0\
  1794. X\0\033L\0\
  1795. X\1\033M\0\
  1796. X\2\033E\0\
  1797. X\0\033f\0\
  1798. X\0\033e\0\
  1799. X\0\0"
  1800. X
  1801. X#  define ANSI_TCAP "ansi\0\
  1802. X\0\033[2K\0\
  1803. X\0\033[L\0\
  1804. X\0\033[%p1%dL\0\
  1805. X\0\033[M\0\
  1806. X\0\033[%p1%dM\0\
  1807. X\1\033[2J\0\
  1808. X\3\033[0m\0\
  1809. X\0\033[7m\0\
  1810. X\3\001\0\
  1811. X\0\033[%i%p1%d;%p2%dH\0\
  1812. X\1\033[%p1%dC\0\
  1813. X\0\0"
  1814. X
  1815. X/*
  1816. X * These codes are valid when nansi.sys or equivalent has been installed.
  1817. X * Function keys on a PC are preceded with a NUL. These are converted into
  1818. X * K_NUL '\316' in GetChars(), because we cannot handle NULs in key codes.
  1819. X * CTRL-arrow is used instead of SHIFT-arrow.
  1820. X */
  1821. X#  define PCANSI_TCAP "pcansi\0\
  1822. X\0\033[K\0\
  1823. X\0\033[L\0\
  1824. X\1\033[M\0\
  1825. X\2\033[2J\0\
  1826. X\3\033[0m\0\
  1827. X\0\033[7m\0\
  1828. X\3\001\0\
  1829. X\0\033[%i%p1%d;%p2%dH\0\
  1830. X\1\033[%p1%dC\0\
  1831. X\5\316H\0\
  1832. X\0\316P\0\
  1833. X\0\316K\0\
  1834. X\0\316M\0\
  1835. X\2\316s\0\
  1836. X\0\316t\0\
  1837. X\0\316;\0\
  1838. X\0\316<\0\
  1839. X\0\316=\0\
  1840. X\0\316>\0\
  1841. X\0\316?\0\
  1842. X\0\316@\0\
  1843. X\0\316A\0\
  1844. X\0\316B\0\
  1845. X\0\316C\0\
  1846. X\0\316D\0\
  1847. X\0\316T\0\
  1848. X\0\316U\0\
  1849. X\0\316V\0\
  1850. X\0\316W\0\
  1851. X\0\316X\0\
  1852. X\0\316Y\0\
  1853. X\0\316Z\0\
  1854. X\0\316[\0\
  1855. X\0\316\\\0\
  1856. X\0\316]\0\
  1857. X\0\0"
  1858. X
  1859. X/*
  1860. X * These codes are valid for the pc video.
  1861. X * The entries that start with ESC | are translated into conio calls in msdos.c.
  1862. X */
  1863. X#  define PCTERM_TCAP "pcterm\0\
  1864. X\0\033|K\0\
  1865. X\0\033|L\0\
  1866. X\1\033|M\0\
  1867. X\1\033|%i%p1%d;%p2%dr\0\
  1868. X\0\033|J\0\
  1869. X\3\033|0m\0\
  1870. X\0\033|112m\0\
  1871. X\0\033|63m\0\
  1872. X\0\033|0m\0\
  1873. X\0\033|31m\0\
  1874. X\0\001\0\
  1875. X\0\033|%i%p1%d;%p2%dH\0\
  1876. X\7\316H\0\
  1877. X\0\316P\0\
  1878. X\0\316K\0\
  1879. X\0\316M\0\
  1880. X\2\316s\0\
  1881. X\0\316t\0\
  1882. X\0\316;\0\
  1883. X\0\316<\0\
  1884. X\0\316=\0\
  1885. X\0\316>\0\
  1886. X\0\316?\0\
  1887. X\0\316@\0\
  1888. X\0\316A\0\
  1889. X\0\316B\0\
  1890. X\0\316C\0\
  1891. X\0\316D\0\
  1892. X\0\316T\0\
  1893. X\0\316U\0\
  1894. X\0\316V\0\
  1895. X\0\316W\0\
  1896. X\0\316X\0\
  1897. X\0\316Y\0\
  1898. X\0\316Z\0\
  1899. X\0\316[\0\
  1900. X\0\316\\\0\
  1901. X\0\316]\0\
  1902. X\0\0"
  1903. X
  1904. X/*
  1905. X * These codes are valid for the NT Console 
  1906. X * The entries that start with ESC | are translated into console calls 
  1907. X * in winnt.c.
  1908. X */
  1909. X#  define NTCONSOLE_TCAP "ntconsole\0\
  1910. X\0\033|K\0\
  1911. X\0\033|L\0\
  1912. X\0\033|%dL\0\
  1913. X\0\033|M\0\
  1914. X\0\033|%dM\0\
  1915. X\1\033|J\0\
  1916. X\0\033|v\0\
  1917. X\0\033|V\0\
  1918. X\1\033|0m\0\
  1919. X\0\033|112m\0\
  1920. X\0\033|63m\0\
  1921. X\0\033|0m\0\
  1922. X\0\033|31m\0\
  1923. X\0\001\0\
  1924. X\0\033|%i%p1%d;%p2%dH\0\
  1925. X\7\316H\0\
  1926. X\0\316P\0\
  1927. X\0\316K\0\
  1928. X\0\316M\0\
  1929. X\2\316s\0\
  1930. X\0\316t\0\
  1931. X\0\316;\0\
  1932. X\0\316<\0\
  1933. X\0\316=\0\
  1934. X\0\316>\0\
  1935. X\0\316?\0\
  1936. X\0\316@\0\
  1937. X\0\316A\0\
  1938. X\0\316B\0\
  1939. X\0\316C\0\
  1940. X\0\316D\0\
  1941. X\0\316T\0\
  1942. X\0\316U\0\
  1943. X\0\316V\0\
  1944. X\0\316W\0\
  1945. X\0\316X\0\
  1946. X\0\316Y\0\
  1947. X\0\316Z\0\
  1948. X\0\316[\0\
  1949. X\0\316\\\0\
  1950. X\0\316]\0\
  1951. X\0\0"
  1952. X
  1953. X
  1954. X#  define VT52_TCAP "vt52\0\
  1955. X\0\033K\0\
  1956. X\0\033T\0\
  1957. X\1\033U\0\
  1958. X\2\014\0\
  1959. X\3\033SO\0\
  1960. X\0\033S2\0\
  1961. X\3\001\0\
  1962. X\0\033Y%+ %+ \0\
  1963. X\0\0"
  1964. X
  1965. X/*
  1966. X * The xterm termcap is missing F14 and F15, because they send the same
  1967. X * codes as the undo and help key, although they don't work on all keyboards.
  1968. X */
  1969. X#  define XTERM_TCAP "xterm\0\
  1970. X\0\033[K\0\
  1971. X\0\033[L\0\
  1972. X\0\033[%p1%dL\0\
  1973. X\0\033[M\0\
  1974. X\0\033[%p1%dM\0\
  1975. X\0\033[%i%p1%d;%p2%dr\0\
  1976. X\0\033[H\033[2J\0\
  1977. X\3\033[m\0\
  1978. X\0\033[7m\0\
  1979. X\3\001\0\
  1980. X\0\033[%i%p1%d;%p2%dH\0\
  1981. X\0\033M\0\
  1982. X\0\033[%p1%dC\0\
  1983. X\1\033[?1h\033=\0\
  1984. X\0\033[?1l\033>\0\
  1985. X\0\0337\033[?47h\0\
  1986. X\0\033[2J\033[?47l\0338\0\
  1987. X\0\033OA\0\
  1988. X\0\033OB\0\
  1989. X\0\033OD\0\
  1990. X\0\033OC\0\
  1991. X\0\033Ox\0\
  1992. X\0\033Or\0\
  1993. X\0\033Ot\0\
  1994. X\0\033Ov\0\
  1995. X\0\033[11~\0\
  1996. X\0\033[12~\0\
  1997. X\0\033[13~\0\
  1998. X\0\033[14~\0\
  1999. X\0\033[15~\0\
  2000. X\0\033[17~\0\
  2001. X\0\033[18~\0\
  2002. X\0\033[19~\0\
  2003. X\0\033[20~\0\
  2004. X\0\033[21~\0\
  2005. X\0\033[23~\0\
  2006. X\0\033[24~\0\
  2007. X\0\033[25~\0\
  2008. X\2\033[29~\0\
  2009. X\0\033[31~\0\
  2010. X\0\033[32~\0\
  2011. X\0\033[33~\0\
  2012. X\0\033[34~\0\
  2013. X\0\033[28~\0\
  2014. X\0\033[26~\0\
  2015. X\0\0"
  2016. X
  2017. X#  define DEBUG_TCAP "debug\0\
  2018. X\0[EL]\0\
  2019. X\0[IL]\0\
  2020. X\0[CIL%p1%d]\0\
  2021. X\0[DL]\0\
  2022. X\0[CDL%p1%d]\0\
  2023. X\0[%p1%dCS%p2%d]\0\
  2024. X\0[ED]\0\
  2025. X\0[CI]\0\
  2026. X\0[CV]\0\
  2027. X\0[CVV]\0\
  2028. X\0[TP]\0\
  2029. X\0[TI]\0\
  2030. X\0[TB]\0\
  2031. X\0[SE]\0\
  2032. X\0[SO]\0\
  2033. X\0[MS]\0\
  2034. X\0[%p1%dCM%p2%d]\0\
  2035. X\0[SR]\0\
  2036. X\0[CRI%p1%d]\0\
  2037. X\0[VB]\0\
  2038. X\0[KS]\0\
  2039. X\0[KE]\0\
  2040. X\0[TI]\0\
  2041. X\0[TE]\0\
  2042. X\0[KU]\0\
  2043. X\0[KD]\0\
  2044. X\0[KL]\0\
  2045. X\0[KR]\0\
  2046. X\0[SKU]\0\
  2047. X\0[SKD]\0\
  2048. X\0[SKL]\0\
  2049. X\0[SKR]\0\
  2050. X\0[F1]\0\
  2051. X\0[F2]\0\
  2052. X\0[F3]\0\
  2053. X\0[F4]\0\
  2054. X\0[F5]\0\
  2055. X\0[F6]\0\
  2056. X\0[F7]\0\
  2057. X\0[F8]\0\
  2058. X\0[F9]\0\
  2059. X\0[F10]\0\
  2060. X\0[SF1]\0\
  2061. X\0[SF2]\0\
  2062. X\0[SF3]\0\
  2063. X\0[SF4]\0\
  2064. X\0[SF5]\0\
  2065. X\0[SF6]\0\
  2066. X\0[SF7]\0\
  2067. X\0[SF8]\0\
  2068. X\0[SF9]\0\
  2069. X\0[SF10]\0\
  2070. X\0[HELP]\0\
  2071. X\0[UNDO]\0\
  2072. X\0\0"
  2073. X
  2074. X#  ifdef ATARI
  2075. X#   define DFLT_TCAP ATARI_TCAP
  2076. X#  endif /* ATARI */
  2077. X
  2078. X#  ifdef AMIGA
  2079. X#   define DFLT_TCAP AMIGA_TCAP
  2080. X#  endif /* AMIGA */
  2081. X
  2082. X#  ifdef NT
  2083. X#   define DFLT_TCAP NTCONSOLE_TCAP
  2084. X#  else
  2085. X#   ifdef MSDOS
  2086. X#    define DFLT_TCAP PCTERM_TCAP                       
  2087. X#   endif /* MSDOS */                                   
  2088. X#  endif /* NT */ 
  2089. X
  2090. X#  ifdef UNIX
  2091. X#   define DFLT_TCAP ANSI_TCAP
  2092. X#  endif /* UNIX */
  2093. X
  2094. X# else /* NO_BUILTIN_TCAPS */
  2095. X/*
  2096. X * The most minimal terminal: only clear screen and cursor positioning
  2097. X */
  2098. X#  define DUMB_TCAP "dumb\0\
  2099. X\6\014\0\
  2100. X\9\033[%i%p1%d;%p2%dH\0\
  2101. X\0\0"
  2102. X# endif /* NO_BUILTIN_TCAPS */
  2103. X
  2104. X#endif
  2105. END_OF_FILE
  2106.   if test 16147 -ne `wc -c <'vim/src/term.h'`; then
  2107.     echo shar: \"'vim/src/term.h'\" unpacked with wrong size!
  2108.   fi
  2109.   # end of 'vim/src/term.h'
  2110. fi
  2111. if test -f 'vim/tools/ref' -a "${1}" != "-c" ; then 
  2112.   echo shar: Will not clobber existing file \"'vim/tools/ref'\"
  2113. else
  2114.   echo shar: Extracting \"'vim/tools/ref'\" \(137 characters\)
  2115.   sed "s/^X//" >'vim/tools/ref' <<'END_OF_FILE'
  2116. X#!/bin/sh
  2117. X#
  2118. X# ref - Check spelling of the arguments
  2119. X#
  2120. X# Usage: ref word ..
  2121. X#
  2122. X# can be used for the K command of Vim
  2123. X#
  2124. Xspell <<EOF
  2125. X$*
  2126. XEOF
  2127. END_OF_FILE
  2128.   if test 137 -ne `wc -c <'vim/tools/ref'`; then
  2129.     echo shar: \"'vim/tools/ref'\" unpacked with wrong size!
  2130.   fi
  2131.   # end of 'vim/tools/ref'
  2132. fi
  2133. echo shar: End of archive 5 \(of 26\).
  2134. cp /dev/null ark5isdone
  2135. MISSING=""
  2136. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ; do
  2137.     if test ! -f ark${I}isdone ; then
  2138.     MISSING="${MISSING} ${I}"
  2139.     fi
  2140. done
  2141. if test "${MISSING}" = "" ; then
  2142.     echo You have unpacked all 26 archives.
  2143.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2144. else
  2145.     echo You still must unpack the following archives:
  2146.     echo "        " ${MISSING}
  2147. fi
  2148. exit 0
  2149. exit 0 # Just in case...
  2150.