'Global Const CF_WYSIWYG = &H8000& 'must also have CF_SCREENFONTS & CF_PRINTERFONTS
'Global Const CF_FORCEFONTEXIST = &H10000
'Global Const CF_SCALABLEONLY = &H20000
'Global Const CF_TTONLY = &H40000
'Global Const CF_NOFACESEL = &H80000
'Global Const CF_NOSTYLESEL = &H100000
'Global Const CF_NOSIZESEL = &H200000
'Printer Dialog Flags
Global Const PD_ALLPAGES = &H0&
Global Const PD_SELECTION = &H1&
Global Const PD_PAGENUMS = &H2&
Global Const PD_NOSELECTION = &H4&
Global Const PD_NOPAGENUMS = &H8&
Global Const PD_COLLATE = &H10&
Global Const PD_PRINTTOFILE = &H20&
Global Const PD_PRINTSETUP = &H40&
Global Const PD_NOWARNING = &H80&
Global Const PD_RETURNDC = &H100&
Global Const PD_RETURNIC = &H200&
Global Const PD_RETURNDEFAULT = &H400&
Global Const PD_SHOWHELP = &H800&
Global Const PD_USEDEVMODECOPIES = &H40000
Global Const PD_DISABLEPRINTTOFILE = &H80000
Global Const PD_HIDEPRINTTOFILE = &H100000
' KeyCode (KeyDown, KeyUp)
Global Const KEY_BACK = &H8
Global Const KEY_TAB = &H9
Global Const KEY_RETURN = &HD
Global Const KEY_SHIFT = &H10
Global Const KEY_CONTROL = &H11
Global Const KEY_CAPITAL = &H14
Global Const KEY_SPACE = &H20
Global Const KEY_PRIOR = &H21
Global Const KEY_NEXT = &H22
Global Const KEY_END = &H23
Global Const KEY_HOME = &H24
Global Const KEY_LEFT = &H25
Global Const KEY_UP = &H26
Global Const KEY_RIGHT = &H27
Global Const KEY_DOWN = &H28
Global Const KEY_INSERT = &H2D
Global Const KEY_DELETE = &H2E
Global Const KEY_F1 = &H70
Global Const KEY_F2 = &H71
Global Const KEY_F3 = &H72
Global Const KEY_F4 = &H73
Global Const KEY_F5 = &H74
Global Const KEY_F6 = &H75
Global Const KEY_F7 = &H76
Global Const KEY_F8 = &H77
Global Const KEY_F9 = &H78
Global Const KEY_F10 = &H79
Global Const KEY_F11 = &H7A
Global Const KEY_F12 = &H7B
Global Const KEY_F13 = &H7C
Global Const KEY_F14 = &H7D
Global Const KEY_F15 = &H7E
Global Const KEY_F16 = &H7F
Global Const PI = 3.1415926535898
Global Const TWOPI = 6.2831853071796
Global Const DEG2RAD = .017453292519943 'number of radians in a degree
Global Const MIN2RAD = DEG2RAD / 60
Global Const RAD2MIN = 3437.746771
Global Const RAD2DEG = 180 / PI
' SLIP communications parameters
'
'Global Const DATA5 = &H0
'Global Const DATA6 = &H1
'Global Const DATA7 = &H2
'Global Const DATA8 = &H3
'
'Global Const NOPARITY = &H0
'Global Const ODDPARITY = &H8
'Global Const EVENPARITY = &H18
'
'Global Const BAUD300 = &H40
'Global Const BAUD600 = &H50
'Global Const BAUD1200 = &H80
'Global Const BAUD2400 = &HA0
'Global Const BAUD4800 = &HC0
'Global Const BAUD9600 = &HE0
'Global Const BAUD1920 = &H0
'Global Const BAUD3840 = &H20
Global Const MAXIMIZED = 2
Global Const MINIMIZED = 1
Global Const DEFAULT = 0
Global Const HOURGLASS = 11
Global Const MAX_TITLE_LEN = 100
Global Const MAX_TYPE_LEN = 100
Global Const MAX_DOCID_LEN = 600
Global Const MAX_TEXT_LENGTH = 120
Global Const MAX_SAVE_BLOCK = 1024 * 8
Global Const MAXDOCS = 100
Global Const CURRDOC = MAXDOCS * 2
Global Const MAXSRCS = 500
Global Const MAXREFS = 50
Global max_docs As Integer
Global temp_path As String
Global db_path As String
Global sources_are_loaded As Integer
Global sources_have_changed As Integer
'Global tcpip_loaded As Integer
'Global remote_query_issued As Integer
'Global used_wais_driver As Integer
Global arg As String
'Global tcp_driver As String
'Global tcp_parm(2, 10) As Variant
'
'Global Const PM_PORT = 0
'Global Const PM_SPEED = 1
'Global Const PM_PARITY = 2
'Global Const PM_INTNO = 3
'Global Const PM_SWINT = 4
'Global Const PM_IOADDR = 5
'Global Const PM_DIX = 6
Global current_group As String
Global s_database(MAXSRCS) As String
Global s_port(MAXSRCS) As Long
Global s_service(MAXSRCS) As String
Global src_database(MAXSRCS) As String
Global src_port(MAXSRCS) As Long
Global src_service(MAXSRCS) As String
Global title_type(MAXDOCS) As String * MAX_TYPE_LEN
Global title_length(MAXDOCS) As Long
Global ref_doc_size(MAXREFS) As Long
Global ref_doc_bytes(MAXREFS) As String
Global ref_type(MAXREFS) As String * MAX_TYPE_LEN
Global ref_start(MAXREFS) As Long
Global ref_end(MAXREFS) As Long
Global init_find As Integer
Global word(20) As String
Global form_cancelled As Integer
Global Const LINE_DENSITY = 20
Global Const MAX_POINTS = 200
Global in_point As Integer
Global in_location(MAX_POINTS, 2) As Double
Global out_point As Integer
Global out_location(MAX_POINTS, 2) As Double
Global coprocessor As Integer
Global doc_selected As Integer
Global Const NONE = 0
Global Const NORMAL = 1
Global Const DOC_NEXT_INORDER = 2
Global Const DOC_NEXT_LISTED = 3
Global Const DOC_PREV_INORDER = 4
Global Const DOC_PREV_LISTED = 5
Global viewed_docno As Integer
Global viewed_headline As String
Global filter_type_code(10) As String
Global filter_ext(10) As String
Global filter_name(10) As String
Global Const MAX_TEMP_FILES = 10
Global file_list(MAX_TEMP_FILES) As String
' Help engine declarations.
Global Const HELP_CONTEXT = &H1 ' Display topic identified by number in Data
Global Const HELP_QUIT = &H2 ' Terminate help
Global Const HELP_INDEX = &H3 ' Display index
Global Const HELP_HELPONHELP = &H4 ' Display help on using help
Global Const HELP_SETINDEX = &H5 ' Set an alternate Index for help file with more than one index
Global Const HELP_KEY = &H101 ' Display topic for keyword in Data
Global Const HELP_MULTIKEY = &H201 ' Lookup keyword in alternate table and display topic
Type MULTIKEYHELP
mkSize As Integer
mkKeylist As String * 1
szKeyphrase As String * 253
End Type
Type DOC
score As Integer
source As Integer
length As Long
type As String * MAX_TYPE_LEN
title As String * MAX_TITLE_LEN
End Type
Type REF
ch_start As Long
ch_end As Long
doc_size As Long
type As String * MAX_TYPE_LEN
doc_bytes As String * MAX_DOCID_LEN
End Type
Type TELNET_MSG
size As Integer
buf As String * 128
End Type
Type WDBII
rec_type As Integer
lat As Integer
lon As Integer
End Type
'Type DRIVER
' name As String * 12
' tail As String * 40
'End Type
Declare Function get_docid Lib "wais.dll" (ByVal docno As Integer, refr As REF) As Integer
Declare Function reference_titles Lib "wais.dll" (ByVal func As Integer, ByVal tot_ref As Integer, refr As REF) As Integer
Declare Function query_titles Lib "wais.dll" (ByVal func As Integer, ByVal tot_ref As Integer, ByVal svr As String, ByVal dbn As String, ByVal kw As String, ByVal port As Long) As Integer
Declare Function get_titles Lib "wais.dll" (ByVal docno As Integer, hl As DOC) As Integer
Declare Function get_document Lib "wais.dll" (ByVal docno As Integer, ByVal tp As String) As Integer
Declare Function get_next_or_prev Lib "wais.dll" (ByVal tp As String, hl As DOC) As Integer
'Declare Function dos_driver_loaded Lib "wais.dll" () As Integer
'Declare Function set_ip_suffix Lib "wais.dll" (ByVal sfx As String) As Integer
'Declare Function set_tcp_stack Lib "wais.dll" (ByVal stack_type As Integer) As Integer
Declare Function set_maxdocs Lib "wais.dll" (ByVal number As Integer) As Integer
Declare Function set_path Lib "wais.dll" (ByVal p1 As String, ByVal p2 As String) As Integer
Declare Function get_alloc_mem Lib "wais.dll" () As Long
Declare Function draw_map Lib "wais.dll" (ByVal hDC As Integer, ByVal gl As Integer, ByVal gr As Integer, ByVal rcx As Double, ByVal rcy As Double, ByVal rr As Double, ByVal clr As Double, ByVal scl As Double, ByVal ccl As Double) As Integer
Declare Function coprocessor_status Lib "wais.dll" () As Integer
'Declare Function telnet_init Lib "wais.dll" (ByVal tcp_name As String) As Integer
'Declare Function telnet_term Lib "wais.dll" () As Integer
'Declare Function telnet_get Lib "wais.dll" (msg As TELNET_MSG) As Integer
'Declare Function telnet_put Lib "wais.dll" (msg As TELNET_MSG) As Integer
'Declare Function x00init Lib "slip.dll" (ByVal commport As Integer, ByVal commparms As Integer) As Integer
'Declare Function x00send Lib "slip.dll" (ByVal ch As Integer) As Integer
'Declare Function x00recv Lib "slip.dll" () As Integer
'Declare Function x00purge Lib "slip.dll" () As Integer
'
'Declare Function tsrload Lib "tsrload.dll" (dr As DRIVER, ByVal intno As Integer, ByVal hwint As Integer, ByVal tp As Integer) As Integer
'Declare Function tsrfree Lib "tsrload.dll" () As Integer
Declare Function GetModuleHandle Lib "kernel" (ByVal nm As String) As Integer
Declare Function GetModuleUsage Lib "kernel" (ByVal handle As Integer) As Integer
Declare Function GetINIInt Lib "kernel" Alias "GetPrivateProfileInt" (ByVal app As String, ByVal key As String, ByVal def As Integer, ByVal fn As String) As Integer
Declare Function GetINIString Lib "kernel" Alias "GetPrivateProfileString" (ByVal app As String, ByVal key As String, ByVal def As String, ByVal ret As String, ByVal retsz As Integer, ByVal fn As String) As Integer
Declare Function PutINIString Lib "kernel" Alias "WritePrivateProfileString" (ByVal app As String, ByVal key As String, ByVal arg As Any, ByVal fn As String) As Integer
Declare Function WinHelp Lib "user" (ByVal hWnd As Integer, ByVal fn As String, ByVal cmd As Integer, dwData As Any) As Integer
Sub load_group_list (currForm As Form, tp As Integer)