-
Notifications
You must be signed in to change notification settings - Fork 0
/
xlist.e
53 lines (40 loc) · 2.26 KB
/
xlist.e
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* -- ----------------------------------------------------------------- -- *
* -- Program.....: XList.e -- *
* -- Author......: Daniel Kasmeroglu <[email protected]> -- *
* -- Original....: Matthias Meixner -- *
* -- Description.: Lists all available packer including types -- *
* -- ----------------------------------------------------------------- -- *
* -- History -- *
* -- -- *
* -- 0.1 (14. August 1998) - Started with writing. -- *
* -- 1.0 (14. August 1998) - Program is complete and works without -- *
* -- problems. -- *
* -- -- *
* -- ----------------------------------------------------------------- -- */
/* -- ----------------------------------------------------------------- -- *
* -- Modules -- *
* -- ----------------------------------------------------------------- -- */
MODULE 'libraries/xpkarchive',
'utility/tagitem'
MODULE 'lib/xpkarchive'
/* -- ----------------------------------------------------------------- -- *
* -- Main -- *
* -- ----------------------------------------------------------------- -- */
PROC main()
DEF ma_list [ 100 ] : ARRAY OF xararchiverentry
DEF ma_i,ma_numpackers
xpkarchivebase := OpenLibrary( 'xpkarchive.library', 2 )
IF xpkarchivebase <> NIL
-> getting the list of available packer
ma_numpackers := XarQueryA( [ XAR_ARCHIVERSQUERY , ma_list ,
XAR_ARRAYSIZE , 100 ,
TAG_END ] )
-> run through all methods and print out their type
FOR ma_i := 0 TO ma_numpackers - 1
Vprintf( '%03ld. \l\s[8] : \s\n', [ ma_i, ma_list[ ma_i ].packer, IF ma_list[ ma_i ].type = XARTYPE_XPK THEN 'XPK' ELSE 'XAR' ] )
ENDFOR
CloseLibrary( xpkarchivebase )
ELSE
Vprintf( 'Can\at open "xpkarchive.library" v2+\n', NIL )
ENDIF
ENDPROC