home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 350.lha / DEdit_v2.01 / stringlib.h < prev    next >
C/C++ Source or Header  |  1990-02-25  |  2KB  |  66 lines

  1. /*********************************************************************
  2.  * stringlib.h
  3.  *
  4.  * defines for use with string.library
  5.  *
  6.  *********************************************************************/
  7.  
  8. #include    <exec/types.h>
  9. #include    <exec/libraries.h>
  10. #include    <exec/execbase.h>
  11. #include    <libraries/dosextens.h>
  12.  
  13. #define STRINGLIBNAME "string.library"
  14.  
  15. struct StringLibrary {
  16.     struct Library        stl_StringLib;
  17.     struct ExecBase        *stl_SysLib;
  18.     struct DosLibrary    *stl_DosLib;
  19.     struct InuitionBase    *stl_IntLib;
  20.     APTR            stl_SegList;
  21.     UBYTE            stl_Flags;
  22.     UBYTE            stl_pad;
  23. };
  24.  
  25. /*  StrRequester struct is input to StrReq() function.  */
  26. struct StrRequester {
  27.     SHORT    sr_LeftEdge;
  28.     SHORT    sr_TopEdge;
  29.     long    sr_MaxOutWidth;
  30.     char    *sr_Prompt;
  31.     char    *sr_OutBuff;
  32.     struct Screen *sr_Screen;
  33. };
  34.  
  35. /* Function Definitions */
  36.  
  37. /* prototypes */
  38. void           LtoX(long, char *);
  39. ULONG          XtoL(char *);
  40. long           StrReq(struct StrRequester *);
  41. void           Center(char *, char *, int, char);
  42. ULONG          LengthOf(char *);
  43. void           CopyStr(char *, char *);
  44. unsigned char  CtoP(int);
  45. long           BtoCStr(BPTR, char *, int);
  46. long           MidStr(char *, char *, int, int);
  47. long           LeftStr(char *, char *, int);
  48. long           RightStr(char *, char *, int);
  49. long           InsertStr(char *, char *, char *, int);
  50. long           DelStr(char *, char *, int, int);
  51.  
  52. /* pragmas */
  53. #pragma libcall StringBase LtoX 1e 8002
  54. #pragma libcall StringBase XtoL 24 801
  55. #pragma libcall StringBase StrReq 2a 801
  56. #pragma libcall StringBase Center 30 109804
  57. #pragma libcall StringBase LengthOf 36 801
  58. #pragma libcall StringBase CopyStr 3c 9802
  59. #pragma libcall StringBase CtoP 42 1
  60. #pragma libcall StringBase BtoCStr 48 9803
  61. #pragma libcall StringBase MidStr 4e 109804
  62. #pragma libcall StringBase LeftStr 54 9803
  63. #pragma libcall StringBase RightStr 5a 9803
  64. #pragma libcall StringBase InsertStr 60 109804
  65. #pragma libcall StringBase DelStr 66 109804
  66.