home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / T / TIFF Code.sit / memory.c < prev    next >
MacBinary  |  1987-12-21  |  1.4 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: memory.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Mon Dec 21 15:32:57 1987, modified Mon Dec 21 15:32:57 1987, creator 'MPS ', type ASCII, 672 bytes "memory.c" , at 0x320 470 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 6d 65 6d 6f 72 79 | 2e 63 00 00 00 00 00 00 |..memory|.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 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 02 a0 00 | 00 01 d6 9d f3 35 f9 9d |........|.....5..|
|00000060| f3 35 f9 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.5......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 50 50 00 00 |........|....PP..|
|00000080| 2f 2a 0d 20 2a 09 6d 65 | 6d 6f 72 79 2e 63 0d 20 |/*. *.me|mory.c. |
|00000090| 2a 0d 20 2a 09 43 6f 70 | 79 72 69 67 68 74 20 28 |*. *.Cop|yright (|
|000000a0| 63 29 20 31 39 38 37 20 | 62 79 20 42 65 61 72 20 |c) 1987 |by Bear |
|000000b0| 52 69 76 65 72 20 41 73 | 73 6f 63 69 61 74 65 73 |River As|sociates|
|000000c0| 2c 20 49 6e 63 2e 0d 20 | 2a 2f 0d 0d 2f 2a 20 50 |, Inc.. |*/../* P|
|000000d0| 72 69 6d 61 72 79 20 49 | 6e 74 65 72 66 61 63 65 |rimary I|nterface|
|000000e0| 20 46 69 6c 65 73 20 2a | 2f 0d 23 69 6e 63 6c 75 | Files *|/.#inclu|
|000000f0| 64 65 20 22 54 79 70 65 | 73 2e 68 22 0d 0d 2f 2a |de "Type|s.h"../*|
|00000100| 20 4f 74 68 65 72 20 49 | 6e 74 65 72 66 61 63 65 | Other I|nterface|
|00000110| 20 66 69 6c 65 73 20 2a | 2f 0d 23 69 6e 63 6c 75 | files *|/.#inclu|
|00000120| 64 65 20 22 4d 65 6d 6f | 72 79 2e 68 22 0d 0d 2f |de "Memo|ry.h"../|
|00000130| 2a 20 41 70 70 6c 69 63 | 61 74 69 6f 6e 2d 73 70 |* Applic|ation-sp|
|00000140| 65 63 69 66 69 63 20 49 | 6e 63 6c 75 64 65 20 66 |ecific I|nclude f|
|00000150| 69 6c 65 73 20 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |iles */.|#include|
|00000160| 09 22 74 69 66 66 6c 69 | 62 2e 68 22 0d 0d 4f 53 |."tiffli|b.h"..OS|
|00000170| 45 72 72 20 41 6c 6c 6f | 63 50 74 72 28 70 74 72 |Err Allo|cPtr(ptr|
|00000180| 50 74 72 2c 20 73 69 7a | 65 29 0d 50 74 72 09 09 |Ptr, siz|e).Ptr..|
|00000190| 2a 70 74 72 50 74 72 3b | 0d 53 69 7a 65 09 73 69 |*ptrPtr;|.Size.si|
|000001a0| 7a 65 3b 0d 7b 0d 09 4f | 53 45 72 72 20 65 72 72 |ze;.{..O|SErr err|
|000001b0| 6f 72 3b 0d 0d 09 2a 70 | 74 72 50 74 72 20 3d 20 |or;...*p|trPtr = |
|000001c0| 4e 65 77 50 74 72 28 73 | 69 7a 65 29 3b 0d 09 65 |NewPtr(s|ize);..e|
|000001d0| 72 72 6f 72 20 3d 20 4d | 65 6d 45 72 72 6f 72 28 |rror = M|emError(|
|000001e0| 29 3b 0d 09 72 65 74 75 | 72 6e 28 65 72 72 6f 72 |);..retu|rn(error|
|000001f0| 29 3b 0d 7d 0d 20 0d 4f | 53 45 72 72 20 41 6c 6c |);.}. .O|SErr All|
|00000200| 6f 63 4d 65 6d 6f 72 79 | 28 70 74 72 48 61 6e 64 |ocMemory|(ptrHand|
|00000210| 6c 65 2c 20 73 69 7a 65 | 29 0d 48 61 6e 64 6c 65 |le, size|).Handle|
|00000220| 09 2a 70 74 72 48 61 6e | 64 6c 65 3b 0d 53 69 7a |.*ptrHan|dle;.Siz|
|00000230| 65 09 73 69 7a 65 3b 0d | 7b 0d 09 4f 53 45 72 72 |e.size;.|{..OSErr|
|00000240| 20 65 72 72 6f 72 3b 0d | 09 0d 09 2a 70 74 72 48 | error;.|...*ptrH|
|00000250| 61 6e 64 6c 65 20 3d 20 | 4e 65 77 48 61 6e 64 6c |andle = |NewHandl|
|00000260| 65 28 73 69 7a 65 29 3b | 0d 09 65 72 72 6f 72 20 |e(size);|..error |
|00000270| 3d 20 4d 65 6d 45 72 72 | 6f 72 28 29 3b 0d 09 72 |= MemErr|or();..r|
|00000280| 65 74 75 72 6e 28 65 72 | 72 6f 72 29 3b 0d 7d 0d |eturn(er|ror);.}.|
|00000290| 0d 4f 53 45 72 72 20 41 | 6c 6c 6f 63 48 61 6e 64 |.OSErr A|llocHand|
|000002a0| 6c 65 53 69 7a 65 28 68 | 2c 20 6e 65 77 53 69 7a |leSize(h|, newSiz|
|000002b0| 65 29 0d 48 61 6e 64 6c | 65 09 68 3b 0d 53 69 7a |e).Handl|e.h;.Siz|
|000002c0| 65 09 6e 65 77 53 69 7a | 65 3b 0d 7b 0d 09 4f 53 |e.newSiz|e;.{..OS|
|000002d0| 45 72 72 20 65 72 72 6f | 72 3b 0d 09 0d 09 53 65 |Err erro|r;....Se|
|000002e0| 74 48 61 6e 64 6c 65 53 | 69 7a 65 28 68 2c 20 6e |tHandleS|ize(h, n|
|000002f0| 65 77 53 69 7a 65 29 3b | 0d 09 65 72 72 6f 72 20 |ewSize);|..error |
|00000300| 3d 20 4d 65 6d 45 72 72 | 6f 72 28 29 3b 0d 09 72 |= MemErr|or();..r|
|00000310| 65 74 75 72 6e 28 65 72 | 72 6f 72 29 3b 0d 7d 0d |eturn(er|ror);.}.|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 01 00 00 00 01 84 | 00 00 00 84 00 00 00 52 |........|.......R|
|00000390| 65 6e 0d 72 65 61 64 20 | 66 72 6f 6d 20 66 69 6c |en.read |from fil|
|000003a0| 65 20 74 68 65 46 69 6c | 65 20 75 6e 74 69 6c 20 |e theFil|e until |
|000003b0| 08 6d 65 6d 6f 72 79 2e | 63 00 02 00 00 00 50 61 |.memory.|c.....Pa|
|000003c0| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|000003d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 a9 80 21 32 00 00 | 00 00 00 00 01 d6 72 20 |....!2..|......r |
|00000400| 66 69 65 6c 64 20 6d 6f | 64 4c 69 73 74 0d 65 6e |field mo|dList.en|
|00000410| 64 20 69 66 0d 65 6e 64 | 20 72 65 70 65 61 74 0d |d if.end| repeat.|
|00000420| 0d 63 6c 6f 73 65 20 66 | 69 6c 65 20 74 68 65 46 |.close f|ile theF|
|00000430| 69 6c 65 0d 65 6e 64 20 | 69 66 0d 65 6e 64 20 6d |ile.end |if.end m|
|00000440| 6f 75 73 65 55 70 0d 00 | 00 ac 00 1f 01 00 01 1d |ouseUp..|........|
|00000450| 00 9b 01 3f 00 b3 80 00 | 00 00 00 00 00 01 00 00 |...?....|........|
|00000460| 00 0c 00 00 00 10 00 00 | 6f 6e 20 6d 6f 75 73 65 |........|on mouse|
|00000470| 55 70 0d 69 66 20 74 68 | 65 20 73 68 69 66 74 4b |Up.if th|e shiftK|
|00000480| 00 00 00 02 00 00 00 00 | 00 48 00 09 4d 6f 6e 61 |........|.H..Mona|
|00000490| 63 6f 00 73 61 66 65 74 | 79 53 69 7a 65 20 2d 20 |co.safet|ySize - |
|000004a0| 46 72 65 65 4d 65 6d 28 | 29 2c 20 73 00 06 00 04 |FreeMem(|), s....|
|000004b0| 00 40 00 0c 01 4e 01 f8 | 00 40 00 0c 01 4e 01 f8 |.@...N..|.@...N..|
|000004c0| 9d f2 ef a9 00 00 00 7e | 00 00 00 7e 00 00 00 00 |.......~|...~....|
|000004d0| 01 00 00 00 00 2e 00 02 | 00 00 01 7d 00 00 01 88 |........|...}....|
|000004e0| 0b 41 6c 6c 6f 63 4d 65 | 6d 6f 72 79 00 00 02 17 |.AllocMe|mory....|
|000004f0| 00 00 02 26 0f 41 6c 6c | 6f 63 48 61 6e 64 6c 65 |...&.All|ocHandle|
|00000500| 53 69 7a 65 00 00 01 00 | 00 00 01 84 00 00 00 84 |Size....|........|
|00000510| 00 00 00 52 00 01 6e 3c | 04 6a 00 00 00 1c 00 52 |...R..n<|.j.....R|
|00000520| 00 01 45 51 45 44 00 00 | 00 12 4d 50 53 52 00 01 |..EQED..|..MPSR..|
|00000530| 00 1e 03 eb ff ff 00 00 | 00 00 00 00 00 00 03 ed |........|........|
|00000540| ff ff 00 00 00 06 00 00 | 00 00 03 ef ff ff 00 00 |........|........|
|00000550| 00 52 00 02 70 8e 00 00 | 00 00 00 00 00 00 00 00 |.R..p...|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+