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

Re: converting counters



Reply to note from "Patricia M. Godfrey"  Mon,
28 Nov 2005 15:39:16 -0500

> There was a utility called Hardcode that converted the counters
> to their actual numbers. Some people have reported problems
> with it, but I've used it successfully. Unfortunately, I don't
> seem to have a copy on this system. It you want to try it, I
> can dig though my backup CDs.

No need to rummage. Here it is -- as is, caveat emptor, FWIW, YMMV,
and all that rot. Read the info. under "Current Limitations"; there
are undoubtedly other limitations, traps and bugs not identified
here. To call this "beta" code is to exaggerate; "gamma" is more
like it -- but the basic functionality is there.

Issue DECODE, then savedef the result as HARDCODE.PM.
Follow the instructions within. For Xy4 and later only; will not
work in Xy3.

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}GLa{>}[cr|lf]BETA CODE--USE AT YOUR OWN RISK![cr|lf]HARDCO
DE.PM -- C.L.Distefano rev. 12/20/04[cr|lf]For XyWrite 4 | Xy
Win | NBWin[cr|lf][cr|lf]Convert "soft" Counters|Dates|Times|
VAlues to hard-coded text[cr|lf][cr|lf]Usage:[cr|lf]With subj
ect file in current window:[cr|lf] RUN HARDCODE.PM[cr
|lf][cr|lf]Current Limitations:[cr|lf] Numerical counters on
ly (alpha and Roman numerals not supported)[cr|lf] Simple co
unter definitions only (no nested or "outline" counters)[cr|l
f] Successive counter redefinitions supported (but may not a
lways work)[cr|lf] Cross-references to chapter numbers (REC)
 and other counter values[cr|lf]  (REF) are converted to har
d text. Cross-references to page numbers[cr|lf]  (REP) are{032}
left intact as embedded commands[cr|lf][cr|lf]{{;5hardcode}}[
cr|lf]{002}{<}LBa{>}[XH_]{<}IF{<}VA$WS{>}<>1{>}{<}PRNo file{>
}{<}EX{>}{<}EI{>}[BX_]es 1[Q2_]{<}SV01,{>}{<}IF{<}VA$AC{>}>0{
{062}}{<}SV01,[AC_]{>}{<}EI{>}{<}IF{<}VA$AR{>}>0{>}[AZ_]{<}SX01,{
<}IS01{>}+"[AZ_]"{>}{<}EI{>}[XP_][XD_][XD_][XD_][YD_];*;[cr|l
f];*;[cr|lf];*; VAlues (VA|VN) and Inserted Save/Gets (IS)[cr
|lf][TF_]{<}LBb{>}[BX_]se [w<]VA[wO][w<]VN[wO][w<]IS[Q2_]{<}
IF@not({<}ER{>}){>}[BX_]seb [w<][Q2_][DF_][BX_]se [w>][Q2_]
[DF_]{<}SV02{>}{<}SX02,{<}PV02{>}{>}{<}SX02,{<}IS02{>}{>}[DN_
]{<}GT02{>}{<}GLb{>}{<}EI{>};*;[cr|lf];*;[cr|lf];*; Soft DAte
s and TiMes[cr|lf][TF_]{<}LBc{>}[BX_]se [w<]DA[wO][w<]TM[Q2_
]{<}IF@not({<}ER{>}){>}[BX_]seb [w<][Q2_][CR_][DF_][BX_]se/f
 [w>][Q2_][DF_]{<}SV02{>}{<}IF{<}VA|02{>}<3{>}{<}SX02,{<}IS0
2{>}+{<}VA$DZ{>}{>}{<}EI{>}{<}SX02,"{<}VA$"+{<}IS02{>}+"{>}"{
{062}}{<}SX02,{<}PV02{>}{>}[DN_][BD_][RC_]{<}GT02{>}{<}GLc{>}{<}E
I{>};*;[cr|lf];*;[cr|lf];*; Defined Counters (C0-C14)[cr|lf];
*; {<}SV02,Cou
nter series (0-14){>} {<}SV03=Initial counter value{>} {<}SV0
4=Increment flag{>} {<}SV05=Start CP{>} {<}SV06=End CP{>}[cr|
lf];*;[cr|lf]{<}SX02,-1{>}{<}LBd{>}[TF_]{<}SX02,{<}PV02{>}+1{
{062}}{<}IF{<}PV02{>}>14{>}{<}PV01{>}{<}PRDone{>}{<}EX{>} <== EXi
t[cr|lf]{<}EI{>}{<}SX03,1{>}{<}SV04,!{>}{<}SX05,0{>}{<}SX06,9
9999999{>};*;[cr|lf];*;[cr|lf]{<}LBe{>}{<}SV07,{>}[BX_]se [w
<]DC{<}PV02{>}=[Q2_]{<}IF@not({<}ER{>}){>}{<}SX05,{<}CP{>}{>}
[BX_]se/f [w<]DC{<}PV02{>}=[Q2_]{<}IF@not({<}ER{>}){>}{<}SX0
6,{<}CP{>}-4-{<}VA|02{>}{>}[BX_]jmp {<}PV05{>}[Q2_]{<}EI{>}[Y
D_][DF_][BX_]se [w>][Q2_][CL_][DF_]{<}SV08{>}[YD_]{<}SX03,{<
}IS08{>}{>}[BX_]jmp {<}PV05{>}[Q2_]{<}EI{>};*;[cr|lf];*;[cr|l
f]{<}LBf{>}[BX_]se [w<]C{<}PV02{>}[w>][wO][w<]C{<}PV02{>}-[w
{062}][Q2_];*;[cr|lf]{<}IF{<}ER{>}!{<}CP{>}>{<}PV06{>}{>}{<}IF{<}
CP{>}>{<}PV06{>}{>}[BX_]jmp {<}PV06{>}[Q2_]{<}SX03,{<}IS08{>}
{>}{<}SV04,!{>}{<}SX05,{<}CP{>}{>}{<}SX06,99999999{>}{<}GLe{>
}{<}EI{>}{<}GLd{>}{<}EI{>};*;[cr|lf];*;[cr|lf][YD_][CL_][DF_]
[BX_]seb C[Q2_][CR_][DF_]{<}SV07{>}[YD_][BX_]seb [w<][Q2_][
DF_][BX_]se [w>][Q2_][DF_][DN_];*;[cr|lf]{<}IF"-"{238}{<}IS0
7{>}<0&{<}VA|04{>}<1{>}{<}SX03,{<}PV03{>}+1{>}{<}EI{>}{<}PV03
{>}{<}SX06,{<}PV06{>}-{<}VA|07{>}-{<}VA|03{>}{>}{<}SV04,{>}{<
}GLf{>};*;[cr|lf];*;[cr|lf];*; Cross-references[cr|lf][DO_][F
F_]{<}IF{<}IS07{>}{240}"-"{>}{<}SV09,-{>}{<}SV10,{>}{<}XS07,0
9,10,09,11{>}{<}SX07,{<}IS10{>}{>}{<}EI{>}{<}IF{<}VA|07{>}>0{
{062}}{<}SX09,{<}CP{>}{>}[TF_][BX_]ch {252}[w<]RE{<}IF{<}PV02{>}<
1{>}C{<}GLg{>}{<}EI{>}F{<}LBg{>}{<}PV07{>}[w>]{252}{<}PV03{>}
[w<]LB Xref:{<}PV07{>}[w>]
{252}[Q2_][BX_]wait[Q2_][BX_]jmp {<}PV09{>}[Q2_][BX_]jmp {<}P
V09{>}[Q2_]{<}EI{>}{<}GLf{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx