home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-24 | 29.8 KB | [TEXT/MPCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jul 24 17:34:22 1995, modified Mon Jul 24 17:34:22 1995, creator 'MPCC', type ASCII, 29771 bytes "LogLibrary.h" , at 0x74cb 456 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 |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 4c 6f 67 4c 69 62 | 72 61 72 79 2e 68 00 00 |..LogLib|rary.h..|
|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 43 | 43 01 00 00 00 00 00 00 |.TEXTMPC|C.......|
|00000050| 00 00 00 00 00 74 4b 00 | 00 01 c8 ac 39 c2 5e ac |.....tK.|....9.^.|
|00000060| 39 c2 5e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |9.^.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ba 1c 00 00 |........|........|
|00000080| 2f 2a 09 09 09 09 09 09 | 09 09 09 09 4c 6f 67 4c |/*......|....LogL|
|00000090| 69 62 72 61 72 79 2e 68 | 09 09 09 09 09 09 09 09 |ibrary.h|........|
|000000a0| 2a 2f 0d 2f 2a 0d 20 2a | 20 4c 6f 67 4c 69 62 72 |*/./*. *| LogLibr|
|000000b0| 61 72 79 2e 68 0d 20 2a | 20 43 6f 70 79 72 69 67 |ary.h. *| Copyrig|
|000000c0| 68 74 20 a9 20 31 39 39 | 32 2d 39 35 20 41 70 70 |ht . 199|2-95 App|
|000000d0| 6c 65 20 43 6f 6d 70 75 | 74 65 72 20 49 6e 63 2e |le Compu|ter Inc.|
|000000e0| 20 41 6c 6c 20 52 69 67 | 68 74 73 20 52 65 73 65 | All Rig|hts Rese|
|000000f0| 72 76 65 64 2e 0d 20 2a | 20 50 72 6f 67 72 61 6d |rved.. *| Program|
|00000100| 6d 65 64 20 62 79 20 4d | 61 72 74 69 6e 20 4d 69 |med by M|artin Mi|
|00000110| 6e 6f 77 2c 0d 20 2a 09 | 49 6e 74 65 72 6e 65 74 |now,. *.|Internet|
|00000120| 3a 09 6d 69 6e 6f 77 40 | 61 70 70 6c 65 2e 63 6f |:.minow@|apple.co|
|00000130| 6d 0d 20 2a 09 41 70 70 | 6c 65 4c 69 6e 6b 3a 09 |m. *.App|leLink:.|
|00000140| 4d 49 4e 4f 57 0d 20 2a | 20 56 65 72 73 69 6f 6e |MINOW. *| Version|
|00000150| 20 6f 66 20 4d 61 79 20 | 32 35 2c 20 31 39 39 35 | of May |25, 1995|
|00000160| 0d 20 2a 2f 0d 23 69 66 | 6e 64 65 66 20 5f 5f 4c |. */.#if|ndef __L|
|00000170| 6f 67 4c 69 62 72 61 72 | 79 5f 5f 0d 23 64 65 66 |ogLibrar|y__.#def|
|00000180| 69 6e 65 20 5f 5f 4c 6f | 67 4c 69 62 72 61 72 79 |ine __Lo|gLibrary|
|00000190| 5f 5f 0d 2f 2a 0d 20 2a | 20 55 73 61 67 65 3a 0d |__./*. *| Usage:.|
|000001a0| 20 2a 09 50 6f 77 65 72 | 50 43 20 28 6e 61 74 69 | *.Power|PC (nati|
|000001b0| 76 65 29 3a 0d 20 2a 09 | 09 49 6e 63 6c 75 64 65 |ve):. *.|.Include|
|000001c0| 20 22 4c 6f 67 4c 69 62 | 72 61 72 79 2e 68 22 20 | "LogLib|rary.h" |
|000001d0| 69 6e 20 61 6c 6c 20 63 | 6f 6d 70 69 6c 61 74 69 |in all c|ompilati|
|000001e0| 6f 6e 73 2e 0d 20 2a 09 | 09 45 69 74 68 65 72 20 |ons.. *.|.Either |
|000001f0| 63 6f 6d 70 69 6c 65 20 | 74 68 65 20 4c 6f 67 4c |compile |the LogL|
|00000200| 69 62 72 61 72 79 20 66 | 75 6e 63 74 69 6f 6e 73 |ibrary f|unctions|
|00000210| 20 6f 72 20 69 6e 63 6c | 75 64 65 20 4c 6f 67 4c | or incl|ude LogL|
|00000220| 69 62 72 61 72 79 20 28 | 73 68 61 72 65 64 20 6c |ibrary (|shared l|
|00000230| 69 62 72 61 72 79 29 2e | 0d 20 2a 09 36 38 30 30 |ibrary).|. *.6800|
|00000240| 30 20 65 6d 75 6c 61 74 | 69 6f 6e 0d 20 2a 09 09 |0 emulat|ion. *..|
|00000250| 49 6e 63 6c 75 64 65 20 | 22 4c 6f 67 4c 69 62 72 |Include |"LogLibr|
|00000260| 61 72 79 2e 68 22 20 69 | 6e 20 61 6c 6c 20 63 6f |ary.h" i|n all co|
|00000270| 6d 70 69 6c 61 74 69 6f | 6e 73 2e 0d 20 2a 09 09 |mpilatio|ns.. *..|
|00000280| 43 6f 6d 70 69 6c 65 20 | 4c 6f 67 4c 69 62 72 61 |Compile |LogLibra|
|00000290| 72 79 2e 63 2c 20 4c 6f | 67 43 6f 6e 76 65 72 74 |ry.c, Lo|gConvert|
|000002a0| 54 69 6d 65 73 74 61 6d | 70 2e 63 2c 20 61 6e 64 |Timestam|p.c, and|
|000002b0| 20 4c 6f 67 46 6f 72 6d | 61 74 54 69 6d 65 73 74 | LogForm|atTimest|
|000002c0| 61 6d 70 2e 63 0d 20 2a | 09 09 28 6f 72 20 69 6e |amp.c. *|..(or in|
|000002d0| 63 6c 75 64 65 20 61 6e | 20 6f 62 6a 65 63 74 29 |clude an| object)|
|000002e0| 2e 0d 20 2a 09 09 4d 61 | 6b 65 20 4c 6f 67 4c 69 |.. *..Ma|ke LogLi|
|000002f0| 62 72 61 72 79 20 6b 6e | 6f 77 6e 20 74 6f 20 74 |brary kn|own to t|
|00000300| 68 65 20 65 78 65 63 75 | 74 69 6e 67 20 70 72 6f |he execu|ting pro|
|00000310| 67 72 61 6d 2c 20 70 6f | 73 73 69 62 6c 79 20 62 |gram, po|ssibly b|
|00000320| 79 20 73 74 6f 72 69 6e | 67 0d 20 2a 09 09 69 74 |y storin|g. *..it|
|00000330| 20 69 6e 20 74 68 65 20 | 45 78 74 65 6e 73 69 6f | in the |Extensio|
|00000340| 6e 73 20 66 6f 6c 64 65 | 72 2e 0d 20 2a 0d 20 2a |ns folde|r.. *. *|
|00000350| 20 45 64 69 74 20 48 69 | 73 74 6f 72 79 0d 20 2a | Edit Hi|story. *|
|00000360| 09 39 34 2e 31 30 2e 31 | 36 20 4d 4d 09 09 52 65 |.94.10.1|6 MM..Re|
|00000370| 76 69 73 65 64 20 28 74 | 68 72 6f 75 67 68 6c 79 |vised (t|hroughly|
|00000380| 29 20 66 72 6f 6d 20 74 | 68 65 20 41 75 64 69 74 |) from t|he Audit|
|00000390| 20 6c 69 62 72 61 72 79 | 20 74 6f 20 74 61 6b 65 | library| to take|
|000003a0| 20 61 64 76 61 6e 74 61 | 67 65 20 6f 66 0d 20 2a | advanta|ge of. *|
|000003b0| 09 09 09 09 09 74 68 65 | 20 6e 65 77 20 49 2f 4f |.....the| new I/O|
|000003c0| 20 61 72 63 68 69 74 65 | 63 74 75 72 65 2e 20 54 | archite|cture. T|
|000003d0| 68 65 20 6c 69 62 72 61 | 72 79 20 6e 61 6d 65 20 |he libra|ry name |
|000003e0| 68 61 73 20 62 65 65 6e | 20 63 68 61 6e 67 65 64 |has been| changed|
|000003f0| 20 66 72 6f 6d 0d 20 2a | 09 09 09 09 09 41 75 64 | from. *|.....Aud|
|00000400| 69 74 20 74 6f 20 44 72 | 69 76 65 72 4c 6f 67 2e |it to Dr|iverLog.|
|00000410| 20 54 68 65 20 64 72 69 | 76 65 72 20 6c 6f 67 20 | The dri|ver log |
|00000420| 69 73 20 6e 61 6d 65 64 | 20 74 68 72 6f 75 67 68 |is named| through|
|00000430| 20 74 68 65 20 53 79 73 | 74 65 6d 0d 20 2a 09 09 | the Sys|tem. *..|
|00000440| 09 09 09 4e 61 6d 65 20 | 52 65 67 69 73 74 72 79 |...Name |Registry|
|00000450| 2e 20 54 68 65 73 65 20 | 66 75 6e 63 74 69 6f 6e |. These |function|
|00000460| 73 20 61 72 65 20 28 63 | 75 72 72 65 6e 74 6c 79 |s are (c|urrently|
|00000470| 29 20 6f 6e 6c 79 20 61 | 76 61 69 6c 61 62 6c 65 |) only a|vailable|
|00000480| 20 69 6e 0d 20 2a 09 09 | 09 09 09 50 6f 77 65 72 | in. *..|...Power|
|00000490| 50 43 2e 0d 20 2a 09 39 | 34 2e 31 32 2e 31 32 20 |PC.. *.9|4.12.12 |
|000004a0| 4d 4d 09 09 46 69 6e 69 | 73 68 65 64 20 63 6f 6e |MM..Fini|shed con|
|000004b0| 76 65 72 74 69 6e 67 20 | 74 6f 20 4c 6f 67 4c 69 |verting |to LogLi|
|000004c0| 62 72 61 72 79 2c 20 61 | 64 64 65 64 20 4d 69 78 |brary, a|dded Mix|
|000004d0| 65 64 20 4d 6f 64 65 20 | 73 75 70 70 6f 72 74 20 |ed Mode |support |
|000004e0| 73 6f 0d 20 2a 09 09 09 | 09 09 74 68 65 20 28 50 |so. *...|..the (P|
|000004f0| 6f 77 65 72 20 50 43 29 | 20 6c 69 62 72 61 72 79 |ower PC)| library|
|00000500| 20 6d 61 79 20 62 65 20 | 63 61 6c 6c 65 64 20 66 | may be |called f|
|00000510| 72 6f 6d 20 36 38 30 30 | 30 20 63 6f 64 65 2e 0d |rom 6800|0 code..|
|00000520| 20 2a 09 39 35 2e 30 32 | 2e 30 33 20 4d 4d 09 09 | *.95.02|.03 MM..|
|00000530| a5 ca 43 68 61 6e 67 65 | 64 20 57 72 69 74 65 4c |..Change|d WriteL|
|00000540| 6f 67 45 6e 74 72 79 2c | 20 53 74 6f 72 65 4c 6f |ogEntry,| StoreLo|
|00000550| 67 45 6e 74 72 79 2c 20 | 61 6e 64 20 52 65 61 64 |gEntry, |and Read|
|00000560| 4c 6f 67 45 6e 74 72 79 | 20 74 6f 20 72 65 74 75 |LogEntry| to retu|
|00000570| 72 6e 0d 20 2a 09 09 09 | 09 09 4f 53 45 72 72 27 |rn. *...|..OSErr'|
|00000580| 73 20 28 74 6f 20 64 69 | 73 74 69 6e 67 75 69 73 |s (to di|stinguis|
|00000590| 68 20 62 65 74 77 65 65 | 6e 20 73 65 6d 61 70 68 |h betwee|n semaph|
|000005a0| 6f 72 65 20 69 6e 74 65 | 72 6c 6f 63 6b 20 61 6e |ore inte|rlock an|
|000005b0| 64 20 6f 74 68 65 72 0d | 20 2a 09 09 09 09 09 65 |d other.| *.....e|
|000005c0| 72 72 6f 72 73 29 2e 20 | 54 68 69 73 20 77 69 6c |rrors). |This wil|
|000005d0| 6c 20 61 6c 6c 6f 77 20 | 61 20 6e 6f 6e 2d 69 6e |l allow |a non-in|
|000005e0| 74 65 72 72 75 70 74 20 | 61 70 70 6c 69 63 61 74 |terrupt |applicat|
|000005f0| 69 6f 6e 20 74 6f 20 6c | 6f 6f 70 0d 20 2a 09 09 |ion to l|oop. *..|
|00000600| 09 09 09 77 68 69 6c 65 | 20 74 68 65 20 73 65 6d |...while| the sem|
|00000610| 61 70 68 6f 72 65 20 69 | 73 20 69 6e 74 65 72 6c |aphore i|s interl|
|00000620| 6f 63 6b 65 64 2c 20 74 | 68 6f 75 67 68 20 74 68 |ocked, t|hough th|
|00000630| 69 73 20 69 73 20 6e 6f | 74 20 74 72 69 76 69 61 |is is no|t trivia|
|00000640| 6c 2e 0d 20 2a 09 09 09 | 09 09 a5 ca 52 65 6d 6f |l.. *...|....Remo|
|00000650| 76 65 64 20 74 68 65 20 | 53 74 6f 72 65 53 74 72 |ved the |StoreStr|
|00000660| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 20 28 6e 6f |ing func|tion (no|
|00000670| 77 20 69 6e 6c 69 6e 65 | 64 29 2e 0d 20 2a 09 09 |w inline|d).. *..|
|00000680| 09 09 09 a5 ca 52 65 6d | 6f 76 65 64 20 74 68 65 |.....Rem|oved the|
|00000690| 20 6c 6f 73 74 20 64 61 | 74 61 20 63 6f 75 6e 74 | lost da|ta count|
|000006a0| 65 72 20 61 6e 64 20 65 | 6e 74 72 79 2e 20 53 65 |er and e|ntry. Se|
|000006b0| 71 75 65 6e 63 65 20 67 | 61 70 73 20 63 61 6e 0d |quence g|aps can.|
|000006c0| 20 2a 09 09 09 09 09 62 | 65 73 74 20 62 65 20 64 | *.....b|est be d|
|000006d0| 65 74 65 72 6d 69 6e 65 | 64 20 62 79 20 77 61 74 |etermine|d by wat|
|000006e0| 63 68 69 6e 67 20 74 68 | 65 20 61 74 6f 6d 69 63 |ching th|e atomic|
|000006f0| 20 73 65 71 75 65 6e 63 | 65 20 63 6f 75 6e 74 65 | sequenc|e counte|
|00000700| 72 2e 0d 20 2a 09 09 09 | 09 09 a5 ca 55 73 65 20 |r.. *...|....Use |
|00000710| 49 6e 63 72 65 6d 65 6e | 74 41 74 6f 6d 69 63 20 |Incremen|tAtomic |
|00000720| 74 6f 20 75 70 64 61 74 | 65 20 74 68 65 20 73 65 |to updat|e the se|
|00000730| 71 75 65 6e 63 65 20 63 | 6f 75 6e 74 65 72 2e 20 |quence c|ounter. |
|00000740| 54 68 69 73 20 77 69 6c | 6c 0d 20 2a 09 09 09 09 |This wil|l. *....|
|00000750| 09 61 6c 73 6f 20 63 6f | 75 6e 74 20 64 61 74 61 |.also co|unt data|
|00000760| 20 6c 6f 73 74 20 69 66 | 20 74 68 65 20 73 65 6d | lost if| the sem|
|00000770| 61 70 68 6f 72 65 20 69 | 73 20 69 6e 74 65 72 6c |aphore i|s interl|
|00000780| 6f 63 6b 65 64 2e 0d 20 | 2a 09 09 09 09 09 a5 ca |ocked.. |*.......|
|00000790| 53 74 6f 72 65 4c 6f 67 | 45 6e 74 72 79 20 73 74 |StoreLog|Entry st|
|000007a0| 6f 72 65 73 20 74 68 65 | 20 73 65 71 75 65 6e 63 |ores the| sequenc|
|000007b0| 65 20 63 6f 75 6e 74 65 | 72 20 61 6e 64 20 74 69 |e counte|r and ti|
|000007c0| 6d 65 73 74 61 6d 70 20 | 69 6e 74 6f 0d 20 2a 09 |mestamp |into. *.|
|000007d0| 09 09 09 09 74 68 65 20 | 63 61 6c 6c 65 72 27 73 |....the |caller's|
|000007e0| 20 4c 6f 67 45 6e 74 72 | 79 52 65 63 6f 72 64 3a | LogEntr|yRecord:|
|000007f0| 20 69 74 20 69 73 20 6e | 6f 74 20 63 61 6c 6c 65 | it is n|ot calle|
|00000800| 64 20 77 69 74 68 20 61 | 20 63 6f 6e 73 74 0d 20 |d with a| const. |
|00000810| 2a 09 09 09 09 09 4c 6f | 67 45 6e 74 72 79 50 74 |*.....Lo|gEntryPt|
|00000820| 72 2e 0d 20 2a 20 39 35 | 2e 30 33 2e 33 31 20 4d |r.. * 95|.03.31 M|
|00000830| 4d 09 09 41 64 64 65 64 | 20 36 38 30 30 30 2d 63 |M..Added| 68000-c|
|00000840| 61 6c 6c 61 62 6c 65 20 | 55 70 54 69 6d 65 2c 20 |allable |UpTime, |
|00000850| 72 65 6d 6f 76 65 64 20 | 55 70 54 69 6d 65 20 66 |removed |UpTime f|
|00000860| 72 6f 6d 20 52 65 61 64 | 4c 6f 67 45 6e 74 72 79 |rom Read|LogEntry|
|00000870| 20 61 6e 64 0d 20 2a 09 | 09 09 09 09 43 6f 70 79 | and. *.|....Copy|
|00000880| 4c 6f 67 52 65 63 6f 72 | 64 45 6e 74 72 79 2e 20 |LogRecor|dEntry. |
|00000890| 4c 6f 67 43 6f 6e 76 65 | 72 74 54 69 6d 65 73 74 |LogConve|rtTimest|
|000008a0| 61 6d 70 20 64 6f 65 73 | 6e 27 74 20 6e 65 65 64 |amp does|n't need|
|000008b0| 20 74 68 69 73 2e 0d 20 | 2a 20 31 39 39 35 2e 30 | this.. |* 1995.0|
|000008c0| 34 2e 30 37 09 4d 4d 09 | 53 6f 6d 65 20 63 6f 6d |4.07.MM.|Some com|
|000008d0| 70 69 6c 65 72 73 20 6d | 69 73 2d 68 61 6e 64 6c |pilers m|is-handl|
|000008e0| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 72 65 74 75 |e functi|ons retu|
|000008f0| 72 6e 69 6e 67 20 73 74 | 72 75 63 74 75 72 65 73 |rning st|ructures|
|00000900| 2e 20 53 74 6f 72 65 0d | 20 2a 09 09 09 09 09 55 |. Store.| *.....U|
|00000910| 70 54 69 6d 65 20 72 65 | 74 75 72 6e 65 64 20 76 |pTime re|turned v|
|00000920| 61 6c 75 65 73 20 69 6e | 20 61 20 76 6f 6c 61 74 |alues in| a volat|
|00000930| 69 6c 65 20 6c 6f 63 61 | 6c 20 76 61 72 69 61 62 |ile loca|l variab|
|00000940| 6c 65 20 62 65 66 6f 72 | 65 20 75 73 69 6e 67 0d |le befor|e using.|
|00000950| 20 2a 09 09 09 09 09 74 | 68 65 6d 20 69 6e 20 61 | *.....t|hem in a|
|00000960| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 6c 6c 2e 0d | functio|n call..|
|00000970| 20 2a 20 31 39 39 35 2e | 30 34 2e 31 31 09 4d 4d | * 1995.|04.11.MM|
|00000980| 09 45 6e 73 75 72 65 20 | 74 68 61 74 20 74 68 65 |.Ensure |that the|
|00000990| 20 43 6f 64 65 20 46 72 | 61 67 6d 65 6e 74 20 69 | Code Fr|agment i|
|000009a0| 73 20 6c 6f 61 64 65 64 | 20 69 6e 74 6f 20 74 68 |s loaded| into th|
|000009b0| 65 20 53 79 73 74 65 6d | 20 48 65 61 70 2e 0d 20 |e System| Heap.. |
|000009c0| 2a 20 31 39 39 35 2e 30 | 34 2e 32 39 09 4d 4d 09 |* 1995.0|4.29.MM.|
|000009d0| 53 70 6c 69 74 20 69 6e | 74 6f 20 4c 6f 67 4c 69 |Split in|to LogLi|
|000009e0| 62 72 61 72 79 20 28 50 | 50 43 29 20 61 6e 64 20 |brary (P|PC) and |
|000009f0| 4c 6f 67 4c 69 62 72 61 | 72 79 36 38 20 28 36 38 |LogLibra|ry68 (68|
|00000a00| 30 30 30 29 2e 20 54 68 | 69 73 0d 20 2a 09 09 09 |000). Th|is. *...|
|00000a10| 09 09 77 61 73 20 64 6f | 6e 65 20 66 6f 72 20 74 |..was do|ne for t|
|00000a20| 68 65 20 62 65 6e 65 66 | 69 74 20 6f 66 20 74 68 |he benef|it of th|
|00000a30| 65 20 4d 61 63 73 42 75 | 67 20 64 63 6d 64 2e 20 |e MacsBu|g dcmd. |
|00000a40| 54 68 69 73 20 63 68 61 | 6e 67 65 0d 20 2a 09 09 |This cha|nge. *..|
|00000a50| 09 09 09 72 65 73 75 6c | 74 65 64 20 69 6e 20 61 |...resul|ted in a|
|00000a60| 20 73 69 67 6e 69 66 69 | 63 61 6e 74 20 73 69 6d | signifi|cant sim|
|00000a70| 70 6c 69 66 69 63 61 74 | 69 6f 6e 20 6f 66 20 74 |plificat|ion of t|
|00000a80| 68 65 20 63 6f 64 65 20 | 61 73 20 61 6c 6c 0d 20 |he code |as all. |
|00000a90| 2a 09 09 09 09 09 6f 66 | 20 74 68 65 20 63 72 6f |*.....of| the cro|
|00000aa0| 73 73 2d 61 72 63 68 69 | 74 65 63 74 75 72 65 20 |ss-archi|tecture |
|00000ab0| 63 6f 64 65 20 77 61 73 | 20 6d 6f 76 65 64 20 74 |code was| moved t|
|00000ac0| 6f 20 4c 6f 67 4c 69 62 | 72 61 72 79 36 38 2e 63 |o LogLib|rary68.c|
|00000ad0| 2e 0d 20 2a 20 31 39 39 | 35 2e 30 35 2e 32 35 09 |.. * 199|5.05.25.|
|00000ae0| 4d 4d 09 53 6f 6d 65 20 | 6d 69 6e 6f 72 20 63 6c |MM.Some |minor cl|
|00000af0| 65 61 6e 75 70 73 20 28 | 70 61 72 61 6d 65 74 65 |eanups (|paramete|
|00000b00| 72 73 20 6d 61 72 6b 65 | 64 20 22 63 6f 6e 73 74 |rs marke|d "const|
|00000b10| 22 29 2e 20 52 65 6d 6f | 76 65 64 20 61 6c 6c 0d |"). Remo|ved all.|
|00000b20| 20 2a 09 09 09 09 09 64 | 65 70 65 6e 64 65 6e 63 | *.....d|ependenc|
|00000b30| 69 65 73 20 6f 6e 20 74 | 68 65 20 4e 61 6d 65 20 |ies on t|he Name |
|00000b40| 52 65 67 69 73 74 72 79 | 2e 20 54 68 65 20 75 6e |Registry|. The un|
|00000b50| 64 65 72 6c 79 69 6e 67 | 20 43 72 65 61 74 65 0d |derlying| Create.|
|00000b60| 20 2a 09 09 09 09 09 72 | 6f 75 74 69 6e 65 20 75 | *.....r|outine u|
|00000b70| 73 65 73 20 61 20 53 65 | 63 6f 6e 64 61 72 79 49 |ses a Se|condaryI|
|00000b80| 6e 74 65 72 72 75 70 74 | 48 61 6e 64 6c 65 72 20 |nterrupt|Handler |
|00000b90| 74 6f 20 70 72 65 76 65 | 6e 74 20 74 77 6f 0d 20 |to preve|nt two. |
|00000ba0| 2a 09 09 09 09 09 61 73 | 79 6e 63 68 72 6f 6e 6f |*.....as|ynchrono|
|00000bb0| 75 73 20 74 61 73 6b 73 | 20 66 72 6f 6d 20 61 64 |us tasks| from ad|
|00000bc0| 64 69 6e 67 20 74 68 65 | 20 73 61 6d 65 20 72 65 |ding the| same re|
|00000bd0| 63 6f 72 64 2e 0d 20 2a | 0d 20 2a 20 4e 6f 74 65 |cord.. *|. * Note|
|00000be0| 3a 20 62 65 63 61 75 73 | 65 20 50 61 73 63 61 6c |: becaus|e Pascal|
|00000bf0| 20 64 6f 65 73 20 6e 6f | 74 20 73 75 70 70 6f 72 | does no|t suppor|
|00000c00| 74 20 76 61 72 69 61 62 | 6c 65 2d 6c 65 6e 67 74 |t variab|le-lengt|
|00000c10| 68 20 63 61 6c 6c 69 6e | 67 20 73 65 71 75 65 6e |h callin|g sequen|
|00000c20| 63 65 73 2c 20 74 68 65 | 0d 20 2a 20 57 72 69 74 |ces, the|. * Writ|
|00000c30| 65 4c 6f 67 45 6e 74 72 | 79 20 66 75 6e 63 74 69 |eLogEntr|y functi|
|00000c40| 6f 6e 20 6d 61 79 20 6f | 6e 6c 79 20 62 65 20 63 |on may o|nly be c|
|00000c50| 61 6c 6c 65 64 20 66 72 | 6f 6d 20 43 2e 20 50 61 |alled fr|om C. Pa|
|00000c60| 73 63 61 6c 20 70 72 6f | 67 72 61 6d 73 20 6d 75 |scal pro|grams mu|
|00000c70| 73 74 20 66 6f 72 6d 61 | 74 20 74 68 65 0d 20 2a |st forma|t the. *|
|00000c80| 20 4c 6f 67 45 6e 74 72 | 79 52 65 63 6f 72 64 20 | LogEntr|yRecord |
|00000c90| 61 6e 64 20 63 61 6c 6c | 20 53 74 6f 72 65 4c 6f |and call| StoreLo|
|00000ca0| 67 45 6e 74 72 79 20 64 | 69 72 65 63 74 6c 79 2e |gEntry d|irectly.|
|00000cb0| 0d 20 2a 2f 0d 2f 2a 0d | 20 2a 20 54 6f 20 63 72 |. */./*.| * To cr|
|00000cc0| 65 61 74 65 20 61 6e 20 | 6c 6f 67 20 6c 69 62 72 |eate an |log libr|
|00000cd0| 61 72 79 20 72 65 63 6f | 72 64 2c 20 61 20 64 72 |ary reco|rd, a dr|
|00000ce0| 69 76 65 72 2c 20 61 70 | 70 6c 69 63 61 74 69 6f |iver, ap|plicatio|
|00000cf0| 6e 2c 20 6f 72 20 6f 74 | 68 65 72 20 63 6f 64 65 |n, or ot|her code|
|00000d00| 20 73 65 67 6d 65 6e 74 | 20 63 61 6c 6c 73 0d 20 | segment| calls. |
|00000d10| 2a 20 4d 61 6b 65 4c 6f | 67 52 65 63 6f 72 64 28 |* MakeLo|gRecord(|
|00000d20| 29 2e 20 54 68 69 73 20 | 69 73 20 74 68 65 20 6f |). This |is the o|
|00000d30| 6e 6c 79 20 66 75 6e 63 | 74 69 6f 6e 20 74 68 61 |nly func|tion tha|
|00000d40| 74 20 61 63 63 65 73 73 | 65 73 20 74 68 65 20 6d |t access|es the m|
|00000d50| 65 6d 6f 72 79 20 6d 61 | 6e 61 67 65 72 20 28 62 |emory ma|nager (b|
|00000d60| 75 74 0d 20 2a 20 73 65 | 65 20 74 68 65 20 6e 6f |ut. * se|e the no|
|00000d70| 74 65 20 6f 6e 20 36 38 | 30 30 30 27 73 20 62 65 |te on 68|000's be|
|00000d80| 6c 6f 77 29 2e 20 54 68 | 65 20 72 65 63 6f 72 64 |low). Th|e record|
|00000d90| 20 69 73 20 63 72 65 61 | 74 65 64 20 62 79 20 74 | is crea|ted by t|
|00000da0| 68 65 20 50 6f 6f 6c 41 | 6c 6c 6f 63 61 74 65 52 |he PoolA|llocateR|
|00000db0| 65 73 69 64 65 6e 74 0d | 20 2a 20 72 6f 75 74 69 |esident.| * routi|
|00000dc0| 6e 65 20 61 6e 64 20 6d | 75 73 74 20 62 65 20 63 |ne and m|ust be c|
|00000dd0| 61 6c 6c 65 64 20 66 72 | 6f 6d 20 74 61 73 6b 20 |alled fr|om task |
|00000de0| 6c 65 76 65 6c 2e 20 49 | 66 20 74 68 65 20 6c 6f |level. I|f the lo|
|00000df0| 67 20 68 61 73 20 61 6c | 72 65 61 64 79 20 62 65 |g has al|ready be|
|00000e00| 65 6e 20 63 72 65 61 74 | 65 64 2c 20 69 74 0d 20 |en creat|ed, it. |
|00000e10| 2a 20 72 65 74 75 72 6e | 73 20 61 20 70 6f 69 6e |* return|s a poin|
|00000e20| 74 65 72 20 74 6f 20 74 | 68 61 74 20 6c 6f 67 20 |ter to t|hat log |
|00000e30| 72 65 63 6f 72 64 2e 0d | 20 2a 0d 20 2a 20 4d 61 |record..| *. * Ma|
|00000e40| 6b 65 4c 6f 67 52 65 63 | 6f 72 64 28 29 20 6d 75 |keLogRec|ord() mu|
|00000e50| 73 74 20 62 65 20 63 61 | 6c 6c 65 64 20 69 6e 20 |st be ca|lled in |
|00000e60| 61 20 63 6f 6e 74 65 78 | 74 20 74 68 61 74 20 63 |a contex|t that c|
|00000e70| 61 6e 20 61 6c 6c 6f 63 | 61 74 65 20 6d 65 6d 6f |an alloc|ate memo|
|00000e80| 72 79 2e 20 54 68 65 20 | 66 69 72 73 74 0d 20 2a |ry. The |first. *|
|00000e90| 20 63 61 6c 6c 20 66 72 | 6f 6d 20 61 20 36 38 30 | call fr|om a 680|
|00000ea0| 30 30 20 61 72 63 68 69 | 74 65 63 74 75 72 65 20 |00 archi|tecture |
|00000eb0| 6d 6f 64 75 6c 65 20 6d | 75 73 74 20 62 65 20 61 |module m|ust be a|
|00000ec0| 62 6c 65 20 74 6f 20 6c | 6f 61 64 20 61 20 73 68 |ble to l|oad a sh|
|00000ed0| 61 72 65 64 20 6c 69 62 | 72 61 72 79 2e 0d 20 2a |ared lib|rary.. *|
|00000ee0| 0d 20 2a 20 54 6f 20 6c | 6f 67 20 64 61 74 61 2c |. * To l|og data,|
|00000ef0| 20 63 61 6c 6c 20 74 68 | 65 20 57 72 69 74 65 4c | call th|e WriteL|
|00000f00| 6f 67 45 6e 74 72 79 28 | 29 20 72 6f 75 74 69 6e |ogEntry(|) routin|
|00000f10| 65 2c 20 6e 6f 72 6d 61 | 6c 6c 79 20 75 73 69 6e |e, norma|lly usin|
|00000f20| 67 20 6f 6e 65 20 6f 66 | 20 74 68 65 20 66 6f 72 |g one of| the for|
|00000f30| 6d 61 74 74 69 6e 67 0d | 20 2a 20 6d 61 63 72 6f |matting.| * macro|
|00000f40| 73 2e 0d 20 2a 0d 20 2a | 20 54 6f 20 72 65 61 64 |s.. *. *| To read|
|00000f50| 20 74 68 65 20 6e 65 78 | 74 20 65 6e 74 72 79 20 | the nex|t entry |
|00000f60| 66 72 6f 6d 20 74 68 65 | 20 6c 6f 67 2c 20 63 61 |from the| log, ca|
|00000f70| 6c 6c 20 74 68 65 20 52 | 65 61 64 4c 6f 67 45 6e |ll the R|eadLogEn|
|00000f80| 74 72 79 28 29 20 72 6f | 75 74 69 6e 65 2e 0d 20 |try() ro|utine.. |
|00000f90| 2a 0d 20 2a 20 4f 6e 63 | 65 20 63 72 65 61 74 65 |*. * Onc|e create|
|00000fa0| 64 2c 20 61 20 6c 6f 67 | 20 70 65 72 73 69 73 74 |d, a log| persist|
|00000fb0| 73 20 75 6e 74 69 6c 20 | 73 79 73 74 65 6d 20 72 |s until |system r|
|00000fc0| 65 73 74 61 72 74 2e 20 | 54 68 65 20 70 72 6f 62 |estart. |The prob|
|00000fd0| 6c 65 6d 20 69 73 20 74 | 68 61 74 20 6d 61 6e 79 |lem is t|hat many|
|00000fe0| 0d 20 2a 20 72 6f 75 74 | 69 6e 65 73 20 6d 69 67 |. * rout|ines mig|
|00000ff0| 68 74 20 68 61 76 65 20 | 67 72 61 62 62 65 64 20 |ht have |grabbed |
|00001000| 74 68 65 20 6c 6f 67 20 | 61 64 64 72 65 73 73 20 |the log |address |
|00001010| 66 72 6f 6d 20 74 68 65 | 20 6e 61 6d 65 20 72 65 |from the| name re|
|00001020| 67 69 73 74 72 79 2c 20 | 73 6f 20 64 65 6c 65 74 |gistry, |so delet|
|00001030| 69 6e 67 0d 20 2a 20 69 | 74 20 66 72 6f 6d 20 74 |ing. * i|t from t|
|00001040| 68 65 20 72 65 67 69 73 | 74 72 79 20 69 73 20 69 |he regis|try is i|
|00001050| 6e 73 75 66 66 69 63 69 | 65 6e 74 2e 0d 20 2a 0d |nsuffici|ent.. *.|
|00001060| 20 2a 20 54 68 65 72 65 | 20 61 72 65 20 61 20 66 | * There| are a f|
|00001070| 65 77 20 6f 74 68 65 72 | 20 72 6f 75 74 69 6e 65 |ew other| routine|
|00001080| 73 2c 20 62 75 74 20 74 | 68 65 79 20 61 72 65 6e |s, but t|hey aren|
|00001090| 27 74 20 74 68 61 74 20 | 69 6d 70 6f 72 74 61 6e |'t that |importan|
|000010a0| 74 2e 0d 20 2a 0d 20 2a | 20 41 20 72 65 61 64 65 |t.. *. *| A reade|
|000010b0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 70 72 |r applic|ation pr|
|000010c0| 6f 63 65 73 73 65 73 20 | 6c 6f 67 20 65 6e 74 72 |ocesses |log entr|
|000010d0| 69 65 73 20 61 73 20 66 | 6f 6c 6c 6f 77 73 2e 0d |ies as f|ollows..|
|000010e0| 20 2a 0d 20 2a 20 09 09 | 53 74 72 32 35 35 09 09 | *. * ..|Str255..|
|000010f0| 09 09 74 69 6d 65 54 65 | 78 74 2c 20 64 61 74 61 |..timeTe|xt, data|
|00001100| 54 65 78 74 3b 0d 20 2a | 09 09 4c 6f 67 52 65 63 |Text;. *|..LogRec|
|00001110| 6f 72 64 50 74 72 09 09 | 6c 6f 67 52 65 63 6f 72 |ordPtr..|logRecor|
|00001120| 64 50 74 72 3b 0d 20 2a | 09 09 4c 6f 67 45 6e 74 |dPtr;. *|..LogEnt|
|00001130| 72 79 50 74 72 09 09 09 | 6c 6f 67 45 6e 74 72 79 |ryPtr...|logEntry|
|00001140| 50 74 72 3b 0d 20 2a 09 | 09 44 61 74 65 54 69 6d |Ptr;. *.|.DateTim|
|00001150| 65 52 65 63 09 09 09 65 | 76 65 6e 74 54 69 6d 65 |eRec...e|ventTime|
|00001160| 3b 0d 20 2a 09 09 55 49 | 6e 74 33 32 09 09 09 09 |;. *..UI|nt32....|
|00001170| 6e 61 6e 6f 73 65 63 6f | 6e 64 73 3b 0d 20 2a 20 |nanoseco|nds;. * |
|00001180| 0d 20 2a 09 09 4d 79 4f | 70 65 6e 4c 6f 67 4f 75 |. *..MyO|penLogOu|
|00001190| 74 70 75 74 46 69 6c 65 | 28 29 3b 0d 20 2a 09 09 |tputFile|();. *..|
|000011a0| 6c 6f 67 50 74 72 20 3d | 20 47 65 74 4c 6f 67 52 |logPtr =| GetLogR|
|000011b0| 65 63 6f 72 64 50 74 72 | 28 22 4d 79 4c 6f 67 52 |ecordPtr|("MyLogR|
|000011c0| 65 63 6f 72 64 22 29 3b | 0d 20 2a 09 09 69 66 20 |ecord");|. *..if |
|000011d0| 28 6c 6f 67 50 74 72 20 | 21 3d 20 4e 55 4c 4c 29 |(logPtr |!= NULL)|
|000011e0| 20 7b 0d 20 2a 09 09 09 | 77 68 69 6c 65 20 28 67 | {. *...|while (g|
|000011f0| 51 75 69 74 4e 6f 77 20 | 3d 3d 20 46 41 4c 53 45 |QuitNow |== FALSE|
|00001200| 29 20 7b 0d 20 2a 09 09 | 09 09 50 72 6f 63 65 73 |) {. *..|..Proces|
|00001210| 73 4f 6e 65 45 76 65 6e | 74 28 29 3b 0d 20 2a 09 |sOneEven|t();. *.|
|00001220| 09 09 09 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 69 |...for (|i = 0; i|
|00001230| 20 3c 20 31 30 3b 20 69 | 2b 2b 29 20 7b 0d 20 2a | < 10; i|++) {. *|
|00001240| 09 09 09 09 09 69 66 20 | 28 52 65 61 64 4c 6f 67 |.....if |(ReadLog|
|00001250| 45 6e 74 72 79 28 6c 6f | 67 50 74 72 2c 20 26 6c |Entry(lo|gPtr, &l|
|00001260| 6f 67 45 6e 74 72 79 29 | 20 21 3d 20 6e 6f 45 72 |ogEntry)| != noEr|
|00001270| 72 29 0d 20 2a 09 09 09 | 09 09 09 62 72 65 61 6b |r). *...|...break|
|00001280| 3b 0d 20 2a 09 09 09 09 | 09 65 6c 73 65 20 7b 0d |;. *....|.else {.|
|00001290| 20 2a 09 09 09 09 09 09 | 43 6f 6e 76 65 72 74 4c | *......|ConvertL|
|000012a0| 6f 67 45 6e 74 72 79 54 | 69 6d 65 73 74 61 6d 70 |ogEntryT|imestamp|
|000012b0| 28 26 6c 6f 67 45 6e 74 | 72 79 2c 20 26 65 76 65 |(&logEnt|ry, &eve|
|000012c0| 6e 74 54 69 6d 65 2c 20 | 26 6e 61 6e 6f 73 65 63 |ntTime, |&nanosec|
|000012d0| 6f 6e 64 73 29 3b 0d 20 | 2a 09 09 09 09 09 09 46 |onds);. |*......F|
|000012e0| 6f 72 6d 61 74 4c 6f 67 | 45 6e 74 72 79 54 69 6d |ormatLog|EntryTim|
|000012f0| 65 73 74 61 6d 70 28 74 | 69 6d 65 54 65 78 74 2c |estamp(t|imeText,|
|00001300| 20 26 65 76 65 6e 74 54 | 69 6d 65 2c 20 6e 61 6e | &eventT|ime, nan|
|00001310| 6f 73 65 63 6f 6e 64 73 | 29 3b 0d 20 2a 09 09 09 |oseconds|);. *...|
|00001320| 09 09 09 46 6f 72 6d 61 | 74 4c 6f 67 45 6e 74 72 |...Forma|tLogEntr|
|00001330| 79 44 61 74 61 28 26 6c | 6f 67 45 6e 74 72 79 2c |yData(&l|ogEntry,|
|00001340| 20 64 61 74 61 54 65 78 | 74 29 3b 0d 20 2a 09 09 | dataTex|t);. *..|
|00001350| 09 09 09 09 70 72 69 6e | 74 66 28 22 25 2e 2a 73 |....prin|tf("%.*s|
|00001360| 3a 20 25 2e 2a 73 5c 6e | 22 2c 0d 20 2a 09 09 09 |: %.*s\n|",. *...|
|00001370| 09 09 09 09 74 69 6d 65 | 54 65 78 74 5b 30 5d 2c |....time|Text[0],|
|00001380| 20 26 74 69 6d 65 54 65 | 78 74 5b 31 5d 2c 0d 20 | &timeTe|xt[1],. |
|00001390| 2a 09 09 09 09 09 09 09 | 64 61 74 61 54 65 78 74 |*.......|dataText|
|000013a0| 5b 30 5d 2c 20 26 64 61 | 74 61 54 65 78 74 5b 31 |[0], &da|taText[1|
|000013b0| 5d 0d 20 2a 09 09 09 09 | 09 09 29 3b 0d 20 2a 09 |]. *....|..);. *.|
|000013c0| 09 09 09 09 7d 0d 20 2a | 09 09 09 09 7d 0d 20 2a |....}. *|....}. *|
|000013d0| 09 09 09 7d 0d 20 2a 09 | 09 7d 0d 20 2a 09 09 45 |...}. *.|.}. *..E|
|000013e0| 78 69 74 54 6f 53 68 65 | 6c 6c 28 29 3b 0d 20 2a |xitToShe|ll();. *|
|000013f0| 2f 0d 0d 23 69 66 6e 64 | 65 66 20 53 79 73 74 65 |/..#ifnd|ef Syste|
|00001400| 6d 53 65 76 65 6e 4f 72 | 4c 61 74 65 72 0d 23 64 |mSevenOr|Later.#d|
|00001410| 65 66 69 6e 65 20 53 79 | 73 74 65 6d 53 65 76 65 |efine Sy|stemSeve|
|00001420| 6e 4f 72 4c 61 74 65 72 | 09 31 0d 23 65 6e 64 69 |nOrLater|.1.#endi|
|00001430| 66 0d 0d 23 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |f..#incl|ude <std|
|00001440| 61 72 67 2e 68 3e 0d 23 | 69 66 6e 64 65 66 20 54 |arg.h>.#|ifndef T|
|00001450| 48 49 4e 4b 5f 43 20 2f | 2a 20 54 65 6d 70 20 75 |HINK_C /|* Temp u|
|00001460| 6e 74 69 6c 20 68 65 61 | 64 65 72 73 20 73 74 61 |ntil hea|ders sta|
|00001470| 62 61 6c 69 7a 65 20 2a | 2f 0d 23 69 6e 63 6c 75 |balize *|/.#inclu|
|00001480| 64 65 20 3c 4d 69 78 65 | 64 4d 6f 64 65 2e 68 3e |de <Mixe|dMode.h>|
|00001490| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 54 79 70 65 73 |.#includ|e <Types|
|000014a0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 4f 53 |.h>.#inc|lude <OS|
|000014b0| 55 74 69 6c 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Utils.h>|.#includ|
|000014c0| 65 20 3c 44 72 69 76 65 | 72 53 65 72 76 69 63 65 |e <Drive|rService|
|000014d0| 73 2e 68 3e 0d 23 65 6e | 64 69 66 0d 0d 2f 2a 20 |s.h>.#en|dif../* |
|000014e0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000014f0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00001500| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00001510| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00001520| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00001530| 2a 20 2a 0d 20 2a 20 50 | 75 62 6c 69 63 20 64 65 |* *. * P|ublic de|
|00001540| 66 69 6e 69 74 69 6f 6e | 73 20 66 6f 72 20 74 68 |finition|s for th|
|00001550| 65 20 4c 6f 67 4c 69 62 | 72 61 72 79 2e 0d 20 2a |e LogLib|rary.. *|
|00001560| 0d 20 2a 20 57 65 20 63 | 61 6e 20 73 74 6f 72 65 |. * We c|an store|
|00001570| 20 6b 4c 6f 67 45 6e 74 | 72 79 44 61 74 61 53 69 | kLogEnt|ryDataSi|
|00001580| 7a 65 20 6c 6f 6e 67 77 | 6f 72 64 73 20 69 6e 20 |ze longw|ords in |
|00001590| 65 61 63 68 20 65 6e 74 | 72 79 2e 20 54 68 69 73 |each ent|ry. This|
|000015a0| 20 69 73 20 74 68 65 20 | 6d 61 78 69 6d 75 6d 0d | is the |maximum.|
|000015b0| 20 2a 20 74 68 61 74 20 | 77 65 20 63 61 6e 20 73 | * that |we can s|
|000015c0| 74 6f 72 65 2c 20 67 69 | 76 65 6e 20 33 20 62 69 |tore, gi|ven 3 bi|
|000015d0| 74 73 20 70 65 72 20 66 | 6f 72 6d 61 74 20 76 61 |ts per f|ormat va|
|000015e0| 6c 75 65 2e 0d 20 2a 2f | 0d 23 64 65 66 69 6e 65 |lue.. */|.#define|
|000015f0| 20 6b 4c 6f 67 45 6e 74 | 72 79 44 61 74 61 53 69 | kLogEnt|ryDataSi|
|00001600| 7a 65 09 09 31 30 0d 2f | 2a 0d 20 2a 20 42 6f 6f |ze..10./|*. * Boo|
|00001610| 6c 65 61 6e 33 32 20 69 | 73 20 61 20 42 6f 6f 6c |lean32 i|s a Bool|
|00001620| 65 61 6e 20 73 74 6f 72 | 65 64 20 69 6e 20 61 20 |ean stor|ed in a |
|00001630| 6c 6f 6e 67 77 6f 72 64 | 2e 20 54 68 69 73 20 70 |longword|. This p|
|00001640| 72 65 76 65 6e 74 73 20 | 54 68 69 6e 6b 20 76 73 |revents |Think vs|
|00001650| 2e 20 4d 50 57 0d 20 2a | 20 76 61 72 69 61 62 6c |. MPW. *| variabl|
|00001660| 65 20 63 6f 6e 66 75 73 | 69 6f 6e 2e 0d 20 2a 2f |e confus|ion.. */|
|00001670| 0d 74 79 70 65 64 65 66 | 20 55 49 6e 74 33 32 09 |.typedef| UInt32.|
|00001680| 09 09 09 09 42 6f 6f 6c | 65 61 6e 33 32 3b 0d 2f |....Bool|ean32;./|
|00001690| 2a 0d 20 2a 20 44 65 66 | 69 6e 65 20 74 68 65 20 |*. * Def|ine the |
|000016a0| 4c 6f 67 52 65 63 6f 72 | 64 20 6e 61 6d 65 2e 0d |LogRecor|d name..|
|000016b0| 2a 2f 0d 65 6e 75 6d 20 | 7b 0d 09 6b 4c 6f 67 52 |*/.enum |{..kLogR|
|000016c0| 65 63 6f 72 64 4e 61 6d | 65 42 75 66 53 69 7a 65 |ecordNam|eBufSize|
|000016d0| 20 3d 20 33 32 2c 09 2f | 2a 20 49 6e 63 6c 75 64 | = 32,./|* Includ|
|000016e0| 65 73 20 74 68 65 20 74 | 65 72 6d 69 6e 61 74 69 |es the t|erminati|
|000016f0| 6e 67 20 4e 55 4c 09 2a | 2f 0d 09 6b 4c 6f 67 4e |ng NUL.*|/..kLogN|
|00001700| 61 6d 65 54 65 72 6d 69 | 6e 61 74 6f 72 09 3d 20 |ameTermi|nator.= |
|00001710| 27 5c 30 27 0d 7d 3b 0d | 74 79 70 65 64 65 66 20 |'\0'.};.|typedef |
|00001720| 63 68 61 72 20 4c 6f 67 | 52 65 63 6f 72 64 4e 61 |char Log|RecordNa|
|00001730| 6d 65 42 79 74 65 2c 20 | 2a 4c 6f 67 52 65 63 6f |meByte, |*LogReco|
|00001740| 72 64 4e 61 6d 65 50 74 | 72 2c 20 4c 6f 67 52 65 |rdNamePt|r, LogRe|
|00001750| 63 6f 72 64 4e 61 6d 65 | 42 75 66 5b 6b 4c 6f 67 |cordName|Buf[kLog|
|00001760| 52 65 63 6f 72 64 4e 61 | 6d 65 42 75 66 53 69 7a |RecordNa|meBufSiz|
|00001770| 65 5d 3b 0d 0d 2f 2a 0d | 20 2a 20 45 61 63 68 20 |e];../*.| * Each |
|00001780| 6c 6f 67 20 72 65 63 6f | 72 64 20 65 6e 74 72 79 |log reco|rd entry|
|00001790| 20 63 6f 6e 74 61 69 6e | 73 20 74 68 65 20 66 6f | contain|s the fo|
|000017a0| 6c 6c 6f 77 69 6e 67 20 | 69 6e 66 6f 72 6d 61 74 |llowing |informat|
|000017b0| 69 6f 6e 3a 0d 20 2a 09 | 09 65 76 65 6e 74 54 69 |ion:. *.|.eventTi|
|000017c0| 6d 65 09 09 54 68 65 20 | 73 79 73 74 65 6d 20 55 |me..The |system U|
|000017d0| 70 54 69 6d 65 20 76 61 | 6c 75 65 20 61 74 20 74 |pTime va|lue at t|
|000017e0| 68 65 20 74 69 6d 65 20 | 74 68 65 20 64 61 74 61 |he time |the data|
|000017f0| 20 77 61 73 20 63 6f 6c | 6c 65 63 74 65 64 2e 0d | was col|lected..|
|00001800| 20 2a 09 09 73 65 71 75 | 65 6e 63 65 09 09 54 68 | *..sequ|ence..Th|
|00001810| 65 20 6f 72 64 69 6e 61 | 6c 20 69 6e 64 65 78 20 |e ordina|l index |
|00001820| 6f 66 20 74 68 69 73 20 | 65 6e 74 72 79 2e 20 54 |of this |entry. T|
|00001830| 68 69 73 20 77 69 6c 6c | 20 61 6c 77 61 79 73 20 |his will| always |
|00001840| 69 6e 63 72 65 6d 65 6e | 74 2e 0d 20 2a 09 09 09 |incremen|t.. *...|
|00001850| 09 09 09 28 49 66 20 79 | 6f 75 20 6c 6f 67 20 6f |...(If y|ou log o|
|00001860| 6e 65 20 65 6e 74 72 79 | 20 70 65 72 20 6d 69 63 |ne entry| per mic|
|00001870| 72 6f 73 65 63 6f 6e 64 | 2c 20 69 74 20 77 69 6c |rosecond|, it wil|
|00001880| 6c 20 77 72 61 70 20 61 | 72 6f 75 6e 64 0d 20 2a |l wrap a|round. *|
|00001890| 09 09 09 09 09 09 61 66 | 74 65 72 20 61 62 6f 75 |......af|ter abou|
|000018a0| 74 20 37 30 20 6d 69 6e | 75 74 65 73 29 2e 0d 20 |t 70 min|utes).. |
|000018b0| 2a 09 09 69 64 43 6f 64 | 65 09 09 09 41 20 6c 6f |*..idCod|e...A lo|
|000018c0| 6e 67 77 6f 72 64 20 74 | 68 61 74 20 75 6e 69 71 |ngword t|hat uniq|
|000018d0| 75 65 6c 79 20 69 64 65 | 6e 74 69 66 69 65 73 20 |uely ide|ntifies |
|000018e0| 74 68 65 20 6c 6f 67 20 | 65 6e 74 72 79 20 28 69 |the log |entry (i|
|000018f0| 2e 65 2e 2c 0d 20 2a 09 | 09 09 09 09 09 77 68 6f |.e.,. *.|.....who|
|00001900| 20 6c 6f 67 67 65 64 20 | 69 74 29 2e 20 54 68 69 | logged |it). Thi|
|00001910| 73 20 69 73 20 70 72 6f | 76 69 64 65 64 20 62 79 |s is pro|vided by|
|00001920| 20 74 68 65 20 57 72 69 | 74 65 4c 6f 67 45 6e 74 | the Wri|teLogEnt|
|00001930| 72 79 20 63 61 6c 6c 65 | 72 2e 0d 20 2a 09 09 66 |ry calle|r.. *..f|
|00001940| 6f 72 6d 61 74 09 09 09 | 41 20 6c 6f 6e 67 77 6f |ormat...|A longwo|
|00001950| 72 64 20 74 68 61 74 20 | 64 65 73 63 72 69 62 65 |rd that |describe|
|00001960| 73 20 74 68 65 20 66 6f | 72 6d 61 74 20 6f 66 20 |s the fo|rmat of |
|00001970| 74 68 65 20 6c 6f 67 20 | 64 61 74 61 2e 0d 20 2a |the log |data.. *|
|00001980| 09 09 64 61 74 61 5b 31 | 30 5d 09 09 54 65 6e 20 |..data[1|0]..Ten |
|00001990| 6c 6f 6e 67 77 6f 72 64 | 73 20 74 68 61 74 20 63 |longword|s that c|
|000019a0| 6f 6e 74 61 69 6e 20 74 | 68 65 20 65 6e 74 72 79 |ontain t|he entry|
|000019b0| 2d 75 6e 69 71 75 65 20 | 69 6e 66 6f 72 6d 61 74 |-unique |informat|
|000019c0| 69 6f 6e 2e 0d 20 2a 09 | 09 09 09 09 09 54 68 65 |ion.. *.|.....The|
|000019d0| 20 61 63 74 75 61 6c 20 | 63 6f 75 6e 74 20 69 73 | actual |count is|
|000019e0| 20 64 65 66 69 6e 65 64 | 20 62 79 20 74 68 65 20 | defined| by the |
|000019f0| 66 6f 72 6d 61 74 20 6c | 6f 6e 67 77 6f 72 64 2e |format l|ongword.|
|00001a00| 0d 20 2a 20 75 70 54 69 | 6d 65 20 61 6e 64 20 73 |. * upTi|me and s|
|00001a10| 65 71 75 65 6e 63 65 20 | 61 72 65 20 6d 61 69 6e |equence |are main|
|00001a20| 74 61 69 6e 65 64 20 62 | 79 20 4c 6f 67 4c 69 62 |tained b|y LogLib|
|00001a30| 72 61 72 79 20 72 6f 75 | 74 69 6e 65 73 2c 20 77 |rary rou|tines, w|
|00001a40| 68 69 6c 65 20 74 68 65 | 20 6f 74 68 65 72 0d 20 |hile the| other. |
|00001a50| 2a 20 70 61 72 61 6d 65 | 74 65 72 73 20 61 72 65 |* parame|ters are|
|00001a60| 20 63 6f 70 69 65 64 20 | 66 72 6f 6d 20 74 68 65 | copied |from the|
|00001a70| 20 57 72 69 74 65 4c 6f | 67 45 6e 74 72 79 20 70 | WriteLo|gEntry p|
|00001a80| 61 72 61 6d 65 74 65 72 | 73 2e 0d 20 2a 2f 0d 23 |arameter|s.. */.#|
|00001a90| 69 66 20 64 65 66 69 6e | 65 64 28 70 6f 77 65 72 |if defin|ed(power|
|00001aa0| 63 29 20 7c 7c 20 64 65 | 66 69 6e 65 64 28 5f 5f |c) || de|fined(__|
|00001ab0| 70 6f 77 65 72 63 29 0d | 23 70 72 61 67 6d 61 20 |powerc).|#pragma |
|00001ac0| 6f 70 74 69 6f 6e 20 61 | 6c 69 67 6e 3d 6d 61 63 |option a|lign=mac|
|00001ad0| 36 38 4b 0d 23 65 6e 64 | 69 66 0d 73 74 72 75 63 |68K.#end|if.struc|
|00001ae0| 74 20 4c 6f 67 45 6e 74 | 72 79 52 65 63 6f 72 64 |t LogEnt|ryRecord|
|00001af0| 20 7b 0d 09 41 62 73 6f | 6c 75 74 65 54 69 6d 65 | {..Abso|luteTime|
|00001b00| 09 09 65 76 65 6e 74 54 | 69 6d 65 3b 09 09 2f 2a |..eventT|ime;../*|
|00001b10| 20 55 70 54 69 6d 65 28 | 29 20 61 74 20 53 61 76 | UpTime(|) at Sav|
|00001b20| 65 4c 6f 67 45 6e 74 72 | 79 20 63 61 6c 6c 09 09 |eLogEntr|y call..|
|00001b30| 09 2a 2f 0d 09 55 49 6e | 74 33 32 09 09 09 09 73 |.*/..UIn|t32....s|
|00001b40| 65 71 75 65 6e 63 65 3b | 09 09 2f 2a 20 45 6e 74 |equence;|../* Ent|
|00001b50| 72 79 20 6e 75 6d 62 65 | 72 20 28 6d 6f 6e 6f 74 |ry numbe|r (monot|
|00001b60| 6f 6d 69 63 61 6c 6c 79 | 20 69 6e 63 72 65 61 73 |omically| increas|
|00001b70| 69 6e 67 29 09 2a 2f 0d | 09 4f 53 54 79 70 65 09 |ing).*/.|.OSType.|
|00001b80| 09 09 09 69 64 43 6f 64 | 65 3b 09 09 09 2f 2a 20 |...idCod|e;.../* |
|00001b90| 57 68 79 20 61 72 65 20 | 77 65 20 6c 6f 67 67 69 |Why are |we loggi|
|00001ba0| 6e 67 20 2d 2d 20 73 65 | 74 20 62 79 20 63 61 6c |ng -- se|t by cal|
|00001bb0| 6c 65 72 09 09 2a 2f 0d | 09 55 49 6e 74 33 32 09 |ler..*/.|.UInt32.|
|00001bc0| 09 09 09 66 6f 72 6d 61 | 74 3b 09 09 09 2f 2a 20 |...forma|t;.../* |
|00001bd0| 46 6f 72 6d 61 74 20 6f | 66 20 74 68 65 20 64 61 |Format o|f the da|
|00001be0| 74 61 20 28 73 65 65 20 | 62 65 6c 6f 77 29 09 09 |ta (see |below)..|
|00001bf0| 09 2a 2f 0d 09 55 49 6e | 74 33 32 09 09 09 09 64 |.*/..UIn|t32....d|
|00001c00| 61 74 61 5b 6b 4c 6f 67 | 45 6e 74 72 79 44 61 74 |ata[kLog|EntryDat|
|00001c10| 61 53 69 7a 65 5d 3b 09 | 2f 2a 20 54 68 65 20 64 |aSize];.|/* The d|
|00001c20| 61 74 61 20 69 74 73 65 | 6c 66 09 09 09 09 2a 2f |ata itse|lf....*/|
|00001c30| 0d 7d 3b 0d 23 69 66 20 | 64 65 66 69 6e 65 64 28 |.};.#if |defined(|
|00001c40| 70 6f 77 65 72 63 29 20 | 7c 7c 20 64 65 66 69 6e |powerc) ||| defin|
|00001c50| 65 64 28 5f 5f 70 6f 77 | 65 72 63 29 0d 23 70 72 |ed(__pow|erc).#pr|
|00001c60| 61 67 6d 61 20 6f 70 74 | 69 6f 6e 73 20 61 6c 69 |agma opt|ions ali|
|00001c70| 67 6e 3d 72 65 73 65 74 | 0d 23 65 6e 64 69 66 0d |gn=reset|.#endif.|
|00001c80| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 4c |typedef |struct L|
|00001c90| 6f 67 45 6e 74 72 79 52 | 65 63 6f 72 64 20 4c 6f |ogEntryR|ecord Lo|
|00001ca0| 67 45 6e 74 72 79 52 65 | 63 6f 72 64 2c 20 2a 4c |gEntryRe|cord, *L|
|00001cb0| 6f 67 45 6e 74 72 79 50 | 74 72 3b 0d 2f 2a 0d 20 |ogEntryP|tr;./*. |
|00001cc0| 2a 20 54 68 65 73 65 20 | 66 6c 61 67 73 20 63 6f |* These |flags co|
|00001cd0| 6e 74 72 6f 6c 20 64 61 | 74 61 20 66 6f 72 6d 61 |ntrol da|ta forma|
|00001ce0| 74 74 69 6e 67 2e 20 4e | 6f 74 65 3a 20 62 65 63 |tting. N|ote: bec|
|00001cf0| 61 75 73 65 20 64 61 74 | 61 20 69 73 20 70 61 73 |ause dat|a is pas|
|00001d00| 73 65 64 20 75 73 69 6e | 67 0d 20 2a 20 76 61 72 |sed usin|g. * var|
|00001d10| 69 61 62 6c 65 2d 6c 65 | 6e 67 74 68 20 61 72 67 |iable-le|ngth arg|
|00001d20| 75 6d 65 6e 74 20 6c 69 | 73 74 20 63 6f 6e 76 65 |ument li|st conve|
|00001d30| 6e 74 69 6f 6e 73 20 61 | 6e 64 20 77 65 20 77 61 |ntions a|nd we wa|
|00001d40| 6e 74 20 74 68 65 20 63 | 6f 64 65 20 74 6f 20 77 |nt the c|ode to w|
|00001d50| 6f 72 6b 0d 20 2a 20 63 | 6f 6d 70 61 74 61 62 6c |ork. * c|ompatabl|
|00001d60| 79 20 6f 6e 20 62 6f 74 | 68 20 54 68 69 6e 6b 20 |y on bot|h Think |
|00001d70| 61 6e 64 20 4d 50 57 2c | 20 61 6c 6c 20 6e 75 6d |and MPW,| all num|
|00001d80| 65 72 69 63 20 70 61 72 | 61 6d 65 74 65 72 73 20 |eric par|ameters |
|00001d90| 6d 75 73 74 20 62 65 20 | 70 61 73 73 65 64 20 61 |must be |passed a|
|00001da0| 73 0d 20 2a 20 22 6c 6f | 6e 67 22 20 6f 72 20 22 |s. * "lo|ng" or "|
|00001db0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 2e 22 20 |unsigned| long." |
|00001dc0| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 74 6f 20 |For exam|ple, to |
|00001dd0| 70 61 73 73 20 61 6e 20 | 4f 53 45 72 72 20 63 6f |pass an |OSErr co|
|00001de0| 64 65 2c 20 64 6f 0d 20 | 2a 09 09 57 72 69 74 65 |de, do. |*..Write|
|00001df0| 4c 6f 67 45 6e 74 72 79 | 28 0d 20 2a 09 09 09 27 |LogEntry|(. *...'|
|00001e00| 66 75 62 72 27 2c 0d 20 | 2a 09 09 09 4c 6f 67 46 |fubr',. |*...LogF|
|00001e10| 6f 72 6d 61 74 31 28 6b | 4c 6f 67 46 6f 72 6d 61 |ormat1(k|LogForma|
|00001e20| 74 53 69 67 6e 65 64 29 | 2c 0d 20 2a 09 09 09 28 |tSigned)|,. *...(|
|00001e30| 73 69 67 6e 65 64 20 6c | 6f 6e 67 29 20 73 74 61 |signed l|ong) sta|
|00001e40| 74 75 73 43 6f 64 65 0d | 20 2a 09 09 29 3b 0d 20 |tusCode.| *..);. |
|00001e50| 2a 2f 0d 65 6e 75 6d 20 | 7b 0d 09 2f 2a 0d 09 20 |*/.enum |{../*.. |
|00001e60| 2a 20 50 61 72 61 6d 65 | 74 65 72 73 20 74 6f 20 |* Parame|ters to |
|00001e70| 74 68 65 20 4c 6f 67 46 | 6f 72 6d 61 74 20 6d 61 |the LogF|ormat ma|
|00001e80| 63 72 6f 2e 0d 09 20 2a | 2f 0d 09 6b 4c 6f 67 46 |cro... *|/..kLogF|
|00001e90| 6f 72 6d 61 74 53 69 67 | 6e 65 64 09 09 09 3d 20 |ormatSig|ned...= |
|00001ea0| 30 2c 09 09 2f 2a 20 53 | 69 67 6e 65 64 20 6c 6f |0,../* S|igned lo|
|00001eb0| 6e 67 09 09 09 09 09 09 | 09 2a 2f 0d 09 6b 4c 6f |ng......|.*/..kLo|
|00001ec0| 67 46 6f 72 6d 61 74 55 | 6e 73 69 67 6e 65 64 09 |gFormatU|nsigned.|
|00001ed0| 09 09 3d 20 31 2c 09 09 | 2f 2a 20 55 6e 73 69 67 |..= 1,..|/* Unsig|
|00001ee0| 6e 65 64 20 28 64 65 63 | 69 6d 61 6c 29 09 09 09 |ned (dec|imal)...|
|00001ef0| 09 09 2a 2f 0d 09 6b 4c | 6f 67 46 6f 72 6d 61 74 |..*/..kL|ogFormat|
|00001f00| 48 65 78 09 09 09 09 3d | 20 32 2c 09 09 2f 2a 20 |Hex....=| 2,../* |
|00001f10| 55 6e 73 69 67 6e 65 64 | 20 28 68 65 78 20 2b 20 |Unsigned| (hex + |
|00001f20| 27 63 68 61 72 27 29 09 | 09 09 09 2a 2f 0d 09 6b |'char').|...*/..k|
|00001f30| 4c 6f 67 46 6f 72 6d 61 | 74 41 64 64 72 65 73 73 |LogForma|tAddress|
|00001f40| 09 09 09 3d 20 33 2c 09 | 09 2f 2a 20 55 6e 73 69 |...= 3,.|./* Unsi|
|00001f50| 67 6e 65 64 20 68 65 78 | 20 6f 6e 6c 79 09 09 09 |gned hex| only...|
|00001f60| 09 09 2a 2f 0d 09 6b 4c | 6f 67 46 6f 72 6d 61 74 |..*/..kL|ogFormat|
|00001f70| 52 65 73 65 72 76 65 64 | 34 09 09 09 3d 20 34 2c |Reserved|4...= 4,|
|00001f80| 09 09 2f 2a 20 55 6e 75 | 73 65 64 09 09 09 09 09 |../* Unu|sed.....|
|00001f90| 09 09 09 2a 2f 0d 09 6b | 4c 6f 67 46 6f 72 6d 61 |...*/..k|LogForma|
|00001fa0| 74 52 65 73 65 72 76 65 | 64 35 09 09 09 3d 20 35 |tReserve|d5...= 5|
|00001fb0| 2c 09 09 2f 2a 20 55 6e | 75 73 65 64 09 09 09 09 |,../* Un|used....|
|00001fc0| 09 09 09 09 2a 2f 0d 09 | 6b 4c 6f 67 46 6f 72 6d |....*/..|kLogForm|
|00001fd0| 61 74 53 74 72 69 6e 67 | 09 09 09 3d 20 36 2c 09 |atString|...= 6,.|
|00001fe0| 09 2f 2a 20 53 74 72 69 | 6e 67 20 28 6c 61 73 74 |./* Stri|ng (last|
|00001ff0| 20 66 6f 72 6d 61 74 29 | 09 09 09 09 09 2a 2f 0d | format)|.....*/.|
|00002000| 09 6b 4c 6f 67 46 6f 72 | 6d 61 74 45 6e 64 09 09 |.kLogFor|matEnd..|
|00002010| 09 09 3d 20 37 2c 09 09 | 2f 2a 20 45 6e 64 20 73 |..= 7,..|/* End s|
|00002020| 69 67 6e 61 6c 20 28 6e | 6f 20 64 61 74 61 29 09 |ignal (n|o data).|
|00002030| 09 09 09 09 2a 2f 0d 09 | 2f 2a 0d 09 20 2a 20 6b |....*/..|/*.. * k|
|00002040| 4c 6f 67 46 6f 72 6d 61 | 74 53 68 69 66 74 20 6d |LogForma|tShift m|
|00002050| 75 73 74 20 62 65 20 6c | 61 72 67 65 20 65 6e 6f |ust be l|arge eno|
|00002060| 75 67 68 20 74 6f 20 73 | 68 69 66 74 20 61 6c 6c |ugh to s|hift all|
|00002070| 20 66 6f 72 6d 61 74 20 | 63 6f 64 65 73 2e 20 41 | format |codes. A|
|00002080| 6c 6c 20 64 61 74 61 0d | 09 20 2a 20 66 6f 72 6d |ll data.|. * form|
|00002090| 61 74 20 63 6f 64 65 73 | 20 6d 75 73 74 20 66 69 |at codes| must fi|
|000020a0| 74 20 69 6e 74 6f 20 61 | 20 73 69 6e 67 6c 65 20 |t into a| single |
|000020b0| 6c 6f 6e 67 77 6f 72 64 | 2e 0d 09 20 2a 2f 0d 09 |longword|... */..|
|000020c0| 6b 4c 6f 67 46 6f 72 6d | 61 74 53 68 69 66 74 09 |kLogForm|atShift.|
|000020d0| 09 09 09 3d 20 33 2c 0d | 09 6b 4c 6f 67 46 6f 72 |...= 3,.|.kLogFor|
|000020e0| 6d 61 74 4d 61 73 6b 09 | 09 09 09 3d 20 28 31 20 |matMask.|...= (1 |
|000020f0| 3c 3c 20 6b 4c 6f 67 46 | 6f 72 6d 61 74 53 68 69 |<< kLogF|ormatShi|
|00002100| 66 74 29 20 2d 20 31 0d | 7d 3b 0d 23 69 66 20 28 |ft) - 1.|};.#if (|
|00002110| 28 6b 4c 6f 67 46 6f 72 | 6d 61 74 53 68 69 66 74 |(kLogFor|matShift|
|00002120| 20 2a 20 6b 4c 6f 67 45 | 6e 74 72 79 44 61 74 61 | * kLogE|ntryData|
|00002130| 53 69 7a 65 29 20 3e 20 | 33 32 29 0d 09 3c 3c 20 |Size) > |32)..<< |
|00002140| 28 6b 4c 6f 67 46 6f 72 | 6d 61 74 53 68 69 66 74 |(kLogFor|matShift|
|00002150| 20 2a 20 6b 4c 6f 67 45 | 6e 74 72 79 44 61 74 61 | * kLogE|ntryData|
|00002160| 53 69 7a 65 29 20 6d 75 | 73 74 20 62 65 20 3c 3d |Size) mu|st be <=|
|00002170| 20 33 32 20 62 69 74 73 | 20 28 6c 6f 6e 67 77 6f | 32 bits| (longwo|
|00002180| 72 64 20 73 69 7a 65 29 | 20 3e 3e 0d 23 65 6e 64 |rd size)| >>.#end|
|00002190| 69 66 0d 0d 2f 2a 20 2a | 20 2a 20 2a 20 2a 20 2a |if../* *| * * * *|
|000021a0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000021b0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000021c0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000021d0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000021e0| 20 2a 20 2a 20 2a 20 2a | 20 2a 0d 20 2a 20 54 68 | * * * *| *. * Th|
|000021f0| 69 73 20 73 65 63 74 69 | 6f 6e 20 73 68 6f 75 6c |is secti|on shoul|
|00002200| 64 20 62 65 20 72 65 67 | 61 72 64 65 64 20 61 73 |d be reg|arded as|
|00002210| 20 22 70 72 69 76 61 74 | 65 22 20 74 6f 20 74 68 | "privat|e" to th|
|00002220| 65 20 4c 6f 67 4c 69 62 | 72 61 72 79 2e 20 41 70 |e LogLib|rary. Ap|
|00002230| 70 6c 69 63 61 74 69 6f | 6e 73 0d 20 2a 20 74 68 |plicatio|ns. * th|
|00002240| 61 74 20 75 73 65 20 74 | 68 65 20 6c 69 62 72 61 |at use t|he libra|
|00002250| 72 79 20 6e 65 76 65 72 | 20 6e 65 65 64 20 74 6f |ry never| need to|
|00002260| 20 72 65 66 65 72 65 6e | 63 65 20 28 6f 72 20 64 | referen|ce (or d|
|00002270| 65 72 65 66 65 72 65 6e | 63 65 29 20 74 68 65 73 |ereferen|ce) thes|
|00002280| 65 20 73 74 72 75 63 74 | 75 72 65 73 2e 0d 20 2a |e struct|ures.. *|
|00002290| 20 41 6c 74 68 6f 75 67 | 68 20 74 68 65 20 63 6f | Althoug|h the co|
|000022a0| 6e 74 65 6e 74 20 6f 66 | 20 74 68 65 20 73 74 72 |ntent of| the str|
|000022b0| 75 63 74 75 72 65 73 20 | 69 73 20 73 68 6f 77 6e |uctures |is shown|
|000022c0| 20 65 78 70 6c 69 63 69 | 74 6c 79 2c 20 61 70 70 | explici|tly, app|
|000022d0| 6c 69 63 61 74 69 6f 6e | 73 20 73 68 6f 75 6c 64 |lication|s should|
|000022e0| 0d 20 2a 20 74 72 65 61 | 74 20 74 68 65 73 65 20 |. * trea|t these |
|000022f0| 73 74 72 75 63 74 75 72 | 65 73 20 61 73 20 22 6f |structur|es as "o|
|00002300| 70 61 71 75 65 22 20 61 | 6e 64 20 22 73 75 62 6a |paque" a|nd "subj|
|00002310| 65 63 74 20 74 6f 20 63 | 68 61 6e 67 65 20 77 69 |ect to c|hange wi|
|00002320| 74 68 6f 75 74 20 6e 6f | 74 69 63 65 22 20 69 6e |thout no|tice" in|
|00002330| 0d 20 2a 20 66 75 74 75 | 72 65 20 4d 61 63 69 6e |. * futu|re Macin|
|00002340| 74 6f 73 68 20 6f 70 65 | 72 61 74 69 6e 67 20 73 |tosh ope|rating s|
|00002350| 79 73 74 65 6d 20 72 65 | 6c 65 61 73 65 73 2e 0d |ystem re|leases..|
|00002360| 20 2a 0d 20 2a 2f 0d 2f | 2a 0d 20 2a 20 54 68 65 | *. */./|*. * The|
|00002370| 20 4c 6f 67 52 65 63 6f | 72 64 20 69 74 65 72 61 | LogReco|rd itera|
|00002380| 74 6f 72 20 63 6f 6e 74 | 65 6e 74 73 20 61 72 65 |tor cont|ents are|
|00002390| 20 70 72 69 76 61 74 65 | 20 74 6f 20 74 68 65 20 | private| to the |
|000023a0| 6c 69 62 72 61 72 79 2e | 0d 20 2a 2f 0d 23 69 66 |library.|. */.#if|
|000023b0| 20 64 65 66 69 6e 65 64 | 28 70 6f 77 65 72 63 29 | defined|(powerc)|
|000023c0| 20 7c 7c 20 64 65 66 69 | 6e 65 64 28 5f 5f 70 6f | || defi|ned(__po|
|000023d0| 77 65 72 63 29 0d 23 70 | 72 61 67 6d 61 20 6f 70 |werc).#p|ragma op|
|000023e0| 74 69 6f 6e 20 61 6c 69 | 67 6e 3d 6d 61 63 36 38 |tion ali|gn=mac68|
|000023f0| 4b 0d 23 65 6e 64 69 66 | 0d 73 74 72 75 63 74 20 |K.#endif|.struct |
|00002400| 4c 6f 67 52 65 63 6f 72 | 64 49 74 65 72 20 7b 0d |LogRecor|dIter {.|
|00002410| 09 73 74 72 75 63 74 20 | 4c 6f 67 52 65 63 6f 72 |.struct |LogRecor|
|00002420| 64 09 2a 6c 6f 67 52 65 | 63 6f 72 64 50 74 72 3b |d.*logRe|cordPtr;|
|00002430| 0d 7d 3b 0d 23 69 66 20 | 64 65 66 69 6e 65 64 28 |.};.#if |defined(|
|00002440| 70 6f 77 65 72 63 29 20 | 7c 7c 20 64 65 66 69 6e |powerc) ||| defin|
|00002450| 65 64 28 5f 5f 70 6f 77 | 65 72 63 29 0d 23 70 72 |ed(__pow|erc).#pr|
|00002460| 61 67 6d 61 20 6f 70 74 | 69 6f 6e 73 20 61 6c 69 |agma opt|ions ali|
|00002470| 67 6e 3d 72 65 73 65 74 | 0d 23 65 6e 64 69 66 0d |gn=reset|.#endif.|
|00002480| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 4c |typedef |struct L|
|00002490| 6f 67 52 65 63 6f 72 64 | 49 74 65 72 20 4c 6f 67 |ogRecord|Iter Log|
|000024a0| 52 65 63 6f 72 64 49 74 | 65 72 2c 20 2a 4c 6f 67 |RecordIt|er, *Log|
|000024b0| 52 65 63 6f 72 64 49 74 | 65 72 50 74 72 3b 0d 0d |RecordIt|erPtr;..|
|000024c0| 23 69 66 20 64 65 66 69 | 6e 65 64 28 70 6f 77 65 |#if defi|ned(powe|
|000024d0| 72 63 29 20 7c 7c 20 64 | 65 66 69 6e 65 64 28 5f |rc) || d|efined(_|
|000024e0| 5f 70 6f 77 65 72 63 29 | 0d 23 70 72 61 67 6d 61 |_powerc)|.#pragma|
|000024f0| 20 6f 70 74 69 6f 6e 20 | 61 6c 69 67 6e 3d 6d 61 | option |align=ma|
|00002500| 63 36 38 4b 0d 23 65 6e | 64 69 66 0d 73 74 72 75 |c68K.#en|dif.stru|
|00002510| 63 74 20 4c 6f 67 52 65 | 63 6f 72 64 20 7b 0d 09 |ct LogRe|cord {..|
|00002520| 73 74 72 75 63 74 20 4c | 6f 67 52 65 63 6f 72 64 |struct L|ogRecord|
|00002530| 09 2a 6c 6f 67 52 65 63 | 6f 72 64 4c 69 6e 6b 3b |.*logRec|ordLink;|
|00002540| 09 09 2f 2a 20 2d 3e 20 | 4e 65 78 74 20 4c 6f 67 |../* -> |Next Log|
|00002550| 52 65 63 6f 72 64 20 69 | 6e 73 74 61 6e 63 65 09 |Record i|nstance.|
|00002560| 09 09 2a 2f 0d 09 4c 6f | 67 52 65 63 6f 72 64 4e |..*/..Lo|gRecordN|
|00002570| 61 6d 65 42 75 66 09 6c | 6f 67 4e 61 6d 65 3b 09 |ameBuf.l|ogName;.|
|00002580| 09 09 2f 2a 20 54 68 69 | 73 20 4c 6f 67 52 65 63 |../* Thi|s LogRec|
|00002590| 6f 72 64 27 73 20 69 64 | 65 6e 74 69 66 69 63 61 |ord's id|entifica|
|000025a0| 74 69 6f 6e 09 09 2a 2f | 0d 09 76 6f 6c 61 74 69 |tion..*/|..volati|
|000025b0| 6c 65 20 55 49 6e 74 33 | 32 09 09 73 65 6d 61 70 |le UInt3|2..semap|
|000025c0| 68 6f 72 65 3b 09 09 09 | 2f 2a 20 49 6e 20 63 72 |hore;...|/* In cr|
|000025d0| 69 74 69 63 61 6c 20 73 | 65 63 74 69 6f 6e 20 69 |itical s|ection i|
|000025e0| 66 20 6e 6f 6e 2d 7a 65 | 72 6f 09 09 2a 2f 0d 09 |f non-ze|ro..*/..|
|000025f0| 76 6f 6c 61 74 69 6c 65 | 20 55 49 6e 74 33 32 09 |volatile| UInt32.|
|00002600| 09 6c 6f 73 74 4c 6f 63 | 6b 43 6f 75 6e 74 65 72 |.lostLoc|kCounter|
|00002610| 3b 09 2f 2a 20 43 61 6e | 27 74 20 65 6e 74 65 72 |;./* Can|'t enter|
|00002620| 20 63 72 69 74 69 63 61 | 6c 20 73 65 63 74 69 6f | critica|l sectio|
|00002630| 6e 09 09 09 2a 2f 0d 09 | 76 6f 6c 61 74 69 6c 65 |n...*/..|volatile|
|00002640| 20 55 49 6e 74 33 32 09 | 09 73 65 71 75 65 6e 63 | UInt32.|.sequenc|
|00002650| 65 43 6f 75 6e 74 65 72 | 3b 09 2f 2a 20 41 62 73 |eCounter|;./* Abs|
|00002660| 6f 6c 75 74 65 20 73 65 | 71 75 65 6e 63 65 20 63 |olute se|quence c|
|00002670| 6f 75 6e 74 65 72 09 09 | 09 2a 2f 0d 09 76 6f 6c |ounter..|.*/..vol|
|00002680| 61 74 69 6c 65 20 55 49 | 6e 74 33 32 09 09 66 6c |atile UI|nt32..fl|
|00002690| 61 67 73 3b 09 09 09 09 | 2f 2a 20 4c 6f 67 67 69 |ags;....|/* Loggi|
|000026a0| 6e 67 20 26 20 6c 6f 73 | 74 20 64 61 74 61 20 66 |ng & los|t data f|
|000026b0| 6c 61 67 73 09 09 09 2a | 2f 0d 09 76 6f 6c 61 74 |lags...*|/..volat|
|000026c0| 69 6c 65 20 55 49 6e 74 | 33 32 09 09 65 6e 74 72 |ile UInt|32..entr|
|000026d0| 79 50 75 74 49 6e 64 65 | 78 3b 09 09 2f 2a 20 57 |yPutInde|x;../* W|
|000026e0| 68 65 72 65 20 74 6f 20 | 73 74 6f 72 65 20 74 68 |here to |store th|
|000026f0| 65 20 6e 65 78 74 20 72 | 65 63 6f 72 64 09 09 2a |e next r|ecord..*|
|00002700| 2f 0d 09 76 6f 6c 61 74 | 69 6c 65 20 55 49 6e 74 |/..volat|ile UInt|
|00002710| 33 32 09 09 65 6e 74 72 | 79 47 65 74 49 6e 64 65 |32..entr|yGetInde|
|00002720| 78 3b 09 09 2f 2a 20 57 | 68 65 72 65 20 74 6f 20 |x;../* W|here to |
|00002730| 72 65 74 72 69 65 76 65 | 20 74 68 65 20 6e 65 78 |retrieve| the nex|
|00002740| 74 20 72 65 63 6f 72 64 | 09 2a 2f 0d 09 76 6f 6c |t record|.*/..vol|
|00002750| 61 74 69 6c 65 20 55 49 | 6e 74 33 32 09 09 65 6e |atile UI|nt32..en|
|00002760| 74 72 79 4d 61 78 49 6e | 64 65 78 3b 09 09 2f 2a |tryMaxIn|dex;../*|
|00002770| 20 41 63 74 75 61 6c 20 | 6e 75 6d 62 65 72 20 6f | Actual |number o|
|00002780| 66 20 6c 6f 67 20 65 6e | 74 72 69 65 73 09 09 09 |f log en|tries...|
|00002790| 2a 2f 0d 09 4c 6f 67 45 | 6e 74 72 79 52 65 63 6f |*/..LogE|ntryReco|
|000027a0| 72 64 09 09 65 6e 74 72 | 69 65 73 5b 31 5d 3b 09 |rd..entr|ies[1];.|
|000027b0| 09 09 2f 2a 20 4c 6f 67 | 20 65 6e 74 72 69 65 73 |../* Log| entries|
|000027c0| 20 61 72 65 20 73 74 6f | 72 65 64 20 68 65 72 65 | are sto|red here|
|000027d0| 09 09 09 2a 2f 0d 7d 3b | 0d 23 69 66 20 64 65 66 |...*/.};|.#if def|
|000027e0| 69 6e 65 64 28 70 6f 77 | 65 72 63 29 20 7c 7c 20 |ined(pow|erc) || |
|000027f0| 64 65 66 69 6e 65 64 28 | 5f 5f 70 6f 77 65 72 63 |defined(|__powerc|
|00002800| 29 0d 23 70 72 61 67 6d | 61 20 6f 70 74 69 6f 6e |).#pragm|a option|
|00002810| 73 20 61 6c 69 67 6e 3d | 72 65 73 65 74 0d 23 65 |s align=|reset.#e|
|00002820| 6e 64 69 66 0d 74 79 70 | 65 64 65 66 20 73 74 72 |ndif.typ|edef str|
|00002830| 75 63 74 20 4c 6f 67 52 | 65 63 6f 72 64 20 4c 6f |uct LogR|ecord Lo|
|00002840| 67 52 65 63 6f 72 64 2c | 20 2a 4c 6f 67 52 65 63 |gRecord,| *LogRec|
|00002850| 6f 72 64 50 74 72 3b 0d | 2f 2a 0d 20 2a 20 56 61 |ordPtr;.|/*. * Va|
|00002860| 6c 75 65 73 20 66 6f 72 | 20 74 68 65 20 66 6c 61 |lues for| the fla|
|00002870| 67 73 20 76 61 72 69 61 | 62 6c 65 20 69 6e 20 74 |gs varia|ble in t|
|00002880| 68 65 20 4c 6f 67 44 61 | 74 61 52 65 63 6f 72 64 |he LogDa|taRecord|
|00002890| 2e 20 54 68 65 73 65 20 | 61 72 65 20 70 72 69 76 |. These |are priv|
|000028a0| 61 74 65 20 74 6f 20 74 | 68 65 0d 20 2a 20 4c 6f |ate to t|he. * Lo|
|000028b0| 67 44 61 74 61 20 6c 69 | 62 72 61 72 79 20 61 6e |gData li|brary an|
|000028c0| 64 20 64 63 6d 64 20 64 | 69 73 70 6c 61 79 20 72 |d dcmd d|isplay r|
|000028d0| 6f 75 74 69 6e 65 2e 0d | 20 2a 2f 0d 65 6e 75 6d |outine..| */.enum|
|000028e0| 20 7b 0d 09 6b 4c 6f 67 | 44 61 74 61 45 6e 61 62 | {..kLog|DataEnab|
|000028f0| 6c 65 64 4d 61 73 6b 09 | 09 09 3d 20 28 31 4c 20 |ledMask.|..= (1L |
|00002900| 3c 3c 20 20 30 29 2c 09 | 2f 2a 20 45 6e 61 62 6c |<< 0),.|/* Enabl|
|00002910| 65 20 6c 6f 67 67 69 6e | 67 20 69 66 20 73 65 74 |e loggin|g if set|
|00002920| 09 09 09 2a 2f 0d 09 6b | 4c 6f 67 44 61 74 61 50 |...*/..k|LogDataP|
|00002930| 72 65 73 65 72 76 65 46 | 69 72 73 74 4d 61 73 6b |reserveF|irstMask|
|00002940| 09 3d 20 28 31 4c 20 3c | 3c 20 20 31 29 2c 09 2f |.= (1L <|< 1),./|
|00002950| 2a 20 50 72 65 73 65 72 | 76 65 20 66 69 72 73 74 |* Preser|ve first|
|00002960| 20 65 6e 74 72 79 20 69 | 66 20 73 65 74 09 09 2a | entry i|f set..*|
|00002970| 2f 0d 09 6b 4c 6f 67 44 | 61 74 61 52 65 63 6f 72 |/..kLogD|ataRecor|
|00002980| 64 55 70 54 69 6d 65 4d | 61 73 6b 09 3d 20 28 31 |dUpTimeM|ask.= (1|
|00002990| 4c 20 3c 3c 20 20 32 29 | 2c 09 2f 2a 20 44 6f 6e |L << 2)|,./* Don|
|000029a0| 27 74 20 72 65 63 6f 72 | 64 20 55 70 54 69 6d 65 |'t recor|d UpTime|
|000029b0| 20 69 66 20 73 65 74 09 | 09 2a 2f 0d 09 6b 4c 6f | if set.|.*/..kLo|
|000029c0| 67 44 61 74 61 57 72 61 | 70 41 72 6f 75 6e 64 4d |gDataWra|pAroundM|
|000029d0| 61 73 6b 09 09 3d 20 28 | 31 4c 20 3c 3c 20 20 33 |ask..= (|1L << 3|
|000029e0| 29 09 2f 2a 20 4c 6f 67 | 20 68 61 73 20 77 72 61 |)./* Log| has wra|
|000029f0| 70 70 65 64 20 61 72 6f | 75 6e 64 20 6f 6e 63 65 |pped aro|und once|
|00002a00| 09 09 2a 2f 0d 7d 3b 0d | 0d 2f 2a 20 2a 20 2a 20 |..*/.};.|./* * * |
|00002a10| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00002a20| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00002a30| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00002a40| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00002a50| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 0d |* * * * |* * * *.|
|00002a60| 20 2a 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 | * The f|ollowing|
|00002a70| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 73 20 | informa|tion is |
|00002a80| 70 75 62 6c 69 63 2e 0d | 20 2a 0d 20 2a 20 54 68 |public..| *. * Th|
|00002a90| 65 20 4c 6f 67 46 6f 72 | 6d 61 74 20 6d 61 63 72 |e LogFor|mat macr|
|00002aa0| 6f 20 73 74 6f 72 65 73 | 20 74 68 65 20 66 6f 72 |o stores| the for|
|00002ab0| 6d 61 74 20 77 6f 72 64 | 2e 0d 20 2a 2f 0d 23 64 |mat word|.. */.#d|
|00002ac0| 65 66 69 6e 65 20 4c 6f | 67 46 6f 72 6d 61 74 28 |efine Lo|gFormat(|
|00002ad0| 66 30 2c 20 66 31 2c 20 | 66 32 2c 20 66 33 2c 20 |f0, f1, |f2, f3, |
|00002ae0| 66 34 2c 20 66 35 2c 20 | 66 36 2c 20 66 37 2c 20 |f4, f5, |f6, f7, |
|00002af0| 66 38 2c 20 66 39 29 09 | 5c 0d 09 28 20 20 28 66 |f8, f9).|\..( (f|
|00002b00| 30 29 09 09 09 09 09 09 | 09 09 09 09 09 5c 0d 09 |0)......|.....\..|
|00002b10| 20 7c 20 28 28 66 31 29 | 20 3c 3c 20 28 6b 4c 6f | | ((f1)| << (kLo|
|00002b20| 67 46 6f 72 6d 61 74 53 | 68 69 66 74 20 2a 20 31 |gFormatS|hift * 1|
|00002b30| 29 29 09 09 09 09 5c 0d | 09 20 7c 20 28 28 66 32 |))....\.|. | ((f2|
|00002b40| 29 20 3c 3c 20 28 6b 4c | 6f 67 46 6f 72 6d 61 74 |) << (kL|ogFormat|
|00002b50| 53 68 69 66 74 20 2a 20 | 32 29 29 09 09 09 09 5c |Shift * |2))....\|
|00002b60| 0d 09 20 7c 20 28 28 66 | 33 29 20 3c 3c 20 28 6b |.. | ((f|3) << (k|
|00002b70| 4c 6f 67 46 6f 72 6d 61 | 74 53 68 69 66 74 20 2a |LogForma|tShift *|
|00002b80| 20 33 29 29 09 09 09 09 | 5c 0d 09 20 7c 20 28 28 | 3))....|\.. | ((|
|00002b90| 66 34 29 20 3c 3c 20 28 | 6b 4c 6f 67 46 6f 72 6d |f4) << (|kLogForm|
|00002ba0| 61 74 53 68 69 66 74 20 | 2a 20 34 29 29 09 09 09 |atShift |* 4))...|
|00002bb0| 09 5c 0d 09 20 7c 20 28 | 28 66 35 29 20 3c 3c 20 |.\.. | (|(f5) << |
|00002bc0| 28 6b 4c 6f 67 46 6f 72 | 6d 61 74 53 68 69 66 74 |(kLogFor|matShift|
|00002bd0| 20 2a 20 35 29 29 09 09 | 09 09 5c 0d 09 20 7c 20 | * 5))..|..\.. | |
|00002be0| 28 28 66 36 29 20 3c 3c | 20 28 6b 4c 6f 67 46 6f |((f6) <<| (kLogFo|
|00002bf0| 72 6d 61 74 53 68 69 66 | 74 20 2a 20 36 29 29 09 |rmatShif|t * 6)).|
|00002c00| 09 09 09 5c 0d 09 20 7c | 20 28 28 66 37 29 20 3c |...\.. || ((f7) <|
|00002c10| 3c 20 28 6b 4c 6f 67 46 | 6f 72 6d 61 74 53 68 69 |< (kLogF|ormatShi|
|00002c20| 66 74 20 2a 20 37 29 29 | 09 09 09 09 5c 0d 09 20 |ft * 7))|....\.. |
|00002c30| 7c 20 28 28 66 38 29 20 | 3c 3c 20 28 6b 4c 6f 67 || ((f8) |<< (kLog|
|00002c40| 46 6f 72 6d 61 74 53 68 | 69 66 74 20 2a 20 38 29 |FormatSh|ift * 8)|
|00002c50| 29 09 09 09 09 5c 0d 09 | 20 7c 20 28 28 66 39 29 |)....\..| | ((f9)|
|00002c60| 20 3c 3c 20 28 6b 4c 6f | 67 46 6f 72 6d 61 74 53 | << (kLo|gFormatS|
|00002c70| 68 69 66 74 20 2a 20 39 | 29 29 09 09 09 09 5c 0d |hift * 9|))....\.|
|00002c80| 09 29 0d 23 64 65 66 69 | 6e 65 20 4c 6f 67 46 6f |.).#defi|ne LogFo|
|00002c90| 72 6d 61 74 31 28 66 30 | 29 09 09 09 09 09 09 09 |rmat1(f0|).......|
|00002ca0| 09 09 09 09 09 09 09 09 | 5c 0d 09 4c 6f 67 46 6f |........|\..LogFo|
|00002cb0| 72 6d 61 74 28 09 09 09 | 09 09 09 09 09 09 09 09 |rmat(...|........|
|00002cc0| 09 09 09 09 09 09 5c 0d | 09 09 28 66 30 29 2c 20 |......\.|..(f0), |
|00002cd0| 20 20 20 20 20 20 20 20 | 20 6b 4c 6f 67 46 6f 72 | | kLogFor|
|00002ce0| 6d 61 74 45 6e 64 2c 20 | 6b 4c 6f 67 46 6f 72 6d |matEnd, |kLogForm|
|00002cf0| 61 74 45 6e 64 2c 20 6b | 4c 6f 67 46 6f 72 6d 61 |atEnd, k|LogForma|
|00002d00| 74 45 6e 64 2c 09 09 09 | 09 5c 0d 09 09 6b 4c 6f |tEnd,...|.\...kLo|
|00002d10| 67 46 6f 72 6d 61 74 45 | 6e 64 2c 20 6b 4c 6f 67 |gFormatE|nd, kLog|
|00002d20| 46 6f 72 6d 61 74 45 6e | 64 2c 20 6b 4c 6f 67 46 |FormatEn|d, kLogF|
|00002d30| 6f 72 6d 61 74 45 6e 64 | 2c 20 6b 4c 6f 67 46 6f |ormatEnd|, kLogFo|
|00002d40| 72 6d 61 74 45 6e 64 2c | 09 09 09 09 5c 0d 09 09 |rmatEnd,|....\...|
|00002d50| 6b 4c 6f 67 46 6f 72 6d | 61 74 45 6e 64 2c 20 6b |kLogForm|atEnd, k|
|00002d60| 4c 6f 67 46 6f 72 6d 61 | 74 45 6e 64 09 09 09 09 |LogForma|tEnd....|
|00002d70| 09 09 09 09 09 09 09 5c | 0d 09 29 0d 23 64 65 66 |.......\|..).#def|
|00002d80| 69 6e 65 20 4c 6f 67 46 | 6f 72 6d 61 74 32 28 66 |ine LogF|ormat2(f|
|00002d90| 30 2c 20 66 31 29 09 09 | 09 09 09 09 09 09 09 09 |0, f1)..|........|
|00002da0| 09 09 09 09 5c 0d 09 4c | 6f 67 46 6f 72 6d 61 74 |....\..L|ogFormat|
|00002db0| 28 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |(.......|........|
|00002dc0| 09 09 5c 0d 09 09 28 66 | 30 29 2c 20 20 20 20 20 |..\...(f|0), |
|00002dd0| 20 20 20 20 20 28 66 31 | 29 2c 20 20 20 20 20 20 | (f1|), |
|00002de0| 20 20 20 20 6b 4c 6f 67 | 46 6f 72 6d 61 74 45 6e | kLog|FormatEn|
|00002df0| 64 2c 20 6b 4c 6f 67 46 | 6f 72 6d 61 74 45 6e 64 |d, kLogF|ormatEnd|
|00002e00| 2c 09 09 09 09 5c 0d 09 | 09 6b 4c 6f 67 46 6f 72 |,....\..|.kLogFor|
|00002e10| 6d 61 74 45 6e 64 2c 20 | 6b 4c 6f 67 46 6f 72 6d |matEnd, |kLogForm|
|00002e20| 61 74 45 6e 64 2c 20 6b | 4c 6f 67 46 6f 72 6d 61 |atEnd, k|LogForma|
|00002e30| 74 45 6e 64 2c 20 6b 4c | 6f 67 46 6f 72 6d 61 74 |tEnd, kL|ogFormat|
|00002e40| 45 6e 64 2c 09 09 09 09 | 5c 0d 09 09 6b 4c 6f 67 |End,....|\...kLog|
|00002e50| 46 6f 72 6d 61 74 45 6e | 64 2c 20 6b 4c 6f 67 46 |FormatEn|d, kLogF|
|00002e60| 6f 72 6d 61 74 45 6e 64 | 09 09 09 09 09 09 09 09 |ormatEnd|........|
|00002e70| 09 09 09 5c 0d 09 29 0d | 23 64 65 66 69 6e 65 20 |...\..).|#define |
|00002e80| 4c 6f 67 46 6f 72 6d 61 | 74 33 28 66 30 2c 20 66 |LogForma|t3(f0, f|
|00002e90| 31 2c 20 66 32 29 09 09 | 09 09 09 09 09 09 09 09 |1, f2)..|........|
|00002ea0| 09 09 09 5c 0d 09 4c 6f | 67 46 6f 72 6d 61 74 28 |...\..Lo|gFormat(|
|00002eb0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00002ec0| 09 5c 0d 09 09 28 66 30 | 29 2c 20 20 20 20 20 20 |.\...(f0|), |
|00002ed0| 20 20 20 20 28 66 31 29 | 2c 20 20 20 20 20 20 20 | (f1)|, |
|00002ee0| 20 20 20 28 66 32 29 2c | 20 20 20 20 20 20 20 20 | (f2),| |
|00002ef0| 20 20 6b 4c 6f 67 46 6f | 72 6d 61 74 45 6e 64 2c | kLogFo|rmatEnd,|
|00002f00| 09 09 09 09 5c 0d 09 09 | 6b 4c 6f 67 46 6f 72 6d |....\...|kLogForm|
|00002f10| 61 74 45 6e 64 2c 20 6b | 4c 6f 67 46 6f 72 6d 61 |atEnd, k|LogForma|
|00002f20| 74 45 6e 64 2c 20 6b 4c | 6f 67 46 6f 72 6d 61 74 |tEnd, kL|ogFormat|
|00002f30| 45 6e 64 2c 20 6b 4c 6f | 67 46 6f 72 6d 61 74 45 |End, kLo|gFormatE|
|00002f40| 6e 64 2c 09 09 09 09 5c | 0d 09 09 6b 4c 6f 67 46 |nd,....\|...kLogF|
|00002f50| 6f 72 6d 61 74 45 6e 64 | 2c 20 6b 4c 6f 67 46 6f |ormatEnd|, kLogFo|
|00002f60| 72 6d 61 74 45 6e 64 09 | 09 09 09 09 09 09 09 09 |rmatEnd.|........|
|00002f70| 09 09 5c 0d 09 29 0d 23 | 64 65 66 69 6e 65 20 4c |..\..).#|define L|
|00002f80| 6f 67 46 6f 72 6d 61 74 | 34 28 66 30 2c 20 66 31 |ogFormat|4(f0, f1|
|00002f90| 2c 20 66 32 2c 20 66 33 | 29 09 09 09 09 09 09 09 |, f2, f3|).......|
|00002fa0| 09 09 09 09 09 5c 0d 09 | 4c 6f 67 46 6f 72 6d 61 |.....\..|LogForma|
|00002fb0| 74 28 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |t(......|........|
|00002fc0| 09 09 09 5c 0d 09 09 28 | 66 30 29 2c 20 20 20 20 |...\...(|f0), |
|00002fd0| 20 20 20 20 20 20 28 66 | 31 29 2c 20 20 20 20 20 | (f|1), |
|00002fe0| 20 20 20 20 20 28 66 32 | 29 2c 20 20 20 20 20 20 | (f2|), |
|00002ff0| 20 20 20 20 28 66 33 29 | 2c 09 09 09 09 09 09 5c | (f3)|,......\|
|00003000| 0d 09 09 6b 4c 6f 67 46 | 6f 72 6d 61 74 45 6e 64 |...kLogF|ormatEnd|
|00003010| 2c 20 6b 4c 6f 67 46 6f | 72 6d 61 74 45 6e 64 2c |, kLogFo|rmatEnd,|
|00003020| 20 6b 4c 6f 67 46 6f 72 | 6d 61 74 45 6e 64 2c 20 | kLogFor|matEnd, |
|00003030| 6b 4c 6f 67 46 6f 72 6d | 61 74 45 6e 64 2c 09 09 |kLogForm|atEnd,..|
|00003040| 09 09 5c 0d 09 09 6b 4c | 6f 67 46 6f 72 6d 61 74 |..\...kL|ogFormat|
|00003050| 45 6e 64 2c 20 6b 4c 6f | 67 46 6f 72 6d 61 74 45 |End, kLo|gFormatE|
|00003060| 6e 64 09 09 09 09 09 09 | 09 09 09 09 09 5c 0d 09 |nd......|.....\..|
|00003070| 29 0d 23 64 65 66 69 6e | 65 20 4c 6f 67 46 6f 72 |).#defin|e LogFor|
|00003080| 6d 61 74 35 28 66 30 2c | 20 66 31 2c 20 66 32 2c |mat5(f0,| f1, f2,|
|00003090| 20 66 33 2c 20 66 34 29 | 09 09 09 09 09 09 09 09 | f3, f4)|........|
|000030a0| 09 09 09 5c 0d 09 4c 6f | 67 46 6f 72 6d 61 74 28 |...\..Lo|gFormat(|
|000030b0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|000030c0| 09 5c 0d 09 09 28 66 30 | 29 2c 20 20 20 20 20 20 |.\...(f0|), |
|000030d0| 20 20 20 20 28 66 31 29 | 2c 20 20 20 20 20 20 20 | (f1)|, |
|000030e0| 20 20 20 28 66 32 29 2c | 20 20 20 20 20 20 20 20 | (f2),| |
|000030f0| 20 20 28 66 33 29 2c 09 | 09 09 09 09 09 5c 0d 09 | (f3),.|.....\..|
|00003100| 09 28 66 34 29 2c 09 09 | 09 6b 4c 6f 67 46 6f 72 |.(f4),..|.kLogFor|
|00003110| 6d 61 74 45 6e 64 2c 20 | 6b 4c 6f 67 46 6f 72 6d |matEnd, |kLogForm|
|00003120| 61 74 45 6e 64 2c 20 6b | 4c 6f 67 46 6f 72 6d 61 |atEnd, k|LogForma|
|00003130| 74 45 6e 64 2c 09 09 09 | 5c 0d 09 09 6b 4c 6f 67 |tEnd,...|\...kLog|
|00003140| 46 6f 72 6d 61 74 45 6e | 64 2c 20 6b 4c 6f 67 46 |FormatEn|d, kLogF|
|00003150| 6f 72 6d 61 74 45 6e 64 | 09 09 09 09 09 09 09 09 |ormatEnd|........|
|00003160| 09 09 09 5c 0d 09 29 0d | 23 64 65 66 69 6e 65 20 |...\..).|#define |
|00003170| 4c 6f 67 46 6f 72 6d 61 | 74 36 28 66 30 2c 20 66 |LogForma|t6(f0, f|
|00003180| 31 2c 20 66 32 2c 20 66 | 33 2c 20 66 34 2c 20 66 |1, f2, f|3, f4, f|
|00003190| 35 29 09 09 09 09 09 09 | 09 09 09 09 5c 0d 09 4c |5)......|....\..L|
|000031a0| 6f 67 46 6f 72 6d 61 74 | 28 09 09 09 09 09 09 09 |ogFormat|(.......|
|000031b0| 09 09 09 09 09 09 09 09 | 09 09 5c 0d 09 09 28 66 |........|..\...(f|
|000031c0| 30 29 2c 20 20 20 20 20 | 20 20 20 20 20 28 66 31 |0), | (f1|
|000031d0| 29 2c 20 20 20 20 20 20 | 20 20 20 20 28 66 32 29 |), | (f2)|
|000031e0| 2c 20 20 20 20 20 20 20 | 20 20 20 28 66 33 29 2c |, | (f3),|
|000031f0| 09 09 09 09 09 09 5c 0d | 09 09 28 66 34 29 2c 20 |......\.|..(f4), |
|00003200| 20 20 20 20 20 20 20 20 | 20 28 66 35 29 2c 20 20 | | (f5), |
|00003210| 20 20 20 20 20 20 20 20 | 6b 4c 6f 67 46 6f 72 6d | |kLogForm|
|00003220| 61 74 45 6e 64 2c 20 6b | 4c 6f 67 46 6f 72 6d 61 |atEnd, k|LogForma|
|00003230| 74 45 6e 64 2c 09 09 09 | 09 5c 0d 09 09 6b 4c 6f |tEnd,...|.\...kLo|
|00003240| 67 46 6f 72 6d 61 74 45 | 6e 64 2c 20 6b 4c 6f 67 |gFormatE|nd, kLog|
|00003250| 46 6f 72 6d 61 74 45 6e | 64 09 09 09 09 09 09 09 |FormatEn|d.......|
|00003260| 09 09 09 09 5c 0d 09 29 | 0d 23 64 65 66 69 6e 65 |....\..)|.#define|
|00003270| 20 4c 6f 67 46 6f 72 6d | 61 74 37 28 66 30 2c 20 | LogForm|at7(f0, |
|00003280| 66 31 2c 20 66 32 2c 20 | 66 33 2c 20 66 34 2c 20 |f1, f2, |f3, f4, |
|00003290| 66 35 2c 20 66 36 29 09 | 09 09 09 09 09 09 09 09 |f5, f6).|........|
|000032a0| 5c 0d 09 4c 6f 67 46 6f | 72 6d 61 74 28 09 09 09 |\..LogFo|rmat(...|
|000032b0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 5c 0d |........|......\.|
|000032c0| 09 09 28 66 30 29 2c 20 | 20 20 20 20 20 20 20 20 |..(f0), | |
|000032d0| 20 28 66 31 29 2c 20 20 | 20 20 20 20 20 20 20 20 | (f1), | |
|000032e0| 28 66 32 29 2c 20 20 20 | 20 20 20 20 20 20 20 28 |(f2), | (|
|000032f0| 66 33 29 2c 09 09 09 09 | 09 09 5c 0d 09 09 28 66 |f3),....|..\...(f|
|00003300| 34 29 2c 20 20 20 20 20 | 20 20 20 20 20 28 66 35 |4), | (f5|
|00003310| 29 2c 20 20 20 20 20 20 | 20 20 20 20 28 66 36 29 |), | (f6)|
|00003320| 2c 20 20 20 20 20 20 20 | 20 20 20 6b 4c 6f 67 46 |, | kLogF|
|00003330| 6f 72 6d 61 74 45 6e 64 | 2c 09 09 09 09 5c 0d 09 |ormatEnd|,....\..|
|00003340| 09 6b 4c 6f 67 46 6f 72 | 6d 61 74 45 6e 64 2c 20 |.kLogFor|matEnd, |
|00003350| 6b 4c 6f 67 46 6f 72 6d | 61 74 45 6e 64 09 09 09 |kLogForm|atEnd...|
|00003360| 09 09 09 09 09 09 09 09 | 5c 0d 09 29 0d 23 64 65 |........|\..).#de|
|00003370| 66 69 6e 65 20 4c 6f 67 | 46 6f 72 6d 61 74 38 28 |fine Log|Format8(|
|00003380| 66 30 2c 20 66 31 2c 20 | 66 32 2c 20 66 33 2c 20 |f0, f1, |f2, f3, |
|00003390| 66 34 2c 20 66 35 2c 20 | 66 36 2c 20 66 37 29 09 |f4, f5, |f6, f7).|
|000033a0| 09 09 09 09 09 09 09 5c | 0d 09 4c 6f 67 46 6f 72 |.......\|..LogFor|
|000033b0| 6d 61 74 28 09 09 09 09 | 09 09 09 09 09 09 09 09 |mat(....|........|
|000033c0| 09 09 09 09 09 5c 0d 09 | 09 28 66 30 29 2c 20 20 |.....\..|.(f0), |
|000033d0| 20 20 20 20 20 20 20 20 | 28 66 31 29 2c 20 20 20 | |(f1), |
|000033e0| 20 20 20 20 20 20 20 28 | 66 32 29 2c 20 20 20 20 | (|f2), |
|000033f0| 20 20 20 20 20 20 28 66 | 33 29 2c 09 09 09 09 09 | (f|3),.....|
|00003400| 09 5c 0d 09 09 28 66 34 | 29 2c 20 20 20 20 20 20 |.\...(f4|), |
|00003410| 20 20 20 20 28 66 35 29 | 2c 20 20 20 20 20 20 20 | (f5)|, |
|00003420| 20 20 20 28 66 36 29 2c | 20 20 20 20 20 20 20 20 | (f6),| |
|00003430| 20 20 28 66 37 29 2c 09 | 09 09 09 09 09 5c 0d 09 | (f7),.|.....\..|
|00003440| 09 6b 4c 6f 67 46 6f 72 | 6d 61 74 45 6e 64 2c 20 |.kLogFor|matEnd, |
|00003450| 6b 4c 6f 67 46 6f 72 6d | 61 74 45 6e 64 09 09 09 |kLogForm|atEnd...|
|00003460| 09 09 09 09 09 09 09 09 | 5c 0d 09 29 0d 23 64 65 |........|\..).#de|
|00003470| 66 69 6e 65 20 4c 6f 67 | 46 6f 72 6d 61 74 39 28 |fine Log|Format9(|
|00003480| 66 30 2c 20 66 31 2c 20 | 66 32 2c 20 66 33 2c 20 |f0, f1, |f2, f3, |
|00003490| 66 34 2c 20 66 35 2c 20 | 66 36 2c 20 66 37 2c 20 |f4, f5, |f6, f7, |
|000034a0| 66 38 29 09 09 09 09 09 | 09 09 5c 0d 09 4c 6f 67 |f8).....|..\..Log|
|000034b0| 46 6f 72 6d 61 74 28 09 | 09 09 09 09 09 09 09 09 |Format(.|........|
|000034c0| 09 09 09 09 09 09 09 09 | 5c 0d 09 09 28 66 30 29 |........|\...(f0)|
|000034d0| 2c 20 20 20 20 20 20 20 | 20 20 20 28 66 31 29 2c |, | (f1),|
|000034e0| 20 20 20 20 20 20 20 20 | 20 20 28 66 32 29 2c 20 | | (f2), |
|000034f0| 20 20 20 20 20 20 20 20 | 20 28 66 33 29 2c 09 09 | | (f3),..|
|00003500| 09 09 09 09 5c 0d 09 09 | 28 66 34 29 2c 20 20 20 |....\...|(f4), |
|00003510| 20 20 20 20 20 20 20 28 | 66 35 29 2c 20 20 20 20 | (|f5), |
|00003520| 20 20 20 20 20 20 28 66 | 36 29 2c 20 20 20 20 20 | (f|6), |
|00003530| 20 20 20 20 20 28 66 37 | 29 2c 09 09 09 09 09 09 | (f7|),......|
|00003540| 5c 0d 09 09 28 66 38 29 | 2c 20 20 20 20 20 20 20 |\...(f8)|, |
|00003550| 20 20 20 6b 4c 6f 67 46 | 6f 72 6d 61 74 45 6e 64 | kLogF|ormatEnd|
|00003560| 09 09 09 09 09 09 09 09 | 09 09 09 5c 0d 09 29 0d |........|...\..).|
|00003570| 23 64 65 66 69 6e 65 20 | 4c 6f 67 46 6f 72 6d 61 |#define |LogForma|
|00003580| 74 31 30 28 66 30 2c 20 | 66 31 2c 20 66 32 2c 20 |t10(f0, |f1, f2, |
|00003590| 66 33 2c 20 66 34 2c 20 | 66 35 2c 20 66 36 2c 20 |f3, f4, |f5, f6, |
|000035a0| 66 37 2c 20 66 38 2c 20 | 66 39 29 09 09 09 09 09 |f7, f8, |f9).....|
|000035b0| 09 5c 0d 09 4c 6f 67 46 | 6f 72 6d 61 74 28 09 09 |.\..LogF|ormat(..|
|000035c0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 5c |........|.......\|
|000035d0| 0d 09 09 28 66 30 29 2c | 20 20 20 20 20 20 20 20 |...(f0),| |
|000035e0| 20 20 28 66 31 29 2c 20 | 20 20 20 20 20 20 20 20 | (f1), | |
|000035f0| 20 28 66 32 29 2c 20 20 | 20 20 20 20 20 20 20 20 | (f2), | |
|00003600| 28 66 33 29 2c 09 09 09 | 09 09 09 5c 0d 09 09 28 |(f3),...|...\...(|
|00003610| 66 34 29 2c 20 20 20 20 | 20 20 20 20 20 20 28 66 |f4), | (f|
|00003620| 35 29 2c 20 20 20 20 20 | 20 20 20 20 20 28 66 36 |5), | (f6|
|00003630| 29 2c 20 20 20 20 20 20 | 20 20 20 20 28 66 37 29 |), | (f7)|
|00003640| 2c 09 09 09 09 09 09 5c | 0d 09 09 28 66 38 29 2c |,......\|...(f8),|
|00003650| 20 20 20 20 20 20 20 20 | 20 20 28 66 39 29 09 09 | | (f9)..|
|00003660| 09 09 09 09 09 09 09 09 | 09 09 09 09 5c 0d 09 29 |........|....\..)|
|00003670| 0d 2f 2a 0d 20 2a 20 54 | 68 65 73 65 20 61 72 65 |./*. * T|hese are|
|00003680| 20 70 6f 70 75 6c 61 72 | 20 66 6f 72 6d 61 74 20 | popular| format |
|00003690| 74 79 70 65 73 2e 0d 20 | 2a 2f 0d 23 64 65 66 69 |types.. |*/.#defi|
|000036a0| 6e 65 20 4c 6f 67 4e 6f | 46 6f 72 6d 61 74 09 28 |ne LogNo|Format.(|
|000036b0| 4c 6f 67 46 6f 72 6d 61 | 74 31 28 6b 4c 6f 67 46 |LogForma|t1(kLogF|
|000036c0| 6f 72 6d 61 74 45 6e 64 | 29 29 0d 23 64 65 66 69 |ormatEnd|)).#defi|
|000036d0| 6e 65 20 4c 6f 67 53 74 | 72 69 6e 67 46 6f 72 6d |ne LogSt|ringForm|
|000036e0| 61 74 09 4c 6f 67 46 6f | 72 6d 61 74 31 28 6b 4c |at.LogFo|rmat1(kL|
|000036f0| 6f 67 46 6f 72 6d 61 74 | 53 74 72 69 6e 67 29 0d |ogFormat|String).|
|00003700| 23 64 65 66 69 6e 65 20 | 4c 6f 67 53 74 61 74 75 |#define |LogStatu|
|00003710| 73 46 6f 72 6d 61 74 09 | 4c 6f 67 46 6f 72 6d 61 |sFormat.|LogForma|
|00003720| 74 32 28 6b 4c 6f 67 46 | 6f 72 6d 61 74 53 69 67 |t2(kLogF|ormatSig|
|00003730| 6e 65 64 2c 20 6b 4c 6f | 67 46 6f 72 6d 61 74 53 |ned, kLo|gFormatS|
|00003740| 74 72 69 6e 67 29 0d 0d | 2f 2a 0d 20 2a 20 54 68 |tring)..|/*. * Th|
|00003750| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 6f 72 |e applic|ation or|
|00003760| 20 63 6f 64 65 20 73 65 | 67 6d 65 6e 74 20 63 61 | code se|gment ca|
|00003770| 6c 6c 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |lls the |followin|
|00003780| 67 20 66 75 6e 63 74 69 | 6f 6e 73 20 74 6f 20 61 |g functi|ons to a|
|00003790| 63 63 65 73 73 20 4c 6f | 67 52 65 63 6f 72 64 20 |ccess Lo|gRecord |
|000037a0| 0d 20 2a 20 72 65 63 6f | 72 64 73 20 4d 61 6b 65 |. * reco|rds Make|
|000037b0| 4c 6f 67 52 65 63 6f 72 | 64 20 6d 75 73 74 20 62 |LogRecor|d must b|
|000037c0| 65 20 63 61 6c 6c 65 64 | 20 66 72 6f 6d 20 61 20 |e called| from a |
|000037d0| 6e 6f 6e 2d 69 6e 74 65 | 72 72 75 70 74 20 65 78 |non-inte|rrupt ex|
|000037e0| 65 63 75 74 69 6f 6e 20 | 6c 65 76 65 6c 20 61 73 |ecution |level as|
|000037f0| 20 69 74 20 6d 61 79 0d | 20 2a 20 61 6c 6c 6f 63 | it may.| * alloc|
|00003800| 61 74 65 20 6d 65 6d 6f | 72 79 20 61 6e 64 20 73 |ate memo|ry and s|
|00003810| 74 6f 72 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |tore inf|ormation|
|00003820| 20 69 6e 74 6f 20 74 68 | 65 20 53 79 73 74 65 6d | into th|e System|
|00003830| 20 4e 61 6d 65 20 52 65 | 67 69 73 74 72 79 2e 20 | Name Re|gistry. |
|00003840| 4d 61 6b 65 4c 6f 67 52 | 65 63 6f 72 64 0d 20 2a |MakeLogR|ecord. *|
|00003850| 20 6f 72 20 47 65 74 4c | 6f 67 52 65 63 6f 72 64 | or GetL|ogRecord|
|00003860| 50 74 72 20 6d 75 73 74 | 20 62 65 20 63 61 6c 6c |Ptr must| be call|
|00003870| 65 64 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |ed befor|e callin|
|00003880| 67 20 61 6e 79 20 6f 74 | 68 65 72 20 4c 6f 67 52 |g any ot|her LogR|
|00003890| 65 63 6f 72 64 20 66 75 | 6e 63 74 69 6f 6e 2e 20 |ecord fu|nction. |
|000038a0| 0d 20 2a 0d 20 2a 20 47 | 65 74 4c 6f 67 52 65 63 |. *. * G|etLogRec|
|000038b0| 6f 72 64 50 74 72 20 63 | 61 6e 20 67 65 6e 65 72 |ordPtr c|an gener|
|000038c0| 61 6c 6c 79 20 62 65 20 | 63 61 6c 6c 65 64 20 65 |ally be |called e|
|000038d0| 69 74 68 65 72 20 66 72 | 6f 6d 20 6e 6f 6e 69 6e |ither fr|om nonin|
|000038e0| 74 65 72 72 75 70 74 20 | 6f 72 20 73 65 63 6f 6e |terrupt |or secon|
|000038f0| 64 61 72 79 0d 20 2a 20 | 65 78 65 63 75 74 69 6f |dary. * |executio|
|00003900| 6e 20 6c 65 76 65 6c 2c | 20 68 6f 77 65 76 65 72 |n level,| however|
|00003910| 20 74 68 65 20 66 69 72 | 73 74 20 63 61 6c 6c 20 | the fir|st call |
|00003920| 66 72 6f 6d 20 61 20 36 | 38 30 30 30 20 61 72 63 |from a 6|8000 arc|
|00003930| 68 69 74 65 63 74 75 72 | 65 20 6d 6f 64 75 6c 65 |hitectur|e module|
|00003940| 20 6d 75 73 74 20 62 65 | 0d 20 2a 20 61 62 6c 65 | must be|. * able|
|00003950| 20 74 6f 20 6c 6f 61 64 | 20 61 20 73 68 61 72 65 | to load| a share|
|00003960| 64 20 6c 69 62 72 61 72 | 79 20 61 6e 64 2c 20 70 |d librar|y and, p|
|00003970| 6f 74 65 6e 74 69 61 6c | 6c 79 2c 20 61 6c 6c 6f |otential|ly, allo|
|00003980| 63 61 74 65 20 6d 65 6d | 6f 72 79 2e 0d 20 2a 0d |cate mem|ory.. *.|
|00003990| 20 2a 20 41 6c 6c 20 6f | 74 68 65 72 20 72 6f 75 | * All o|ther rou|
|000039a0| 74 69 6e 65 73 20 6d 61 | 79 20 62 65 20 63 61 6c |tines ma|y be cal|
|000039b0| 6c 65 64 20 66 72 6f 6d | 20 61 6e 79 20 65 78 65 |led from| any exe|
|000039c0| 63 75 74 69 6f 6e 20 6c | 65 76 65 6c 2e 0d 20 2a |cution l|evel.. *|
|000039d0| 2f 0d 0d 2f 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |/../* * |* * * * |
|000039e0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000039f0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003a00| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003a10| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003a20| 2a 20 2a 20 2a 20 2a 20 | 2a 0d 20 2a 20 4c 6f 67 |* * * * |*. * Log|
|00003a30| 4c 69 62 72 61 72 79 36 | 38 49 6e 69 74 69 61 6c |Library6|8Initial|
|00003a40| 69 7a 65 0d 20 2a 0d 20 | 2a 20 54 68 69 73 20 66 |ize. *. |* This f|
|00003a50| 75 6e 63 74 69 6f 6e 20 | 69 73 20 6f 6e 6c 79 20 |unction |is only |
|00003a60| 63 61 6c 6c 65 64 20 66 | 72 6f 6d 20 61 20 36 38 |called f|rom a 68|
|00003a70| 30 30 30 20 6d 6f 64 75 | 6c 65 20 74 6f 20 22 73 |000 modu|le to "s|
|00003a80| 6f 66 74 2d 6c 69 6e 6b | 22 20 74 6f 20 74 68 65 |oft-link|" to the|
|00003a90| 20 4c 6f 67 4c 69 62 72 | 61 72 79 2e 0d 20 2a 20 | LogLibr|ary.. * |
|00003aa0| 49 74 20 63 61 6c 6c 73 | 20 74 68 65 20 43 6f 64 |It calls| the Cod|
|00003ab0| 65 20 46 72 61 67 6d 65 | 6e 74 20 4d 61 6e 61 67 |e Fragme|nt Manag|
|00003ac0| 65 72 20 61 6e 64 2c 20 | 69 6d 70 6c 69 63 69 74 |er and, |implicit|
|00003ad0| 6c 79 2c 20 72 65 71 75 | 69 72 65 73 20 61 63 63 |ly, requ|ires acc|
|00003ae0| 65 73 73 20 74 6f 20 74 | 68 65 20 66 69 6c 65 0d |ess to t|he file.|
|00003af0| 20 2a 20 73 79 73 74 65 | 6d 20 61 6e 64 20 6d 61 | * syste|m and ma|
|00003b00| 79 20 61 6c 6c 6f 63 61 | 74 65 20 6d 65 6d 6f 72 |y alloca|te memor|
|00003b10| 79 2e 20 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |y. This |function|
|00003b20| 20 64 6f 65 73 20 6e 6f | 74 68 69 6e 67 20 69 66 | does no|thing if|
|00003b30| 20 63 61 6c 6c 65 64 20 | 66 72 6f 6d 20 61 0d 20 | called |from a. |
|00003b40| 2a 20 50 6f 77 65 72 50 | 43 20 6e 61 74 69 76 65 |* PowerP|C native|
|00003b50| 20 6d 6f 64 75 6c 65 2e | 0d 20 2a 2f 0d 70 61 73 | module.|. */.pas|
|00003b60| 63 61 6c 20 4f 53 45 72 | 72 09 09 09 4c 6f 67 4c |cal OSEr|r...LogL|
|00003b70| 69 62 72 61 72 79 36 38 | 49 6e 69 74 69 61 6c 69 |ibrary68|Initiali|
|00003b80| 7a 65 28 76 6f 69 64 29 | 3b 0d 0d 2f 2a 20 2a 20 |ze(void)|;../* * |
|00003b90| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003ba0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003bb0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003bc0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003bd0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003be0| 2a 0d 20 2a 20 4d 61 6b | 65 4c 6f 67 52 65 63 6f |*. * Mak|eLogReco|
|00003bf0| 72 64 0d 20 2a 0d 20 2a | 20 54 68 65 20 66 69 72 |rd. *. *| The fir|
|00003c00| 73 74 20 74 69 6d 65 20 | 74 68 69 73 20 66 75 6e |st time |this fun|
|00003c10| 63 74 69 6f 6e 20 69 73 | 20 63 61 6c 6c 65 64 20 |ction is| called |
|00003c20| 61 66 74 65 72 20 74 68 | 65 20 73 79 73 74 65 6d |after th|e system|
|00003c30| 20 69 73 20 73 74 61 72 | 74 65 64 2c 20 69 74 20 | is star|ted, it |
|00003c40| 63 72 65 61 74 65 73 20 | 61 0d 20 2a 20 6c 6f 67 |creates |a. * log|
|00003c50| 20 72 65 63 6f 72 64 20 | 66 6f 72 20 74 68 69 73 | record |for this|
|00003c60| 20 6e 61 6d 65 2e 20 54 | 68 65 20 6c 6f 67 20 69 | name. T|he log i|
|00003c70| 73 20 69 6e 69 74 69 61 | 6c 6c 79 20 65 6e 61 62 |s initia|lly enab|
|00003c80| 6c 65 64 2c 20 61 6e 64 | 20 64 65 6c 65 74 65 73 |led, and| deletes|
|00003c90| 20 6f 76 65 72 66 6c 6f | 77 20 61 74 20 74 68 65 | overflo|w at the|
|00003ca0| 0d 20 2a 20 73 74 61 72 | 74 2e 20 49 74 20 74 68 |. * star|t. It th|
|00003cb0| 75 73 20 72 65 74 61 69 | 6e 73 20 74 68 65 20 2a |us retai|ns the *|
|00003cc0| 65 6e 64 2a 20 6f 66 20 | 74 68 65 20 6c 6f 67 20 |end* of |the log |
|00003cd0| 2d 2d 20 74 68 69 73 20 | 69 73 20 75 73 65 66 75 |-- this |is usefu|
|00003ce0| 6c 20 66 6f 72 20 6f 6e | 67 6f 69 6e 67 20 6c 6f |l for on|going lo|
|00003cf0| 67 67 69 6e 67 2c 0d 20 | 2a 20 62 75 74 20 6d 61 |gging,. |* but ma|
|00003d00| 79 20 6c 6f 73 65 20 74 | 68 65 20 73 74 61 72 74 |y lose t|he start|
|00003d10| 20 6f 66 20 61 20 64 69 | 73 61 73 74 65 72 20 73 | of a di|saster s|
|00003d20| 65 71 75 65 6e 63 65 20 | 28 61 73 20 69 74 20 72 |equence |(as it r|
|00003d30| 65 63 6f 72 64 73 20 74 | 68 65 20 66 6c 6f 77 20 |ecords t|he flow |
|00003d40| 6f 66 20 65 72 72 6f 72 | 73 0d 20 2a 20 74 68 72 |of error|s. * thr|
|00003d50| 6f 75 67 68 20 74 68 65 | 20 73 79 73 74 65 6d 2c |ough the| system,|
|00003d60| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 74 68 65 | rather |than the|
|00003d70| 20 69 6e 74 69 61 6c 20 | 63 61 75 73 65 2e 0d 20 | intial |cause.. |
|00003d80| 2a 0d 20 2a 20 4c 6f 67 | 52 65 63 6f 72 64 4e 61 |*. * Log|RecordNa|
|00003d90| 6d 65 50 74 72 20 6d 75 | 73 74 20 64 65 66 69 6e |mePtr mu|st defin|
|00003da0| 65 20 61 20 6e 6f 6e 2d | 6e 75 6c 6c 20 73 74 72 |e a non-|null str|
|00003db0| 69 6e 67 2e 20 6e 45 6e | 74 72 69 65 73 20 6d 75 |ing. nEn|tries mu|
|00003dc0| 73 74 20 62 65 20 6e 6f | 6e 2d 7a 65 72 6f 2e 0d |st be no|n-zero..|
|00003dd0| 20 2a 20 54 68 65 20 6c | 6f 67 52 65 63 6f 72 64 | * The l|ogRecord|
|00003de0| 4e 61 6d 65 50 74 72 20 | 22 6e 61 6d 65 22 20 69 |NamePtr |"name" i|
|00003df0| 73 20 72 65 73 65 72 76 | 65 64 20 74 6f 20 74 68 |s reserv|ed to th|
|00003e00| 65 20 4e 61 6d 65 20 52 | 65 67 69 73 74 72 79 2e |e Name R|egistry.|
|00003e10| 20 44 6f 6e 27 74 20 75 | 73 65 20 69 74 2e 0d 20 | Don't u|se it.. |
|00003e20| 2a 0d 20 2a 20 54 68 69 | 73 20 66 75 6e 63 74 69 |*. * Thi|s functi|
|00003e30| 6f 6e 20 6d 75 73 74 20 | 62 65 20 63 61 6c 6c 65 |on must |be calle|
|00003e40| 64 20 69 6e 20 61 20 63 | 6f 6e 74 65 78 74 20 74 |d in a c|ontext t|
|00003e50| 68 61 74 20 63 61 6e 20 | 61 6c 6c 6f 63 61 74 65 |hat can |allocate|
|00003e60| 20 6d 65 6d 6f 72 79 2e | 20 54 68 65 20 66 69 72 | memory.| The fir|
|00003e70| 73 74 20 63 61 6c 6c 0d | 20 2a 20 66 72 6f 6d 20 |st call.| * from |
|00003e80| 61 20 36 38 30 30 30 20 | 61 72 63 68 69 74 65 63 |a 68000 |architec|
|00003e90| 74 75 72 65 20 6d 6f 64 | 75 6c 65 20 6d 75 73 74 |ture mod|ule must|
|00003ea0| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 61 63 63 65 | be able| to acce|
|00003eb0| 73 73 20 74 68 65 20 43 | 6f 64 65 20 46 72 61 67 |ss the C|ode Frag|
|00003ec0| 6d 65 6e 74 20 4d 61 6e | 61 67 65 72 2e 0d 20 2a |ment Man|ager.. *|
|00003ed0| 0d 20 2a 20 52 65 74 75 | 72 6e 20 74 68 65 20 4c |. * Retu|rn the L|
|00003ee0| 6f 67 52 65 63 6f 72 64 | 50 74 72 20 66 6f 72 20 |ogRecord|Ptr for |
|00003ef0| 74 68 69 73 20 6c 6f 67 | 2c 20 6f 72 20 4e 55 4c |this log|, or NUL|
|00003f00| 4c 20 69 66 20 75 6e 73 | 75 63 63 65 73 73 66 75 |L if uns|uccessfu|
|00003f10| 6c 2e 0d 20 2a 2f 0d 70 | 61 73 63 61 6c 20 4c 6f |l.. */.p|ascal Lo|
|00003f20| 67 52 65 63 6f 72 64 50 | 74 72 09 09 09 4d 61 6b |gRecordP|tr...Mak|
|00003f30| 65 4c 6f 67 52 65 63 6f | 72 64 28 0d 09 09 63 6f |eLogReco|rd(...co|
|00003f40| 6e 73 74 20 4c 6f 67 52 | 65 63 6f 72 64 4e 61 6d |nst LogR|ecordNam|
|00003f50| 65 50 74 72 09 6c 6f 67 | 52 65 63 6f 72 64 4e 61 |ePtr.log|RecordNa|
|00003f60| 6d 65 50 74 72 2c 09 09 | 2f 2a 20 4c 6f 67 20 6e |mePtr,..|/* Log n|
|00003f70| 61 6d 65 20 28 43 2d 73 | 74 72 69 6e 67 29 09 09 |ame (C-s|tring)..|
|00003f80| 2a 2f 0d 09 09 55 49 6e | 74 33 32 09 09 09 09 09 |*/...UIn|t32.....|
|00003f90| 6e 45 6e 74 72 69 65 73 | 09 09 09 09 2f 2a 20 4e |nEntries|..../* N|
|00003fa0| 75 6d 62 65 72 20 6f 66 | 20 4c 6f 67 20 65 6e 74 |umber of| Log ent|
|00003fb0| 72 69 65 73 09 2a 2f 0d | 09 29 3b 0d 0d 2f 2a 20 |ries.*/.|.);../* |
|00003fc0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003fd0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003fe0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003ff0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004000| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004010| 2a 20 2a 0d 20 2a 20 47 | 65 74 4c 6f 67 52 65 63 |* *. * G|etLogRec|
|00004020| 6f 72 64 50 74 72 0d 20 | 2a 0d 20 2a 20 52 65 74 |ordPtr. |*. * Ret|
|00004030| 75 72 6e 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |urn a po|inter to|
|00004040| 20 74 68 65 20 6c 6f 67 | 20 72 65 63 6f 72 64 20 | the log| record |
|00004050| 66 6f 72 20 61 20 73 70 | 65 63 69 66 69 65 64 20 |for a sp|ecified |
|00004060| 6e 61 6d 65 2e 20 52 65 | 74 75 72 6e 73 20 4e 55 |name. Re|turns NU|
|00004070| 4c 4c 20 69 66 20 69 74 | 20 77 61 73 0d 20 2a 20 |LL if it| was. * |
|00004080| 6e 6f 74 20 66 6f 75 6e | 64 20 28 57 72 69 74 65 |not foun|d (Write|
|00004090| 4c 6f 67 45 6e 74 72 79 | 2c 20 65 74 63 2e 20 77 |LogEntry|, etc. w|
|000040a0| 69 6c 6c 20 6e 6f 74 20 | 63 68 6f 6b 65 29 2e 20 |ill not |choke). |
|000040b0| 54 68 65 20 66 69 72 73 | 74 20 63 61 6c 6c 20 66 |The firs|t call f|
|000040c0| 72 6f 6d 20 61 20 36 38 | 30 30 30 0d 20 2a 20 6d |rom a 68|000. * m|
|000040d0| 6f 64 75 6c 65 20 6d 75 | 73 74 20 62 65 20 61 62 |odule mu|st be ab|
|000040e0| 6c 65 20 74 6f 20 61 63 | 63 65 73 73 20 74 68 65 |le to ac|cess the|
|000040f0| 20 43 6f 64 65 20 46 72 | 61 67 6d 65 6e 74 20 4d | Code Fr|agment M|
|00004100| 61 6e 61 67 65 72 2e 0d | 20 2a 2f 0d 70 61 73 63 |anager..| */.pasc|
|00004110| 61 6c 20 4c 6f 67 52 65 | 63 6f 72 64 50 74 72 09 |al LogRe|cordPtr.|
|00004120| 09 09 47 65 74 4c 6f 67 | 52 65 63 6f 72 64 50 74 |..GetLog|RecordPt|
|00004130| 72 28 0d 09 09 63 6f 6e | 73 74 20 4c 6f 67 52 65 |r(...con|st LogRe|
|00004140| 63 6f 72 64 4e 61 6d 65 | 50 74 72 09 6c 6f 67 52 |cordName|Ptr.logR|
|00004150| 65 63 6f 72 64 4e 61 6d | 65 50 74 72 09 09 2f 2a |ecordNam|ePtr../*|
|00004160| 20 4c 6f 67 20 6e 61 6d | 65 20 28 43 2d 73 74 72 | Log nam|e (C-str|
|00004170| 69 6e 67 29 09 09 2a 2f | 0d 09 29 3b 0d 0d 2f 2a |ing)..*/|..);../*|
|00004180| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004190| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000041a0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000041b0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000041c0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000041d0| 20 2a 20 2a 0d 20 2a 20 | 4c 6f 67 53 74 72 69 6e | * *. * |LogStrin|
|000041e0| 67 0d 20 2a 0d 20 2a 20 | 4c 6f 67 53 74 72 69 6e |g. *. * |LogStrin|
|000041f0| 67 20 63 61 6c 6c 73 20 | 57 72 69 74 65 4c 6f 67 |g calls |WriteLog|
|00004200| 45 6e 74 72 79 20 77 69 | 74 68 20 61 20 73 69 6e |Entry wi|th a sin|
|00004210| 67 6c 65 20 50 61 73 63 | 61 6c 20 73 74 72 69 6e |gle Pasc|al strin|
|00004220| 67 20 61 72 67 75 6d 65 | 6e 74 2e 20 46 6f 6c 6c |g argume|nt. Foll|
|00004230| 6f 77 69 6e 67 20 41 4e | 53 49 0d 20 2a 20 43 20 |owing AN|SI. * C |
|00004240| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 2c 20 69 74 20 |conventi|ons, it |
|00004250| 69 73 20 70 72 6f 76 69 | 64 65 64 20 61 73 20 61 |is provi|ded as a|
|00004260| 20 6d 61 63 72 6f 20 61 | 6e 64 20 61 73 20 61 20 | macro a|nd as a |
|00004270| 66 75 6e 63 74 69 6f 6e | 2e 20 54 68 65 20 66 75 |function|. The fu|
|00004280| 6e 63 74 69 6f 6e 20 6d | 61 79 20 62 65 0d 20 2a |nction m|ay be. *|
|00004290| 20 63 61 6c 6c 65 64 20 | 66 72 6f 6d 20 50 61 73 | called |from Pas|
|000042a0| 63 61 6c 2e 0d 20 2a 2f | 0d 23 64 65 66 69 6e 65 |cal.. */|.#define|
|000042b0| 20 4c 6f 67 53 74 72 69 | 6e 67 28 70 74 72 2c 20 | LogStri|ng(ptr, |
|000042c0| 69 64 43 6f 64 65 2c 20 | 73 74 72 69 6e 67 29 20 |idCode, |string) |
|000042d0| 5c 0d 09 09 57 72 69 74 | 65 4c 6f 67 45 6e 74 72 |\...Writ|eLogEntr|
|000042e0| 79 28 28 70 74 72 29 2c | 20 28 69 64 43 6f 64 65 |y((ptr),| (idCode|
|000042f0| 29 2c 20 4c 6f 67 53 74 | 72 69 6e 67 46 6f 72 6d |), LogSt|ringForm|
|00004300| 61 74 2c 20 73 74 72 69 | 6e 67 29 0d 70 61 73 63 |at, stri|ng).pasc|
|00004310| 61 6c 20 4f 53 45 72 72 | 09 09 09 09 28 4c 6f 67 |al OSErr|....(Log|
|00004320| 53 74 72 69 6e 67 29 28 | 0d 09 09 4c 6f 67 52 65 |String)(|...LogRe|
|00004330| 63 6f 72 64 50 74 72 09 | 09 09 6c 6f 67 52 65 63 |cordPtr.|..logRec|
|00004340| 6f 72 64 50 74 72 2c 09 | 09 09 2f 2a 20 54 68 69 |ordPtr,.|../* Thi|
|00004350| 73 20 6c 6f 67 20 72 65 | 63 6f 72 64 09 09 09 2a |s log re|cord...*|
|00004360| 2f 0d 09 09 4f 53 54 79 | 70 65 09 09 09 09 09 69 |/...OSTy|pe.....i|
|00004370| 64 43 6f 64 65 2c 09 09 | 09 09 09 2f 2a 20 45 6e |dCode,..|.../* En|
|00004380| 74 72 79 20 69 64 65 6e | 74 69 66 69 65 72 09 09 |try iden|tifier..|
|00004390| 09 2a 2f 0d 09 09 43 6f | 6e 73 74 53 74 72 32 35 |.*/...Co|nstStr25|
|000043a0| 35 50 61 72 61 6d 09 09 | 73 74 72 69 6e 67 09 09 |5Param..|string..|
|000043b0| 09 09 09 2f 2a 20 54 68 | 65 20 64 61 74 75 6d 09 |.../* Th|e datum.|
|000043c0| 09 09 09 2a 2f 0d 09 29 | 3b 0d 0d 2f 2a 20 2a 20 |...*/..)|;../* * |
|000043d0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000043e0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000043f0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004400| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004410| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004420| 2a 0d 20 2a 20 4c 6f 67 | 53 74 61 74 75 73 53 74 |*. * Log|StatusSt|
|00004430| 72 69 6e 67 0d 20 2a 0d | 20 2a 20 4c 6f 67 53 74 |ring. *.| * LogSt|
|00004440| 61 74 75 73 53 74 72 69 | 6e 67 20 63 61 6c 6c 73 |atusStri|ng calls|
|00004450| 20 57 72 69 74 65 4c 6f | 67 45 6e 74 72 79 20 77 | WriteLo|gEntry w|
|00004460| 69 74 68 20 74 68 65 20 | 73 74 61 74 75 73 20 61 |ith the |status a|
|00004470| 6e 64 20 73 74 72 69 6e | 67 20 76 61 6c 75 65 73 |nd strin|g values|
|00004480| 2e 20 49 74 20 69 73 0d | 20 2a 20 70 72 6f 76 69 |. It is.| * provi|
|00004490| 64 65 64 20 61 73 20 61 | 20 6d 61 63 72 6f 20 61 |ded as a| macro a|
|000044a0| 6e 64 20 61 73 20 61 20 | 66 75 6e 63 74 69 6f 6e |nd as a |function|
|000044b0| 2e 0d 20 2a 2f 0d 23 64 | 65 66 69 6e 65 20 4c 6f |.. */.#d|efine Lo|
|000044c0| 67 53 74 61 74 75 73 53 | 74 72 69 6e 67 28 70 74 |gStatusS|tring(pt|
|000044d0| 72 2c 20 69 64 43 6f 64 | 65 2c 20 73 74 61 74 75 |r, idCod|e, statu|
|000044e0| 73 2c 20 73 74 72 69 6e | 67 29 20 28 09 5c 0d 09 |s, strin|g) (.\..|
|000044f0| 09 57 72 69 74 65 4c 6f | 67 45 6e 74 72 79 28 09 |.WriteLo|gEntry(.|
|00004500| 09 09 09 09 09 09 09 09 | 5c 0d 09 09 09 28 70 74 |........|\....(pt|
|00004510| 72 29 2c 09 09 09 09 09 | 09 09 09 09 09 5c 0d 09 |r),.....|.....\..|
|00004520| 09 09 28 69 64 43 6f 64 | 65 29 2c 09 09 09 09 09 |..(idCod|e),.....|
|00004530| 09 09 09 09 5c 0d 09 09 | 09 4c 6f 67 53 74 61 74 |....\...|.LogStat|
|00004540| 75 73 46 6f 72 6d 61 74 | 2c 09 09 09 09 09 09 09 |usFormat|,.......|
|00004550| 5c 0d 09 09 09 28 73 69 | 67 6e 65 64 20 6c 6f 6e |\....(si|gned lon|
|00004560| 67 29 20 28 73 74 61 74 | 75 73 29 2c 09 09 09 09 |g) (stat|us),....|
|00004570| 09 09 5c 0d 09 09 09 73 | 74 72 69 6e 67 09 09 09 |..\....s|tring...|
|00004580| 09 09 09 09 09 09 09 5c | 0d 09 09 29 09 09 09 09 |.......\|...)....|
|00004590| 09 09 09 09 09 09 09 09 | 5c 0d 09 29 0d 70 61 73 |........|\..).pas|
|000045a0| 63 61 6c 20 4f 53 45 72 | 72 09 09 09 09 28 4c 6f |cal OSEr|r....(Lo|
|000045b0| 67 53 74 61 74 75 73 53 | 74 72 69 6e 67 29 28 0d |gStatusS|tring)(.|
|000045c0| 09 09 4c 6f 67 52 65 63 | 6f 72 64 50 74 72 09 09 |..LogRec|ordPtr..|
|000045d0| 09 6c 6f 67 52 65 63 6f | 72 64 50 74 72 2c 09 09 |.logReco|rdPtr,..|
|000045e0| 09 2f 2a 20 54 68 69 73 | 20 6c 6f 67 20 72 65 63 |./* This| log rec|
|000045f0| 6f 72 64 09 09 09 2a 2f | 0d 09 09 4f 53 54 79 70 |ord...*/|...OSTyp|
|00004600| 65 09 09 09 09 09 69 64 | 43 6f 64 65 2c 09 09 09 |e.....id|Code,...|
|00004610| 09 09 2f 2a 20 45 6e 74 | 72 79 20 69 64 65 6e 74 |../* Ent|ry ident|
|00004620| 69 66 69 65 72 09 09 09 | 2a 2f 0d 09 09 4f 53 45 |ifier...|*/...OSE|
|00004630| 72 72 09 09 09 09 09 73 | 74 61 74 75 73 2c 09 09 |rr.....s|tatus,..|
|00004640| 09 09 09 2f 2a 20 53 74 | 61 74 75 73 20 65 72 72 |.../* St|atus err|
|00004650| 6f 72 20 63 6f 64 65 09 | 09 2a 2f 0d 09 09 43 6f |or code.|.*/...Co|
|00004660| 6e 73 74 53 74 72 32 35 | 35 50 61 72 61 6d 09 09 |nstStr25|5Param..|
|00004670| 73 74 72 69 6e 67 09 09 | 09 09 09 2f 2a 20 54 68 |string..|.../* Th|
|00004680| 65 20 64 61 74 75 6d 09 | 09 09 09 2a 2f 0d 09 29 |e datum.|...*/..)|
|00004690| 3b 0d 0d 2f 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |;../* * |* * * * |
|000046a0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000046b0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000046c0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000046d0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000046e0| 2a 20 2a 20 2a 20 2a 20 | 2a 0d 20 2a 20 57 72 69 |* * * * |*. * Wri|
|000046f0| 74 65 4c 6f 67 45 6e 74 | 72 79 0d 20 2a 0d 20 2a |teLogEnt|ry. *. *|
|00004700| 20 57 72 69 74 65 20 61 | 20 4c 6f 67 52 65 63 6f | Write a| LogReco|
|00004710| 72 64 20 65 6e 74 72 79 | 20 69 66 20 6c 6f 67 67 |rd entry| if logg|
|00004720| 69 6e 67 20 69 73 20 65 | 6e 61 62 6c 65 64 20 61 |ing is e|nabled a|
|00004730| 6e 64 20 74 68 65 72 65 | 20 69 73 20 73 70 61 63 |nd there| is spac|
|00004740| 65 20 69 6e 20 74 68 65 | 20 6c 6f 67 2e 0d 20 2a |e in the| log.. *|
|00004750| 09 6c 6f 67 52 65 63 6f | 72 64 50 74 72 20 49 64 |.logReco|rdPtr Id|
|00004760| 65 6e 74 69 66 69 65 73 | 20 74 68 69 73 20 6c 6f |entifies| this lo|
|00004770| 67 2e 0d 20 2a 09 69 64 | 43 6f 64 65 09 09 41 20 |g.. *.id|Code..A |
|00004780| 75 73 65 72 2d 63 6f 6e | 74 72 6f 6c 6c 65 64 20 |user-con|trolled |
|00004790| 76 61 6c 75 65 2c 20 62 | 79 20 63 6f 6e 76 65 6e |value, b|y conven|
|000047a0| 74 69 6f 6e 20 61 6e 20 | 4f 53 54 79 70 65 20 28 |tion an |OSType (|
|000047b0| 34 2d 62 79 74 65 20 63 | 68 61 72 61 63 74 65 72 |4-byte c|haracter|
|000047c0| 29 0d 20 2a 09 09 09 09 | 74 68 61 74 20 69 64 65 |). *....|that ide|
|000047d0| 6e 74 69 66 69 65 73 20 | 74 68 69 73 20 65 6e 74 |ntifies |this ent|
|000047e0| 72 79 2e 20 54 68 65 20 | 64 69 73 70 6c 61 79 20 |ry. The |display |
|000047f0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 70 72 69 6e |applicat|ion prin|
|00004800| 74 73 20 69 74 2e 20 4e | 6f 74 65 0d 20 2a 09 09 |ts it. N|ote. *..|
|00004810| 09 09 74 68 61 74 2c 20 | 6f 6e 20 74 68 65 20 4d |..that, |on the M|
|00004820| 61 63 69 6e 74 6f 73 68 | 2c 20 61 6e 20 4f 53 54 |acintosh|, an OST|
|00004830| 79 70 65 20 63 61 6e 20 | 62 65 20 63 6f 65 72 63 |ype can |be coerc|
|00004840| 65 64 20 66 72 6f 6d 2f | 74 6f 20 61 6e 79 20 6c |ed from/|to any l|
|00004850| 6f 6e 67 77 6f 72 64 0d | 20 2a 09 09 09 09 73 63 |ongword.| *....sc|
|00004860| 61 6c 61 72 20 28 73 75 | 63 68 20 61 73 20 61 6e |alar (su|ch as an|
|00004870| 20 61 64 64 72 65 73 73 | 29 20 77 69 74 68 6f 75 | address|) withou|
|00004880| 74 20 6c 6f 73 73 20 6f | 66 20 64 61 74 61 2e 20 |t loss o|f data. |
|00004890| 54 68 69 73 20 6d 61 79 | 20 62 65 20 75 73 65 66 |This may| be usef|
|000048a0| 75 6c 0d 20 2a 09 09 09 | 09 66 6f 72 20 75 73 65 |ul. *...|.for use|
|000048b0| 72 2d 77 72 69 74 74 65 | 6e 20 64 69 73 70 6c 61 |r-writte|n displa|
|000048c0| 79 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 2e 0d |y applic|ations..|
|000048d0| 20 2a 09 66 6f 72 6d 61 | 74 09 09 41 20 6c 6f 6e | *.forma|t..A lon|
|000048e0| 67 77 6f 72 64 20 74 68 | 61 74 20 73 70 65 63 69 |gword th|at speci|
|000048f0| 66 69 65 73 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |fies the| format |
|00004900| 6f 66 20 74 68 65 20 72 | 65 6d 61 69 6e 69 6e 67 |of the r|emaining|
|00004910| 20 64 61 74 61 2e 20 55 | 73 65 20 74 68 65 0d 20 | data. U|se the. |
|00004920| 2a 09 09 09 09 76 61 6c | 75 65 20 4c 6f 67 53 74 |*....val|ue LogSt|
|00004930| 72 69 6e 67 46 6f 72 6d | 61 74 20 69 66 20 74 68 |ringForm|at if th|
|00004940| 65 20 6f 6e 6c 79 20 64 | 61 74 75 6d 20 69 73 20 |e only d|atum is |
|00004950| 61 20 50 61 73 63 61 6c | 20 73 74 72 69 6e 67 3b |a Pascal| string;|
|00004960| 20 75 73 65 20 74 68 65 | 0d 20 2a 09 09 09 09 76 | use the|. *....v|
|00004970| 61 6c 75 65 20 4c 6f 67 | 53 74 61 74 75 73 46 6f |alue Log|StatusFo|
|00004980| 72 6d 61 74 20 69 66 20 | 79 6f 75 20 61 72 65 20 |rmat if |you are |
|00004990| 6c 6f 67 67 69 6e 67 20 | 61 6e 20 4f 53 45 72 72 |logging |an OSErr|
|000049a0| 20 61 6e 64 20 61 6e 20 | 61 63 63 6f 6d 70 61 6e | and an |accompan|
|000049b0| 69 6e 67 0d 20 2a 09 09 | 09 09 73 74 72 69 6e 67 |ing. *..|..string|
|000049c0| 3b 20 6f 74 68 65 72 77 | 69 73 65 2c 20 75 73 65 |; otherw|ise, use|
|000049d0| 20 74 68 65 20 4c 6f 67 | 46 6f 72 6d 61 74 20 6d | the Log|Format m|
|000049e0| 61 63 72 6f 20 74 6f 20 | 63 72 65 61 74 65 20 74 |acro to |create t|
|000049f0| 68 65 20 76 61 6c 75 65 | 2e 0d 20 2a 09 2e 2e 2e |he value|.. *....|
|00004a00| 09 09 09 41 64 64 69 74 | 69 6f 6e 61 6c 20 64 61 |...Addit|ional da|
|00004a10| 74 61 20 61 73 20 6e 65 | 65 64 65 64 2e 20 4e 6f |ta as ne|eded. No|
|00004a20| 74 65 20 74 68 61 74 20 | 61 6c 6c 20 64 61 74 61 |te that |all data|
|00004a30| 20 6d 75 73 74 20 62 65 | 20 73 70 65 63 69 66 69 | must be| specifi|
|00004a40| 65 64 20 61 73 2c 20 6f | 72 0d 20 2a 09 09 09 09 |ed as, o|r. *....|
|00004a50| 63 6f 65 72 63 65 64 20 | 74 6f 20 6c 6f 6e 67 77 |coerced |to longw|
|00004a60| 6f 72 64 73 20 28 53 74 | 72 69 6e 67 50 74 72 2c |ords (St|ringPtr,|
|00004a70| 20 61 64 64 72 65 73 73 | 2c 20 6f 72 20 6c 6f 6e | address|, or lon|
|00004a80| 67 29 2e 20 4e 61 74 75 | 72 61 6c 6c 79 20 73 68 |g). Natu|rally sh|
|00004a90| 6f 72 74 0d 20 2a 09 09 | 09 09 69 6e 74 65 67 65 |ort. *..|..intege|
|00004aa0| 72 73 20 73 75 63 68 20 | 61 73 20 42 6f 6f 6c 65 |rs such |as Boole|
|00004ab0| 61 6e 73 20 6f 72 20 4f | 53 45 72 72 20 63 6f 64 |ans or O|SErr cod|
|00004ac0| 65 73 20 6d 75 73 74 20 | 62 65 20 65 78 70 6c 69 |es must |be expli|
|00004ad0| 63 69 74 6c 79 20 63 61 | 73 74 20 74 6f 0d 20 2a |citly ca|st to. *|
|00004ae0| 09 09 09 09 6c 6f 6e 67 | 2e 20 54 68 69 73 20 69 |....long|. This i|
|00004af0| 73 20 6e 65 65 64 65 64 | 20 62 65 63 61 75 73 65 |s needed| because|
|00004b00| 20 6f 66 20 63 6f 6d 70 | 69 6c 65 72 20 6f 70 74 | of comp|iler opt|
|00004b10| 69 6f 6e 73 20 72 65 67 | 61 72 64 69 6e 67 20 64 |ions reg|arding d|
|00004b20| 61 74 61 0d 20 2a 09 09 | 09 09 66 6f 72 6d 61 74 |ata. *..|..format|
|00004b30| 20 6c 65 6e 67 74 68 73 | 2e 0d 20 2a 20 57 72 69 | lengths|.. * Wri|
|00004b40| 74 65 4c 6f 67 44 61 74 | 61 20 77 69 6c 6c 20 61 |teLogDat|a will a|
|00004b50| 6c 77 61 79 73 20 62 65 | 20 69 6e 20 74 68 65 20 |lways be| in the |
|00004b60| 63 75 72 72 65 6e 74 20 | 69 6e 73 74 72 75 63 74 |current |instruct|
|00004b70| 69 6f 6e 20 61 72 63 68 | 69 74 65 63 74 75 72 65 |ion arch|itecture|
|00004b80| 20 61 73 20 79 6f 75 20 | 63 61 6e 6e 6f 74 0d 20 | as you |cannot. |
|00004b90| 2a 20 6d 61 6b 65 20 61 | 20 4d 69 78 65 64 4d 6f |* make a| MixedMo|
|00004ba0| 64 65 20 63 61 6c 6c 20 | 77 69 74 68 20 61 20 76 |de call |with a v|
|00004bb0| 61 72 69 61 62 6c 65 2d | 6c 65 6e 67 74 68 20 61 |ariable-|length a|
|00004bc0| 72 67 75 6d 65 6e 74 20 | 6c 69 73 74 2e 20 41 6c |rgument |list. Al|
|00004bd0| 73 6f 2c 20 57 72 69 74 | 65 4c 6f 67 44 61 74 61 |so, Writ|eLogData|
|00004be0| 0d 20 2a 20 63 61 6e 6e | 6f 74 20 62 65 20 63 61 |. * cann|ot be ca|
|00004bf0| 6c 6c 65 64 20 66 72 6f | 6d 20 50 61 73 63 61 6c |lled fro|m Pascal|
|00004c00| 20 66 6f 72 20 74 68 65 | 20 73 61 6d 65 20 72 65 | for the| same re|
|00004c10| 61 73 6f 6e 2e 0d 20 2a | 0d 20 2a 20 52 65 74 75 |ason.. *|. * Retu|
|00004c20| 72 6e 20 76 61 6c 75 65 | 73 3a 0d 20 2a 09 6e 6f |rn value|s:. *.no|
|00004c30| 45 72 72 09 09 4e 6f 72 | 6d 61 6c 20 63 6f 6d 70 |Err..Nor|mal comp|
|00004c40| 6c 65 74 69 6f 6e 20 6f | 72 20 6c 6f 67 67 69 6e |letion o|r loggin|
|00004c50| 67 20 77 61 73 20 64 69 | 73 61 62 6c 65 64 2e 0d |g was di|sabled..|
|00004c60| 20 2a 09 77 72 69 74 45 | 72 72 09 09 54 68 65 20 | *.writE|rr..The |
|00004c70| 65 6e 74 72 79 20 63 6f | 75 6c 64 20 6e 6f 74 20 |entry co|uld not |
|00004c80| 62 65 20 73 74 6f 72 65 | 64 20 62 65 63 61 75 73 |be store|d becaus|
|00004c90| 65 20 74 68 65 20 4c 6f | 67 52 65 63 6f 72 64 20 |e the Lo|gRecord |
|00004ca0| 77 61 73 20 66 75 6c 6c | 2e 20 54 68 69 73 0d 20 |was full|. This. |
|00004cb0| 2a 09 09 09 09 63 61 6e | 20 75 73 75 61 6c 6c 79 |*....can| usually|
|00004cc0| 20 62 65 20 69 67 6e 6f | 72 65 64 2e 0d 20 2a 09 | be igno|red.. *.|
|00004cd0| 66 42 73 79 45 72 72 09 | 09 54 68 65 20 65 6e 74 |fBsyErr.|.The ent|
|00004ce0| 72 79 20 63 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |ry could| not be |
|00004cf0| 73 74 6f 72 65 64 20 62 | 65 63 61 75 73 65 20 74 |stored b|ecause t|
|00004d00| 68 65 20 4c 6f 67 52 65 | 63 6f 72 64 20 73 65 6d |he LogRe|cord sem|
|00004d10| 61 70 68 6f 72 65 20 77 | 61 73 0d 20 2a 09 09 09 |aphore w|as. *...|
|00004d20| 09 6c 6f 63 6b 65 64 20 | 2d 2d 20 70 72 65 73 75 |.locked |-- presu|
|00004d30| 6d 61 62 6c 79 20 62 79 | 20 61 6e 20 61 73 79 6e |mably by| an asyn|
|00004d40| 63 68 72 6f 6e 6f 75 73 | 20 70 72 6f 63 65 73 73 |chronous| process|
|00004d50| 2e 20 54 68 65 20 63 61 | 6c 6c 65 72 20 6d 61 79 |. The ca|ller may|
|00004d60| 0d 20 2a 09 09 09 09 77 | 69 73 68 20 74 6f 20 74 |. *....w|ish to t|
|00004d70| 72 79 20 74 68 65 20 6f | 70 65 72 61 74 69 6f 6e |ry the o|peration|
|00004d80| 20 61 67 61 69 6e 2c 20 | 70 65 72 68 61 70 73 20 | again, |perhaps |
|00004d90| 61 66 74 65 72 20 61 20 | 73 68 6f 72 74 20 64 65 |after a |short de|
|00004da0| 6c 61 79 2e 0d 20 2a 2f | 0d 4f 53 45 72 72 09 09 |lay.. */|.OSErr..|
|00004db0| 09 09 09 09 57 72 69 74 | 65 4c 6f 67 45 6e 74 72 |....Writ|eLogEntr|
|00004dc0| 79 28 0d 09 09 4c 6f 67 | 52 65 63 6f 72 64 50 74 |y(...Log|RecordPt|
|00004dd0| 72 09 09 09 6c 6f 67 52 | 65 63 6f 72 64 50 74 72 |r...logR|ecordPtr|
|00004de0| 2c 09 09 09 2f 2a 20 54 | 68 69 73 20 6c 6f 67 20 |,.../* T|his log |
|00004df0| 72 65 63 6f 72 64 09 09 | 09 2a 2f 0d 09 09 4f 53 |record..|.*/...OS|
|00004e00| 54 79 70 65 09 09 09 09 | 09 69 64 43 6f 64 65 2c |Type....|.idCode,|
|00004e10| 09 09 09 09 09 2f 2a 20 | 45 6e 74 72 79 20 69 64 |...../* |Entry id|
|00004e20| 65 6e 74 69 66 69 65 72 | 09 09 09 2a 2f 0d 09 09 |entifier|...*/...|
|00004e30| 55 49 6e 74 33 32 09 09 | 09 09 09 66 6f 72 6d 61 |UInt32..|...forma|
|00004e40| 74 2c 09 09 09 09 09 2f | 2a 20 46 6f 72 6d 61 74 |t,...../|* Format|
|00004e50| 20 62 69 74 73 09 09 09 | 09 2a 2f 0d 09 09 2e 2e | bits...|.*/.....|
|00004e60| 2e 09 09 09 09 09 09 09 | 09 09 09 09 09 2f 2a 20 |........|...../* |
|00004e70| 41 64 64 69 74 69 6f 6e | 61 6c 20 64 61 74 61 2c |Addition|al data,|
|00004e80| 20 69 66 20 61 6e 79 09 | 2a 2f 0d 09 29 3b 0d 0d | if any.|*/..);..|
|00004e90| 2f 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a |/* * * *| * * * *|
|00004ea0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004eb0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004ec0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004ed0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004ee0| 20 2a 20 2a 20 2a 0d 20 | 2a 20 53 74 6f 72 65 4c | * * *. |* StoreL|
|00004ef0| 6f 67 45 6e 74 72 79 0d | 20 2a 0d 20 2a 20 53 74 |ogEntry.| *. * St|
|00004f00| 6f 72 65 20 61 20 66 6f | 72 6d 61 74 74 65 64 20 |ore a fo|rmatted |
|00004f10| 4c 6f 67 45 6e 74 72 79 | 52 65 63 6f 72 64 20 69 |LogEntry|Record i|
|00004f20| 6e 20 74 68 65 20 6c 6f | 67 2e 20 54 68 69 73 20 |n the lo|g. This |
|00004f30| 69 73 20 74 68 65 20 6f | 6e 6c 79 20 72 6f 75 74 |is the o|nly rout|
|00004f40| 69 6e 65 20 74 68 61 74 | 0d 20 2a 20 77 72 69 74 |ine that|. * writ|
|00004f50| 65 73 20 74 68 65 20 6c | 6f 67 20 65 6e 74 72 79 |es the l|og entry|
|00004f60| 2e 20 4e 6f 72 6d 61 6c | 6c 79 2c 20 69 74 20 69 |. Normal|ly, it i|
|00004f70| 73 20 6f 6e 6c 79 20 63 | 61 6c 6c 65 64 20 62 79 |s only c|alled by|
|00004f80| 20 57 72 69 74 65 4c 6f | 67 44 61 74 61 2e 20 54 | WriteLo|gData. T|
|00004f90| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 0d 20 2a 20 |his func|tion. * |
|00004fa0| 77 69 6c 6c 20 73 74 6f | 72 65 20 74 68 65 20 66 |will sto|re the f|
|00004fb0| 6f 6c 6c 6f 77 69 6e 67 | 20 64 61 74 61 20 69 6e |ollowing| data in|
|00004fc0| 74 6f 20 74 68 65 20 63 | 61 6c 6c 65 72 27 73 20 |to the c|aller's |
|00004fd0| 4c 6f 67 45 6e 74 72 79 | 52 65 63 6f 72 64 20 28 |LogEntry|Record (|
|00004fe0| 65 76 65 6e 20 69 66 20 | 6c 6f 67 67 69 6e 67 0d |even if |logging.|
|00004ff0| 20 2a 20 77 61 73 20 64 | 69 73 61 62 6c 65 64 20 | * was d|isabled |
|00005000| 6f 72 20 74 68 65 20 6c | 6f 67 20 77 61 73 20 66 |or the l|og was f|
|00005010| 75 6c 6c 29 3a 0d 20 2a | 09 09 73 65 71 75 65 6e |ull):. *|..sequen|
|00005020| 63 65 09 54 68 69 73 20 | 65 6e 74 72 79 20 73 65 |ce.This |entry se|
|00005030| 71 75 65 6e 63 65 20 63 | 6f 75 6e 74 65 72 2e 0d |quence c|ounter..|
|00005040| 20 2a 09 09 65 76 65 6e | 74 54 69 6d 65 09 55 70 | *..even|tTime.Up|
|00005050| 54 69 6d 65 20 77 68 65 | 6e 20 74 68 69 73 20 72 |Time whe|n this r|
|00005060| 65 63 6f 72 64 20 77 61 | 73 20 61 64 64 65 64 20 |ecord wa|s added |
|00005070| 74 6f 20 74 68 65 20 4c | 6f 67 52 65 63 6f 72 64 |to the L|ogRecord|
|00005080| 2e 0d 20 2a 0d 20 2a 20 | 52 65 74 75 72 6e 20 76 |.. *. * |Return v|
|00005090| 61 6c 75 65 73 3a 0d 20 | 2a 09 6e 6f 45 72 72 09 |alues:. |*.noErr.|
|000050a0| 09 4e 6f 72 6d 61 6c 20 | 63 6f 6d 70 6c 65 74 69 |.Normal |completi|
|000050b0| 6f 6e 20 6f 72 20 6c 6f | 67 67 69 6e 67 20 77 61 |on or lo|gging wa|
|000050c0| 73 20 64 69 73 61 62 6c | 65 64 2e 0d 20 2a 09 77 |s disabl|ed.. *.w|
|000050d0| 72 69 74 45 72 72 09 09 | 54 68 65 20 65 6e 74 72 |ritErr..|The entr|
|000050e0| 79 20 63 6f 75 6c 64 20 | 6e 6f 74 20 62 65 20 73 |y could |not be s|
|000050f0| 74 6f 72 65 64 20 62 65 | 63 61 75 73 65 20 74 68 |tored be|cause th|
|00005100| 65 20 4c 6f 67 52 65 63 | 6f 72 64 20 77 61 73 20 |e LogRec|ord was |
|00005110| 66 75 6c 6c 2e 20 54 68 | 69 73 0d 20 2a 09 09 09 |full. Th|is. *...|
|00005120| 09 63 61 6e 20 75 73 75 | 61 6c 6c 79 20 62 65 20 |.can usu|ally be |
|00005130| 69 67 6e 6f 72 65 64 2e | 0d 20 2a 09 66 42 73 79 |ignored.|. *.fBsy|
|00005140| 45 72 72 09 09 54 68 65 | 20 65 6e 74 72 79 20 63 |Err..The| entry c|
|00005150| 6f 75 6c 64 20 6e 6f 74 | 20 62 65 20 73 74 6f 72 |ould not| be stor|
|00005160| 65 64 20 62 65 63 61 75 | 73 65 20 74 68 65 20 4c |ed becau|se the L|
|00005170| 6f 67 52 65 63 6f 72 64 | 20 73 65 6d 61 70 68 6f |ogRecord| semapho|
|00005180| 72 65 20 77 61 73 0d 20 | 2a 09 09 09 09 6c 6f 63 |re was. |*....loc|
|00005190| 6b 65 64 20 2d 2d 20 70 | 72 65 73 75 6d 61 62 6c |ked -- p|resumabl|
|000051a0| 79 20 62 79 20 61 6e 20 | 61 73 79 6e 63 68 72 6f |y by an |asynchro|
|000051b0| 6e 6f 75 73 20 70 72 6f | 63 65 73 73 2e 20 54 68 |nous pro|cess. Th|
|000051c0| 65 20 63 61 6c 6c 65 72 | 20 6d 61 79 0d 20 2a 09 |e caller| may. *.|
|000051d0| 09 09 09 77 69 73 68 20 | 74 6f 20 74 72 79 20 74 |...wish |to try t|
|000051e0| 68 65 20 6f 70 65 72 61 | 74 69 6f 6e 20 61 67 61 |he opera|tion aga|
|000051f0| 69 6e 2c 20 70 65 72 68 | 61 70 73 20 61 66 74 65 |in, perh|aps afte|
|00005200| 72 20 61 20 73 68 6f 72 | 74 20 64 65 6c 61 79 2e |r a shor|t delay.|
|00005210| 0d 20 2a 2f 0d 70 61 73 | 63 61 6c 20 4f 53 45 72 |. */.pas|cal OSEr|
|00005220| 72 09 09 09 09 53 74 6f | 72 65 4c 6f 67 45 6e 74 |r....Sto|reLogEnt|
|00005230| 72 79 28 0d 09 09 4c 6f | 67 52 65 63 6f 72 64 50 |ry(...Lo|gRecordP|
|00005240| 74 72 09 09 09 6c 6f 67 | 52 65 63 6f 72 64 50 74 |tr...log|RecordPt|
|00005250| 72 2c 09 09 09 2f 2a 20 | 54 68 69 73 20 6c 6f 67 |r,.../* |This log|
|00005260| 20 72 65 63 6f 72 64 09 | 09 09 2a 2f 0d 09 09 63 | record.|..*/...c|
|00005270| 6f 6e 73 74 20 4c 6f 67 | 45 6e 74 72 79 50 74 72 |onst Log|EntryPtr|
|00005280| 09 09 6c 6f 67 45 6e 74 | 72 79 50 74 72 09 09 09 |..logEnt|ryPtr...|
|00005290| 09 2f 2a 20 47 65 74 73 | 20 74 68 69 73 20 65 6e |./* Gets| this en|
|000052a0| 74 72 79 09 09 09 2a 2f | 0d 09 29 3b 0d 0d 2f 2a |try...*/|..);../*|
|000052b0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000052c0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000052d0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000052e0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000052f0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005300| 20 2a 20 2a 0d 20 2a 20 | 52 65 61 64 4c 6f 67 45 | * *. * |ReadLogE|
|00005310| 6e 74 72 79 0d 20 2a 0d | 20 2a 20 52 65 61 64 20 |ntry. *.| * Read |
|00005320| 74 68 65 20 6e 65 78 74 | 20 4c 6f 67 52 65 63 6f |the next| LogReco|
|00005330| 72 64 20 65 6e 74 72 79 | 2e 20 54 68 69 73 20 72 |rd entry|. This r|
|00005340| 65 74 75 72 6e 73 20 61 | 20 63 6f 70 79 20 6f 66 |eturns a| copy of|
|00005350| 20 74 68 65 20 65 6e 74 | 72 79 2c 20 69 66 20 6f | the ent|ry, if o|
|00005360| 6e 65 20 69 73 0d 20 2a | 20 61 76 61 69 6c 61 62 |ne is. *| availab|
|00005370| 6c 65 2e 20 52 65 61 64 | 4c 6f 67 45 6e 74 72 79 |le. Read|LogEntry|
|00005380| 20 61 6c 73 6f 20 72 65 | 74 75 72 6e 73 20 74 68 | also re|turns th|
|00005390| 65 20 55 70 54 69 6d 65 | 20 76 61 6c 75 65 20 77 |e UpTime| value w|
|000053a0| 68 65 6e 20 69 74 20 77 | 61 73 20 63 61 6c 6c 65 |hen it w|as calle|
|000053b0| 64 2e 20 54 68 69 73 0d | 20 2a 20 69 73 20 6e 65 |d. This.| * is ne|
|000053c0| 65 64 65 64 20 62 79 20 | 36 38 30 30 30 2d 62 61 |eded by |68000-ba|
|000053d0| 73 65 64 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |sed appl|ications|
|000053e0| 20 61 73 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e | as the |function|
|000053f0| 20 69 73 20 6f 6e 6c 79 | 20 61 76 61 69 6c 61 62 | is only| availab|
|00005400| 6c 65 20 66 72 6f 6d 20 | 74 68 65 0d 20 2a 20 50 |le from |the. * P|
|00005410| 6f 77 65 72 20 50 43 20 | 6e 61 74 69 76 65 20 44 |ower PC |native D|
|00005420| 72 69 76 65 72 53 65 72 | 76 69 63 65 73 20 6c 69 |riverSer|vices li|
|00005430| 62 72 61 72 79 2e 0d 20 | 2a 0d 20 2a 20 52 65 74 |brary.. |*. * Ret|
|00005440| 75 72 6e 20 76 61 6c 75 | 65 73 3a 0d 20 2a 09 6e |urn valu|es:. *.n|
|00005450| 6f 45 72 72 09 09 4e 6f | 72 6d 61 6c 20 63 6f 6d |oErr..No|rmal com|
|00005460| 70 6c 65 74 69 6f 6e 20 | 6f 72 20 6c 6f 67 67 69 |pletion |or loggi|
|00005470| 6e 67 20 77 61 73 20 64 | 69 73 61 62 6c 65 64 2e |ng was d|isabled.|
|00005480| 0d 20 2a 09 72 65 61 64 | 45 72 72 09 09 54 68 65 |. *.read|Err..The|
|00005490| 20 65 6e 74 72 79 20 63 | 6f 75 6c 64 20 6e 6f 74 | entry c|ould not|
|000054a0| 20 62 65 20 73 74 6f 72 | 65 64 20 62 65 63 61 75 | be stor|ed becau|
|000054b0| 73 65 20 74 68 65 20 4c | 6f 67 52 65 63 6f 72 64 |se the L|ogRecord|
|000054c0| 20 77 61 73 20 65 6d 70 | 74 79 0d 20 2a 09 66 42 | was emp|ty. *.fB|
|000054d0| 73 79 45 72 72 09 09 54 | 68 65 20 65 6e 74 72 79 |syErr..T|he entry|
|000054e0| 20 63 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 73 74 | could n|ot be st|
|000054f0| 6f 72 65 64 20 62 65 63 | 61 75 73 65 20 74 68 65 |ored bec|ause the|
|00005500| 20 4c 6f 67 52 65 63 6f | 72 64 20 73 65 6d 61 70 | LogReco|rd semap|
|00005510| 68 6f 72 65 20 77 61 73 | 0d 20 2a 09 09 09 09 6c |hore was|. *....l|
|00005520| 6f 63 6b 65 64 20 2d 2d | 20 70 72 65 73 75 6d 61 |ocked --| presuma|
|00005530| 62 6c 79 20 62 79 20 61 | 6e 20 61 73 79 6e 63 68 |bly by a|n asynch|
|00005540| 72 6f 6e 6f 75 73 20 70 | 72 6f 63 65 73 73 2e 20 |ronous p|rocess. |
|00005550| 54 68 65 20 63 61 6c 6c | 65 72 20 6d 61 79 0d 20 |The call|er may. |
|00005560| 2a 09 09 09 09 77 69 73 | 68 20 74 6f 20 74 72 79 |*....wis|h to try|
|00005570| 20 74 68 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 61 | the ope|ration a|
|00005580| 67 61 69 6e 2c 20 70 65 | 72 68 61 70 73 20 61 66 |gain, pe|rhaps af|
|00005590| 74 65 72 20 61 20 73 68 | 6f 72 74 20 64 65 6c 61 |ter a sh|ort dela|
|000055a0| 79 2e 0d 20 2a 2f 0d 70 | 61 73 63 61 6c 20 4f 53 |y.. */.p|ascal OS|
|000055b0| 45 72 72 09 09 09 09 52 | 65 61 64 4c 6f 67 45 6e |Err....R|eadLogEn|
|000055c0| 74 72 79 28 0d 09 09 4c | 6f 67 52 65 63 6f 72 64 |try(...L|ogRecord|
|000055d0| 50 74 72 09 09 09 6c 6f | 67 52 65 63 6f 72 64 50 |Ptr...lo|gRecordP|
|000055e0| 74 72 2c 09 09 09 2f 2a | 20 54 68 69 73 20 6c 6f |tr,.../*| This lo|
|000055f0| 67 20 72 65 63 6f 72 64 | 09 09 09 2a 2f 0d 09 09 |g record|...*/...|
|00005600| 4c 6f 67 45 6e 74 72 79 | 50 74 72 09 09 09 09 74 |LogEntry|Ptr....t|
|00005610| 68 69 73 4c 6f 67 45 6e | 74 72 79 09 09 09 2f 2a |hisLogEn|try.../*|
|00005620| 20 53 74 6f 72 65 20 65 | 6e 74 72 79 20 68 65 72 | Store e|ntry her|
|00005630| 65 09 09 09 2a 2f 0d 09 | 29 3b 0d 0d 2f 2a 20 2a |e...*/..|);../* *|
|00005640| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005650| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005660| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005670| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005680| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005690| 20 2a 0d 20 2a 20 45 6e | 61 62 6c 65 4c 6f 67 52 | *. * En|ableLogR|
|000056a0| 65 63 6f 72 64 0d 20 2a | 0d 20 2a 20 45 6e 61 62 |ecord. *|. * Enab|
|000056b0| 6c 65 2f 64 69 73 61 62 | 6c 65 20 6c 6f 67 67 69 |le/disab|le loggi|
|000056c0| 6e 67 2e 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |ng. Retu|rns the |
|000056d0| 6f 6c 64 20 6c 6f 67 67 | 69 6e 67 20 73 74 61 74 |old logg|ing stat|
|000056e0| 65 2e 0d 20 2a 2f 0d 70 | 61 73 63 61 6c 20 42 6f |e.. */.p|ascal Bo|
|000056f0| 6f 6c 65 61 6e 33 32 09 | 09 09 45 6e 61 62 6c 65 |olean32.|..Enable|
|00005700| 4c 6f 67 52 65 63 6f 72 | 64 28 0d 09 09 4c 6f 67 |LogRecor|d(...Log|
|00005710| 52 65 63 6f 72 64 50 74 | 72 09 09 09 6c 6f 67 52 |RecordPt|r...logR|
|00005720| 65 63 6f 72 64 50 74 72 | 2c 09 09 09 2f 2a 20 54 |ecordPtr|,.../* T|
|00005730| 68 69 73 20 6c 6f 67 20 | 72 65 63 6f 72 64 09 09 |his log |record..|
|00005740| 09 2a 2f 0d 09 09 42 6f | 6f 6c 65 61 6e 33 32 09 |.*/...Bo|olean32.|
|00005750| 09 09 09 65 6e 61 62 6c | 65 4c 6f 67 67 69 6e 67 |...enabl|eLogging|
|00005760| 09 09 09 2f 2a 20 54 52 | 55 45 20 74 6f 20 65 6e |.../* TR|UE to en|
|00005770| 61 62 6c 65 20 6c 6f 67 | 67 69 6e 67 09 2a 2f 0d |able log|ging.*/.|
|00005780| 09 29 3b 0d 0d 2f 2a 20 | 2a 20 2a 20 2a 20 2a 20 |.);../* |* * * * |
|00005790| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000057a0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000057b0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000057c0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000057d0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 0d 20 2a 20 50 |* * * * |* *. * P|
|000057e0| 72 65 73 65 72 76 65 4c | 6f 67 52 65 63 6f 72 64 |reserveL|ogRecord|
|000057f0| 0d 20 2a 0d 20 2a 20 53 | 65 74 20 74 68 65 20 70 |. *. * S|et the p|
|00005800| 72 65 73 65 72 76 65 46 | 69 72 73 74 20 66 6c 61 |reserveF|irst fla|
|00005810| 67 2e 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 6f |g. Retur|ns the o|
|00005820| 6c 64 20 66 6c 61 67 20 | 76 61 6c 75 65 2e 20 0d |ld flag |value. .|
|00005830| 20 2a 2f 0d 70 61 73 63 | 61 6c 20 42 6f 6f 6c 65 | */.pasc|al Boole|
|00005840| 61 6e 33 32 09 09 09 50 | 72 65 73 65 72 76 65 4c |an32...P|reserveL|
|00005850| 6f 67 52 65 63 6f 72 64 | 28 0d 09 09 4c 6f 67 52 |ogRecord|(...LogR|
|00005860| 65 63 6f 72 64 50 74 72 | 09 09 09 6c 6f 67 52 65 |ecordPtr|...logRe|
|00005870| 63 6f 72 64 50 74 72 2c | 09 09 09 2f 2a 20 54 68 |cordPtr,|.../* Th|
|00005880| 69 73 20 6c 6f 67 20 72 | 65 63 6f 72 64 09 09 09 |is log r|ecord...|
|00005890| 2a 2f 0d 09 09 42 6f 6f | 6c 65 61 6e 33 32 09 09 |*/...Boo|lean32..|
|000058a0| 09 09 70 72 65 73 65 72 | 76 65 46 69 72 73 74 09 |..preser|veFirst.|
|000058b0| 09 09 2f 2a 20 54 52 55 | 45 20 74 6f 20 70 72 65 |../* TRU|E to pre|
|000058c0| 73 65 72 76 65 20 73 74 | 61 72 74 09 2a 2f 0d 09 |serve st|art.*/..|
|000058d0| 29 3b 0d 0d 2f 2a 20 2a | 20 2a 20 2a 20 2a 20 2a |);../* *| * * * *|
|000058e0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000058f0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005900| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005910| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005920| 20 2a 20 2a 20 2a 20 2a | 20 2a 0d 20 2a 20 45 6e | * * * *| *. * En|
|00005930| 61 62 6c 65 4c 6f 67 55 | 70 54 69 6d 65 0d 20 2a |ableLogU|pTime. *|
|00005940| 0d 20 2a 20 45 6e 61 62 | 6c 65 2f 64 69 73 61 62 |. * Enab|le/disab|
|00005950| 6c 65 20 72 65 63 6f 72 | 64 69 6e 67 20 6f 66 20 |le recor|ding of |
|00005960| 55 70 54 69 6d 65 20 77 | 68 65 6e 20 57 72 69 74 |UpTime w|hen Writ|
|00005970| 65 4c 6f 67 52 65 63 6f | 72 64 2e 20 52 65 74 75 |eLogReco|rd. Retu|
|00005980| 72 6e 73 20 74 68 65 20 | 6f 6c 64 20 73 74 61 74 |rns the |old stat|
|00005990| 65 2e 0d 20 2a 20 55 70 | 54 69 6d 65 20 67 65 6e |e.. * Up|Time gen|
|000059a0| 65 72 61 6c 6c 79 20 77 | 6f 75 6c 64 20 62 65 20 |erally w|ould be |
|000059b0| 6c 65 66 74 20 69 6e 20 | 69 74 73 20 6f 72 69 67 |left in |its orig|
|000059c0| 69 6e 61 6c 2c 20 65 6e | 61 62 6c 65 64 2c 20 73 |inal, en|abled, s|
|000059d0| 74 61 74 65 2e 20 54 68 | 65 20 73 74 61 74 65 20 |tate. Th|e state |
|000059e0| 6d 61 79 20 62 65 0d 20 | 2a 20 73 65 74 20 46 41 |may be. |* set FA|
|000059f0| 4c 53 45 20 74 6f 20 6d | 69 6e 69 6d 69 7a 65 20 |LSE to m|inimize |
|00005a00| 74 68 65 20 74 69 6d 65 | 20 6e 65 65 64 65 64 20 |the time| needed |
|00005a10| 74 6f 20 6c 6f 67 20 64 | 61 74 61 2e 20 49 66 20 |to log d|ata. If |
|00005a20| 73 65 74 20 46 41 4c 53 | 45 2c 20 74 69 6d 65 73 |set FALS|E, times|
|00005a30| 20 77 69 6c 6c 20 62 65 | 0d 20 2a 20 72 65 63 6f | will be|. * reco|
|00005a40| 72 64 65 64 20 61 73 20 | 7a 65 72 6f 2e 0d 20 2a |rded as |zero.. *|
|00005a50| 2f 0d 70 61 73 63 61 6c | 20 42 6f 6f 6c 65 61 6e |/.pascal| Boolean|
|00005a60| 33 32 09 09 09 45 6e 61 | 62 6c 65 4c 6f 67 55 70 |32...Ena|bleLogUp|
|00005a70| 54 69 6d 65 28 0d 09 09 | 4c 6f 67 52 65 63 6f 72 |Time(...|LogRecor|
|00005a80| 64 50 74 72 09 09 09 6c | 6f 67 52 65 63 6f 72 64 |dPtr...l|ogRecord|
|00005a90| 50 74 72 2c 09 09 09 2f | 2a 20 54 68 69 73 20 6c |Ptr,.../|* This l|
|00005aa0| 6f 67 20 72 65 63 6f 72 | 64 09 09 09 2a 2f 0d 09 |og recor|d...*/..|
|00005ab0| 09 42 6f 6f 6c 65 61 6e | 33 32 09 09 09 09 65 6e |.Boolean|32....en|
|00005ac0| 61 62 6c 65 55 70 54 69 | 6d 65 09 09 09 2f 2a 20 |ableUpTi|me.../* |
|00005ad0| 54 52 55 45 20 74 6f 20 | 65 6e 61 62 6c 65 20 55 |TRUE to |enable U|
|00005ae0| 70 54 69 6d 65 09 2a 2f | 0d 09 29 3b 0d 0d 2f 2a |pTime.*/|..);../*|
|00005af0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005b00| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005b10| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005b20| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005b30| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005b40| 20 2a 20 2a 0d 20 2a 20 | 47 65 74 4c 6f 67 53 65 | * *. * |GetLogSe|
|00005b50| 6d 61 70 68 6f 72 65 4c | 6f 73 74 43 6f 75 6e 74 |maphoreL|ostCount|
|00005b60| 65 72 0d 20 2a 0d 20 2a | 20 42 65 63 61 75 73 65 |er. *. *| Because|
|00005b70| 20 74 68 65 20 6c 6f 67 | 20 6c 69 62 72 61 72 79 | the log| library|
|00005b80| 20 75 73 65 73 20 61 20 | 22 6c 6f 73 73 79 22 20 | uses a |"lossy" |
|00005b90| 61 6c 67 6f 72 69 74 68 | 6d 20 74 6f 20 6d 61 69 |algorith|m to mai|
|00005ba0| 6e 74 61 69 6e 20 65 78 | 63 6c 75 73 69 76 65 20 |ntain ex|clusive |
|00005bb0| 61 63 63 65 73 73 20 74 | 6f 0d 20 2a 20 74 68 65 |access t|o. * the|
|00005bc0| 20 63 72 69 74 69 63 61 | 6c 20 73 65 63 74 69 6f | critica|l sectio|
|00005bd0| 6e 2c 20 74 68 65 72 65 | 20 69 73 20 61 20 76 65 |n, there| is a ve|
|00005be0| 72 79 20 73 6c 69 67 68 | 74 20 70 6f 73 73 69 62 |ry sligh|t possib|
|00005bf0| 69 6c 69 74 79 20 74 68 | 61 74 20 74 77 6f 20 70 |ility th|at two p|
|00005c00| 72 6f 63 65 73 73 65 73 | 20 77 69 6c 6c 0d 20 2a |rocesses| will. *|
|00005c10| 20 74 72 79 20 74 6f 20 | 61 63 63 65 73 73 20 74 | try to |access t|
|00005c20| 68 65 20 6c 6f 67 20 72 | 65 63 6f 72 64 20 61 74 |he log r|ecord at|
|00005c30| 20 74 68 65 20 73 61 6d | 65 20 74 69 6d 65 2e 20 | the sam|e time. |
|00005c40| 49 6e 20 74 68 69 73 20 | 63 61 73 65 2c 20 52 65 |In this |case, Re|
|00005c50| 61 64 4c 6f 67 45 6e 74 | 72 79 20 77 69 6c 6c 0d |adLogEnt|ry will.|
|00005c60| 20 2a 20 73 74 61 6c 6c | 20 28 6c 6f 6f 70 29 20 | * stall| (loop) |
|00005c70| 61 6e 64 20 65 76 65 6e | 74 75 61 6c 6c 79 20 73 |and even|tually s|
|00005c80| 75 63 63 65 65 64 2c 20 | 77 68 69 6c 65 20 57 72 |ucceed, |while Wr|
|00005c90| 69 74 65 4c 6f 67 45 6e | 74 72 79 20 77 69 6c 6c |iteLogEn|try will|
|00005ca0| 20 6c 6f 73 65 20 74 68 | 65 20 64 61 74 75 6d 2c | lose th|e datum,|
|00005cb0| 20 61 6e 64 0d 20 2a 20 | 69 6e 63 72 65 6d 65 6e | and. * |incremen|
|00005cc0| 74 20 74 68 65 20 6c 6f | 67 4c 6f 73 74 43 6f 75 |t the lo|gLostCou|
|00005cd0| 6e 74 65 72 2e 0d 20 2a | 2f 0d 70 61 73 63 61 6c |nter.. *|/.pascal|
|00005ce0| 20 55 49 6e 74 33 32 09 | 09 09 09 47 65 74 4c 6f | UInt32.|...GetLo|
|00005cf0| 67 53 65 6d 61 70 68 6f | 72 65 4c 6f 73 74 43 6f |gSemapho|reLostCo|
|00005d00| 75 6e 74 65 72 28 0d 09 | 09 4c 6f 67 52 65 63 6f |unter(..|.LogReco|
|00005d10| 72 64 50 74 72 09 09 09 | 6c 6f 67 52 65 63 6f 72 |rdPtr...|logRecor|
|00005d20| 64 50 74 72 09 09 09 2f | 2a 20 54 68 69 73 20 6c |dPtr.../|* This l|
|00005d30| 6f 67 20 72 65 63 6f 72 | 64 09 09 09 2a 2f 0d 09 |og recor|d...*/..|
|00005d40| 29 3b 0d 0d 2f 2a 20 2a | 20 2a 20 2a 20 2a 20 2a |);../* *| * * * *|
|00005d50| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005d60| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005d70| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005d80| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005d90| 20 2a 20 2a 20 2a 20 2a | 20 2a 0d 20 2a 20 46 6f | * * * *| *. * Fo|
|00005da0| 72 6d 61 74 4c 6f 67 45 | 6e 74 72 79 44 61 74 61 |rmatLogE|ntryData|
|00005db0| 0d 20 2a 0d 20 2a 20 54 | 68 69 73 20 66 75 6e 63 |. *. * T|his func|
|00005dc0| 74 69 6f 6e 20 69 73 20 | 69 6e 20 4c 6f 67 46 6f |tion is |in LogFo|
|00005dd0| 72 6d 61 74 2e 63 20 2d | 20 69 74 20 66 6f 72 6d |rmat.c -| it form|
|00005de0| 61 74 73 20 61 6e 20 65 | 6e 74 72 79 20 69 6e 74 |ats an e|ntry int|
|00005df0| 6f 20 61 20 73 69 6e 67 | 6c 65 20 6c 69 6e 65 0d |o a sing|le line.|
|00005e00| 20 2a 20 74 68 61 74 20 | 69 73 20 73 74 6f 72 65 | * that |is store|
|00005e10| 64 20 69 6e 20 74 68 65 | 20 72 65 73 75 6c 74 2e |d in the| result.|
|00005e20| 20 4e 6f 74 65 3a 20 6f | 6e 6c 79 20 74 68 65 20 | Note: o|nly the |
|00005e30| 64 61 74 61 20 69 73 20 | 66 6f 72 6d 61 74 74 65 |data is |formatte|
|00005e40| 64 3a 20 74 68 65 20 74 | 69 6d 65 73 74 61 6d 70 |d: the t|imestamp|
|00005e50| 0d 20 2a 20 69 73 20 6e | 6f 74 20 70 72 6f 63 65 |. * is n|ot proce|
|00005e60| 73 73 65 64 2e 20 54 68 | 69 73 20 66 75 6e 63 74 |ssed. Th|is funct|
|00005e70| 69 6f 6e 20 6d 61 79 20 | 62 65 20 63 61 6c 6c 65 |ion may |be calle|
|00005e80| 64 20 66 72 6f 6d 20 61 | 20 6e 6f 6e 2d 61 70 70 |d from a| non-app|
|00005e90| 6c 69 63 61 74 69 6f 6e | 20 63 6f 6e 74 65 78 74 |lication| context|
|00005ea0| 3b 0d 20 2a 20 49 74 20 | 64 6f 65 73 20 6e 6f 74 |;. * It |does not|
|00005eb0| 20 72 65 71 75 69 72 65 | 20 61 20 4d 69 78 65 64 | require| a Mixed|
|00005ec0| 4d 6f 64 65 20 73 77 69 | 74 63 68 2e 0d 20 2a 2f |Mode swi|tch.. */|
|00005ed0| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 09 09 09 09 |.pascal |void....|
|00005ee0| 09 46 6f 72 6d 61 74 4c | 6f 67 45 6e 74 72 79 44 |.FormatL|ogEntryD|
|00005ef0| 61 74 61 28 0d 09 09 63 | 6f 6e 73 74 20 4c 6f 67 |ata(...c|onst Log|
|00005f00| 45 6e 74 72 79 50 74 72 | 09 09 74 68 69 73 4c 6f |EntryPtr|..thisLo|
|00005f10| 67 45 6e 74 72 79 2c 09 | 09 09 2f 2a 20 46 6f 72 |gEntry,.|../* For|
|00005f20| 6d 61 74 20 74 68 69 73 | 20 65 6e 74 72 79 09 09 |mat this| entry..|
|00005f30| 2a 2f 0d 09 09 53 74 72 | 69 6e 67 50 74 72 09 09 |*/...Str|ingPtr..|
|00005f40| 09 09 72 65 73 75 6c 74 | 0d 09 29 3b 0d 0d 2f 2a |..result|..);../*|
|00005f50| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005f60| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005f70| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005f80| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005f90| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005fa0| 20 2a 20 2a 0d 20 2a 20 | 4c 6f 67 43 6f 6e 76 65 | * *. * |LogConve|
|00005fb0| 72 74 54 69 6d 65 73 74 | 61 6d 70 0d 20 2a 0d 20 |rtTimest|amp. *. |
|00005fc0| 2a 20 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |* This f|unction |
|00005fd0| 69 73 20 69 6e 20 4c 6f | 67 43 6f 6e 76 65 72 74 |is in Lo|gConvert|
|00005fe0| 54 69 6d 65 73 74 61 6d | 70 2e 63 20 2d 20 69 74 |Timestam|p.c - it|
|00005ff0| 20 66 6f 72 6d 61 74 73 | 20 74 68 65 20 74 69 6d | formats| the tim|
|00006000| 65 73 74 61 6d 70 20 69 | 6e 74 6f 20 63 69 76 69 |estamp i|nto civi|
|00006010| 6c 0d 20 2a 20 28 22 63 | 6c 6f 63 6b 22 29 20 74 |l. * ("c|lock") t|
|00006020| 69 6d 65 2c 20 72 65 74 | 75 72 6e 69 6e 67 20 74 |ime, ret|urning t|
|00006030| 68 65 20 72 65 73 75 6c | 74 20 69 6e 20 61 20 44 |he resul|t in a D|
|00006040| 61 74 65 54 69 6d 65 52 | 65 63 20 61 6e 64 20 61 |ateTimeR|ec and a|
|00006050| 6e 20 61 73 73 6f 63 69 | 61 74 65 64 20 72 65 73 |n associ|ated res|
|00006060| 69 64 75 61 6c 0d 20 2a | 20 6e 75 6d 62 65 72 20 |idual. *| number |
|00006070| 6f 66 20 6e 61 6e 6f 73 | 65 63 6f 6e 64 73 2e 20 |of nanos|econds. |
|00006080| 54 68 69 73 20 72 6f 75 | 74 69 6e 65 20 63 61 6c |This rou|tine cal|
|00006090| 6c 73 20 4d 61 63 69 6e | 74 6f 73 68 20 54 6f 6f |ls Macin|tosh Too|
|000060a0| 6c 62 6f 78 20 73 65 72 | 76 69 63 65 73 2e 20 49 |lbox ser|vices. I|
|000060b0| 74 20 69 73 20 6e 6f 74 | 0d 20 2a 20 69 6e 20 74 |t is not|. * in t|
|000060c0| 68 65 20 73 68 61 72 65 | 64 20 6c 69 62 72 61 72 |he share|d librar|
|000060d0| 79 2e 20 43 61 6c 6c 69 | 6e 67 20 73 65 71 75 65 |y. Calli|ng seque|
|000060e0| 6e 63 65 3a 0d 20 2a 09 | 09 4c 6f 67 45 6e 74 72 |nce:. *.|.LogEntr|
|000060f0| 79 52 65 63 6f 72 64 09 | 09 74 68 69 73 4c 6f 67 |yRecord.|.thisLog|
|00006100| 45 6e 74 72 79 3b 0d 20 | 2a 09 09 55 49 6e 74 33 |Entry;. |*..UInt3|
|00006110| 32 09 09 09 09 74 68 69 | 73 43 69 76 69 6c 54 69 |2....thi|sCivilTi|
|00006120| 6d 65 3b 0d 20 2a 09 09 | 44 61 74 65 54 69 6d 65 |me;. *..|DateTime|
|00006130| 52 65 63 09 09 09 74 68 | 69 73 44 61 74 65 54 69 |Rec...th|isDateTi|
|00006140| 6d 65 3b 0d 20 2a 09 09 | 55 49 6e 74 33 32 09 09 |me;. *..|UInt32..|
|00006150| 09 09 72 65 73 69 64 75 | 61 6c 4e 61 6e 6f 73 65 |..residu|alNanose|
|00006160| 63 6f 6e 64 73 3b 0d 20 | 2a 0d 20 2a 09 09 69 66 |conds;. |*. *..if|
|00006170| 20 28 52 65 61 64 4c 6f | 67 45 6e 74 72 79 28 6d | (ReadLo|gEntry(m|
|00006180| 79 4c 6f 67 52 65 63 6f | 72 64 50 74 72 2c 20 26 |yLogReco|rdPtr, &|
|00006190| 74 68 69 73 4c 6f 67 45 | 6e 74 72 79 29 29 20 7b |thisLogE|ntry)) {|
|000061a0| 0d 20 2a 09 09 09 4c 6f | 67 43 6f 6e 76 65 72 74 |. *...Lo|gConvert|
|000061b0| 54 69 6d 65 73 74 61 6d | 70 28 0d 20 2a 09 09 09 |Timestam|p(. *...|
|000061c0| 09 26 74 68 69 73 4c 6f | 67 45 6e 74 72 79 2c 0d |.&thisLo|gEntry,.|
|000061d0| 20 2a 09 09 09 09 26 74 | 68 69 73 44 61 74 65 54 | *....&t|hisDateT|
|000061e0| 69 6d 65 2c 0d 20 2a 09 | 09 09 09 26 72 65 73 69 |ime,. *.|...&resi|
|000061f0| 64 75 61 6c 4e 61 6e 6f | 73 65 63 6f 6e 64 73 0d |dualNano|seconds.|
|00006200| 20 2a 09 09 09 29 3b 0d | 20 2a 09 09 7d 0d 20 2a | *...);.| *..}. *|
|00006210| 20 74 68 69 73 43 69 76 | 69 6c 54 69 6d 65 20 77 | thisCiv|ilTime w|
|00006220| 69 6c 6c 20 68 61 76 65 | 20 74 68 65 20 63 69 76 |ill have| the civ|
|00006230| 69 6c 20 74 69 6d 65 20 | 28 73 65 63 6f 6e 64 73 |il time |(seconds|
|00006240| 20 73 69 6e 63 65 20 31 | 39 30 34 29 20 77 68 65 | since 1|904) whe|
|00006250| 6e 20 74 68 65 20 65 6e | 74 72 79 20 77 61 73 0d |n the en|try was.|
|00006260| 20 2a 20 73 74 6f 72 65 | 64 20 69 6e 74 6f 20 74 | * store|d into t|
|00006270| 68 65 20 6c 6f 67 2e 20 | 74 68 69 73 44 61 74 65 |he log. |thisDate|
|00006280| 54 69 6d 65 20 77 69 6c | 6c 20 68 61 76 65 20 74 |Time wil|l have t|
|00006290| 68 65 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 |he corre|sponding|
|000062a0| 20 63 69 76 69 6c 20 64 | 61 74 65 0d 20 2a 20 28 | civil d|ate. * (|
|000062b0| 59 65 61 72 2c 20 4d 6f | 6e 74 68 2c 20 44 61 79 |Year, Mo|nth, Day|
|000062c0| 2c 20 48 6f 75 72 2c 20 | 4d 69 6e 75 74 65 2c 20 |, Hour, |Minute, |
|000062d0| 53 65 63 6f 6e 64 29 0d | 20 2a 2f 0d 70 61 73 63 |Second).| */.pasc|
|000062e0| 61 6c 20 76 6f 69 64 09 | 09 09 09 09 4c 6f 67 43 |al void.|....LogC|
|000062f0| 6f 6e 76 65 72 74 54 69 | 6d 65 73 74 61 6d 70 28 |onvertTi|mestamp(|
|00006300| 0d 09 09 63 6f 6e 73 74 | 20 4c 6f 67 45 6e 74 72 |...const| LogEntr|
|00006310| 79 50 74 72 09 09 6c 6f | 67 45 6e 74 72 79 50 74 |yPtr..lo|gEntryPt|
|00006320| 72 2c 09 09 09 2f 2a 20 | 43 75 72 72 65 6e 74 20 |r,.../* |Current |
|00006330| 6c 6f 67 20 65 6e 74 72 | 79 09 09 2a 2f 0d 09 09 |log entr|y..*/...|
|00006340| 44 61 74 65 54 69 6d 65 | 52 65 63 09 09 09 09 2a |DateTime|Rec....*|
|00006350| 65 76 65 6e 74 44 61 74 | 65 54 69 6d 65 2c 09 09 |eventDat|eTime,..|
|00006360| 09 2f 2a 20 59 65 61 72 | 2c 20 4d 6f 6e 74 68 2c |./* Year|, Month,|
|00006370| 20 44 61 79 20 65 74 63 | 2e 09 2a 2f 0d 09 09 55 | Day etc|..*/...U|
|00006380| 49 6e 74 33 32 09 09 09 | 09 09 2a 72 65 73 69 64 |Int32...|..*resid|
|00006390| 75 61 6c 4e 61 6e 6f 73 | 65 63 6f 6e 64 73 09 2f |ualNanos|econds./|
|000063a0| 2a 20 46 72 61 63 74 69 | 6f 6e 61 6c 20 73 65 63 |* Fracti|onal sec|
|000063b0| 6f 6e 64 09 09 2a 2f 0d | 09 29 3b 0d 0d 2f 2a 20 |ond..*/.|.);../* |
|000063c0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000063d0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000063e0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000063f0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.