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: BLKSHFT.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\LIBRARY\BLKSHFT.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 4c 49 42 |.....\CB|TREE\LIB|
|00000010| 52 41 52 59 5c 42 4c 4b | 53 48 46 54 2e 43 00 00 |RARY\BLK|SHFT.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 1a 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 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0d 0a 20 2a 0d 0a 20 |********|*.. *.. |
|000000d0| 2a 20 20 20 20 62 6c 6b | 73 68 66 74 2e 63 20 20 |* blk|shft.c |
|000000e0| 2d 2d 20 20 69 6e 74 65 | 6c 6c 69 67 65 6e 74 20 |-- inte|lligent |
|000000f0| 62 6c 6f 63 6b 20 73 68 | 69 66 74 20 72 6f 75 74 |block sh|ift rout|
|00000100| 69 6e 65 0d 0a 20 2a 2f | 0d 0a 0d 0a 23 69 6e 63 |ine.. */|....#inc|
|00000110| 6c 75 64 65 20 22 63 62 | 74 72 65 65 2e 68 22 0d |lude "cb|tree.h".|
|00000120| 0a 0d 0a 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.../****|********|
|00000130| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000140| 2a 2a 2a 2f 0d 0a 0d 0a | 76 6f 69 64 20 62 6c 6b |***/....|void blk|
|00000150| 73 68 66 74 28 64 73 74 | 70 2c 20 73 72 63 70 2c |shft(dst|p, srcp,|
|00000160| 20 6e 75 6d 2c 20 62 6c | 6b 73 7a 29 0d 0a 0d 0a | num, bl|ksz)....|
|00000170| 2f 2a 0d 0a 20 2a 20 20 | 20 73 68 69 66 74 20 6e |/*.. * | shift n|
|00000180| 20 70 61 67 65 73 20 66 | 72 6f 6d 20 73 72 63 20 | pages f|rom src |
|00000190| 74 6f 20 64 73 74 2c 20 | 63 6f 6e 73 69 64 65 72 |to dst, |consider|
|000001a0| 73 20 6f 76 65 72 6c 61 | 70 70 69 6e 67 20 6d 65 |s overla|pping me|
|000001b0| 6d 6f 72 79 20 72 65 67 | 69 6f 6e 73 2e 0d 0a 20 |mory reg|ions... |
|000001c0| 2a 0d 0a 20 2a 2f 0d 0a | 63 68 61 72 20 2a 64 73 |*.. */..|char *ds|
|000001d0| 74 70 3b 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |tp; | /* |
|000001e0| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 61 64 64 72 |destinat|ion addr|
|000001f0| 65 73 73 20 2a 2f 0d 0a | 63 68 61 72 20 2a 73 72 |ess */..|char *sr|
|00000200| 63 70 3b 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |cp; | /* |
|00000210| 73 6f 75 72 63 65 20 61 | 64 64 72 65 73 73 20 20 |source a|ddress |
|00000220| 20 20 20 20 2a 2f 0d 0a | 75 77 6f 72 64 20 6e 75 | */..|uword nu|
|00000230| 6d 3b 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |m; | /* |
|00000240| 23 20 62 6c 6f 63 6b 73 | 20 74 6f 20 63 6f 70 79 |# blocks| to copy|
|00000250| 20 20 20 20 2a 2f 0d 0a | 75 77 6f 72 64 20 62 6c | */..|uword bl|
|00000260| 6b 73 7a 3b 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |ksz; | /* |
|00000270| 62 6c 6f 63 6b 20 73 69 | 7a 65 20 20 20 20 20 20 |block si|ze |
|00000280| 20 20 20 20 2a 2f 0d 0a | 7b 0d 0a 20 20 20 75 77 | */..|{.. uw|
|00000290| 6f 72 64 20 6e 20 3d 20 | 6e 75 6d 20 2a 20 62 6c |ord n = |num * bl|
|000002a0| 6b 73 7a 3b 0d 0a 0d 0a | 20 20 20 2f 2a 20 46 4f |ksz;....| /* FO|
|000002b0| 52 57 41 52 44 20 43 4f | 50 59 20 28 70 72 65 66 |RWARD CO|PY (pref|
|000002c0| 65 72 72 65 64 29 20 2a | 2f 0d 0a 20 20 20 2f 2a |erred) *|/.. /*|
|000002d0| 20 20 20 73 72 63 3a 20 | 20 20 20 20 3c 2d 2d 20 | src: | <-- |
|000002e0| 20 7c 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | |------|--------|
|000002f0| 2d 2d 2d 2d 2d 2d 2d 7c | 20 20 20 2a 2f 0d 0a 20 |-------|| */.. |
|00000300| 20 20 2f 2a 20 20 20 64 | 73 74 3a 20 20 20 7c 20 | /* d|st: | |
|00000310| 2d 20 2d 20 2d 20 2d 20 | 2d 20 2d 20 2d 20 2d 20 |- - - - |- - - - |
|00000320| 2d 20 2d 20 7c 20 20 20 | 20 20 20 20 20 20 20 2a |- - | | *|
|00000330| 2f 0d 0a 0d 0a 20 20 20 | 69 66 20 28 64 73 74 70 |/.... |if (dstp|
|00000340| 20 3c 20 73 72 63 70 20 | 7c 7c 20 20 20 20 20 20 | < srcp ||| |
|00000350| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 65 | | /* e|
|00000360| 69 74 68 65 72 20 77 65 | 27 72 65 20 63 6f 70 79 |ither we|'re copy|
|00000370| 69 6e 67 20 74 6f 20 6c | 6f 77 65 72 20 2a 2f 0d |ing to l|ower */.|
|00000380| 0a 20 20 20 20 20 20 20 | 20 20 73 72 63 70 20 2b |. | srcp +|
|00000390| 20 6e 20 3c 3d 20 64 73 | 74 70 29 20 20 20 20 20 | n <= ds|tp) |
|000003a0| 20 20 20 20 20 20 20 20 | 2f 2a 20 6d 65 6d 6f 72 | |/* memor|
|000003b0| 79 20 6f 72 20 77 65 27 | 72 65 20 4e 4f 54 20 6f |y or we'|re NOT o|
|000003c0| 76 65 72 6c 61 70 70 69 | 6e 67 20 2a 2f 0d 0a 0d |verlappi|ng */...|
|000003d0| 0a 20 20 20 20 20 20 6d | 65 6d 63 70 79 28 64 73 |. m|emcpy(ds|
|000003e0| 74 70 2c 20 73 72 63 70 | 2c 20 6e 29 3b 20 2f 2a |tp, srcp|, n); /*|
|000003f0| 20 63 6f 70 79 20 75 70 | 77 61 72 64 73 20 2a 2f | copy up|wards */|
|00000400| 0d 0a 0d 0a 20 20 20 2f | 2a 20 52 45 56 45 52 53 |.... /|* REVERS|
|00000410| 45 20 42 4c 4f 43 4b 20 | 43 4f 50 59 20 28 73 6c |E BLOCK |COPY (sl|
|00000420| 69 67 68 74 6c 79 20 73 | 6c 6f 77 65 72 29 20 2a |ightly s|lower) *|
|00000430| 2f 0d 0a 20 20 20 2f 2a | 20 20 20 73 72 63 3a 20 |/.. /*| src: |
|00000440| 20 20 7c 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | |-----|--------|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 7c 20 20 2d 2d 3e 20 20 |--------|| --> |
|00000460| 20 20 20 2a 2f 0d 0a 20 | 20 20 2f 2a 20 20 20 64 | */.. | /* d|
|00000470| 73 74 3a 20 20 20 20 20 | 20 20 20 20 20 7c 20 2d |st: | | -|
|00000480| 20 2d 20 2d 20 2d 20 2d | 20 2d 20 2d 20 2d 20 2d | - - - -| - - - -|
|00000490| 20 2d 20 7c 20 20 20 2a | 2f 0d 0a 0d 0a 20 20 20 | - | *|/.... |
|000004a0| 65 6c 73 65 20 20 2f 2a | 20 72 61 6e 67 65 73 20 |else /*| ranges |
|000004b0| 61 72 65 20 6f 76 65 72 | 6c 61 70 70 69 6e 67 20 |are over|lapping |
|000004c0| 41 4e 44 20 77 65 27 72 | 65 20 63 6f 70 79 20 74 |AND we'r|e copy t|
|000004d0| 6f 20 68 69 67 68 65 72 | 20 6d 65 6d 6f 72 79 20 |o higher| memory |
|000004e0| 2a 2f 0d 0a 20 20 20 7b | 0d 0a 20 20 20 20 20 20 |*/.. {|.. |
|000004f0| 73 72 63 70 20 2b 3d 20 | 6e 3b 0d 0a 20 20 20 20 |srcp += |n;.. |
|00000500| 20 20 64 73 74 70 20 2b | 3d 20 6e 3b 0d 0a 20 20 | dstp +|= n;.. |
|00000510| 20 20 20 20 77 68 69 6c | 65 20 28 6e 75 6d 2d 2d | whil|e (num--|
|00000520| 20 21 3d 20 30 29 0d 0a | 20 20 20 20 20 20 20 20 | != 0)..| |
|00000530| 20 6d 65 6d 63 70 79 28 | 64 73 74 70 20 2d 3d 20 | memcpy(|dstp -= |
|00000540| 62 6c 6b 73 7a 2c 20 73 | 72 63 70 20 2d 3d 20 62 |blksz, s|rcp -= b|
|00000550| 6c 6b 73 7a 2c 20 62 6c | 6b 73 7a 29 3b 20 2f 2a |lksz, bl|ksz); /*|
|00000560| 20 61 20 62 6c 6b 20 61 | 74 20 61 20 74 69 6d 65 | a blk a|t a time|
|00000570| 20 2a 2f 0d 0a 20 20 20 | 7d 0d 0a 7d 0d 0a | */.. |}..}.. |
+--------+-------------------------+-------------------------+--------+--------+