Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / openurl / library / libent.asm
blob778b4fef464b9f45e2e792c1fae2b7a04cea35b0
2 SECTION openurl.library,CODE
4 NOLIST
6 INCLUDE "openurl.library_rev.i"
7 INCLUDE "exec/libraries.i"
8 INCLUDE "exec/resident.i"
9 INCLUDE "exec/initializers.i"
10 INCLUDE "exec/lists.i"
11 INCLUDE "exec/semaphores.i"
13 LIST
15 XREF _LinkerDB
16 XREF _lib_name
17 XREF ENDCODE
19 XREF _initLib
20 XREF _openLib
21 XREF _expungeLib
22 XREF _closeLib
23 XREF _dispatch
25 XREF _URL_OpenA
26 XREF _URL_OldGetPrefs
27 XREF _URL_OldFreePrefs
28 XREF _URL_OldSetPrefs
29 XREF _URL_OldGetDefaultPrefs
30 XREF _URL_OldLaunchPrefsApp
31 XREF _DoFunction
32 XREF _URL_GetPrefsA
33 XREF _URL_FreePrefsA
34 XREF _URL_SetPrefsA
35 XREF _URL_LaunchPrefsAppA
36 XREF _URL_GetAttr
38 XDEF _ID
40 PRI EQU 0
42 start: moveq #-1,d0
43 rts
45 romtag:
46 dc.w RTC_MATCHWORD
47 dc.l romtag
48 dc.l ENDCODE
49 dc.b RTF_AUTOINIT
50 dc.b VERSION
51 dc.b NT_LIBRARY
52 dc.b PRI
53 dc.l _lib_name
54 dc.l _ID
55 dc.l init
57 _ID: VSTRING
59 CNOP 0,4
61 init: dc.l LIB_SIZE
62 dc.l funcTable
63 dc.l dataTable
64 dc.l _initLib
66 V_DEF MACRO
67 dc.w \1+(*-funcTable)
68 ENDM
70 funcTable:
71 DC.W -1
73 V_DEF _openLib
74 V_DEF _closeLib
75 V_DEF _expungeLib
76 V_DEF nil
78 V_DEF _URL_OpenA
79 V_DEF _URL_OldGetPrefs
80 V_DEF _URL_OldFreePrefs
81 V_DEF _URL_OldSetPrefs
82 V_DEF _URL_OldGetDefaultPrefs
83 V_DEF _URL_OldLaunchPrefsApp
84 V_DEF query
85 V_DEF _URL_GetPrefsA
86 V_DEF _URL_FreePrefsA
87 V_DEF _URL_SetPrefsA
88 V_DEF _URL_LaunchPrefsAppA
89 V_DEF _URL_GetAttr
91 DC.W -1
93 dataTable:
94 INITBYTE LN_TYPE,NT_LIBRARY
95 INITLONG LN_NAME,_lib_name
96 INITBYTE LIB_FLAGS,(LIBF_SUMUSED!LIBF_CHANGED)
97 INITWORD LIB_VERSION,VERSION
98 INITWORD LIB_REVISION,REVISION
99 INITLONG LIB_IDSTRING,_ID
100 dc.w 0
102 CNOP 0,4
104 nil: moveq #0,d0
107 query: movem.l a1/a4,-(sp)
108 lea _LinkerDB,a4
109 subq.l #4,sp
110 movea.l sp,a1
111 bsr _dispatch
112 movem.l (sp)+,a0/a1/a4