2 ; Original GPL release version 4.12
3 ; Copyright 1993-2000 Jonathan Potter
5 ; This program is free software; you can redistribute it and/or
6 ; modify it under the terms of the GNU General Public License
7 ; as published by the Free Software Foundation; either version 2
8 ; of the License, or (at your option) any later version.
10 ; This program is distributed in the hope that it will be useful,
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; GNU General Public License for more details.
15 ; You should have received a copy of the GNU General Public License
16 ; along with this program; if not, write to the Free Software
17 ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 ; All users of Directory Opus 4 (including versions distributed
20 ; under the GPL) are entitled to upgrade to the latest version of
21 ; Directory Opus version 5 at a reduced price. Please see
22 ; http://www.gpsoft.com.au for more information.
24 ; The release of Directory Opus 4 under the GPL in NO WAY affects
25 ; the existing commercial status of Directory Opus 5.
27 * include "exec/types.i"
28 include "devices/inputevent.i"
34 * WORD rle_imageheight
40 * BYTE rle_compression
44 _LVORawDoFmt
equ -$20a
47 VIEW_MAX_LINE_LENGTH
equ 4
49 VIEW_TEXT_BUFFER
equ 12
59 movem.l a2
/a3
/a6
,-(sp)
63 lea.l stuffChar
(pc
),a2
66 movem.l
(sp)+,a2
/a3
/a6
76 movem.l d2
-d6
/a2
,-(sp) ; save registers
78 move.l VIEW_FILE_SIZE
(a0
),d1
79 move.l VIEW_MAX_LINE_LENGTH
(a0
),d2
80 move.l VIEW_TAB_SIZE
(a0
),d6
82 move.l VIEW_TEXT_BUFFER
(a0
),a0
85 * D2
= maximum line
length
89 * D0
= number of lines
90 * D3
= number of characters counted
92 * D5
= earliest position to wordwrap from
93 * A1
= last white space character
(for wordwrap
)
124 bra notspace
;bra skip3
131 divu d6
,d4
; d4 = d3 % d6
135 ; move.l d0,-(sp) ;debug
142 neg.l d4
; d4 = d6 - d4
146 move.l a0
,a1
;to implement
147 bra notspace
;TAB spacing
163 movem.l
(sp)+,d2
-d6
/a2
166 XDEF _smartcountlines
169 movem.l d2
-d7
/a2
,-(sp)
171 move.l VIEW_FILE_SIZE
(a0
),d1
173 move.l VIEW_MAX_LINE_LENGTH
(a0
),d2
174 move.l VIEW_TEXT_BUFFER
(a0
),a0
228 movem.l
(sp)+,d2
-d7
/a2
240 movem.l
(sp)+,d2
-d7
/a2
263 movem.l
(sp)+,d2
-d7
/a2
272 movem.l d2
-d7
/a2
,-(sp)
274 move.l VIEW_TAB_SIZE
(a0
),d0
276 move.l VIEW_FILE_SIZE
(a0
),d1
277 move.l VIEW_MAX_LINE_LENGTH
(a0
),d2
278 move.l VIEW_TEXT_BUFFER
(a0
),a0
374 movem.l
(sp)+,d2
-d7
/a2
380 ; move.l VIEW_FILE_SIZE(a0),d1
381 ; move.l VIEW_TEXT_BUFFER(a0),a0