/ Sams Teach Yourself C in 21 Days (6th Edition)
/ STYC216E.ISO / mac / Examples / Day06 / do.c ![]() | next > |
MacBinary | 2002-04-16 | 1.3 KB | [TEXT/LMAN] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
66% | dexvert | Compact Compressed (Unix) (archive/compact) | ext | Supported |
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
10% | dexvert | Jesper Olsen Module (music/jesperOlsen) | magic | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | TTComp archive data, binary, 1K dictionary | default (weak) | |
99% | file | MacBinary II, Tue Apr 16 22:54:16 2002, modified Tue Apr 16 22:54:16 2002, creator 'LMAN', type ASCII, 693 bytes "do.c" , at 0x335 286 bytes resource | default (weak) | |
98% | file | data | default | |
49% | TrID | Macintosh plain text (MacBinary) | default | |
33% | TrID | TTComp archive compressed (bin-1K) | default (weak) | |
16% | TrID | MacBinary 2 | default (weak) | |
0% | TrID | Sybase iAnywhere database files | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [LMAN] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 04 64 6f 2e 63 00 00 | 00 00 00 00 00 00 00 00 |..do.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 4c 4d 41 | 4e 00 00 ff ff ff ff 00 |.TEXTLMA|N.......|
|00000050| 00 00 00 00 00 02 b5 00 | 00 01 1e b8 e2 94 58 b8 |........|......X.|
|00000060| e2 94 58 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..X.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7a 04 00 00 |........|....z...|
|00000080| 2f 2a 20 44 65 6d 6f 6e | 73 74 72 61 74 65 73 20 |/* Demon|strates |
|00000090| 61 20 73 69 6d 70 6c 65 | 20 64 6f 2e 2e 2e 77 68 |a simple| do...wh|
|000000a0| 69 6c 65 20 73 74 61 74 | 65 6d 65 6e 74 20 2a 2f |ile stat|ement */|
|000000b0| 0d 0a 0d 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |....#inc|lude <st|
|000000c0| 64 69 6f 2e 68 3e 0d 0a | 0d 0a 69 6e 74 20 67 65 |dio.h>..|..int ge|
|000000d0| 74 5f 6d 65 6e 75 5f 63 | 68 6f 69 63 65 28 20 76 |t_menu_c|hoice( v|
|000000e0| 6f 69 64 20 29 3b 0d 0a | 0d 0a 69 6e 74 20 6d 61 |oid );..|..int ma|
|000000f0| 69 6e 28 20 76 6f 69 64 | 20 29 0d 0a 7b 0d 0a 20 |in( void| )..{.. |
|00000100| 20 20 20 69 6e 74 20 63 | 68 6f 69 63 65 3b 0d 0a | int c|hoice;..|
|00000110| 0d 0a 20 20 20 20 63 68 | 6f 69 63 65 20 3d 20 67 |.. ch|oice = g|
|00000120| 65 74 5f 6d 65 6e 75 5f | 63 68 6f 69 63 65 28 29 |et_menu_|choice()|
|00000130| 3b 0d 0a 0d 0a 20 20 20 | 20 70 72 69 6e 74 66 28 |;.... | printf(|
|00000140| 22 59 6f 75 20 63 68 6f | 73 65 20 4d 65 6e 75 20 |"You cho|se Menu |
|00000150| 4f 70 74 69 6f 6e 20 25 | 64 5c 6e 22 2c 20 63 68 |Option %|d\n", ch|
|00000160| 6f 69 63 65 20 29 3b 0d | 0a 0d 0a 20 20 20 20 72 |oice );.|... r|
|00000170| 65 74 75 72 6e 20 30 3b | 0d 0a 7d 0d 0a 0d 0a 69 |eturn 0;|..}....i|
|00000180| 6e 74 20 67 65 74 5f 6d | 65 6e 75 5f 63 68 6f 69 |nt get_m|enu_choi|
|00000190| 63 65 28 20 76 6f 69 64 | 20 29 0d 0a 7b 0d 0a 20 |ce( void| )..{.. |
|000001a0| 20 20 20 69 6e 74 20 73 | 65 6c 65 63 74 69 6f 6e | int s|election|
|000001b0| 20 3d 20 30 3b 0d 0a 0d | 0a 20 20 20 20 64 6f 0d | = 0;...|. do.|
|000001c0| 0a 20 20 20 20 7b 0d 0a | 20 20 20 20 20 20 20 20 |. {..| |
|000001d0| 70 72 69 6e 74 66 28 22 | 5c 6e 22 20 29 3b 0d 0a |printf("|\n" );..|
|000001e0| 20 20 20 20 20 20 20 20 | 70 72 69 6e 74 66 28 22 | |printf("|
|000001f0| 5c 6e 31 20 2d 20 41 64 | 64 20 61 20 52 65 63 6f |\n1 - Ad|d a Reco|
|00000200| 72 64 22 20 29 3b 0d 0a | 20 20 20 20 20 20 20 20 |rd" );..| |
|00000210| 70 72 69 6e 74 66 28 22 | 5c 6e 32 20 2d 20 43 68 |printf("|\n2 - Ch|
|00000220| 61 6e 67 65 20 61 20 72 | 65 63 6f 72 64 22 29 3b |ange a r|ecord");|
|00000230| 0d 0a 20 20 20 20 20 20 | 20 20 70 72 69 6e 74 66 |.. | printf|
|00000240| 28 22 5c 6e 33 20 2d 20 | 44 65 6c 65 74 65 20 61 |("\n3 - |Delete a|
|00000250| 20 72 65 63 6f 72 64 22 | 29 3b 0d 0a 20 20 20 20 | record"|);.. |
|00000260| 20 20 20 20 70 72 69 6e | 74 66 28 22 5c 6e 34 20 | prin|tf("\n4 |
|00000270| 2d 20 51 75 69 74 22 29 | 3b 0d 0a 20 20 20 20 20 |- Quit")|;.. |
|00000280| 20 20 20 70 72 69 6e 74 | 66 28 22 5c 6e 22 20 29 | print|f("\n" )|
|00000290| 3b 0d 0a 20 20 20 20 20 | 20 20 20 70 72 69 6e 74 |;.. | print|
|000002a0| 66 28 22 5c 6e 45 6e 74 | 65 72 20 61 20 73 65 6c |f("\nEnt|er a sel|
|000002b0| 65 63 74 69 6f 6e 3a 20 | 22 20 29 3b 0d 0a 0d 0a |ection: |" );....|
|000002c0| 20 20 20 20 20 20 20 20 | 73 63 61 6e 66 28 22 25 | |scanf("%|
|000002d0| 64 22 2c 20 26 73 65 6c | 65 63 74 69 6f 6e 20 29 |d", &sel|ection )|
|000002e0| 3b 0d 0a 0d 0a 20 20 20 | 20 20 7d 77 68 69 6c 65 |;.... | }while|
|000002f0| 20 28 20 73 65 6c 65 63 | 74 69 6f 6e 20 3c 20 31 | ( selec|tion < 1|
|00000300| 20 7c 7c 20 73 65 6c 65 | 63 74 69 6f 6e 20 3e 20 | || sele|ction > |
|00000310| 34 20 29 3b 0d 0a 0d 0a | 20 20 20 20 20 72 65 74 |4 );....| ret|
|00000320| 75 72 6e 20 73 65 6c 65 | 63 74 69 6f 6e 3b 0d 0a |urn sele|ction;..|
|00000330| 7d 0d 0a 0d 0a 00 00 00 | 00 00 00 00 00 00 00 00 |}.......|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000390| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|000003a0| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|000003b0| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+