[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Problem with from102cr in U2



Reply to note from Harry Binswanger  Thu, 24 Dec
2009 14:13:27 -0500

Harry:

> But if the last character in the file is a line-feed...

True. It's a bug in XyWrite's implementation of the "wild line feed"
wildcard.

> The solution is a bit hairy.
> ...
> XP BF DF CL DF XD LU
> BX ci /[search-line-feed]/[cr-lf]/

I can't make that work. The problem is that the line feed character
(1-byte Ascii-10) is "hot" in XyWrite. Specifically, it's very
difficult to get the cursor to rest on Ascii-10; usually the cursor
jumps over it -- which is why "DF CL DF" in your proposed fix
doesn't behave as you'd expect.

Another way that seems to be reliable is to do a SEarch/Forward for
the Ascii-10, in eXPanded view. If the search succeeds, the cursor
lands on the Ascii-10, and you can then use func RC (Rub out
Character) to delete it.

Here's a revised frame FROM102CR that restores the original cursor
position and display type and maintains an accurate report of the
number of changes:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5from102cr}} Regularize 10 to 13+10 , fro
m  to EOF (RJH 2/4/99 CLD rev.12/24/09)[cr|lf]{002}[BX_]
es 1[Q2_]{<}SU01,{>}{<}IF{<}VA$DT{>}>0&{<}VA$DT{>}<>8{>}[TG_]
{<}SU01,[TG_]{>}{<}EI{>}[BX_]ci [w10] [wC][Q2_]{<}SX02,{<}VA
$WC{>}{>}{<}SX50,{<}CP{>}{>}[BX_]se/f [w10][Q2_]{<}IF@not({<
}ER{>}){>}{<}SX02,{<}PV02{>}+1{>}[RC_][JM_]2.ReJuMP[Q2_]{<}EI
{>}{<}GT01{>}{<}SX02,{<}IS02{>}+" changes"{>}{<}PR@02{>}{002}
[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx