home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: DOS BACKUP file
(archive/dosBackupFile).
You can browse this item here: BTPARSE.C
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| DOS BACKUP file (archive/dosBackupFile)
| magic
| Supported |
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
100%
| file
| DOS 2.0-3.2 backed up file \CBTREE\PROGRAMS\BTPARSE.C
| default
| |
99%
| file
| data
| default
| |
51%
| TrID
| DOS 2.0-3.2 backup
| default
| |
48%
| TrID
| MP3 audio
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| ff 01 00 00 00 5c 43 42 | 54 52 45 45 5c 50 52 4f |.....\CB|TREE\PRO|
|00000010| 47 52 41 4d 53 5c 42 54 | 50 41 52 53 45 2e 43 00 |GRAMS\BT|PARSE.C.|
|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 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 1b 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 20 28 43 29 20 43 | 6f 70 79 72 69 67 68 74 |/* (C) C|opyright|
|00000090| 20 31 39 38 34 2c 38 35 | 2c 38 36 2c 38 37 20 57 | 1984,85|,86,87 W|
|000000a0| 61 6c 74 65 72 20 4c 2e | 20 50 65 61 63 6f 63 6b |alter L.| Peacock|
|000000b0| 20 20 20 41 6c 6c 20 52 | 69 67 68 74 73 20 52 65 | All R|ights Re|
|000000c0| 73 65 72 76 65 64 20 20 | 20 2a 2f 0d 0a 0d 0a 2f |served | */..../|
|000000d0| 2a 20 54 48 49 53 20 50 | 52 4f 47 52 41 4d 20 42 |* THIS P|ROGRAM B|
|000000e0| 45 4c 4f 4e 47 53 20 54 | 4f 20 57 41 4c 54 45 52 |ELONGS T|O WALTER|
|000000f0| 20 4c 2e 20 50 45 41 43 | 4f 43 4b 2e 20 20 49 54 | L. PEAC|OCK. IT|
|00000100| 20 49 53 20 43 4f 4e 53 | 49 44 45 52 45 44 20 41 | IS CONS|IDERED A|
|00000110| 20 54 52 41 44 45 20 2a | 2f 0d 0a 2f 2a 20 53 45 | TRADE *|/../* SE|
|00000120| 43 52 45 54 20 41 4e 44 | 20 49 53 20 4e 4f 54 20 |CRET AND| IS NOT |
|00000130| 54 4f 20 42 45 20 44 49 | 56 55 4c 47 45 44 20 4f |TO BE DI|VULGED O|
|00000140| 52 20 55 53 45 44 20 42 | 59 20 50 41 52 54 49 45 |R USED B|Y PARTIE|
|00000150| 53 20 57 48 4f 20 48 41 | 56 45 20 4e 4f 54 20 20 |S WHO HA|VE NOT |
|00000160| 20 2a 2f 0d 0a 2f 2a 20 | 52 45 43 45 49 56 45 44 | */../* |RECEIVED|
|00000170| 20 57 52 49 54 54 45 4e | 20 41 55 54 48 4f 52 49 | WRITTEN| AUTHORI|
|00000180| 5a 41 54 49 4f 4e 20 46 | 52 4f 4d 20 54 48 45 20 |ZATION F|ROM THE |
|00000190| 4f 57 4e 45 52 2e 20 20 | 20 20 20 20 20 20 20 20 |OWNER. | |
|000001a0| 20 20 20 20 20 20 20 20 | 2a 2f 0d 0a 0d 0a 2f 2a | |*/..../*|
|000001b0| 20 62 20 74 20 72 20 70 | 20 61 20 72 20 73 20 65 | b t r p| a r s e|
|000001c0| 20 2e 20 63 20 20 20 20 | 20 20 6c 61 73 74 20 6d | . c | last m|
|000001d0| 6f 64 3a 20 31 31 2f 32 | 33 2f 38 34 20 20 20 2a |od: 11/2|3/84 *|
|000001e0| 2f 0d 0a 2f 2a 20 20 70 | 61 72 73 65 20 62 74 72 |/../* p|arse btr|
|000001f0| 65 65 20 61 6e 64 20 70 | 72 69 6e 74 20 6b 65 79 |ee and p|rint key|
|00000200| 73 20 61 6e 64 20 72 65 | 63 6f 72 64 20 6c 6f 63 |s and re|cord loc|
|00000210| 61 74 69 6f 6e 73 20 6f | 6e 20 74 68 65 20 70 72 |ations o|n the pr|
|00000220| 69 6e 74 65 72 2e 20 20 | 20 20 20 20 2a 2f 0d 0a |inter. | */..|
|00000230| 0d 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 64 69 |..#inclu|de <stdi|
|00000240| 6f 2e 68 3e 0d 0a 23 69 | 6e 63 6c 75 64 65 20 22 |o.h>..#i|nclude "|
|00000250| 63 62 74 72 65 65 2e 68 | 22 0d 0a 2f 2a 20 62 74 |cbtree.h|"../* bt|
|00000260| 66 69 6f 2e 68 20 2a 6d | 75 73 74 2a 20 62 65 20 |fio.h *m|ust* be |
|00000270| 69 6e 63 6c 75 64 65 64 | 20 77 68 65 6e 20 62 74 |included| when bt|
|00000280| 5f 6f 70 65 6e 28 29 20 | 69 73 20 75 73 65 64 20 |_open() |is used |
|00000290| 2a 2f 0d 0a 23 69 6e 63 | 6c 75 64 65 20 22 62 74 |*/..#inc|lude "bt|
|000002a0| 66 69 6f 2e 68 22 0d 0a | 0d 0a 76 6f 69 64 20 6d |fio.h"..|..void m|
|000002b0| 61 69 6e 28 61 72 67 63 | 2c 20 61 72 67 76 29 0d |ain(argc|, argv).|
|000002c0| 0a 69 6e 74 20 61 72 67 | 63 3b 0d 0a 63 68 61 72 |.int arg|c;..char|
|000002d0| 20 2a 2a 61 72 67 76 3b | 0d 0a 7b 0d 0a 20 20 20 | **argv;|..{.. |
|000002e0| 65 78 74 65 72 6e 20 6c | 6f 6e 67 20 67 65 74 72 |extern l|ong getr|
|000002f0| 6f 6f 74 28 29 2c 20 61 | 74 6f 6c 28 29 3b 0d 0a |oot(), a|tol();..|
|00000300| 20 20 20 65 78 74 65 72 | 6e 20 69 6e 74 20 20 20 | exter|n int |
|00000310| 62 74 5f 6c 74 6f 61 28 | 29 3b 20 20 20 20 20 20 |bt_ltoa(|); |
|00000320| 2f 2a 20 63 75 73 74 6f | 6d 20 63 62 74 72 65 65 |/* custo|m cbtree|
|00000330| 20 72 6f 75 74 69 6e 65 | 3a 20 73 65 65 20 6c 74 | routine|: see lt|
|00000340| 6f 61 2e 63 20 2a 2f 0d | 0a 20 20 20 65 78 74 65 |oa.c */.|. exte|
|00000350| 72 6e 20 63 68 61 72 20 | 2a 73 74 72 63 70 79 28 |rn char |*strcpy(|
|00000360| 29 2c 20 2a 63 61 6c 6c | 6f 63 28 29 3b 0d 0a 20 |), *call|oc();.. |
|00000370| 20 20 65 78 74 65 72 6e | 20 76 6f 69 64 20 20 66 | extern| void f|
|00000380| 72 65 65 28 29 3b 0d 0a | 20 20 20 65 78 74 65 72 |ree();..| exter|
|00000390| 6e 20 46 49 4c 45 20 2a | 66 6f 70 65 6e 28 29 3b |n FILE *|fopen();|
|000003a0| 0d 0a 20 20 20 6c 6f 6e | 67 20 72 6f 6f 74 70 74 |.. lon|g rootpt|
|000003b0| 72 3b 0d 0a 20 20 20 73 | 74 72 75 63 74 20 62 74 |r;.. s|truct bt|
|000003c0| 63 6f 6d 6d 6f 20 62 74 | 69 6e 64 65 78 3b 0d 0a |commo bt|index;..|
|000003d0| 20 20 20 46 49 4c 45 20 | 20 2a 66 70 72 6e 3b 0d | FILE | *fprn;.|
|000003e0| 0a 20 20 20 69 6e 74 20 | 66 64 69 64 78 2c 20 70 |. int |fdidx, p|
|000003f0| 77 69 64 74 68 3b 0d 0a | 20 20 20 63 68 61 72 20 |width;..| char |
|00000400| 69 6e 70 63 5b 38 5d 3b | 0d 0a 0d 0a 20 20 20 69 |inpc[8];|.... i|
|00000410| 66 28 20 28 66 70 72 6e | 20 3d 20 66 6f 70 65 6e |f( (fprn| = fopen|
|00000420| 28 50 52 49 4e 54 45 52 | 2c 22 77 22 29 20 29 20 |(PRINTER|,"w") ) |
|00000430| 3d 3d 20 4e 55 4c 4c 29 | 20 20 20 20 2f 2a 20 73 |== NULL)| /* s|
|00000440| 65 65 20 63 62 74 72 64 | 65 66 2e 68 20 2a 2f 0d |ee cbtrd|ef.h */.|
|00000450| 0a 20 20 20 7b 0d 0a 20 | 20 20 20 20 20 70 75 74 |. {.. | put|
|00000460| 73 28 22 43 61 6e 27 74 | 20 66 6f 70 65 6e 20 70 |s("Can't| fopen p|
|00000470| 72 69 6e 74 65 72 22 29 | 3b 0d 0a 20 20 20 20 20 |rinter")|;.. |
|00000480| 20 65 78 69 74 28 45 52 | 52 29 3b 0d 0a 20 20 20 | exit(ER|R);.. |
|00000490| 7d 0d 0a 20 20 20 73 63 | 72 5f 63 6c 72 28 29 3b |}.. sc|r_clr();|
|000004a0| 0d 0a 20 20 20 73 63 72 | 5f 63 75 72 73 28 35 2c |.. scr|_curs(5,|
|000004b0| 20 32 30 29 3b 0d 0a 20 | 20 20 70 72 69 6e 74 66 | 20);.. | printf|
|000004c0| 28 22 20 20 20 20 50 61 | 72 73 69 6e 67 20 20 42 |(" Pa|rsing B|
|000004d0| 2d 54 72 65 65 2e 2e 2e | 20 22 29 3b 0d 0a 0d 0a |-Tree...| ");....|
|000004e0| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 20 4d 20 41 | | /* M A|
|000004f0| 20 49 20 4e 20 20 43 20 | 4f 20 4e 20 54 20 52 20 | I N C |O N T R |
|00000500| 4f 20 4c 20 20 50 20 52 | 20 4f 20 47 20 52 20 41 |O L P R| O G R A|
|00000510| 20 4d 20 2a 2f 0d 0a 0d | 0a 20 20 20 67 65 74 62 | M */...|. getb|
|00000520| 6e 61 6d 65 28 61 72 67 | 63 2c 20 61 72 67 76 2c |name(arg|c, argv,|
|00000530| 20 26 62 74 69 6e 64 65 | 78 29 3b 0d 0a 0d 0a 20 | &btinde|x);.... |
|00000540| 20 20 69 66 28 28 66 64 | 69 64 78 20 3d 20 62 74 | if((fd|idx = bt|
|00000550| 5f 6f 70 65 6e 28 62 74 | 69 6e 64 65 78 2e 69 64 |_open(bt|index.id|
|00000560| 78 6e 61 6d 65 2c 4f 5f | 52 44 57 52 29 29 20 3d |xname,O_|RDWR)) =|
|00000570| 3d 20 45 52 52 29 0d 0a | 20 20 20 7b 0d 0a 20 20 |= ERR)..| {.. |
|00000580| 20 20 20 20 70 72 69 6e | 74 66 28 22 5c 6e 42 54 | prin|tf("\nBT|
|00000590| 50 41 52 53 45 3a 20 63 | 61 6e 27 74 20 6f 70 65 |PARSE: c|an't ope|
|000005a0| 6e 20 66 69 6c 65 20 27 | 25 73 27 22 2c 20 62 74 |n file '|%s'", bt|
|000005b0| 69 6e 64 65 78 2e 69 64 | 78 6e 61 6d 65 29 3b 0d |index.id|xname);.|
|000005c0| 0a 20 20 20 20 20 20 70 | 72 69 6e 74 66 28 22 5c |. p|rintf("\|
|000005d0| 6e 42 54 50 41 52 53 45 | 3a 20 72 65 2d 72 75 6e |nBTPARSE|: re-run|
|000005e0| 20 42 54 53 45 54 55 50 | 2e 45 58 45 5c 6e 22 29 | BTSETUP|.EXE\n")|
|000005f0| 3b 0d 0a 20 20 20 20 20 | 20 65 78 69 74 28 30 29 |;.. | exit(0)|
|00000600| 3b 0d 0a 20 20 20 7d 0d | 0a 0d 0a 20 20 20 70 72 |;.. }.|... pr|
|00000610| 69 6e 74 66 28 22 5c 6e | 42 2b 74 72 65 65 20 4e |intf("\n|B+tree N|
|00000620| 61 6d 65 20 3a 20 25 73 | 20 22 2c 20 62 74 69 6e |ame : %s| ", btin|
|00000630| 64 65 78 2e 62 74 6e 61 | 6d 65 29 3b 0d 0a 20 20 |dex.btna|me);.. |
|00000640| 20 70 72 69 6e 74 66 28 | 22 5c 6e 49 6e 64 65 78 | printf(|"\nIndex|
|00000650| 20 46 69 6c 65 20 4e 61 | 6d 65 20 3a 20 25 73 20 | File Na|me : %s |
|00000660| 22 2c 20 62 74 69 6e 64 | 65 78 2e 69 64 78 6e 61 |", btind|ex.idxna|
|00000670| 6d 65 29 3b 0d 0a 0d 0a | 20 20 20 72 65 70 65 61 |me);....| repea|
|00000680| 74 0d 0a 20 20 20 7b 0d | 0a 20 20 20 20 20 20 70 |t.. {.|. p|
|00000690| 72 69 6e 74 66 28 22 5c | 6e 5c 6e 45 6e 74 65 72 |rintf("\|n\nEnter|
|000006a0| 20 74 68 65 20 77 69 64 | 74 68 20 6f 66 20 79 6f | the wid|th of yo|
|000006b0| 75 72 20 70 61 70 65 72 | 20 3d 3d 3e 22 29 3b 0d |ur paper| ==>");.|
|000006c0| 0a 20 20 20 20 20 20 67 | 65 74 73 28 69 6e 70 63 |. g|ets(inpc|
|000006d0| 29 3b 0d 0a 20 20 20 20 | 20 20 70 77 69 64 74 68 |);.. | pwidth|
|000006e0| 20 3d 20 61 74 6f 69 28 | 69 6e 70 63 29 3b 0d 0a | = atoi(|inpc);..|
|000006f0| 20 20 20 7d 0d 0a 20 20 | 20 75 6e 74 69 6c 28 20 | }.. | until( |
|00000700| 70 77 69 64 74 68 20 3e | 3d 20 34 30 20 20 26 26 |pwidth >|= 40 &&|
|00000710| 20 20 70 77 69 64 74 68 | 20 3c 20 32 35 36 20 29 | pwidth| < 256 )|
|00000720| 3b 0d 0a 0d 0a 20 20 20 | 72 6f 6f 74 70 74 72 20 |;.... |rootptr |
|00000730| 3d 20 67 65 74 72 6f 6f | 74 28 66 64 69 64 78 2c |= getroo|t(fdidx,|
|00000740| 20 62 74 69 6e 64 65 78 | 2e 66 69 6e 64 72 6f 6f | btindex|.findroo|
|00000750| 74 29 3b 20 20 20 2f 2a | 20 67 65 74 20 70 74 72 |t); /*| get ptr|
|00000760| 20 74 6f 20 69 64 78 20 | 72 6f 6f 74 20 6e 6f 64 | to idx |root nod|
|00000770| 65 20 2a 2f 0d 0a 0d 0a | 20 20 20 62 74 70 72 69 |e */....| btpri|
|00000780| 6e 74 28 66 64 69 64 78 | 2c 20 66 70 72 6e 2c 20 |nt(fdidx|, fprn, |
|00000790| 72 6f 6f 74 70 74 72 2c | 20 70 77 69 64 74 68 2c |rootptr,| pwidth,|
|000007a0| 20 26 62 74 69 6e 64 65 | 78 2c 20 30 29 3b 0d 0a | &btinde|x, 0);..|
|000007b0| 0d 0a 20 20 20 63 6c 6f | 73 65 28 66 64 69 64 78 |.. clo|se(fdidx|
|000007c0| 29 3b 0d 0a 20 20 20 62 | 74 72 74 65 72 6d 28 26 |);.. b|trterm(&|
|000007d0| 62 74 69 6e 64 65 78 29 | 3b 0d 0a 20 20 20 66 70 |btindex)|;.. fp|
|000007e0| 72 69 6e 74 66 28 66 70 | 72 6e 2c 22 5c 6e 22 29 |rintf(fp|rn,"\n")|
|000007f0| 3b 0d 0a 20 20 20 66 63 | 6c 6f 73 65 28 66 70 72 |;.. fc|lose(fpr|
|00000800| 6e 29 3b 0d 0a 20 20 20 | 70 72 69 6e 74 66 28 22 |n);.. |printf("|
|00000810| 5c 6e 22 29 3b 0d 0a 7d | 0d 0a 0d 0a |\n");..}|.... |
+--------+-------------------------+-------------------------+--------+--------+