- Timestamp:
- 02/14/08 15:33:20 (4 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib1/svn_Utilities.ls (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/svn_Utilities.ls
r144 r146 195 195 196 196 scrTextLi = [scrText] 197 if the platform contains "mac" then 198 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 199 else 200 pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 201 pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 202 end if 197 ----------- always convert to mac linebreaks as director internally uses mac linebreaks 198 -- if the platform contains "mac" then 199 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 200 -- else 201 -- pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 202 -- pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 203 -- end if 203 204 scrText = scrTextLi[1] 204 205 205 206 else 206 207 207 if the platform contains "mac" then 208 209 -- first convert windows to mac 210 fndStr = numToChar(13) & numToChar(10) 208 ----------- always convert to mac linebreaks as director internally uses mac linebreaks 209 -- if the platform contains "mac" then 210 211 -- first convert windows to mac 212 fndStr = numToChar(13) & numToChar(10) 213 offs = offset(fndStr, scrText) 214 repeat while offs > 0 215 put numToChar(13) into char offs to offs+1 of scrText 211 216 offs = offset(fndStr, scrText) 212 repeat while offs > 0213 put numToChar(13) into char offs to offs+1 of scrText214 offs = offset(fndStr, scrText)215 end repeat216 217 -- now convert unix to mac218 fndStr = numToChar(10)217 end repeat 218 219 -- now convert unix to mac 220 fndStr = numToChar(10) 221 offs = offset(fndStr, scrText) 222 repeat while offs > 0 223 put numToChar(13) into char offs of scrText 219 224 offs = offset(fndStr, scrText) 220 repeat while offs > 0 221 put numToChar(13) into char offs of scrText 222 offs = offset(fndStr, scrText) 223 end repeat 224 225 else 226 227 fndStr = numToChar(13) & numToChar(10) 228 offs = offset(fndStr, scrText) 229 repeat while offs > 0 230 put "ÀÀÀ" into char offs+1 of scrText 231 offs = offset(fndStr, scrText) 232 end repeat 233 234 235 fndStr = numToChar(10) 236 offs = offset(fndStr, scrText) 237 repeat while offs > 0 238 put "ÀÀÀ" into char offs of scrText 239 offs = offset(fndStr, scrText) 240 end repeat 241 242 243 244 fndStr = numToChar(13) & "ÀÀÀ" 245 offs = offset(fndStr, scrText) 246 repeat while offs > 0 247 put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 248 offs = offset(fndStr, scrText) 249 end repeat 250 251 252 253 fndStr = "ÀÀÀ" 254 offs = offset(fndStr, scrText) 255 repeat while offs > 0 256 put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 257 offs = offset(fndStr, scrText) 258 end repeat 259 260 end if 225 end repeat 226 227 -- else 228 -- 229 -- fndStr = numToChar(13) & numToChar(10) 230 -- offs = offset(fndStr, scrText) 231 -- repeat while offs > 0 232 -- put "ÀÀÀ" into char offs+1 of scrText 233 -- offs = offset(fndStr, scrText) 234 -- end repeat 235 -- 236 -- 237 -- fndStr = numToChar(10) 238 -- offs = offset(fndStr, scrText) 239 -- repeat while offs > 0 240 -- put "ÀÀÀ" into char offs of scrText 241 -- offs = offset(fndStr, scrText) 242 -- end repeat 243 -- 244 -- 245 -- 246 -- fndStr = numToChar(13) & "ÀÀÀ" 247 -- offs = offset(fndStr, scrText) 248 -- repeat while offs > 0 249 -- put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 250 -- offs = offset(fndStr, scrText) 251 -- end repeat 252 -- 253 -- 254 -- 255 -- fndStr = "ÀÀÀ" 256 -- offs = offset(fndStr, scrText) 257 -- repeat while offs > 0 258 -- put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 259 -- offs = offset(fndStr, scrText) 260 -- end repeat 261 -- 262 -- end if 261 263 262 264 end if
Note: See TracChangeset
for help on using the changeset viewer.
