home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Updaters / WhiteCap 3.0.4 / WhiteCap Source.sit / WhiteCap Source / Common / io / ConfigFile.cpp < prev    next >
MacBinary  |  1999-07-13  |  1.5 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: ConfigFile.cpp

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Jul 13 21:53:57 1999, modified Tue Jul 13 21:53:57 1999, creator 'CWIE', type ASCII, 842 bytes "ConfigFile.cpp" , at 0x3ca 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 43 6f 6e 66 69 67 | 46 69 6c 65 2e 63 70 70 |..Config|File.cpp|
|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 03 4a 00 | 00 01 9a b3 b1 9e 35 b3 |......J.|......5.|
|00000060| b1 9e 35 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..5.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3f fc 00 00 |........|....?...|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 22 43 6f 6e 66 69 67 |#include| "Config|
|00000090| 46 69 6c 65 2e 68 22 0d | 0d 23 69 6e 63 6c 75 64 |File.h".|.#includ|
|000000a0| 65 20 22 43 45 67 46 69 | 6c 65 53 70 65 63 2e 68 |e "CEgFi|leSpec.h|
|000000b0| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 43 45 67 49 |".#inclu|de "CEgI|
|000000c0| 46 69 6c 65 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |File.h".|#include|
|000000d0| 20 22 41 72 67 4c 69 73 | 74 2e 68 22 0d 0d 0d 62 | "ArgLis|t.h"...b|
|000000e0| 6f 6f 6c 20 43 6f 6e 66 | 69 67 46 69 6c 65 3a 3a |ool Conf|igFile::|
|000000f0| 4c 6f 61 64 28 20 63 6f | 6e 73 74 20 43 45 67 46 |Load( co|nst CEgF|
|00000100| 69 6c 65 53 70 65 63 2a | 20 69 6e 53 70 65 63 2c |ileSpec*| inSpec,|
|00000110| 20 41 72 67 4c 69 73 74 | 26 20 6f 75 74 41 72 67 | ArgList|& outArg|
|00000120| 73 20 29 20 7b 0d 09 55 | 74 69 6c 53 74 72 20 73 |s ) {..U|tilStr s|
|00000130| 74 72 2c 20 63 6f 6e 66 | 69 67 54 65 78 74 2c 20 |tr, conf|igText, |
|00000140| 6e 75 6d 3b 0d 09 43 45 | 67 49 46 69 6c 65 20 66 |num;..CE|gIFile f|
|00000150| 69 6c 65 3b 0d 09 69 6e | 74 20 69 2c 20 65 6e 64 |ile;..in|t i, end|
|00000160| 3b 0d 09 0d 09 66 69 6c | 65 2e 6f 70 65 6e 28 20 |;....fil|e.open( |
|00000170| 69 6e 53 70 65 63 20 29 | 3b 0d 09 0d 09 69 66 20 |inSpec )|;....if |
|00000180| 28 20 66 69 6c 65 2e 6e | 6f 45 72 72 28 29 20 29 |( file.n|oErr() )|
|00000190| 20 7b 20 0d 09 0d 09 09 | 2f 2f 20 52 65 61 64 20 | { .....|// Read |
|000001a0| 74 68 65 20 63 6f 6e 66 | 69 67 20 61 6e 64 20 63 |the conf|ig and c|
|000001b0| 68 75 63 6b 20 61 6e 79 | 20 63 6f 6d 6d 65 6e 74 |huck any| comment|
|000001c0| 73 0d 09 09 77 68 69 6c | 65 20 28 20 66 69 6c 65 |s...whil|e ( file|
|000001d0| 2e 6e 6f 45 72 72 28 29 | 20 29 20 7b 0d 09 09 09 |.noErr()| ) {....|
|000001e0| 66 69 6c 65 2e 52 65 61 | 64 6c 6e 28 20 73 74 72 |file.Rea|dln( str|
|000001f0| 20 29 3b 0d 09 09 09 69 | 20 3d 20 73 74 72 2e 63 | );....i| = str.c|
|00000200| 6f 6e 74 61 69 6e 73 28 | 20 22 2f 2f 22 20 29 3b |ontains(| "//" );|
|00000210| 0d 09 09 09 69 66 20 28 | 20 69 20 3e 20 30 20 29 |....if (| i > 0 )|
|00000220| 0d 09 09 09 09 73 74 72 | 2e 4b 65 65 70 28 20 69 |.....str|.Keep( i|
|00000230| 20 2d 20 31 20 29 3b 0d | 09 09 09 63 6f 6e 66 69 | - 1 );.|...confi|
|00000240| 67 54 65 78 74 2e 41 70 | 70 65 6e 64 28 20 73 74 |gText.Ap|pend( st|
|00000250| 72 20 29 3b 0d 09 09 7d | 20 0d 09 09 66 69 6c 65 |r );...}| ...file|
|00000260| 2e 74 68 72 6f 77 45 72 | 72 28 20 63 4e 6f 45 72 |.throwEr|r( cNoEr|
|00000270| 72 20 29 3b 0d 09 09 0d | 09 09 2f 2f 20 52 65 6d |r );....|..// Rem|
|00000280| 6f 76 65 20 62 6c 6f 63 | 6b 20 63 6f 6d 6d 65 6e |ove bloc|k commen|
|00000290| 74 73 0d 09 09 64 6f 20 | 7b 0d 09 09 09 69 20 3d |ts...do |{....i =|
|000002a0| 20 63 6f 6e 66 69 67 54 | 65 78 74 2e 63 6f 6e 74 | configT|ext.cont|
|000002b0| 61 69 6e 73 28 20 22 2f | 2a 22 20 29 3b 0d 09 09 |ains( "/|*" );...|
|000002c0| 09 69 66 20 28 20 69 20 | 3e 20 30 20 29 20 7b 0d |.if ( i |> 0 ) {.|
|000002d0| 09 09 09 09 65 6e 64 20 | 3d 20 63 6f 6e 66 69 67 |....end |= config|
|000002e0| 54 65 78 74 2e 63 6f 6e | 74 61 69 6e 73 28 20 22 |Text.con|tains( "|
|000002f0| 2a 2f 22 20 29 3b 0d 09 | 09 09 09 69 66 20 28 20 |*/" );..|...if ( |
|00000300| 65 6e 64 20 3e 20 30 20 | 29 0d 09 09 09 09 09 63 |end > 0 |)......c|
|00000310| 6f 6e 66 69 67 54 65 78 | 74 2e 52 65 6d 6f 76 65 |onfigTex|t.Remove|
|00000320| 28 20 69 2c 20 65 6e 64 | 20 2d 20 69 20 2b 20 32 |( i, end| - i + 2|
|00000330| 20 29 3b 0d 09 09 09 7d | 0d 09 09 7d 20 77 68 69 | );....}|...} whi|
|00000340| 6c 65 20 28 20 69 20 3e | 20 30 20 26 26 20 65 6e |le ( i >| 0 && en|
|00000350| 64 20 3e 20 30 20 29 3b | 0d 09 09 0d 09 09 2f 2f |d > 0 );|......//|
|00000360| 20 50 61 72 73 65 20 74 | 68 65 20 61 72 67 73 2f | Parse t|he args/|
|00000370| 64 69 63 74 2e 2e 2e 0d | 09 09 6f 75 74 41 72 67 |dict....|..outArg|
|00000380| 73 2e 53 65 74 41 72 67 | 73 28 20 63 6f 6e 66 69 |s.SetArg|s( confi|
|00000390| 67 54 65 78 74 20 29 3b | 0d 09 09 0d 09 09 72 65 |gText );|......re|
|000003a0| 74 75 72 6e 20 74 72 75 | 65 3b 20 7d 0d 09 65 6c |turn tru|e; }..el|
|000003b0| 73 65 20 7b 0d 09 09 72 | 65 74 75 72 6e 20 66 61 |se {...r|eturn fa|
|000003c0| 6c 73 65 3b 0d 09 7d 09 | 0d 7d 00 00 00 00 00 00 |lse;..}.|.}......|
|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 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000410| f1 82 cb 01 00 00 00 00 | 82 41 00 00 00 16 87 1f |........|.A......|
|00000420| c0 08 00 00 7c 80 f6 81 | 5f 89 12 01 00 00 00 00 |....|...|_.......|
|00000430| 82 42 00 00 00 16 87 ba | c0 08 00 00 7c 81 64 82 |.B......|....|.d.|
|00000440| 15 89 bb 01 00 00 00 00 | 82 43 00 00 00 16 80 e8 |........|.C......|
|00000450| c0 08 00 00 7c 82 18 82 | c3 82 f2 01 00 00 00 00 |....|...|........|
|00000460| 82 44 00 00 00 15 85 48 | c0 08 00 00 a4 87 5a 87 |.D.....H|......Z.|
|00000470| cb ff 00 01 00 00 00 82 | 45 00 00 00 15 84 6c c0 |........|E.....l.|
|00000480| 08 00 00 a4 87 cc 88 37 | ff 00 01 00 00 00 82 46 |.......7|.......F|
|00000490| 00 00 00 14 4d c0 08 00 | 00 a4 88 38 88 a4 ff 00 |....M...|...8....|
|000004a0| 01 00 00 00 82 47 00 00 | 00 15 82 4f c0 08 00 00 |.....G..|...O....|
|000004b0| a4 88 a5 89 0f ff 00 01 | 00 00 00 82 48 00 00 00 |........|....H...|
|000004c0| 15 82 49 c0 08 00 00 a4 | 89 10 89 7c ff 00 01 00 |..I.....|...|....|
|000004d0| 00 00 82 49 00 00 00 15 | 85 20 c0 08 00 00 a4 89 |...I....|. ......|
|000004e0| 7d 89 ec ff 00 01 00 00 | 00 82 4a 00 00 00 15 89 |}.......|..J.....|
|000004f0| 2c c0 08 00 00 a4 89 ed | 8a 5b ff 00 01 00 00 00 |,.......|.[......|
|00000500| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 03 | 00 04 00 2c 00 08 02 40 |........|...,...@|
|00000530| 02 5e 00 2c 00 08 02 40 | 02 5e b3 5b 53 e9 00 00 |.^.,...@|.^.[S...|
|00000540| 00 64 00 00 00 6e 00 00 | 00 00 01 00 00 00 00 04 |.d...n..|........|
|00000550| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000560| 00 00 00 46 04 df a8 c4 | 1d 04 00 00 00 1c 00 46 |...F....|.......F|
|00000570| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000580| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000590| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+