[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Hard-coding" a text file



>If you already have one, please post the source code.  I can compile
>Ultramacros source files

This is programming code, but it is short and was requested to be posted here.
Because of the syntax using open brackets, it may turn into HTML instead of
macro code for some readers. If that happens, let me know,  I will repost it.

Source code for Adding CR's to AppleWorks word processor files. From
TO.Stripper by Beverly Cadieux (c) 1997 TEXAS II. For AppleWorks 5.1 only.....
although AW 3/Ultra 4 and AW 4 would probably work, too.

For the complete CR Stripper and Add CR TimeOut accessory for AppleWorks 5.1,
order TEXAS II on Disk vol.24, $10 from Beverly Cadieux, PayPal.com address
a2mg@aol.com.

start

a:<awp 		
	b=.eof:
	posn c,r:
	ifnot r<b goto ba-L:else:			// Test for eof

	cell:if $0="" down:rpt:endif:			// Blank line, move down
	A=peekWord $B0:Ptr=.getptr A:

	.getblock P,$800,1:					// Get line into $800
	L=peek $801:						// Read line length
byte
	L=.mod L,$80:						// Strip CR byte, if
any
	L=L+$80 endif:						// Add CR byte
	L(9)=L:

	Poke $801,L:					// update length byte with CR
	.putblock 0,$800,Z,1:			// Put Block into memory
	.putptr Adr,Z:					// Put new Ptr in $B0's
address
	.relblock Ptr:					// Release old line

	down rpt:						// Do until EOF
>!	

<BA-L>:<all launch "SEG.UM">!

Contents Copyright (c) TEXAS II - AppleWorks - An international newsletter for
users of AppleWorks(R) 5.1 (c) 2000 Kingwood Micro Software. - The information
contained herein is for personal use, intended solely for the addressee.  Any
unauthorized access, use, reproduction, posting, or dissemination is
prohibited.


Beverly Cadieux 
The Apple II Mail Group - http://members.aol.com/A2MG