/ Sams Teach Yourself C in 21 Days (6th Edition)
/ STYC216E.ISO / mac / Examples / Day17 / strspn.c ![]() | < prev | next > |
MacBinary | 2002-08-11 | 1.1 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 |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, Sun Aug 11 10:38:22 2002, modified Sun Aug 11 10:38:22 2002, creator 'LMAN', type ASCII, 555 bytes "strspn.c" , at 0x2ab 286 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 | [LMAN] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 73 74 72 73 70 6e | 2e 63 00 00 00 00 00 00 |..strspn|.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 2b 00 | 00 01 1e b9 7c 27 5e b9 |......+.|....|'^.|
|00000060| 7c 27 5e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 ||'^.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4a ce 00 00 |........|....J...|
|00000080| 2f 2a 20 53 65 61 72 63 | 68 69 6e 67 20 77 69 74 |/* Searc|hing wit|
|00000090| 68 20 73 74 72 73 70 6e | 28 29 2e 20 2a 2f 0d 0a |h strspn|(). */..|
|000000a0| 0d 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 64 69 |..#inclu|de <stdi|
|000000b0| 6f 2e 68 3e 0d 0a 23 69 | 6e 63 6c 75 64 65 20 3c |o.h>..#i|nclude <|
|000000c0| 73 74 72 69 6e 67 2e 68 | 3e 0d 0a 0d 0a 69 6e 74 |string.h|>....int|
|000000d0| 20 6d 61 69 6e 28 20 76 | 6f 69 64 20 29 0d 0a 7b | main( v|oid )..{|
|000000e0| 0d 0a 20 20 20 20 63 68 | 61 72 20 20 62 75 66 31 |.. ch|ar buf1|
|000000f0| 5b 38 30 5d 2c 20 62 75 | 66 32 5b 38 30 5d 3b 0d |[80], bu|f2[80];.|
|00000100| 0a 20 20 20 20 73 69 7a | 65 5f 74 20 6c 6f 63 3b |. siz|e_t loc;|
|00000110| 0d 0a 0d 0a 20 20 20 20 | 2f 2a 20 49 6e 70 75 74 |.... |/* Input|
|00000120| 20 74 68 65 20 73 74 72 | 69 6e 67 73 2e 20 2a 2f | the str|ings. */|
|00000130| 0d 0a 0d 0a 20 20 20 20 | 70 72 69 6e 74 66 28 22 |.... |printf("|
|00000140| 45 6e 74 65 72 20 74 68 | 65 20 73 74 72 69 6e 67 |Enter th|e string|
|00000150| 20 74 6f 20 62 65 20 73 | 65 61 72 63 68 65 64 3a | to be s|earched:|
|00000160| 20 22 29 3b 0d 0a 20 20 | 20 20 67 65 74 73 28 62 | ");.. | gets(b|
|00000170| 75 66 31 29 3b 0d 0a 20 | 20 20 20 70 72 69 6e 74 |uf1);.. | print|
|00000180| 66 28 22 45 6e 74 65 72 | 20 74 68 65 20 73 74 72 |f("Enter| the str|
|00000190| 69 6e 67 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 74 |ing cont|aining t|
|000001a0| 61 72 67 65 74 20 63 68 | 61 72 61 63 74 65 72 73 |arget ch|aracters|
|000001b0| 3a 20 22 29 3b 0d 0a 20 | 20 20 20 67 65 74 73 28 |: ");.. | gets(|
|000001c0| 62 75 66 32 29 3b 0d 0a | 0d 0a 20 20 20 20 2f 2a |buf2);..|.. /*|
|000001d0| 20 50 65 72 66 6f 72 6d | 20 74 68 65 20 73 65 61 | Perform| the sea|
|000001e0| 72 63 68 2e 20 2a 2f 0d | 0a 0d 0a 20 20 20 20 6c |rch. */.|... l|
|000001f0| 6f 63 20 3d 20 73 74 72 | 73 70 6e 28 62 75 66 31 |oc = str|spn(buf1|
|00000200| 2c 20 62 75 66 32 29 3b | 0d 0a 0d 0a 20 20 20 20 |, buf2);|.... |
|00000210| 69 66 20 28 20 6c 6f 63 | 20 3d 3d 20 20 30 20 29 |if ( loc| == 0 )|
|00000220| 0d 0a 20 20 20 20 20 20 | 20 20 70 72 69 6e 74 66 |.. | printf|
|00000230| 28 22 4e 6f 20 6d 61 74 | 63 68 20 77 61 73 20 66 |("No mat|ch was f|
|00000240| 6f 75 6e 64 2e 5c 6e 22 | 29 3b 0d 0a 20 20 20 20 |ound.\n"|);.. |
|00000250| 65 6c 73 65 0d 0a 20 20 | 20 20 20 20 20 20 70 72 |else.. | pr|
|00000260| 69 6e 74 66 28 22 43 68 | 61 72 61 63 74 65 72 73 |intf("Ch|aracters|
|00000270| 20 6d 61 74 63 68 20 75 | 70 20 74 6f 20 70 6f 73 | match u|p to pos|
|00000280| 69 74 69 6f 6e 20 25 64 | 2e 5c 6e 22 2c 20 6c 6f |ition %d|.\n", lo|
|00000290| 63 2d 31 29 3b 0d 0a 20 | 20 20 20 72 65 74 75 72 |c-1);.. | retur|
|000002a0| 6e 20 30 3b 0d 0a 7d 0d | 0a 0d 0a 00 00 00 00 00 |n 0;..}.|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000310| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|00000320| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|00000330| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|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 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|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 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000410| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+