home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-09-11 | 2.3 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: CExample.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Sep 11 22:58:55 1995, modified Mon Sep 11 22:58:55 1995, creator 'CWIE', type ASCII, 1606 bytes "CExample.c" , at 0x6c6 428 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 | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 43 45 78 61 6d 70 | 6c 65 2e 63 00 00 00 00 |..CExamp|le.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 06 46 00 | 00 01 ac ac 7a a7 ef ac |......F.|....z...|
|00000060| 7a a7 ef 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |z.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4f 13 00 00 |........|....O...|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00000090| 68 3e 0d 0d 23 69 6e 63 | 6c 75 64 65 20 3c 54 79 |h>..#inc|lude <Ty|
|000000a0| 70 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |pes.h>.#|include |
|000000b0| 3c 46 69 6c 65 73 2e 68 | 3e 0d 0d 23 69 66 6e 64 |<Files.h|>..#ifnd|
|000000c0| 65 66 20 54 48 49 4e 4b | 5f 43 0d 23 69 6e 63 6c |ef THINK|_C.#incl|
|000000d0| 75 64 65 20 3c 53 74 72 | 69 6e 67 73 2e 68 3e 0d |ude <Str|ings.h>.|
|000000e0| 23 65 6e 64 69 66 0d 0d | 23 69 6e 63 6c 75 64 65 |#endif..|#include|
|000000f0| 20 3c 49 43 54 79 70 65 | 73 2e 68 3e 0d 23 69 6e | <ICType|s.h>.#in|
|00000100| 63 6c 75 64 65 20 3c 49 | 43 41 50 49 2e 68 3e 0d |clude <I|CAPI.h>.|
|00000110| 23 69 6e 63 6c 75 64 65 | 20 3c 49 43 4b 65 79 73 |#include| <ICKeys|
|00000120| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 49 43 |.h>.#inc|lude <IC|
|00000130| 43 41 50 49 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |CAPI.h>.|#include|
|00000140| 20 3c 49 43 43 6f 6d 70 | 6f 6e 65 6e 74 53 65 6c | <ICComp|onentSel|
|00000150| 65 63 74 6f 72 73 2e 68 | 3e 0d 0d 76 6f 69 64 20 |ectors.h|>..void |
|00000160| 44 75 6d 70 50 72 65 66 | 73 28 76 6f 69 64 29 3b |DumpPref|s(void);|
|00000170| 0d 0d 49 43 49 6e 73 74 | 61 6e 63 65 20 69 6e 73 |..ICInst|ance ins|
|00000180| 74 3b 0d 0d 76 6f 69 64 | 20 54 65 73 74 43 20 28 |t;..void| TestC (|
|00000190| 29 3b 0d 76 6f 69 64 20 | 54 65 73 74 43 20 28 29 |);.void |TestC ()|
|000001a0| 20 7b 0d 09 49 43 45 72 | 72 6f 72 20 65 72 72 3b | {..ICEr|ror err;|
|000001b0| 0d 09 49 43 44 69 72 53 | 70 65 63 41 72 72 61 79 |..ICDirS|pecArray|
|000001c0| 20 66 6f 6c 64 65 72 5f | 73 70 65 63 3b 0d 09 53 | folder_|spec;..S|
|000001d0| 74 72 32 35 35 20 65 6d | 61 69 6c 5f 61 64 64 72 |tr255 em|ail_addr|
|000001e0| 65 73 73 3b 0d 09 6c 6f | 6e 67 20 61 74 74 72 3b |ess;..lo|ng attr;|
|000001f0| 0d 09 6c 6f 6e 67 20 73 | 69 7a 65 3b 0d 09 6c 6f |..long s|ize;..lo|
|00000200| 6e 67 20 73 65 65 64 3b | 0d 0d 09 65 72 72 20 3d |ng seed;|...err =|
|00000210| 20 49 43 53 74 61 72 74 | 28 26 69 6e 73 74 2c 20 | ICStart|(&inst, |
|00000220| 27 43 52 45 41 27 29 3b | 09 09 09 2f 2a 20 74 65 |'CREA');|.../* te|
|00000230| 6c 6c 20 69 74 20 79 6f | 75 72 20 61 70 70 6c 69 |ll it yo|ur appli|
|00000240| 63 61 74 69 6f 6e 20 63 | 72 65 61 74 6f 72 20 2a |cation c|reator *|
|00000250| 2f 0d 09 70 72 69 6e 74 | 66 28 22 49 43 53 74 61 |/..print|f("ICSta|
|00000260| 72 74 3a 20 25 6c 64 5c | 6e 22 2c 20 65 72 72 29 |rt: %ld\|n", err)|
|00000270| 3b 0d 0d 09 66 6f 6c 64 | 65 72 5f 73 70 65 63 5b |;...fold|er_spec[|
|00000280| 30 5d 2e 76 52 65 66 4e | 75 6d 20 3d 20 2d 31 3b |0].vRefN|um = -1;|
|00000290| 09 09 09 09 09 09 09 09 | 2f 2a 20 73 65 61 72 63 |........|/* searc|
|000002a0| 68 20 66 6f 72 20 70 72 | 65 66 73 20 69 6e 20 72 |h for pr|efs in r|
|000002b0| 6f 6f 74 20 6f 66 20 74 | 68 65 20 73 79 73 74 65 |oot of t|he syste|
|000002c0| 6d 20 2a 2f 0d 09 66 6f | 6c 64 65 72 5f 73 70 65 |m */..fo|lder_spe|
|000002d0| 63 5b 30 5d 2e 64 69 72 | 49 44 20 3d 20 32 3b 09 |c[0].dir|ID = 2;.|
|000002e0| 09 09 09 09 09 09 09 09 | 09 2f 2a 20 76 6f 6c 75 |........|./* volu|
|000002f0| 6d 65 2c 20 6f 62 76 69 | 6f 75 73 6c 79 20 79 6f |me, obvi|ously yo|
|00000300| 75 27 64 20 75 73 65 20 | 6f 74 68 65 72 20 74 68 |u'd use |other th|
|00000310| 69 6e 67 73 20 2a 2f 0d | 09 65 72 72 20 3d 20 49 |ings */.|.err = I|
|00000320| 43 46 69 6e 64 43 6f 6e | 66 69 67 46 69 6c 65 28 |CFindCon|figFile(|
|00000330| 69 6e 73 74 2c 20 31 2c | 20 28 49 43 44 69 72 53 |inst, 1,| (ICDirS|
|00000340| 70 65 63 41 72 72 61 79 | 50 74 72 29 20 26 66 6f |pecArray|Ptr) &fo|
|00000350| 6c 64 65 72 5f 73 70 65 | 63 29 3b 0d 09 70 72 69 |lder_spe|c);..pri|
|00000360| 6e 74 66 28 22 49 43 46 | 69 6e 64 43 6f 6e 66 69 |ntf("ICF|indConfi|
|00000370| 67 46 69 6c 65 3a 20 25 | 6c 64 5c 6e 22 2c 20 65 |gFile: %|ld\n", e|
|00000380| 72 72 29 3b 0d 0d 09 65 | 72 72 20 3d 20 49 43 42 |rr);...e|rr = ICB|
|00000390| 65 67 69 6e 28 69 6e 73 | 74 2c 20 69 63 52 65 61 |egin(ins|t, icRea|
|000003a0| 64 57 72 69 74 65 50 65 | 72 6d 29 3b 0d 09 70 72 |dWritePe|rm);..pr|
|000003b0| 69 6e 74 66 28 22 49 43 | 42 65 67 69 6e 3a 20 25 |intf("IC|Begin: %|
|000003c0| 6c 64 5c 6e 22 2c 20 65 | 72 72 29 3b 0d 09 73 69 |ld\n", e|rr);..si|
|000003d0| 7a 65 20 3d 20 73 69 7a | 65 6f 66 28 65 6d 61 69 |ze = siz|eof(emai|
|000003e0| 6c 5f 61 64 64 72 65 73 | 73 29 3b 0d 09 65 72 72 |l_addres|s);..err|
|000003f0| 20 3d 20 49 43 47 65 74 | 50 72 65 66 28 69 6e 73 | = ICGet|Pref(ins|
|00000400| 74 2c 20 22 5c 70 45 6d | 61 69 6c 22 2c 20 26 61 |t, "\pEm|ail", &a|
|00000410| 74 74 72 2c 20 28 50 74 | 72 29 20 65 6d 61 69 6c |ttr, (Pt|r) email|
|00000420| 5f 61 64 64 72 65 73 73 | 2c 20 26 73 69 7a 65 29 |_address|, &size)|
|00000430| 3b 0d 09 70 72 69 6e 74 | 66 28 22 49 43 47 65 74 |;..print|f("ICGet|
|00000440| 50 72 65 66 3a 20 25 6c | 64 5c 6e 22 2c 20 65 72 |Pref: %l|d\n", er|
|00000450| 72 29 3b 0d 09 0d 09 70 | 32 63 73 74 72 28 65 6d |r);....p|2cstr(em|
|00000460| 61 69 6c 5f 61 64 64 72 | 65 73 73 29 3b 0d 09 70 |ail_addr|ess);..p|
|00000470| 72 69 6e 74 66 28 22 59 | 6f 75 72 20 45 6d 61 69 |rintf("Y|our Emai|
|00000480| 6c 20 61 64 64 72 65 73 | 73 20 69 73 20 25 73 5c |l addres|s is %s\|
|00000490| 6e 22 2c 20 65 6d 61 69 | 6c 5f 61 64 64 72 65 73 |n", emai|l_addres|
|000004a0| 73 29 3b 0d 09 44 75 6d | 70 50 72 65 66 73 28 29 |s);..Dum|pPrefs()|
|000004b0| 3b 0d 09 65 72 72 20 3d | 20 49 43 45 6e 64 28 69 |;..err =| ICEnd(i|
|000004c0| 6e 73 74 29 3b 0d 09 70 | 72 69 6e 74 66 28 22 49 |nst);..p|rintf("I|
|000004d0| 43 45 6e 64 3a 20 25 6c | 64 5c 6e 22 2c 20 65 72 |CEnd: %l|d\n", er|
|000004e0| 72 29 3b 0d 0d 09 65 72 | 72 20 3d 20 49 43 47 65 |r);...er|r = ICGe|
|000004f0| 74 53 65 65 64 28 69 6e | 73 74 2c 20 26 73 65 65 |tSeed(in|st, &see|
|00000500| 64 29 3b 0d 09 70 72 69 | 6e 74 66 28 22 49 43 47 |d);..pri|ntf("ICG|
|00000510| 65 74 53 65 65 64 3a 20 | 25 6c 64 20 3d 20 25 6c |etSeed: |%ld = %l|
|00000520| 64 5c 6e 22 2c 20 65 72 | 72 2c 20 73 65 65 64 29 |d\n", er|r, seed)|
|00000530| 3b 0d 09 2f 2a 20 6e 6f | 77 20 6d 6f 6e 69 74 6f |;../* no|w monito|
|00000540| 72 20 74 68 69 73 20 73 | 65 65 64 20 74 6f 20 73 |r this s|eed to s|
|00000550| 65 65 20 69 66 20 61 6e | 79 20 70 72 65 66 65 72 |ee if an|y prefer|
|00000560| 65 6e 63 65 73 20 68 61 | 76 65 20 63 68 61 6e 67 |ences ha|ve chang|
|00000570| 65 64 20 2a 2f 0d 0d 09 | 65 72 72 20 3d 20 49 43 |ed */...|err = IC|
|00000580| 53 74 6f 70 28 69 6e 73 | 74 29 3b 0d 09 70 72 69 |Stop(ins|t);..pri|
|00000590| 6e 74 66 28 22 49 43 53 | 74 6f 70 3a 20 25 6c 64 |ntf("ICS|top: %ld|
|000005a0| 5c 6e 22 2c 20 65 72 72 | 29 3b 0d 7d 0d 0d 76 6f |\n", err|);.}..vo|
|000005b0| 69 64 20 44 75 6d 70 50 | 72 65 66 73 28 29 0d 7b |id DumpP|refs().{|
|000005c0| 0d 09 49 43 45 72 72 6f | 72 20 65 72 72 3b 0d 09 |..ICErro|r err;..|
|000005d0| 6c 6f 6e 67 20 63 6f 75 | 6e 74 3b 0d 09 6c 6f 6e |long cou|nt;..lon|
|000005e0| 67 20 69 3b 0d 09 53 74 | 72 32 35 35 20 6b 65 79 |g i;..St|r255 key|
|000005f0| 3b 0d 09 0d 09 65 72 72 | 20 3d 20 49 43 43 6f 75 |;....err| = ICCou|
|00000600| 6e 74 50 72 65 66 28 69 | 6e 73 74 2c 20 26 63 6f |ntPref(i|nst, &co|
|00000610| 75 6e 74 29 3b 0d 09 70 | 72 69 6e 74 66 28 22 49 |unt);..p|rintf("I|
|00000620| 43 43 6f 75 6e 74 50 72 | 65 66 3a 20 25 6c 64 5c |CCountPr|ef: %ld\|
|00000630| 6e 22 2c 20 65 72 72 29 | 3b 0d 09 66 6f 72 20 28 |n", err)|;..for (|
|00000640| 69 20 3d 20 31 3b 20 69 | 20 3c 3d 20 63 6f 75 6e |i = 1; i| <= coun|
|00000650| 74 3b 20 69 2b 2b 29 20 | 7b 0d 09 09 65 72 72 20 |t; i++) |{...err |
|00000660| 3d 20 49 43 47 65 74 49 | 6e 64 50 72 65 66 28 69 |= ICGetI|ndPref(i|
|00000670| 6e 73 74 2c 20 69 2c 20 | 6b 65 79 29 3b 0d 09 09 |nst, i, |key);...|
|00000680| 70 32 63 73 74 72 28 6b | 65 79 29 3b 0d 09 09 70 |p2cstr(k|ey);...p|
|00000690| 72 69 6e 74 66 28 22 20 | 20 49 43 47 65 74 49 6e |rintf(" | ICGetIn|
|000006a0| 64 50 72 65 66 3a 20 25 | 6c 64 20 2d 20 25 73 5c |dPref: %|ld - %s\|
|000006b0| 6e 22 2c 20 65 72 72 2c | 20 26 6b 65 79 29 3b 0d |n", err,| &key);.|
|000006c0| 09 7d 3b 0d 7d 0d 00 00 | 00 00 00 00 00 00 00 00 |.};.}...|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000710| 33 45 38 30 3b 0d 46 55 | 4e 43 54 49 4f 4e 20 50 |3E80;.FU|NCTION P|
|00000720| 42 53 65 74 45 4f 46 28 | 70 61 72 61 6d 42 6c 6f |BSetEOF(|paramBlo|
|00000730| 0a 43 45 78 61 6d 70 6c | 65 2e 63 00 02 00 00 00 |.CExampl|e.c.....|
|00000740| 54 45 58 54 43 57 49 45 | 01 00 00 00 00 00 00 00 |TEXTCWIE|........|
|00000750| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 00 00 00 |..TEXTCW|IE......|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 a9 a6 e5 13 00 00 | 06 46 00 00 01 ac 6c 6b |........|.F....lk|
|00000780| 50 74 72 29 3a 20 4f 53 | 45 72 72 3b 0d 20 49 4e |Ptr): OS|Err;. IN|
|00000790| 4c 49 4e 45 20 24 32 30 | 35 46 2c 24 41 30 31 32 |LINE $20|5F,$A012|
|000007a0| 2c 24 33 45 38 30 3b 0d | 46 55 4e 43 54 49 4f 4e |,$3E80;.|FUNCTION|
|000007b0| 20 50 42 53 65 74 45 4f | 46 41 73 79 6e 63 28 70 | PBSetEO|FAsync(p|
|000007c0| 61 72 61 6d 42 6c 6f 63 | 6b 3a 20 50 61 72 6d 42 |aramBloc|k: ParmB|
|000007d0| 6c 6b 50 74 72 29 3a 20 | 4f 53 45 72 72 3b 0d 20 |lkPtr): |OSErr;. |
|000007e0| 49 4e 4c 49 4e 45 20 24 | 32 30 35 46 2c 24 41 34 |INLINE $|205F,$A4|
|000007f0| 31 32 2c 24 33 45 38 30 | 3b 0d 46 55 4e 43 54 49 |12,$3E80|;.FUNCTI|
|00000800| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 06 | 00 02 00 2a 00 03 01 d1 |........|...*....|
|00000830| 01 ff 00 35 00 04 01 dc | 02 00 ab bf 4a d5 00 00 |...5....|....J...|
|00000840| 00 a4 00 00 00 a4 00 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000850| 00 2a 00 03 01 d1 01 ff | 00 35 00 04 01 dc 02 00 |.*......|.5......|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 28 |.....n..|.n...>.(|
|00000880| 26 f8 0e 54 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |&..T....|.>..MPSR|
|00000890| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000008a0| 03 f0 ff ff 00 00 00 4c | 00 2a 82 40 00 00 00 00 |.......L|.*.@....|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+