home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / appl / fixdsktp.sit / Source / bundles.c.bin < prev    next >
MacBinary  |  1989-09-13  |  3.5 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert AMOS Picture Packer (image/amosPicturePacker) ext Supported
1% dexvert Debian floppy split (archive/debianFloppySplit) ext Unsupported
1% dexvert Sound Images sound sample (audio/soundImagesSoundSample) ext Unsupported
1% dexvert DESI-III drawing (image/desiIIIDrawing) ext Unsupported
1% dexvert MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable) ext Unsupported
1% dexvert Alien Trilogytextures (other/alienTrilogyTextures) ext Unsupported
1% dexvert APT cache data (other/aptCacheData) ext Unsupported
1% dexvert CorelTRACE configuration (other/corelTRACEConfiguration) ext Unsupported
1% dexvert Dreamcast Disc (other/dreamcastDisc) ext Unsupported
1% dexvert EST flat binary (other/estFlatBinary) ext Unsupported
1% dexvert Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat) ext Unsupported
1% dexvert Sega Genesis/Megadrive/32x ROM (other/genesisROM) ext Unsupported
1% dexvert Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive) ext Unsupported
1% dexvert Sound Images Sound Driver (other/soundImagesSoundDriver) ext Unsupported
1% dexvert Symantec/Norton Config (other/symantecNortonConfig) ext Unsupported
1% dexvert Vectrex ROM (other/vectrexROM) ext Unsupported
1% dexvert BIS raP encoded format (other/bisraPEncoded) ext Unsupported
1% dexvert Pascal Script binary (other/pascalScriptBinary) ext Unsupported
1% dexvert 7th Level game data archive (other/seventhLevelGameDataArchive) ext Unsupported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary, Wed Sep 7 17:03:00 1988, modified Wed Sep 7 18:08:15 1988, creator Think C, type ASCII, 3331 bytes "bundles.c" default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 1 default (weak)
100% lsar MacBinary default
100% gt2 MAC Bilddatei default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 62 75 6e 64 6c 65 | 73 2e 63 00 00 00 00 00 |..bundle|s.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 0d 03 00 | 00 00 00 9f 4b 54 84 9f |........|....KT..|
|00000060| 4b 63 cf 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |Kc......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 3c 4d 61 63 54 79 70 |#include| <MacTyp|
|00000090| 65 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |es.h>.#i|nclude <|
|000000a0| 52 65 73 6f 75 72 63 65 | 4d 67 72 2e 68 3e 0d 0d |Resource|Mgr.h>..|
|000000b0| 23 69 6e 63 6c 75 64 65 | 20 22 66 69 78 2e 68 22 |#include| "fix.h"|
|000000c0| 0d 0d 09 2f 2a 20 4c 6f | 63 61 6c 20 74 79 70 65 |.../* Lo|cal type|
|000000d0| 73 2e 20 2a 2f 0d 0d 74 | 79 70 65 64 65 66 20 73 |s. */..t|ypedef s|
|000000e0| 74 72 75 63 74 20 62 6e | 64 6c 5f 6e 6f 64 65 20 |truct bn|dl_node |
|000000f0| 7b 0d 09 73 74 72 75 63 | 74 20 62 6e 64 6c 5f 6e |{..struc|t bndl_n|
|00000100| 6f 64 65 20 2a 6e 65 78 | 74 3b 0d 09 69 6e 74 20 |ode *nex|t;..int |
|00000110| 62 6e 64 6c 5f 69 64 3b | 0d 09 6c 6f 6e 67 20 62 |bndl_id;|..long b|
|00000120| 6e 64 6c 5f 74 79 70 65 | 3b 0d 09 48 61 6e 64 6c |ndl_type|;..Handl|
|00000130| 65 20 62 6e 64 6c 5f 72 | 65 73 6f 75 72 63 65 3b |e bndl_r|esource;|
|00000140| 0d 7d 20 62 6e 64 6c 5f | 6e 6f 64 65 2c 20 2a 62 |.} bndl_|node, *b|
|00000150| 6e 64 6c 5f 70 74 72 3b | 0d 0d 73 74 61 74 69 63 |ndl_ptr;|..static|
|00000160| 20 62 6e 64 6c 5f 70 74 | 72 20 62 6e 64 6c 5f 74 | bndl_pt|r bndl_t|
|00000170| 61 62 6c 65 3b 0d 0d 09 | 2f 2a 20 4c 6f 63 61 6c |able;...|/* Local|
|00000180| 20 70 72 6f 74 6f 74 79 | 70 65 73 2e 20 2a 2f 0d | prototy|pes. */.|
|00000190| 0d 6c 6f 6e 67 20 62 75 | 6e 64 6c 65 5f 74 79 70 |.long bu|ndle_typ|
|000001a0| 65 28 48 61 6e 64 6c 65 | 20 68 61 6e 64 29 3b 0d |e(Handle| hand);.|
|000001b0| 76 6f 69 64 20 69 6e 73 | 65 72 74 5f 62 6e 64 6c |void ins|ert_bndl|
|000001c0| 28 69 6e 74 20 6e 75 6d | 62 65 72 2c 20 48 61 6e |(int num|ber, Han|
|000001d0| 64 6c 65 20 68 61 6e 64 | 29 3b 0d 76 6f 69 64 20 |dle hand|);.void |
|000001e0| 6b 69 6c 6c 5f 72 65 6c | 61 74 65 64 28 6c 6f 6e |kill_rel|ated(lon|
|000001f0| 67 20 74 79 70 65 2c 20 | 48 61 6e 64 6c 65 20 68 |g type, |Handle h|
|00000200| 61 6e 64 29 3b 0d 0d 09 | 2f 2a 20 49 6e 73 65 72 |and);...|/* Inser|
|00000210| 74 20 61 6e 20 62 75 6e | 64 6c 65 20 72 65 63 6f |t an bun|dle reco|
|00000220| 72 64 20 69 6e 74 6f 20 | 74 68 65 20 6c 69 73 74 |rd into |the list|
|00000230| 2e 20 2a 2f 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |. */..st|atic voi|
|00000240| 64 20 69 6e 73 65 72 74 | 5f 62 6e 64 6c 28 6e 75 |d insert|_bndl(nu|
|00000250| 6d 62 65 72 2c 20 68 61 | 6e 64 29 0d 09 69 6e 74 |mber, ha|nd)..int|
|00000260| 20 6e 75 6d 62 65 72 3b | 0d 09 48 61 6e 64 6c 65 | number;|..Handle|
|00000270| 20 68 61 6e 64 3b 0d 7b | 0d 09 72 65 67 69 73 74 | hand;.{|..regist|
|00000280| 65 72 20 62 6e 64 6c 5f | 70 74 72 20 74 65 6d 70 |er bndl_|ptr temp|
|00000290| 20 3d 20 28 62 6e 64 6c | 5f 70 74 72 29 20 4e 65 | = (bndl|_ptr) Ne|
|000002a0| 77 50 74 72 28 28 6c 6f | 6e 67 29 20 73 69 7a 65 |wPtr((lo|ng) size|
|000002b0| 6f 66 28 62 6e 64 6c 5f | 6e 6f 64 65 29 29 3b 0d |of(bndl_|node));.|
|000002c0| 0d 09 74 65 6d 70 2d 3e | 6e 65 78 74 20 3d 20 62 |..temp->|next = b|
|000002d0| 6e 64 6c 5f 74 61 62 6c | 65 3b 09 09 09 09 2f 2a |ndl_tabl|e;..../*|
|000002e0| 20 49 6e 73 65 72 74 20 | 61 74 20 20 20 20 2a 2f | Insert |at */|
|000002f0| 0d 09 74 65 6d 70 2d 3e | 62 6e 64 6c 5f 69 64 20 |..temp->|bndl_id |
|00000300| 3d 20 6e 75 6d 62 65 72 | 3b 09 09 09 09 09 2f 2a |= number|;...../*|
|00000310| 20 62 65 67 69 6e 6e 69 | 6e 67 20 6f 66 20 2a 2f | beginni|ng of */|
|00000320| 0d 09 74 65 6d 70 2d 3e | 62 6e 64 6c 5f 74 79 70 |..temp->|bndl_typ|
|00000330| 65 20 3d 20 62 75 6e 64 | 6c 65 5f 74 79 70 65 28 |e = bund|le_type(|
|00000340| 68 61 6e 64 29 3b 09 2f | 2a 20 6c 69 73 74 2e 2e |hand);./|* list..|
|00000350| 2e 20 20 20 20 20 20 2a | 2f 0d 09 74 65 6d 70 2d |. *|/..temp-|
|00000360| 3e 62 6e 64 6c 5f 72 65 | 73 6f 75 72 63 65 20 3d |>bndl_re|source =|
|00000370| 20 68 61 6e 64 3b 0d 09 | 62 6e 64 6c 5f 74 61 62 | hand;..|bndl_tab|
|00000380| 6c 65 20 3d 20 74 65 6d | 70 3b 0d 7d 0d 0d 09 2f |le = tem|p;.}.../|
|00000390| 2a 20 52 65 6d 6f 76 65 | 20 61 20 62 75 6e 64 6c |* Remove| a bundl|
|000003a0| 65 20 72 65 63 6f 72 64 | 20 66 72 6f 6d 20 74 68 |e record| from th|
|000003b0| 65 20 6c 69 73 74 2e 20 | 2a 2f 0d 0d 76 6f 69 64 |e list. |*/..void|
|000003c0| 20 72 65 6d 6f 76 65 5f | 62 6e 64 6c 28 74 79 70 | remove_|bndl(typ|
|000003d0| 65 29 0d 09 72 65 67 69 | 73 74 65 72 20 6c 6f 6e |e)..regi|ster lon|
|000003e0| 67 20 74 79 70 65 3b 0d | 7b 0d 09 72 65 67 69 73 |g type;.|{..regis|
|000003f0| 74 65 72 20 62 6e 64 6c | 5f 70 74 72 20 74 65 6d |ter bndl|_ptr tem|
|00000400| 70 2c 20 70 72 65 76 3b | 0d 0d 09 74 65 6d 70 20 |p, prev;|...temp |
|00000410| 3d 20 62 6e 64 6c 5f 74 | 61 62 6c 65 3b 0d 09 70 |= bndl_t|able;..p|
|00000420| 72 65 76 20 3d 20 4e 49 | 4c 3b 0d 09 77 68 69 6c |rev = NI|L;..whil|
|00000430| 65 20 28 28 74 65 6d 70 | 29 20 26 26 20 28 74 65 |e ((temp|) && (te|
|00000440| 6d 70 2d 3e 62 6e 64 6c | 5f 74 79 70 65 20 21 3d |mp->bndl|_type !=|
|00000450| 20 74 79 70 65 29 29 20 | 7b 0d 09 09 70 72 65 76 | type)) |{...prev|
|00000460| 20 3d 20 74 65 6d 70 3b | 0d 09 09 74 65 6d 70 20 | = temp;|...temp |
|00000470| 3d 20 74 65 6d 70 2d 3e | 6e 65 78 74 3b 0d 09 7d |= temp->|next;..}|
|00000480| 0d 09 69 66 20 28 74 65 | 6d 70 29 20 7b 09 09 09 |..if (te|mp) {...|
|00000490| 2f 2a 20 46 6f 75 6e 64 | 20 69 74 2e 2e 2e 20 2a |/* Found| it... *|
|000004a0| 2f 0d 09 09 69 66 20 28 | 21 70 72 65 76 29 09 09 |/...if (|!prev)..|
|000004b0| 2f 2a 20 55 6e 6c 69 6e | 6b 20 66 72 6f 6d 20 63 |/* Unlin|k from c|
|000004c0| 68 61 69 6e 2e 2e 2e 20 | 2a 2f 0d 09 09 09 62 6e |hain... |*/....bn|
|000004d0| 64 6c 5f 74 61 62 6c 65 | 20 3d 20 74 65 6d 70 2d |dl_table| = temp-|
|000004e0| 3e 6e 65 78 74 3b 0d 09 | 09 65 6c 73 65 0d 09 09 |>next;..|.else...|
|000004f0| 09 70 72 65 76 2d 3e 6e | 65 78 74 20 3d 20 74 65 |.prev->n|ext = te|
|00000500| 6d 70 2d 3e 6e 65 78 74 | 3b 0d 09 09 44 69 73 70 |mp->next|;...Disp|
|00000510| 6f 73 50 74 72 28 74 65 | 6d 70 29 3b 0d 09 7d 0d |osPtr(te|mp);..}.|
|00000520| 7d 0d 0d 09 2f 2a 20 46 | 69 6e 64 20 74 68 65 20 |}.../* F|ind the |
|00000530| 6f 77 6e 65 72 20 6f 66 | 20 61 20 62 75 6e 64 6c |owner of| a bundl|
|00000540| 65 2e 20 2a 2f 0d 0d 73 | 74 61 74 69 63 20 6c 6f |e. */..s|tatic lo|
|00000550| 6e 67 20 62 75 6e 64 6c | 65 5f 74 79 70 65 28 68 |ng bundl|e_type(h|
|00000560| 61 6e 64 29 0d 09 48 61 | 6e 64 6c 65 20 68 61 6e |and)..Ha|ndle han|
|00000570| 64 3b 0d 7b 0d 09 72 65 | 74 75 72 6e 20 28 2a 2a |d;.{..re|turn (**|
|00000580| 28 28 6c 6f 6e 67 20 2a | 2a 29 68 61 6e 64 29 29 |((long *|*)hand))|
|00000590| 3b 0d 7d 0d 0d 09 2f 2a | 20 50 65 72 66 6f 72 6d |;.}.../*| Perform|
|000005a0| 20 69 6e 69 74 69 61 6c | 20 62 75 6e 64 6c 65 20 | initial| bundle |
|000005b0| 70 72 6f 63 65 73 73 69 | 6e 67 2e 20 2a 2f 0d 0d |processi|ng. */..|
|000005c0| 76 6f 69 64 20 70 72 65 | 5f 62 75 6e 64 6c 65 5f |void pre|_bundle_|
|000005d0| 70 72 6f 63 65 73 73 69 | 6e 67 28 29 0d 7b 0d 09 |processi|ng().{..|
|000005e0| 72 65 67 69 73 74 65 72 | 20 48 61 6e 64 6c 65 20 |register| Handle |
|000005f0| 68 61 6e 64 3b 0d 09 72 | 65 67 69 73 74 65 72 20 |hand;..r|egister |
|00000600| 69 6e 74 20 69 2c 20 63 | 6f 75 6e 74 3b 0d 09 69 |int i, c|ount;..i|
|00000610| 6e 74 20 6e 75 6d 62 65 | 72 3b 0d 09 6c 6f 6e 67 |nt numbe|r;..long|
|00000620| 20 62 6c 6f 62 3b 0d 09 | 63 68 61 72 20 62 6c 6f | blob;..|char blo|
|00000630| 62 32 5b 32 35 36 5d 3b | 0d 0d 09 09 2f 2a 20 45 |b2[256];|..../* E|
|00000640| 6d 70 74 79 20 74 68 65 | 20 62 75 6e 64 6c 65 20 |mpty the| bundle |
|00000650| 6c 69 73 74 2e 20 2a 2f | 0d 0d 09 62 6e 64 6c 5f |list. */|...bndl_|
|00000660| 63 6f 75 6e 74 20 3d 20 | 30 3b 0d 09 62 6e 64 6c |count = |0;..bndl|
|00000670| 5f 74 61 62 6c 65 20 3d | 20 4e 49 4c 3b 0d 0d 09 |_table =| NIL;...|
|00000680| 09 2f 2a 20 49 6e 73 65 | 72 74 20 61 6c 6c 20 42 |./* Inse|rt all B|
|00000690| 4e 44 4c 20 72 65 73 6f | 75 72 63 65 73 20 69 6e |NDL reso|urces in|
|000006a0| 74 6f 20 74 68 65 20 6c | 69 73 74 2e 20 2a 2f 0d |to the l|ist. */.|
|000006b0| 0d 09 63 6f 75 6e 74 20 | 3d 20 43 6f 75 6e 74 31 |..count |= Count1|
|000006c0| 52 65 73 6f 75 72 63 65 | 73 28 27 42 4e 44 4c 27 |Resource|s('BNDL'|
|000006d0| 29 3b 09 2f 2a 20 49 6e | 73 65 72 74 20 61 6c 6c |);./* In|sert all|
|000006e0| 20 42 4e 44 4c 20 20 20 | 20 2a 2f 0d 09 66 6f 72 | BNDL | */..for|
|000006f0| 20 28 69 3d 31 3b 20 69 | 3c 3d 63 6f 75 6e 74 3b | (i=1; i|<=count;|
|00000700| 20 69 2b 2b 29 20 7b 09 | 09 09 2f 2a 20 72 65 73 | i++) {.|../* res|
|00000710| 6f 75 72 63 65 73 20 69 | 6e 74 6f 20 74 68 65 20 |ources i|nto the |
|00000720| 2a 2f 0d 09 09 68 61 6e | 64 20 3d 20 47 65 74 31 |*/...han|d = Get1|
|00000730| 49 6e 64 52 65 73 6f 75 | 72 63 65 28 27 42 4e 44 |IndResou|rce('BND|
|00000740| 4c 27 2c 69 29 3b 20 2f | 2a 20 6c 69 73 74 2e 2e |L',i); /|* list..|
|00000750| 2e 20 20 20 20 20 20 20 | 20 20 20 2a 2f 0d 09 09 |. | */...|
|00000760| 48 4e 6f 50 75 72 67 65 | 28 68 61 6e 64 29 3b 0d |HNoPurge|(hand);.|
|00000770| 09 09 47 65 74 52 65 73 | 49 6e 66 6f 28 68 61 6e |..GetRes|Info(han|
|00000780| 64 2c 20 26 6e 75 6d 62 | 65 72 2c 20 26 62 6c 6f |d, &numb|er, &blo|
|00000790| 62 2c 20 26 62 6c 6f 62 | 32 29 3b 0d 09 09 69 6e |b, &blob|2);...in|
|000007a0| 73 65 72 74 5f 62 6e 64 | 6c 28 6e 75 6d 62 65 72 |sert_bnd|l(number|
|000007b0| 2c 20 68 61 6e 64 29 3b | 0d 09 7d 0d 7d 0d 0d 09 |, hand);|..}.}...|
|000007c0| 2f 2a 20 50 65 72 66 6f | 72 6d 20 66 69 6e 61 6c |/* Perfo|rm final|
|000007d0| 20 62 75 6e 64 6c 65 20 | 70 72 6f 63 65 73 73 69 | bundle |processi|
|000007e0| 6e 67 2e 20 2a 2f 0d 0d | 76 6f 69 64 20 70 6f 73 |ng. */..|void pos|
|000007f0| 74 5f 62 75 6e 64 6c 65 | 5f 70 72 6f 63 65 73 73 |t_bundle|_process|
|00000800| 69 6e 67 28 29 0d 7b 0d | 09 72 65 67 69 73 74 65 |ing().{.|.registe|
|00000810| 72 20 62 6e 64 6c 5f 70 | 74 72 20 74 65 6d 70 2c |r bndl_p|tr temp,|
|00000820| 20 74 65 6d 70 32 3b 0d | 0d 09 09 2f 2a 20 4b 69 | temp2;.|.../* Ki|
|00000830| 6c 6c 20 61 6c 6c 20 72 | 65 6c 61 74 65 64 20 72 |ll all r|elated r|
|00000840| 65 73 6f 75 72 63 65 73 | 2c 20 74 68 65 6e 20 65 |esources|, then e|
|00000850| 61 63 68 20 62 75 6e 64 | 6c 65 2e 20 2a 2f 0d 0d |ach bund|le. */..|
|00000860| 09 74 65 6d 70 20 3d 20 | 62 6e 64 6c 5f 74 61 62 |.temp = |bndl_tab|
|00000870| 6c 65 3b 0d 09 77 68 69 | 6c 65 20 28 74 65 6d 70 |le;..whi|le (temp|
|00000880| 29 20 7b 0d 09 09 62 6e | 64 6c 5f 63 6f 75 6e 74 |) {...bn|dl_count|
|00000890| 2b 2b 3b 0d 23 69 66 6e | 64 65 66 20 54 45 53 54 |++;.#ifn|def TEST|
|000008a0| 5f 4d 4f 44 45 0d 09 09 | 6b 69 6c 6c 5f 72 65 6c |_MODE...|kill_rel|
|000008b0| 61 74 65 64 28 74 65 6d | 70 2d 3e 62 6e 64 6c 5f |ated(tem|p->bndl_|
|000008c0| 74 79 70 65 2c 20 74 65 | 6d 70 2d 3e 62 6e 64 6c |type, te|mp->bndl|
|000008d0| 5f 72 65 73 6f 75 72 63 | 65 29 3b 0d 09 09 52 6d |_resourc|e);...Rm|
|000008e0| 76 65 52 65 73 6f 75 72 | 63 65 28 74 65 6d 70 2d |veResour|ce(temp-|
|000008f0| 3e 62 6e 64 6c 5f 72 65 | 73 6f 75 72 63 65 29 3b |>bndl_re|source);|
|00000900| 0d 09 09 44 69 73 70 6f | 73 48 61 6e 64 6c 65 28 |...Dispo|sHandle(|
|00000910| 74 65 6d 70 2d 3e 62 6e | 64 6c 5f 72 65 73 6f 75 |temp->bn|dl_resou|
|00000920| 72 63 65 29 3b 0d 23 65 | 6e 64 69 66 20 54 45 53 |rce);.#e|ndif TES|
|00000930| 54 5f 4d 4f 44 45 0d 09 | 09 74 65 6d 70 32 20 3d |T_MODE..|.temp2 =|
|00000940| 20 74 65 6d 70 3b 0d 09 | 09 74 65 6d 70 20 3d 20 | temp;..|.temp = |
|00000950| 74 65 6d 70 2d 3e 6e 65 | 78 74 3b 0d 09 09 44 69 |temp->ne|xt;...Di|
|00000960| 73 70 6f 73 50 74 72 28 | 74 65 6d 70 32 29 3b 0d |sposPtr(|temp2);.|
|00000970| 09 7d 0d 7d 0d 0d 23 69 | 66 6e 64 65 66 20 54 45 |.}.}..#i|fndef TE|
|00000980| 53 54 5f 4d 4f 44 45 0d | 0d 09 2f 2a 20 52 65 6d |ST_MODE.|../* Rem|
|00000990| 6f 76 65 20 72 65 73 6f | 75 72 63 65 73 20 72 65 |ove reso|urces re|
|000009a0| 66 65 72 72 65 64 20 74 | 6f 20 62 79 20 61 20 62 |ferred t|o by a b|
|000009b0| 75 6e 64 6c 65 2e 20 2a | 2f 0d 0d 73 74 61 74 69 |undle. *|/..stati|
|000009c0| 63 20 76 6f 69 64 20 6b | 69 6c 6c 5f 72 65 6c 61 |c void k|ill_rela|
|000009d0| 74 65 64 28 74 79 70 65 | 2c 20 68 61 6e 64 29 0d |ted(type|, hand).|
|000009e0| 09 6c 6f 6e 67 20 74 79 | 70 65 3b 0d 09 48 61 6e |.long ty|pe;..Han|
|000009f0| 64 6c 65 20 68 61 6e 64 | 3b 0d 7b 0d 09 72 65 67 |dle hand|;.{..reg|
|00000a00| 69 73 74 65 72 20 69 6e | 74 20 2a 62 75 6e 64 6c |ister in|t *bundl|
|00000a10| 65 3b 09 2f 2a 20 50 6f | 69 6e 74 65 72 20 74 6f |e;./* Po|inter to|
|00000a20| 20 62 75 6e 64 6c 65 20 | 73 6f 20 66 61 72 2e 2e | bundle |so far..|
|00000a30| 2e 20 2a 2f 0d 09 72 65 | 67 69 73 74 65 72 20 69 |. */..re|gister i|
|00000a40| 6e 74 20 72 65 73 5f 69 | 64 2c 09 2f 2a 20 52 65 |nt res_i|d,./* Re|
|00000a50| 73 6f 75 72 63 65 20 49 | 44 20 6e 75 6d 62 65 72 |source I|D number|
|00000a60| 2e 20 2a 2f 0d 09 09 09 | 09 20 6e 75 6d 5f 74 79 |. */....|. num_ty|
|00000a70| 70 65 73 2c 09 2f 2a 20 | 4e 75 6d 62 65 72 20 6f |pes,./* |Number o|
|00000a80| 66 20 72 65 73 6f 75 72 | 63 65 20 74 79 70 65 73 |f resour|ce types|
|00000a90| 2e 20 2a 2f 0d 09 09 09 | 09 20 6e 75 6d 5f 74 68 |. */....|. num_th|
|00000aa0| 69 73 3b 09 2f 2a 20 4e | 75 6d 62 65 72 20 6f 66 |is;./* N|umber of|
|00000ab0| 20 72 65 73 6f 75 72 63 | 65 73 20 6f 66 20 74 68 | resourc|es of th|
|00000ac0| 69 73 20 74 79 70 65 2e | 20 2a 2f 0d 09 72 65 67 |is type.| */..reg|
|00000ad0| 69 73 74 65 72 20 6c 6f | 6e 67 20 74 68 69 73 5f |ister lo|ng this_|
|00000ae0| 74 79 70 65 3b 09 2f 2a | 20 54 79 70 65 20 6f 66 |type;./*| Type of|
|00000af0| 20 74 68 65 73 65 20 72 | 65 73 6f 75 72 63 65 73 | these r|esources|
|00000b00| 2e 20 2a 2f 0d 0d 09 48 | 4c 6f 63 6b 28 68 61 6e |. */...H|Lock(han|
|00000b10| 64 29 3b 0d 09 62 75 6e | 64 6c 65 20 3d 20 28 69 |d);..bun|dle = (i|
|00000b20| 6e 74 20 2a 29 20 2a 68 | 61 6e 64 3b 0d 0d 09 62 |nt *) *h|and;...b|
|00000b30| 75 6e 64 6c 65 20 2b 3d | 20 32 3b 09 2f 2a 20 53 |undle +=| 2;./* S|
|00000b40| 6b 69 70 20 74 6f 20 73 | 69 67 6e 61 74 75 72 65 |kip to s|ignature|
|00000b50| 20 49 44 20 23 2e 20 2a | 2f 0d 09 72 65 73 5f 69 | ID #. *|/..res_i|
|00000b60| 64 20 3d 20 2a 28 62 75 | 6e 64 6c 65 2b 2b 29 3b |d = *(bu|ndle++);|
|00000b70| 0d 09 6b 69 6c 6c 5f 72 | 65 73 6f 75 72 63 65 28 |..kill_r|esource(|
|00000b80| 74 79 70 65 2c 20 72 65 | 73 5f 69 64 29 3b 0d 0d |type, re|s_id);..|
|00000b90| 09 6e 75 6d 5f 74 79 70 | 65 73 20 3d 20 2a 28 62 |.num_typ|es = *(b|
|00000ba0| 75 6e 64 6c 65 2b 2b 29 | 3b 0d 09 77 68 69 6c 65 |undle++)|;..while|
|00000bb0| 20 28 6e 75 6d 5f 74 79 | 70 65 73 20 3e 3d 20 30 | (num_ty|pes >= 0|
|00000bc0| 29 20 7b 09 2f 2a 20 46 | 6f 72 20 65 61 63 68 20 |) {./* F|or each |
|00000bd0| 74 79 70 65 2e 2e 2e 20 | 2a 2f 0d 09 09 2d 2d 6e |type... |*/...--n|
|00000be0| 75 6d 5f 74 79 70 65 73 | 3b 0d 09 09 74 68 69 73 |um_types|;...this|
|00000bf0| 5f 74 79 70 65 20 3d 20 | 2a 28 28 6c 6f 6e 67 20 |_type = |*((long |
|00000c00| 2a 29 20 62 75 6e 64 6c | 65 29 3b 09 2f 2a 20 47 |*) bundl|e);./* G|
|00000c10| 65 74 20 74 68 65 20 74 | 79 70 65 2e 2e 2e 20 2a |et the t|ype... *|
|00000c20| 2f 0d 09 09 62 75 6e 64 | 6c 65 20 2b 3d 20 32 3b |/...bund|le += 2;|
|00000c30| 0d 09 09 6e 75 6d 5f 74 | 68 69 73 20 3d 20 2a 28 |...num_t|his = *(|
|00000c40| 62 75 6e 64 6c 65 2b 2b | 29 3b 09 09 09 2f 2a 20 |bundle++|);.../* |
|00000c50| 43 6f 75 6e 74 20 6f 66 | 20 74 68 69 73 20 74 79 |Count of| this ty|
|00000c60| 70 65 2e 2e 2e 20 2a 2f | 0d 09 09 77 68 69 6c 65 |pe... */|...while|
|00000c70| 20 28 6e 75 6d 5f 74 68 | 69 73 20 3e 3d 20 30 29 | (num_th|is >= 0)|
|00000c80| 20 7b 09 09 09 2f 2a 20 | 46 6f 72 20 65 61 63 68 | {.../* |For each|
|00000c90| 20 72 65 73 6f 75 72 63 | 65 2e 2e 2e 20 20 2a 2f | resourc|e... */|
|00000ca0| 0d 09 09 09 2d 2d 6e 75 | 6d 5f 74 68 69 73 3b 09 |....--nu|m_this;.|
|00000cb0| 09 09 09 09 2f 2a 20 53 | 6b 69 70 20 6c 6f 63 61 |..../* S|kip loca|
|00000cc0| 6c 20 49 44 2e 2e 2e 20 | 20 20 20 20 20 2a 2f 0d |l ID... | */.|
|00000cd0| 09 09 09 62 75 6e 64 6c | 65 2b 2b 3b 09 09 09 09 |...bundl|e++;....|
|00000ce0| 09 2f 2a 20 47 65 74 20 | 72 65 73 2e 20 49 44 2e |./* Get |res. ID.|
|00000cf0| 2e 2e 20 20 20 20 20 20 | 20 20 2a 2f 0d 09 09 09 |.. | */....|
|00000d00| 72 65 73 5f 69 64 20 3d | 20 2a 28 62 75 6e 64 6c |res_id =| *(bundl|
|00000d10| 65 2b 2b 29 3b 09 09 2f | 2a 20 61 6e 64 20 72 65 |e++);../|* and re|
|00000d20| 6d 6f 76 65 20 69 74 21 | 20 20 20 20 20 20 20 20 |move it!| |
|00000d30| 2a 2f 0d 09 09 09 6b 69 | 6c 6c 5f 72 65 73 6f 75 |*/....ki|ll_resou|
|00000d40| 72 63 65 28 74 68 69 73 | 5f 74 79 70 65 2c 72 65 |rce(this|_type,re|
|00000d50| 73 5f 69 64 29 3b 0d 09 | 09 7d 0d 09 7d 0d 0d 09 |s_id);..|.}..}...|
|00000d60| 48 55 6e 6c 6f 63 6b 28 | 68 61 6e 64 29 3b 0d 7d |HUnlock(|hand);.}|
|00000d70| 0d 0d 23 65 6e 64 69 66 | 20 54 45 53 54 5f 4d 4f |..#endif| TEST_MO|
|00000d80| 44 45 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |DE......|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+