1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-04 15:53:01 +00:00

Build R from source code.

Source files found in archive CLUSRC; _R -IPAK- dated 1978-01-30.
This commit is contained in:
Lars Brinkhoff
2021-08-27 13:03:53 +02:00
parent c288505517
commit 90e65c33d1
45 changed files with 15515 additions and 12 deletions

22
doc/r/r.histry Normal file
View File

@@ -0,0 +1,22 @@
21 11/6/76 11:27:27
20 9/19/76 18:55:01.5
19 7/8/76 18:39:02.5
18 5/31/76 16:43:38.5
17 3/5/76 14:36:49
16 2/26/76 21:05:14
15 2/21/76 12:46:46
14 12/22/75 13:49:17
13 12/6/75 17:54:53.5
12 11/13/75 12:44:44.5
11 11/2/75 18:13:18.5
10 10/30/75 11:09:52
9 10/28/75 12:33:22
8 10/26/75 18:01:44
7 10/13/75 17:29:43
6 9/20/75 19:12:33
5 9/1/75 18:17:05
4 8/16/75 21:01:57
3 5/11/75 21:46:02
2 4/16/75 11:36:05
1 3/19/75 15:30:11


79
doc/r/r.notes Normal file
View File

@@ -0,0 +1,79 @@
R CHANGES UNDER CONSIDERATION (30 Jan 1978)
-- changes made ---
leading ^C, ^R causes break
don't remove trailing blanks in nofill mode
FS changes both c and p fonts
PF request removed
TR takes 2 characters only
WF and WA can take a full file name (if one name given then
taken as extension)
HV, VV requests
^F ring buffer (also used by FS)
FONT, PFONT NR do not affect ring buffer
Fwidth NR
End_of_sentence NR
-- likely changes --
Allow arb. space/tab to separate file name from font mode
Should the no-space mode be reset when the vertical position is
changed? (YES)
.ms <macro-name> <sr-name> macro -> string
CFDATE, CFTIME string registers
Does ^X macro start in state=0? Should it?
LESS LIKELY CHANGES
Concealed newlines?
Outfile SR/SR init?
case shift request?
Better way to handle tabs.
Allow underlining of white space (internal prefix operator).
A way to avoid widows?
RD arg should always go to tty (error file on UNIX?)
Should .nr font x interfere with ^F* (by changing old font)?
At least document it.
There apparently is some use for a "left-justify" character, other
than the hpos hack, which perhaps should change.
Could use a "relative tab" that does not break words or affect justification.
Perhaps simply change semantics of .hp to always be
relative (thus allow negative hpos until actually used).
\^A"0 "doubles" quotes before inserting
Should allow more than 10 macro arguments?
Think about beginning-of-line and end-of-line traps (for line numbering
and large character hacks)
Perhaps the ES request should not copy the partial line.
Recognize hyphen at end of input line in fill mode (?)
Invisible hyphen character ^Y (?)
LPT_TABs: if (n=lpt_tabs)>0 then assume that LPT has tab stops every
n columns and use tabs for input tabs, ^Ps, etc.
Should " matching only occur at one input level? How difficult to
implement?
Possible uses for remaining control characters:
^O - horizontal offset
^Y - hYphen
R BUGS
R MACRO BUGS
R MACROS
R MACRO DOCUMENTATION
R MANUAL
Ignore would be a good example.
Should talk about using fixed-width fonts to get things
lined up as in input (pf and tabs).
Explain how character width is calculated, and what it means.
space_width = width (' ')
char_width = max (width (' '), min (2*width(' '), width ('0')))
Note that skipping statement bodies knows nothing about
macro definitions.
EQ needs example.
Note that .\^Sfoo is possible.


50
doc/r/rextrn.desc Normal file
View File

@@ -0,0 +1,50 @@
Description of externally used routines:
(Not including routines in RITS.C)
file I/O:
Files are represented by integers or pointers, returned by
the various open routines. These routines must return
the constant OPENLOSS when a file cannot be opened.
cputc (c, f) output the character c; '\n' implies
end of line
c = cgetc (f) input a character; '\n' implies end
of line; and negative or zero must be
returned on end-of-file
b = ceof (f) return TRUE iff end-of-file (last
character read by cgetc was negative
or zero)
gets (buffer) read a line of characters from standard
input into the buffer, terminated by
NUL
ungetc (c, f) push back character onto input stream;
capacity of 1 character is required
cclose (f) close file
cisfd (f) return nonzero if f looks like it is
a file descriptor
setprompt (s) make string s the default prompt for
terminal input (optional, of course)
Standard files:
cin standard input (used for terminal input)
cout standard output (used for messages)
cerr standard error (used for some fatal errors)
String routines:
n = slen (s) return length of string
b = stcmp (s1, s2) compare for equality of strings
stcpy (s, d) copy string from s to d
Storage allocation:
*i = salloc (n) return n integers [check for storage full]
*c = calloc (n) return n characters [check for storage full]
sfree (*i) return integers allocated by salloc
cfree (*c) return characters allocated by calloc
n = alocstat (*p, *q) return number of free words of storage
set *p to size of free space (in words)
and *q to the number of free blocks
return -1 if no stats available
Miscellaneous:
stkdmp (f) dump stack frames on file for debugging (optional)
i = cputm () return cpu time in 1/60 sec


68
doc/r/rideas.r Normal file
View File

@@ -0,0 +1,68 @@
.fo 0 25vg
.fo 1 25vgb
.fo 2 25vgi
.fo 3 31vg
.so r/r.macros
.sr left_heading 2R Ideas*
.sr right_heading 2fdate*
.de sec title {date}
.fi
.sp
.ne 5
3\0 \1*
.sp
.em
.de bug date
.fi
.sp
.ne 5
3\0 BUG*
.sp
.em
.sec "Page Selection" 6/29/75
It might be desirable to have a command option, like TROFF, which
causes only designated pages to be output.
.sec "String Substitution" 6/29/75
It has been suggested that R implement some form of low-level
string substitution (without rescanning), so that one could write
<= and have it replaced by ^F1^Q^[^F*.
.sec "Indexes" 9/18/75
One possibility is to be able to specify a list of words to be
indexed when output (don't do unless printing turned on).
XOFF (CMU 10/72) has the following commands:
.table
.index <word, page>
.note <word, phrase>
.print index
.end_table
These produce lines of the form
.table
word (phrase)page1, page2(5i)
.end_table
In addition, there is 1collate in*, which specifies sorting,
and 1collate out*, which specifies when a blank line should
be left in the index (normally between entries whose first characters
differ).
.sec "Output Diversion" 10/1/75
A possible way to do output diversion is to have another device type,
STRING, and save the actual device output in a macro. One problem
is to make sure that absolute vertical positions are changed to
relative.
Another possibility is to attempt to store the output in a form
which can be processed as input. This has the advantage of being
readable, at least. A new control character or mode would be
needed that would cause justification without filling.
.bug 10/3/75
It is possible to evoke a message, "escape character ('\t') not
allowed as text." I believe this escape character should be
allowed as text, regardless of how it is obtained.
.sec "Footnote Problems" 10/26/75
See Greif, p. 91, for PUB footnote lossage. What about footnote
reference in a figure which may be moved to the next page after
it is determined how much room it needs.
.sec "Macro Insertion" 11/1/75
It might be desirable to have some way of dynamically inserting
a macro body inside the definition of another macro. How should
one be able to concatenate two macros into another macro definition?


79
doc/r/rman.index Normal file
View File

@@ -0,0 +1,79 @@
.index am 17
.index be 19
.index bj 12
.index bk 19
.index bp 11
.index br 12
.index cc 22
.index ct 21
.index de 16
.index dv 10
.index ec 22
.index ef 19
.index em 17
.index en 19
.index eo 11
.index eq 17
.index es 18
.index ev 18
.index ex 21
.index fi 12
.index fo 10
.index fr 19
.index fs 10
.index hp 14
.index hs 14
.index hv 20
.index hx 15
.index if 19
.index in 13
.index ir 14
.index ll 13
.index ls 13
.index nc 22
.index nd 14
.index ne 11
.index nf 12
.index nr 14
.index ns 13
.index nv 19
.index nx 21
.index oo 11
.index pl 11
.index pn 11
.index rd 21
.index rl 24
.index rm 17
.index rs 13
.index rt 21
.index sb 15
.index sc 15
.index sd 15
.index si 15
.index sl 16
.index so 21
.index sp 13
.index sr 14
.index st 21
.index sv 19
.index ta 14
.index ti 14
.index tm 24
.index tr 23
.index uo 23
.index ut 23
.index vp 13
.index vv 20
.index vx 15
.index wa 21
.index we 22
.index wf 21
.index wh 19
.index wl 22
.index wm 22
.index ws 22
.index xc 24
.index xe 18
.index xn 15
.index xs 15


3156
doc/r/rman.r Normal file

File diff suppressed because it is too large Load Diff

237
doc/r/rman.toc Normal file
View File

@@ -0,0 +1,237 @@
.sr left_heading 2R Reference Manual*
.sr right_heading 230 January 1978*
.de table_of_contents
.new_font 7
.nf
.sp .5
1. Introduction . 4
.nf
.sp .5
2. Philosophy . 4
.nf
.sp .5
3. The Logical Input Alphabet . 5
.nf
.sp .5
4. The Input Mapping . 5
.nf
.sp .5
5. Input Modes . 6
.nf
.sp .5
6. Input Format . 6
.nf
.sp .5
7. Request Descriptions . 7
.sp .5
.fs 1
.ir +300m
.ne 2
.ta indent+600m
7.1 Output Device Specifications . 8
.fi

2dv*
2fo*
2fs*
.ne 2
.ta indent+600m
7.2 Page Control . 11
.fi

2pl*
2bp*
2pn*
2eo*
2oo*
2ne*
.ne 2
.ta indent+600m
7.3 Text Filling and Adjusting . 12
.fi

2br*
2bj*
2fi*
2nf*
.ne 2
.ta indent+600m
7.4 Line Spacing and Blank Lines . 12
.fi

2ls*
2sp*
2vp*
2ns*
2rs*
.ne 2
.ta indent+600m
7.5 Line Length, Indenting, and Horizontal Positioning . 13
.fi

2ll*
2in*
2ti*
2ir*
2ta*
2hs*
2hp*
.ne 2
.ta indent+600m
7.6 Registers . 14
.fi

2nr*
2sr*
2nd*
2sd*
2hx*
2vx*
2xn*
2xs*
.ne 2
.ta indent+600m
7.7 String Operations . 15
.fi

2sb*
2si*
2sc*
2sl*
.ne 2
.ta indent+600m
7.8 Macros . 16
.fi

2de*
2rm*
2am*
2eq*
2em*
.ne 2
.ta indent+600m
7.9 Environments . 17
.fi

2ev*
2es*
2xe*
.ne 2
.ta indent+600m
7.10 Blocks, Conditionals, Iteration, and Local Variables . 18
.fi

2be*
2if*
2ef*
2wh*
2fr*
2en*
2bk*
2nv*
2sv*
2hv*
2vv*
.ne 2
.ta indent+600m
7.11 Traps . 20
.fi

2st*
2rt*
2ct*
.ne 2
.ta indent+600m
7.12 Stream Switching . 21
.fi

2so*
2nx*
2rd*
2ex*
.ne 2
.ta indent+600m
7.13 Text File Output . 21
.fi

2wf*
2wa*
2ws*
2wl*
2wm*
2we*
.ne 2
.ta indent+600m
7.14 Control Characters . 22
.fi

2cc*
2nc*
2ec*
.ne 2
.ta indent+600m
7.15 Output Processing . 23
.fi

2tr*
2uo*
2ut*
.ne 2
.ta indent+600m
7.16 Miscellaneous . 24
.fi

2tm*
2rl*
2xc*
.br
.fs
.ir -300m
.ne 5i
.nf
.sp .5
8. Control Characters . 24
.nf
.sp .5
9. Delayed Interpretation of Control Characters . 28
.nf
.sp .5
10. Built-In Registers . 28
.nf
.sp .5
11. Freezing . 28
.nf
.sp .5
12. Invoking R . 30
.nf
.sp .5
13. Error Messages . 31
.nf
.sp .5
14. The Trace Facility . 31
.nf
.sp .5
15. Examples . 32
.sp .5
.fs 1
.ir +300m
.ta indent+600m
115.1 Paragraphs . 32*
.ta indent+600m
115.2 Chapter Headings . 33*
.ta indent+600m
115.3 Margins . 33*
.ta indent+600m
115.4 Headings . 34*
.ta indent+600m
115.5 Equations . 35*
.ta indent+600m
115.6 Computing the Width and Height of Text . 37*
.fs
.ir -300m
.sp .5
Request Summary . 39
.sp .5
Control Character Summary . 43
.do_index
.em

56
doc/r/rmantc.r Normal file
View File

@@ -0,0 +1,56 @@
.dv xgp
.fo 0 25vg
.fo 1 25vgb
.fo 2 25vgi
.fo 3 40vg
.fo 4 75vbee
.fo 5 18fg
.fo 6 31as
.fo 7 31vg
.fo 8 25as
.fo 9 22fg
.fo F 2AS
.
.tr @
.nr both_sides 1
.sr list_left_margin 500m
.sr list_right_margin 500m
.
.sr asterisk 1**
.sr newline 1newline*
.sr tab 1tab*
.sr quote 8'*
.sr dot dodot()
.
.so r.macros
.
.nr page 2
.begin_table_of_contents 2
.
.
.de index req page
.elements "\0@.@\1"
.em
.
.so rws/column.rmac
.
.de do_index
.sp 3
Request Index
.sp 2
.new_font 0
.in 0
.ir 0
.ta .5i 1.5i 2i 3i 3.5i 4.5i 5i 6i
.fi
.so rman.index
.hx inter_column_spacing 400m
.columns 4 1 0 0 0 800m
.nf
.new_font 7
.em
.
.
.so rman.toc
.nr verbose 1


118
doc/r/troff.compar Normal file
View File

@@ -0,0 +1,118 @@
.so usual.rmacs
.de e
.next
.nr e list_count-1
\e. 
.em
.
.
.nf c
1Comparison of R with respect to NROFF/TROFF0
.nf l
.fi
.sp 2
1External Features*
.br
.ilist 5
.ns
.e
Unlimited length macro and register names.
.e
All ASCII characters can be used as text. (Of course,
escape or quoting may be needed to write some characters.)
.e
Tracing mode for debugging.
.e
Control character mapping more reasonable and more precisely
defined. Changing the control character mapping does not
interfere with previously-defined macros.
.e
Many built-in number registers and string registers.
.e
Lambda-binding of registers. When used with the built-in
registers, this provides a convenient method for saving
and restoring states.
.e
Conditional and loop constructs.
.e
String operations.
.e
Up to 16 fonts. (Fonts are actually font/size combinations;
there is no notion of separately changing point size.)
.e
Many error messages. (Error messages go to the terminal;
formatted output always goes to a file.)
.e
Inline macro invocation. Useful for equations.
.e
Operator precedence in expressions.
.e
Extra line-space provided automatically to compensate for
extra-tall characters.
.e
Non-integer line-spacing allowed (e.g. space-and-a-half).
.e
Explicit right indentation.
.e
Arbitrary number of named environments.
.e
Tabs, hpos, etc. refer to 2output* positions.
.e
Can expunge environments and registers.
.e
To delay the interpretation of a control character for 2n* readings,
2n* backslashes are used, rather than 22n*-1.
.end_list
.sp
.ne 10
1Internal Features*
.br
.ilist 5
.ns
.e
Well-modularized, with device and system dependencies factored
out. Currently runs on 2 systems (PDP11 UNIX and PDP10 ITS)
and supports 3 devices (printing, XGP, and Varian).
.e
Long names used internally. (The long names are translated to
short ones where necessary by #defines. The C preprocessor must
be changed to recognize 16 characters in identifiers to support
this usage.)
.end_list
.sp
1External Unfeatures*
.br
.ilist 5
.ns
.e
No hyphenation.
.e
No diverted output. (However, facilities are provided to do
local two-pass processing.)
.e
No direct to terminal output. (A file is always produced.
A separate program can be used to print the file on a
terminal, pausing at each page and adding extra blank lines
to fill out pages.)
.e
No line numbering.
.e
No fixed-width mode.
.e
No input-line-count traps.
.e
No special support for ligatures or special names for
special characters.
.e
No transparent throughput mode.
.end_list
.sp
.ne 4
1Internal Unfeatures*
.br
.ilist 5
.ns
.e
Big -- requires separate I and D space on the PDP11.
.end_list