1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-11 23:53:12 +00:00

New text functions added to MIGS.

This commit is contained in:
Lars Brinkhoff 2021-12-13 15:17:23 +01:00
parent a73b2dff03
commit a6ab4a346a
3 changed files with 102 additions and 13 deletions

View File

@ -1,4 +1,5 @@
THERE IS NOW A NEW FOUNCTION IN MIGS. IT IS PICT, PICT IS ANOTHER WAY
OF DEFINING A MCELL. PICT LOOKS VERY MUCH LIKE DEFINE IN SYNTACS. IT
ALSO RETURNS THE ATOM THAT YOU GAVE IT ,SO <DISP <PICT A .....>> WILL
@ -32,7 +33,7 @@ EX.PICT.1
THERE IS NOW A PACKAGED VERSION OF MIGS! AT THE MINUTE IT IS IN MY
PRIVIAT LIBRARY BUT I WILL MOVE IT IN TO THE PUBLIC LIBRARY TODAY. TO
GET IT SAY <MIGS:>$ OR <USE "MIGSPK">$ .
@ -68,7 +69,7 @@ Package SWCHAR ...
magnitude of the y coordinates of all end points.
SHEAR is is used to italicize a character.
Function Args. Discription
Function Args. Description
<CHARGE .CHR .X .Y .SCL> 3 - 4 Displays .chr (type character) at
point .x .y (type fix) with a scale
factor of .scl (type <OR FIX FLOAT>).
@ -85,3 +86,38 @@ Function Args. Discription
shear from the y axis. ANG is optional
and defaults to .785 radians.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; THURSDAY DEC 11,2021 11:54:00
;;; New functions added to SWCHAR
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function Args. Description
<SWTEXT .STR .X .Y .SP> 1 - 4 This function will plot one line
text. All control characters as SSV's ^character.
All paramiters but STR , the string are optional.
(X, Y) is the screen postion for the start of the
string. (x,Y) defaults to (0,500). SP the spacing
in screen coordinates from the start of the
current character to the start of the next character.
It defaults to 12.
<SWTXT2 .STR .X .Y .SP> 1 - 4 This function will plot multiple
lines of text from the in the text string STR.
All paramiters but STR , the string are optional.
(X, Y) is the screen postion for the start of the
string. (x,Y) defaults to (0,500). SP the spacing
in screen coordinates from the start of the
current character to the start of the next character.
It defaults to 12. This function know how to handle
CR, <ASCII 13>, and L, <ASCII 10> corectly. the
inter-line separation is 25 screen unites.
<SWTXT3 .STR .X .Y .SP> 1 - 4 This function identical to SWTXT2,
but also handles tabs, <ASCII 09> correctly.
The default tab stops are every 4th charactedre
position. The GVAL of SPCTAB!-ISWCHAR!-PACKAGE
set to the default tab spacing in characters. SETGing
it to 8 works well with Muddle.

Binary file not shown.

View File

@ -1,6 +1,6 @@
<PACKAGE "SWCHAR">
<ENTRY CHARGE MCHARG SHEAR SWTEXT>
<ENTRY CHARGE MCHARG SHEAR SWTEXT SWTXT2 SWTXT3>
<USE "SMCELLS">
<USE "DISPLA">
<BLOCK (<GET IDISPLA OBLIST> <ROOT>)>
@ -1817,16 +1817,6 @@
<SET S <+ .S .SP>>
<COND (<G? .S 1000> <SET S 0> <SET T <- .T 25>>)>>>
<DEFINE SWTEXT (STR "OPT" (X 0) (Y 500) (SP 12) )
#DECL ((STR) STRING (X Y SP ) FIX (VALUE) ATOM)
<REPEAT ((S .X) (T .Y) (ST .STR) CHR)
#DECL ((S T)FIX (ST) STRING (CHR) CHARACTER)
<COND (<EMPTY? .ST> <RETURN ,NULL>)
(T <SET CHR <1 .ST>>)>
<CHARGE .CHR .S .T>
<SET S <+ .S .SP>>
<COND (<G? .S 1000> <SET S 0> <SET T <- .T 25>>)>
<SET ST <REST .ST>> >>
<DEFINE CHARGE (CHAR X Y "OPTIONAL" (SIZE 1.0) "AUX" (CHARS ,CHARS))
@ -1843,6 +1833,69 @@
<SCALE .SIZE>
<XLATE .X .Y>>>
<DEFINE SWTEXT (STR "OPT" (X 0) (Y 500) (SP 12) )
#DECL ((STR) STRING (X Y SP ) FIX (VALUE) ATOM)
<REPEAT ((S .X) (T .Y) (ST .STR) CHR)
#DECL ((S T)FIX (ST) STRING (CHR) CHARACTER)
<COND (<EMPTY? .ST> <RETURN ,NULL>)
(T <SET CHR <1 .ST>>)>
<CHARGE .CHR .S .T>
<SET S <+ .S .SP>>
<COND (<G? .S 1000> <SET S 0> <SET T <- .T 25>>)>
<SET ST <REST .ST>> >>
<DEFINE SWTXT2 (STR "OPT" (X 0) (Y 500) (SP 12)
"AUX" (LX .X) (LY .Y) (YSP 25) )
#DECL ((STR) STRING (X Y SP YSP) FIX (VALUE) ATOM)
<REPEAT ((S .X) (T .Y) (ST .STR) CHR)
#DECL ((S T)FIX (ST) STRING (CHR) CHARACTER)
<COND (<EMPTY? .ST> <RETURN ,NULL>)
(T <SET CHR <1 .ST>>)>
<COND (<==? .CHR <ASCII 13>> <SET S .LX>)
(<==? .CHR <ASCII 10>> <SET T <- .T .YSP>>)
(T <CHARGE .CHR .S .T>)>
<SET S <+ .S .SP>>
<COND (<G? .S 1000> <SET S 0> <SET T <- .T .YSP>>)>
<SET ST <REST .ST>> >>
<DEFINE SWTXT3 (STR ;"INPUT TEXT STRING"
"OPT" (X 0) (Y 500) (SP 12)
"AUX" (LX .X) (LY .Y) (YSP 25) )
#DECL ((STR) STRING (X Y SP YSP) FIX (VALUE) ATOM)
<REPEAT ((S .X) (T .Y) (ST .STR) CHR)
#DECL ((S T)FIX (ST) STRING (CHR) CHARACTER)
<COND (<EMPTY? .ST> <RETURN ,NULL>)
(T <SET CHR <1 .ST>>)>
<COND (<==? .CHR <ASCII 13>> <SET S .LX>) ;"CR HANDLER "
(<==? .CHR <ASCII 10>> <SET T <- .T .YSP>>) ;"LF HANDLER"
(<==? .CHR <ASCII 09>> ;"TAB HANDLER"
<SET S <+ .S <* .SP <TB2SP .S>>> >) ;" INC S BY WIDTH OF N SPACES"
(T <CHARGE .CHR .S .T>)>
<SET S <+ .S .SP>>
<COND (<G? .S 1000> <SET S 0> <SET T <- .T .YSP>>)>
<SET ST <REST .ST>> >>
<SETG SPCTAB 4> ;"SPACES PER TAB"
<DEFINE TB2SP (CRP "AUX" (SPCTAB ,SPCTAB))
#DECL((VALUE SPCTAB CRP NSP) FIX)
;" calculate number of spaces needed to the
; reach the next tab postion"
<SET NSP <- .SPCTAB <MOD .CRP .SPCTAB>>> >
<SETG TSTSTR "THIS IS A TEST OF
MULT-LINE TEXT
ABC DEF GHI JKL MNO PQR STU VWX YZ
0 1 2 3 4">
<SETG TSTSTR2 "THIS IS A TEST OF
MULT-LINE TEXT
ABC DEF GHI JKL MNO PQR STU VWX YZ
0 1 2 3 4">
<BLOCK ( !.OBLIST <GET IDISPLA OBLIST>)>
<SET 3DSTK ('T)>;"COMPILER CAUSED KLUDGE"