Article View: fa.info-mac
Article #147wordBreak hook in Text Edit
From: info-mac
Date: Fri, 13 Jul 1984 17:51
Date: Fri, 13 Jul 1984 17:51
25 lines
1570 bytes
1570 bytes
From: Mike Schuster <MIKES@CIT-20.ARPA> You can change the set of word delimiting characters used by the Text Edit routines for word wrap calculations and double click selections by installing a non-zero address of a routine in the field 'wordBreak' of a TERecord. The default set of delimiting characters is /00 thru /20, inclusive. The routine is passed the address of the first character of the text in a0, and an offset to the character in question in d0. The routine returns with d0 nonzero if the character is a delimiter. Also, the status register should be set reflecting the value in d0. As a sample, this routine defines delimiters to be /00 thru /2f, inclusive. .text .globl wdbreak wdbreak: cmpb #/2f,a0@(0,d0:w) sls d0 tstb d0 rts One thing to remember: defining a period '.' to be a delimiter might be great for editing C programs, but lousy when word wrapping causes a period at the end of a sentence to appear on the next line all by itself. -------
Technical Details
Message-ID:
<1212@uw-beaver>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!info-macShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 UW 5/3/83; site uw-beaver Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!info-mac From: info-mac@uw-beaver (info-mac) Newsgroups: fa.info-mac Subject: wordBreak hook in Text Edit Message-ID: <1212@uw-beaver> Date: Fri, 13-Jul-84 13:51:30 EDT Article-I.D.: uw-beaver>.1212 Posted: Fri Jul 13 13:51:30 1984 Date-Received: Sat, 14-Jul-84 02:42:09 EDT Sender: daemon@uw-beave Organization: U of Washington Computer Science Lines: 25