home *** CD-ROM | disk | FTP | other *** search
-
- Curly
-
- For C programmers
-
- Thi≤ prograφ i≤ designeΣ t∩ hel≡ anybod∙ wh∩ doe≤ ß lo⌠ oµ ├
- debugging«á Iµá yo⌡á eve≥ suffe≥ tha⌠ annoyinτ littlσ probleφá oµ
- unmatcheΣ curl∙ braces¼á thi≤ ma∙ help« ╔ go⌠ sicδ oµ printinτ m∙
- ├á program≤ anΣ markinτ al∞ thσ routine≤ encloseΣ b∙ eacΦ se⌠á oµ
- matched curly braces so I wrote a program to do it for me.
- A≤ i⌠ i≤ set¼á i⌠ wil∞ takσ u≡ t∩ 25░ linσ program≤ oµ line≤
- n∩á morσ thaε 8░ character≤ long«á Yo⌡ ma∙ als∩ havσá you≥á bracσ
- nesting≤ g∩ abou⌠ 1░ deep« Al∞ thesσ constant≤ arσ defineΣ iε thσ
- firs⌠ fe≈ line≤ oµ thσ prograφ s∩ (memor∙ permitting)¼á fee∞ freσ
- to change them.
- Thσá prin⌠á ou⌠ i≤ ver∙ simple«á Yo⌡ jus⌠ ge⌠ ß norma∞á dum≡
- excep⌠á tha⌠ ever∙ linσ i≤ pusheΣ acros≤ abou⌠ ╕ o≥ ╣á character≤
- (dependinτ oε ho≈ dee≡ you≥ bigges⌠ nestinτ is⌐ anΣ dowε thσ lef⌠
- hanΣá sidσá oµ thσ pape≥ yo⌡ ge⌠á somσá funn∙á characters«á Thesσ
- consis⌠ oµ '+º anΣ '!'«á ┴ '+º tell≤ yo⌡ wherσ thσ curl∙ bracσ i≤
- and the '!' covers all the area in between.
- Yo⌡á needn'⌠ bothe≥ abou⌠ brace≤ encloseΣ iε single¼á doublσ
- quote≤á o≥ commen⌠ marker≤ ('/*º anΣ '*/')«á ╔ havσá alloweΣá fo≥
- them.
- To start the program once it has been compiled, just type
-
- A>curly filename1 filename2
-
- Thσá filename▒ doe≤ no⌠ neeΣ ß .π oε thσ enΣ bu⌠ iµ tha⌠á o≥
- anythinτ elsσ i≤ specified¼ i⌠ wil∞ bσ accepted« Filename▓ i≤ no⌠
- eveε necessary«á Iµ i⌠ i≤ no⌠ included¼ thσ adjusteΣ filσ wil∞ bσ
- saveΣ a≤ filename▒ witΦ .CU╥ oε thσ end«á Iµ i⌠ i≤ included¼á thσ
- filenamσ wil∞ bσ saveΣ a≤ i⌠ witΦ it≤ '.endingº o≥ .CU╥ iµ onσ i≤
- omitted.
- Thσ appropriatσ erro≥ message≤ havσ beeε includeΣ fo≥á thosσ
- oµá u≤á wh∩ tr∙ t∩ CURL┘ ß prograφ tha⌠ doesn'⌠ exis⌠ o≥ end≤á iε
- .CU╥á bu⌠á iµá ßá prograφ exist≤ witΦá ßá filenamσá thσá samσá a≤
- filename▓ it will be overwritten.
- Thi≤ versioε iε writteε fo≥ BD╙ ├ Versioε 1.╡ s∩ iµ yo⌡ havσ
- another, you may have to do some adapting.
-
- Happy debugging
-
- Courtesy Michael Girle