repo.or.cz
/
AROS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
revert between 56095 -> 55830 in arch
[AROS.git]
/
workbench
/
classes
/
zune
/
texteditor
/
demo
/
rexx
/
Reformat.Rexx
blob
d6b1ff777030eaa27887d1c92f814e0d4f9aa798
1
/* Reformat a paragraph */
2
3
Options Results
4
5
Position SOL
6
SetBookmark 3
7
Line 1
8
GetLine
9
LineContents = RESULT
10
MoreLines = 1
11
12
Do While ((LineContents ~= '0a'x) & (Left(LineContents,1) ~= ' ') & (MoreLines ~= 0))
13
14
Position SOL
15
Backspace
16
Text ' '
17
18
GetCursor Line
19
CurrentLine = RESULT
20
Line 1
21
GetCursor Line
22
if(RESULT = CurrentLine) Then MoreLines = 0
23
24
GetLine
25
LineContents = RESULT
26
27
End
28
29
GotoBookmark 3
30
GotoColumn 80
31
GetCursor Column
32
ColumnNr = RESULT
33
34
Do While (ColumnNr = 80)
35
36
Previous Word
37
Backspace
38
Text '0a'x
39
GotoColumn 80
40
GetCursor Column
41
ColumnNr = RESULT
42
43
End
44
45
Cursor Right