home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / develop / galer / reqlibrary / reqlib.lha / ReqLib / include / libraries / reqbase.i < prev   
Text File  |  1990-12-18  |  17KB  |  498 lines

  1.  
  2. ; reqlibrary.i © 1988/1989/1990 reserved by Colin Fox and Bruce Dawson */
  3.  
  4.     IFND    REQ_LIBRARY_I
  5. REQ_LIBRARY_I    SET    1
  6.  
  7. **
  8. **    $Filename: libraries/reqbase.i $
  9. **    $Release: 2.0 release 1 $
  10. **    $Revision: 2.5 $
  11. **    $Date: 90/11/6 $
  12. **
  13. **    req.library definitions
  14. **
  15. **
  16.  
  17.  
  18.         INCLUDE    "intuition/intuition.i"
  19.  
  20.         INCLUDE    "libraries/dos.i"
  21.         INCLUDE    "libraries/dosextens.i"
  22.  
  23.         INCLUDE    "exec/memory.i"
  24.         INCLUDE    "exec/initializers.i"
  25.         INCLUDE    "exec/alerts.i"
  26.  
  27. REQVERSION    EQU    2
  28.  
  29.  
  30. PairsSize    EQU    20
  31.  
  32.  STRUCTURE    GadgetBlock.,0        ;a boolean button style text gadget
  33.     STRUCT    gb_Gadget,gg_SIZEOF
  34.     STRUCT    gb_Border,bd_SIZEOF
  35.     STRUCT    gb_Pairs,PairsSize
  36.     STRUCT    gb_Text,it_SIZEOF
  37.     LABEL    gb_SIZEOF
  38.  
  39.  STRUCTURE    StringBlock.,0        ;a string gadget
  40.     STRUCT    sb_Gadget,gg_SIZEOF
  41.     STRUCT    sb_Info,si_SIZEOF
  42.     STRUCT    sb_Border,bd_SIZEOF
  43.     STRUCT    sb_Pairs,PairsSize
  44.     LABEL    sb_SIZEOF
  45.  
  46.  STRUCTURE    PropBlock.,0        ;a prop gadget
  47.     STRUCT    pb_Gadget,gg_SIZEOF
  48.     STRUCT    pb_Info,pi_SIZEOF
  49.     STRUCT    pb_Image,ig_SIZEOF
  50.     LABEL    pb_SIZEOF
  51.  
  52.  STRUCTURE    SliderBlock.,0        ;a slider (two arrows & a prop)
  53.     STRUCT    slb_ArrowUpLt,gg_SIZEOF
  54.     STRUCT    slb_ImageUpLt,ig_SIZEOF
  55.     STRUCT    slb_ArrowDnRt,gg_SIZEOF
  56.     STRUCT    slb_ImageDnRt,ig_SIZEOF
  57.     STRUCT    slb_Prop,pb_SIZEOF    ;this is at the end for REFRESH GLIST purposes
  58.     LABEL    slb_SIZEOF
  59.  
  60.  STRUCTURE    TwoImageBlock,0
  61.     STRUCT    tib_Gadget,gg_SIZEOF
  62.     STRUCT    tib_Image1,ig_SIZEOF
  63.     STRUCT    tib_Image2,ig_SIZEOF
  64.     LABEL    tib_SIZEOF
  65.  
  66. ATTITUDEB    EQU    16    ;Bit# of the attitude bit.
  67.  
  68. HorizSlider    EQU    0        ;which way the slider stands
  69. VertSlider    EQU    1<<ATTITUDEB    ;This is so that it bypasses all gadget flags.
  70.  
  71.  
  72.  
  73. ;         This structure is use with the TextRequester function.
  74.  
  75.  STRUCTURE TRStructure,0
  76.     APTR    TR_Text            ;This is the message text, including printf() style formatting if desired.
  77.     APTR    TR_Controls        ;This is the address of the parameter list, if printf() style formatting is used.
  78.     APTR    TR_Window        ;This is an optional (zero if not used) pointer to a window on the screen you 
  79.                     ;would like the requester to show up on.
  80.     APTR    TR_MiddleText        ;If non-zero, this is the text for the gadget in the lower middle (returns 2).
  81.     APTR    TR_PositiveText        ;If non-zero, this is the text for the gadget in the lower left hand corner (returns 1).
  82.     APTR    TR_NegativeText        ;If non-zero, this is the text for the gadget in the lower right (returns 0).
  83.     APTR    TR_Title        ;This is the title for the window.
  84.     WORD    TR_KeyMask        ;This is the qualifier mask for the keyboard shortcuts.
  85.                     ;Use $FFFF to allow any qualifiers (or none).
  86.                     ;Zero means that no keyboard shortcuts are allowed.
  87.     WORD    TR_textcolor        ;Color of the text.  Uses Color 1 if no Color specified.
  88.     WORD    TR_detailcolor        ;Detail and block color, as in a NewWindow structure.  If
  89.     WORD    TR_blockcolor        ;both are left zero, block pen will be set to 1.
  90.     WORD    TR_versionnumber    ;Make SURE this is set to the current version of REQVERSION.
  91.     UWORD    TR_Timeout        ;The timeout value, in seconds.
  92.     LONG    TR_AbortMask        ;
  93.     UWORD    TR_rfu1
  94.     LABEL    TR_SIZEOF
  95.  
  96. ;/* NOTE:
  97. ;
  98. ;    The  control  values  mentioned above are used if you choose to insert
  99. ;printf  style directives in your strings and should contain the address of
  100. ;a list of control parameters, usually on the stack.
  101. ;    */
  102.  
  103.  
  104.  
  105. ;         This structure is for use with the GetLong function.
  106.  
  107. GLNODEFAULTB    EQU    0    ;Set this bit in the flags if you don't want a default
  108.                 ;value to show up in the get long string gadget.  For
  109.                 ;some things this is much better than having a zero
  110.                 ;show up.
  111.  
  112. GLNODEFAULTM    EQU    1<<GLNODEFAULTB
  113.  
  114.  STRUCTURE    GetLongStruct,0
  115.     APTR    gl_titlebar
  116.     LONG    gl_defaultval
  117.     LONG    gl_minlimit
  118.     LONG    gl_maxlimit
  119.     LONG    gl_result
  120.     APTR    gl_window
  121.     WORD    gl_versionnumber;    ;Make SURE this is set to REQVERSION
  122.     LONG    gl_flags;        ;Some, uh flags.  See above for bit definitions.
  123.     LONG    gl_rfu2;        ;Make SURE you leave these two zeroed also.
  124.     LABEL    gl_SIZEOF
  125.  
  126.  
  127.  STRUCTURE    GetStringStruct,0
  128.     APTR    gs_titlebar
  129.     APTR    gs_stringbuffer
  130.     APTR    gs_window
  131.     WORD    gs_stringsize
  132.     WORD    gs_visiblesize
  133.     WORD    gs_versionnumber    ;this should be REQVERSION
  134.     LONG    gs_flags
  135.     LONG    gs_rfu1
  136.     LONG    gs_rfu2
  137.     LONG    gs_rfu3
  138.     LABEL    gs_SIZEOF
  139.  
  140.  
  141.  
  142. ;         Remember,   if  you  don't  want  to  go  through  the  hassle  of
  143. ; initializing a ExtendedColorRequester structure, you can always just call
  144. ; ColorRequester  (as opposed to ExtendedColorRequester).  ColorRequester
  145. ; just  takes  a  single  parameter, in D0, the color that should start out
  146. ; being highlit.  It returns a single value, the color that was selected at
  147. ; the end.
  148.  
  149. ;         This structure is for use with the ExtendedColorRequester (_not_,
  150. ; the ColorRequester) function.
  151.  
  152.  STRUCTURE    ExtendedColorRequesterStruct,0
  153.     LONG    ecr_defcolor        ;The color that is initially highlit.
  154.     APTR    ecr_window        ;The window the 'requester' opens up in (zero normally).
  155.     LONG    ecr_rfu1            ;Who knows what these will be used for,
  156.     LONG    ecr_rfu2            ;but I'm sure we'll think of something.
  157.     LONG    ecr_rfu3            ;Until then, just keep these zeroed.
  158.     LONG    ecr_rfu4            ;Okay?
  159.     LONG    ecr_rfu5
  160.     LABEL    ecr_SIZEOF
  161.  
  162.  
  163.  
  164.     IFND    DSIZE
  165. DSIZE        EQU    130
  166. FCHARS        EQU    30
  167.     ENDC
  168. WILDLENGTH    EQU    30
  169.  
  170. ;     These  are  the  bit  numbers  of various bits that you can set in the
  171. ; Flags  field of the file requester structure.  The actual values that come
  172. ; out of these bit numbers are defined in the set of includes below with the
  173. ; same  names  but  with  an  M  (for  mask) ending instead of a B (for bit)
  174. ; ending.
  175.  
  176. FRQSHOWINFOB    EQU    0    ;Set this in Flags if you want .info files to show.  They default to hidden.
  177. FRQEXTSELECTB    EQU    1    ;Set this in Flags if you want extended select.  Default is not.
  178. FRQCACHINGB    EQU    2    ;Set this in Flags if you want directory caching.  Default is not.
  179. FRQGETFONTSB    EQU    3    ;Set this in Flags if you want a font requester rather than a file requester.
  180. FRQINFOGADGETB    EQU    4    ;Set this in Flags if you want a hide-info files gadget.
  181. FRQHIDEWILDSB    EQU    5    ;Set this in Flags if you DON'T want 'show' and 'hide' string gadgets.
  182. FRQABSOLUTEXYB    EQU    6    ;Use absolute x,y positions rather than centering on mouse.
  183. FRQCACHEPURGEB    EQU    7    ;Purge the cache whenever the directory date stamp changes if this is set.
  184. FRQNOHALFCACHEB    EQU    8    ;Don't cache a directory unless it is completely read in when this is set.
  185. FRQNOSORTB    EQU    9    ;Set this in Flags if you DON'T want sorted directories.
  186. FRQNODRAGB    EQU    10    ;Set this in Flags if you DON'T want a drag bar and depth gadgets.
  187. FRQSAVINGB    EQU    11    ;Set this bit if you are selecting a file to save to.
  188. FRQLOADINGB    EQU    12    ;Set this bit if you are selecting a file(s) to load from.
  189.                 ;These two bits (save and load) aren't currently used for
  190.                 ;anything, but they may be in the future, so you should
  191.                 ;remember to set them.  Also, these bits make it easier if
  192.                 ;somebody wants to customize the file requester for their
  193.                 ;machine.  They can make it behave differently for loading
  194.                 ;vs saving.
  195. FRQDIRONLYB    EQU    13    ;Allow the user to select a directory, rather than a file.
  196.  
  197. ;     These  are the mask values that you can OR into the Flags field of the
  198. ; file requester structure.
  199.  
  200. FRQSHOWINFOM    EQU    1<<FRQSHOWINFOB
  201. FRQEXTSELECTM    EQU    1<<FRQEXTSELECTB
  202. FRQCACHINGM    EQU    1<<FRQCACHINGB
  203. FRQGETFONTSM    EQU    1<<FRQGETFONTSB
  204. FRQINFOGADGETM    EQU    1<<FRQINFOGADGETB
  205. FRQHIDEWILDSM    EQU    1<<FRQHIDEWILDSB
  206. FRQABSOLUTEXYM    EQU    1<<FRQABSOLUTEXYB
  207. FRQCACHEPURGEM    EQU    1<<FRQCACHEPURGEB
  208. FRQNOHALFCACHEM    EQU    1<<FRQNOHALFCACHEB
  209. FRQNOSORTM    EQU    1<<FRQNOSORTB
  210. FRQNODRAGM    EQU    1<<FRQNODRAGB
  211. FRQSAVINGM    EQU    1<<FRQSAVINGB
  212. FRQLOADINGM    EQU    1<<FRQLOADINGB
  213. FRQDIRONLYM    EQU    1<<FRQDIRONLYB
  214.  
  215.  
  216.  STRUCTURE    ESStructure,0        ;ExtendedSelectStructure
  217.         LONG    es_NextFile    ;This must be the first element!
  218.         WORD    es_NameLength    ;File name length, not including the terminating zero.
  219.         WORD    es_Pad
  220.         APTR    es_Node        ;Node that the user has extended selected.
  221.         LABEL    es_SIZEOF
  222.  
  223. ;         When  using  extended  select,  the  directory pointer is required
  224. ; since  only  the  file  names  are stored in the frq_ExtendedSelect linked
  225. ; list.   When  not  using  extended select, you can either have frq_Dir and
  226. ; frq_File  point  be initialized, or you can have frq_PathName initialized,
  227. ; or  both.   frq_PathName will contain the concatenation of the file and
  228. ; directory chosen.
  229.  
  230.  STRUCTURE    ReqFileRequester,0
  231.     UWORD    frq_VersionNumber        ;MUST BE REQVERSION!!!!!!!!!!!!!!!!!!
  232.  
  233.     ;You will probably want to initialize these three variables.
  234.     APTR    frq_Title            ; Hailing text
  235.     APTR    frq_Dir                ; Directory array (must be DSIZE+1 characters long)
  236.     APTR    frq_File            ; Filename array (must be FCHARS+1 characters long)
  237.     ;If you initialize this variable then the file requester will place the complete path name in here on exit.
  238.     APTR    frq_PathName            ; Complete path name array - (must be DSIZE+FCHARS+2 long)
  239.     ;If you want the file requester to pop up on your custom screen, put one of your window pointers here.
  240.     ;Or better yet, you can leave this field zeroed and put a pointer to one of your windows in the
  241.     ;pr_WindowPtr field in your process structure.
  242.     APTR    frq_Window            ; Window requesting or NULL
  243.     ;Initialize these to the number of lines and columns you want to appear in the inner window that
  244.     ;displays the file names.  If you leave these set to zero then default values will be used.
  245.     UWORD    frq_MaxExtendedSelect        ; Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.
  246.     UWORD    frq_numlines            ; Number of lines in file window.
  247.     UWORD    frq_numcolumns            ; Number of columns in file window.
  248.     UWORD    frq_devcolumns            ; Number of columns in device window.
  249.     ULONG    frq_Flags            ; Various - umm - flags.  See above for more info.
  250.     UWORD    frq_dirnamescolor    ;These five colors will all default
  251.     UWORD    frq_filenamescolor    ;to color one if you don't specify
  252.     UWORD    frq_devicenamescolor    ;a color (ie; if you specify color zero).
  253.     UWORD    frq_fontnamescolor    ;If you want color zero to be used, specify
  254.     UWORD    frq_fontsizescolor    ;color 32, or some other too large number
  255.                     ;which mods down to zero.
  256.  
  257.     UWORD    frq_detailcolor        ;If both of these colors are specified as
  258.     UWORD    frq_blockcolor        ;zero then the block pen will be set to one.
  259.  
  260.     UWORD    frq_gadgettextcolor    ;The color for the text of the five boolean gadgets.  Defaults to 1.
  261.     UWORD    frq_textmessagecolor    ;The color for the message at the screen top.  Defaults to 1.
  262.     UWORD    frq_stringnamecolor    ;The color for the words Drawer, File, Hide and Show.  Defaults to 3.
  263.     UWORD    frq_stringgadgetcolor    ;The color for the borders of the string gadgets.  Defaults to 3.
  264.                     ;Unfortunately it is not possible to specify
  265.                     ;the color of the actual text in an Intuition
  266.                     ;string gadget.
  267.     UWORD    frq_boxbordercolor    ;The color for the boxes around the file and directory areas.  Defaults to 3.
  268.     UWORD    frq_gadgetboxcolor    ;The color for the boxes around the five boolean gadgets.  Defaults to 3.
  269.  
  270.     STRUCT    frq_RFU_Stuff,36        ;This area, which is reserved for
  271.                         ;future use, should all be zero.
  272.  
  273.     STRUCT    frq_DirDateStamp,ds_SIZEOF    ; A copy of the cached directories date stamp.
  274.                         ; There should never be any need to change this.
  275.  
  276.     UWORD    frq_WindowLeftEdge;        ;These two fields are only used when the
  277.     UWORD    frq_WindowTopEdge;        ;FRQABSOLUTEXY flag is set.  They specify
  278.                         ;the location of the upper left hand
  279.                         ;corner of the window.
  280.  
  281.     UWORD    frq_FontYSize            ;These fields are used to return the selected
  282.     UWORD    frq_FontStyle            ;font size and style, only applicable when the
  283.                         ;font bit is set.
  284.  
  285.     ;If you set the extended select bit and the user extended selects, the list of filenames will start from here.
  286.     APTR    frq_ExtendedSelect        ; Linked list of ESStructures if more than one filename is chosen.
  287.     ;All of the following variables you shouldn't need to touch.  They contain fields that the file
  288.     ;requester sets and likes to preserve over calls, just to make life easier for the user.
  289.     STRUCT    frq_Hide,WILDLENGTH+2        ; Wildcards for files to hide.
  290.     STRUCT    frq_Show,WILDLENGTH+2        ; Wildcards for files to show.
  291.     WORD    frq_FileBufferPos        ; Cursor's  position  and first
  292.     WORD    frq_FileDispPos            ; displayed character number in
  293.     WORD    frq_DirBufferPos        ; the three string gadgets.  No
  294.     WORD    frq_DirDispPos            ; need  to initialized these if
  295.     WORD    frq_HideBufferPos        ; you don't want to.
  296.     WORD    frq_HideDispPos
  297.     WORD    frq_ShowBufferPos
  298.     WORD    frq_ShowDispPos
  299.  
  300. ;         The  following  fields are PRIVATE!  Don't go messing with them or
  301. ; wierd  things may/will happen.  If this isn't enough of a warning, go read
  302. ; the one in intuition.h, that should scare you off.
  303.  
  304.     APTR    frq_Memory            ; Memory allocated for dir entries.
  305.     APTR    frq_Memory2            ; Used for currently hidden files.
  306.     APTR    frq_Lock            ; Contains lock on directories being read across calls.
  307.     STRUCT    frq_PrivateDirBuffer,DSIZE+2    ; Used for keeping a record of which
  308.                         ; directory we have file names for.
  309.     APTR    frq_FileInfoBlock
  310.     WORD    frq_NumEntries
  311.     WORD    frq_NumHiddenEntries
  312.     WORD    frq_filestartnumber
  313.     WORD    frq_devicestartnumber
  314.     LABEL    frq_SIZEOF
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322. ;         This is used with the RealTimeScroll function.
  323.  
  324.  STRUCTURE    ReqScrollStruct,0
  325.     ULONG    ss_TopEntryNumber    ;This is the ordinal number of the first
  326.                     ;displayed entry.
  327.     ULONG    ss_NumEntries        ;This is the total number of entries in
  328.                     ;the list.
  329.     UWORD    ss_LineSpacing        ;This is how many pixels high each entry is.
  330.     ULONG    ss_NumLines        ;This is how many entries can be displayed simultaneously.
  331.     APTR    ss_PropGadget        ;This is a pointer to the prop gadget being monitored.
  332.  
  333.     APTR    ss_RedrawAll        ;This routine is used to redraw all of the
  334.                     ;entries when the user moves far enough
  335.                     ;that scrolling will take too long.
  336.  
  337.     APTR    ss_ReadMore        ;An optional routine that is called when
  338.                     ;the scroll routine is waiting for movement.
  339.                     ;This allows reading of new data while real
  340.                     ;time scrolling.
  341.     APTR    ss_ScrollAndDraw    ;This routine is called when the data needs
  342.                     ;to be scrolled and updated.  This routine is
  343.                     ;passed five long parameters (on the stack and
  344.                     ;in D0-D3/A0) which are, respectively:
  345.                     ;D0 - entry number of first line to be drawn.
  346.                     ;D1 - pixel offset to draw first line at.
  347.                     ;D2 - amount to scroll before doing any drawing.
  348.                     ;D3 - number of lines of data to draw.
  349.                     ;A0 - the Scroll structure itself.
  350.     WORD    versionnumber        ;REQVERSION should be put here.
  351.     LONG    rfu1            ;Make SURE you leave these two zeroed also.
  352.     LONG    rfu2            ;Make SURE you leave these two zeroed also.
  353.     LABEL    ss_SIZEOF
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  STRUCTURE    Arrows,0
  360.     STRUCT    ArrowUp,20
  361.     STRUCT    ArrowDown,20
  362.     STRUCT    ArrowLeft,18
  363.     STRUCT    ArrowRight,18
  364.     STRUCT    Letter_R,20
  365.     STRUCT    Letter_G,20
  366.     STRUCT    Letter_B,20
  367.     STRUCT    Letter_H,20
  368.     STRUCT    Letter_S,20
  369.     STRUCT    Letter_V,20
  370.     LABEL    chipstuff_SIZEOF
  371.  
  372. ; These are the positions relative to the rl_Images pointer.
  373. ;ie
  374. ;    MOVE.L    rl_Images(A6),A0
  375. ;    ADD.L    #ArrowLeft,A0        ;A0 now points at the left arrow.
  376.  
  377.  
  378.  STRUCTURE    ReqLib,LIB_SIZE
  379.     APTR    rl_SysLib
  380.     APTR    rl_DosLib        ;These must be kept in the same order,
  381.     APTR    rl_IntuiLib        ;the library expunge code depends on it.
  382.     APTR    rl_GfxLib        ;
  383.     APTR    rl_SegList
  384.     APTR    rl_Images        ;pointer to the arrow images.
  385.     BYTE    rl_Flags
  386.     BYTE    rl_Pad
  387.     APTR    rl_ConsoleDev        ;for RawKeyToAscii
  388.     APTR    rl_ConsoleHandle    ;so we can close the device later
  389.     APTR    rl_RexxSysBase        ;pointer to rexxsyslib.library
  390.     LABEL    MyLib_Sizeof
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.     LIBINIT
  398.     LIBDEF    _LVOCenter        ;1e
  399.  
  400.     LIBDEF    _LVOSetSize        ;24
  401.     LIBDEF    _LVOSetLocation        ;2a
  402.     LIBDEF    _LVOReadLocation    ;30
  403.  
  404.     LIBDEF    _LVOReqFormat        ;36
  405.  
  406.     LIBDEF    _LVODispatch        ;3c  Was Old function. Now is ARexx hook
  407.     LIBDEF    _LVOFakeFunction2    ;42  Old function.  Don't use.
  408.  
  409.     LIBDEF    _LVOFakeFunction3    ;48  Old function.  Don't use.
  410.     LIBDEF    _LVOFakeFunction4    ;4e  Old function.  Don't use.
  411.  
  412.     LIBDEF    _LVOFileRequester    ;54
  413.  
  414.     LIBDEF    _LVOColorRequester    ;5a
  415.  
  416.     LIBDEF    _LVODrawBox        ;60
  417.  
  418.     LIBDEF    _LVOMakeButton        ;66
  419.     LIBDEF    _LVOMakeScrollBar    ;6c
  420.  
  421.     LIBDEF    _LVOPurgeFiles        ;72
  422.  
  423.     LIBDEF    _LVOGetFontHeightAndWidth ;78
  424.  
  425.     LIBDEF    _LVOMakeGadget        ;7e
  426.     LIBDEF    _LVOMakeString        ;84
  427.     LIBDEF    _LVOMakeProp        ;8a
  428.  
  429.     LIBDEF    _LVOLinkGadget        ;90
  430.     LIBDEF    _LVOLinkStringGadget    ;96
  431.     LIBDEF    _LVOLinkPropGadget    ;9c
  432.  
  433.     LIBDEF    _LVOGetString        ;a2
  434.  
  435.     LIBDEF    _LVORealTimeScroll    ;a8
  436.  
  437.     LIBDEF    _LVOTextRequest        ;ae
  438.  
  439.     LIBDEF    _LVOGetLong        ;b4
  440.  
  441.     LIBDEF    _LVORawKeyToAscii    ;ba
  442.  
  443.     LIBDEF    _LVOExtendedColorRequester ;c0
  444.  
  445.     LIBDEF    _LVONewGetString    ;c6
  446.  
  447.  
  448.  
  449. REQNAME    MACRO
  450.     DC.B    'req.library',0
  451.     ENDM
  452.  
  453. ; This macro will open the RequesterLibrary for you. At the end, A6 will
  454. ;contain the library and D0/A0 will be correct. (What dos passed you)
  455.  
  456. OpenReq    MACRO
  457.     BRA.S    opnrq
  458.  
  459. dname    DC.B    'dos.library',0
  460. rlibmsg    DC.B    'You need V2+ of '
  461. ReqName    REQNAME
  462.     DC.B    10,13,0
  463. ;;;rliblng    EQU    *-rlibmsg
  464. rliblng    EQU    30
  465.     DS.W    0
  466.     EVEN
  467.  
  468. opnrq:
  469.     MOVEM.L    d0/a0,-(sp)
  470.     MOVE.L    4,A6
  471.     LEA.L    ReqName,a1
  472.     MOVEQ.L    #REQVERSION,d0
  473.     SYS    OpenLibrary
  474.     TST.L    d0
  475.     BNE.S    itsokay
  476.     LEA    dname,A1
  477.     SYS    OpenLibrary
  478.     TST.L    D0
  479.     BEQ.S    1$
  480.     MOVE.L    D0,A6
  481.     SYS    Output
  482.     MOVE.L    d0,d1
  483.     BEQ.S    1$            ;No output. Phooey.
  484.     MOVE.L    #rlibmsg,d2        ;Tell user he needs to find library.
  485.     MOVE.L    #rliblng,D3
  486.     SYS    Write
  487. 1$:    ADDQ    #8,sp
  488.     RTS
  489.  
  490. itsokay:
  491.     MOVE.L    D0,A6
  492.     MOVEM.L    (SP)+,D0/A0
  493.     ENDM
  494.  
  495.  
  496.  
  497.     ENDC
  498.