• Keine Ergebnisse gefunden

ROUTINES SUMMARY

Im Dokument Cat Editor (Seite 153-157)

6. INSERTING, ERASING, AND COPYING TEXT

7.4 ROUTINES SUMMARY

7.4.0

Bold and Underline Command Routines

attribregion ( a n1 n2 -) f )

( pronounced atftrib ree'jin )

Returns a true flag if any attributable character within the region of text of length n1 which starts at address a does not yet have the attribute n2.

Bold - )

pronounced bohld' )

Checks the current selection. The bold attribute will be removed from all characters in the selection if

a. None of the characters in the selection can receive an attribute. OR

b. If all of the characters in the selection already have the bold attribute, AND

c. The current operation is the same as the last operatic'}, OR d. A Learn activity is not occurring

The bold attribute will be added to all characters in the selection if

a. Any characters in the selection can receive an attribute, AND

b. If there are characters in the selection that aren't bold, OR

c. The current operation is not the same as the last operation, AND

d. A Learn activity is occurring.

Bold copies the current selection to the gap, then copies the selection back to the text, and inserts the bold character attribute at the same time. If the selection lies within a locked area of text or if there is not enough memory to create a copy of the selection, the operation will be aborted. If the selection is not already extended, it will be extended before the operation continues.

Under - )

pronounced un'der )

Checks the current selection. The underline attribute will be removed from all characters in the selection if:

a. None of the characters in the selection can receive an attribute, OR

b. If all of the characters in the selection already have the underline attribute, AND

c. The current operation is the same as the last operation, OR d. A Learn activity is not occurring

The underline attribute will be added to all characters in the selection if:

a. Any characters in the selection can receive an attribute, AND b. If there are not-underlined characters in the selection, OR c. The current operation is not the same as the last operation,

~D

d. A Learn activity is occurring.

Under copies the current selection to the gap, then copies the selection back to the text and inserts the underline character attribute at the same time. If the selection lies within a locked area of text or if there is not enough memory to create a copy of the selection, the operation will be aborted. If the selection is not already extended, it will be extended before the operation continues.

7.4.1

Caps Command Routines cap region a n -) f

pronounced kapt reetjin }

Returns a true flag if a lowercase character is found in the region of text of length ~ which starts at address ~ in the text.

lowercase a n -) )

pronounced later kays )

Changes the ~ characters located in memory starting at address a to lowercase.

Upper -)

( pronounced up'per )

Checks the current selection. All characters in the selection will be capitalized if:

a. The selection contains one or more lowercase letters, OR b. The current operation is not the same as the last operation,

~D

c. A Learn activity is occurring

All characters in the selection will be changed to lowercase if:

a. The selection contains only capital letters, OR

b. The current operation is the same as the last operation, AND c. A Learn activity is not occurring

The routines uppercase and lowercase capitalize or lowercase the selection.

uppercase a n -)

pronounced up'per kays )

Capitalizes the n characters located in memory starting at address a.

7.4.2 Words That Alter the Character Data

extramods a nl -) n2

pronounced eksttra mahds' )

Examines the nl bytes of text starting at address a and returns a count n2 of how many characters within the range can be modified

(can be underlined or boldfaced).

movewith al a2 nl n2 -) a3) pronounced moov with t )

Moves the nl bytes of text starting at address a1 to memory starting at address a2 and inserts the desired modifier

information n2 after each character which can accept a modifier.

Returns the address of the end of the newly modified selection.

movenotwith a1 a2 n1 n2 -) a3 pronounced moov naht' with

Moves the n1 bytes of text starting at address a1 to memory starting at address a2. If a character has the modifier n2, the modifier is removed. If n2 was the only modifier appended to a character, the entire modifier byte is removed. Returns the address of the end of the newly modified selection.

cformatl - )

pronounced see fort mat wuhn )

"Character-format-one" prepares a selection for character

modification. By repositioning the bOll pointer, expands the undo buffer so that it is just large enough to hold the current

selection. Moves the selection to the undo buffer.

cformat2 a -) )

pronounced see for/mat too)

Refreshes the selection after the characters in the selection have been modified. Updates the gap system integer with the address ~ which lies just after the last modified character.

Recalculates the control/format information for those lines in the window record (which were affected by the character

modification). Uses refresh to redraw the changed lines. Sets the cursor to "wide."

cformat3 - )

pronounced see for'mat three)

Places the modified selection text found in the undo buffer back in its previous spot in the text and uses cformat2 to update the display area containing the new text.

Uncformat - )

pronounced un' see for'mat ) Calls cformat3 and makes itself the undo operation.

8. PARAGRAPH FORMAT COMMANDS

Introduction

There are six paragraph formatting operations:

Left Margin Right Margin Indent

Paragraph Style Line Spacing Set/Clear Tabs

The shifted versions of these six, which restore the default setting for the corresponding format operation, make a total of 12. Each operation changes either all paragraph format packets in the current selection or, if there is no selection, just the paragraph format packet which controls the paragraph which

contains the cursor. The text is redisplayed to show the affects of the new paragraph format.

Im Dokument Cat Editor (Seite 153-157)