Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1 @@
.fo 'REGULUS Reference Manual'- % -'SUBS'

View File

@@ -0,0 +1,29 @@
.so macro
.he 'ATOF''ATOF'
.n NAME
atof - ascii to floating point conversion
.sy SYNOPSIS
.nf
#include <math.h>
double
atof(s)
char *s;
.fi
.d DESCRIPTION
\&'atof' converts an ascii string into it's floating point representation,
where the string is of the format :
.sp
.nf
.ti +5
{sign}{digits}{'.'}{digits}{E}{sign}{digits}
.fi
.sp
Both signs and the exponent string is optional. The decimal point is
optional, but may appear at any point in the digit string.
The single precision result is returned.
.fl FILES
math.h - routine declaration
.sa SEE ALSO
etoa(subs), ftoa(subs), atol(subs)
.dg DIAGNOSTICS

View File

@@ -0,0 +1,18 @@
.so macro
.he 'CEIL''CEIL'
.n CEIL
ceil - floating point ceiling function
.sy SYNOPSIS
.nf
#include <math.h>
double ceil(d)
double d;
.fi
.d DESCRIPTION
\&'ceil' returns the smallest integer (as a double precision
number) not less than x.
.fl FILES
math.h - declaration include file
.sa SEE ALSO
floor(subs)

View File

@@ -0,0 +1,27 @@
.so macro
.he 'ETOA''ETOA'
.n etoa
etoa - floating point exponential to ascii
.sy SYNOPSIS
.nf
#include <math.h>
char *
etoa(fp,buf,prec)
float fp;
char *buf;
int prec;
.fi
.d DESCRIPTION
\&'etoa' converts a float into it's ascii exponential representation.
Where fp is a floating point number, buf is the buffer in
which to return the string, and
prec is the precision of the decimal places.
If the precision is specified to be zero or negative then the default
precision of six decimal places will be used.
A pointer to the beginning of buf is returned.
.fl FILES
math.h - routine declaration
.sa SEE ALSO
ftoa(subs), atoi(subs), atol(subs), itoa(subs)
.dg DIAGNOSTICS

View File

@@ -0,0 +1,17 @@
.so macro
.he 'FABS''FABS'
.n FABS
fabs - floating point absolute
.sy SYNOPSIS
.nf
#include <math.h>
double
fabs(d)
double d;
.fi
.d DESCRIPTION
\&'fabs' returns the absolute value of a floating point number.
.fl FILES
math.h - declaration include file
.sa SEE ALSO

View File

@@ -0,0 +1,18 @@
.so macro
.he 'FLOOR''FLOOR'
.n FLOOR
floor - floating point floor function
.sy SYNOPSIS
.nf
#include <math.h>
double floor(d)
double d;
.fi
.d DESCRIPTION
\&'floor' returns the largest integer (as a double precision
number) not greater than x.
.fl FILES
math.h - declaration include file
.sa SEE ALSO
ceil(subs)

View File

@@ -0,0 +1,16 @@
.so macro
.he 'FMOD''FMOD'
.n FMOD
fmod - floating point remainder function
.sy SYNOPSIS
.nf
#include <math.h>
double fmod(x,y)
double x,y;
.fi
.d DESCRIPTION
\&'fmod' returns the remainder when x is divided by y.
.fl FILES
math.h - declaration include file
.sa SEE ALSO

View File

@@ -0,0 +1,28 @@
.so macro
.he 'FTOA''FTOA'
.n NAME
ftoa - floating point to ascii conversion
.sy SYNOPSIS
.nf
#include <math.h>
char *
ftoa(fp,buf,prec)
float fp;
char *buf;
int prec;
.fi
.d DESCRIPTION
\&'ftoa' converts a float into it's ascii representation.
Where fp is a floating point number, buf is the buffer in
which to return the string, and
prec is the precision of the decimal places.
If the specified precision is zero then no decimal point will be
printed. If the precision is negative then the default precision
\&(6) will be used.
A pointer to the beginning of buf is returned.
.fl FILES
math.h - routine declaration
.sa SEE ALSO
etoa(subs), atoi(subs), atol(subs), itoa(subs)
.dg DIAGNOSTICS

View File

@@ -0,0 +1,17 @@
.th GETCHAR
.sh NAME
getchar \*- read character
.sh SYNOPSIS
.ft B
int getchar( )
.br
.ft R
.sh DESCRIPTION
Getchar reads records from the standard input (VERSAdos file #5)
into a buffer and returns these characters one per call to the
user. Getchar assumes that it is reading ASCII records. It
places a '\\n' character on the end of each record, and translates
the VERSAdos tab character (any negative character) into a '\\t'.
Getchar returns a negative number for EOF or read error.
Since all VERSAdos I/O is record I/O, getchar must be buffered,
and thus is not any less efficient than getc.

View File

@@ -0,0 +1,89 @@
.so macro
.he 'PRINTF''PRINTF'
.n NAME PRINTF
printf - formatted print
.sy SYNOPSIS
printf(plist);
char *plist;
.d DESCRIPTION
\&'printf' takes the input string and interprets various formatting
commands and outputs the results to the standard output device.
There are two types of items in the input string: characters which
are copied literally and format statements which work on strings,
characters and numerics.
.sp
The string takes the form of a literal string with embedded format
statements and the various arguments on which the format statements
act: printf("...",arg1,arg2...).
All format statements are
preceded by a percent sign and terminated by one of the conversion
characters.
Between the percent sign and the conversion characters
are optional symbols which adjust the standard formats.
.sp
The format statement consists of a contiguous group of characters.
A minus sign '-' may follow the percent sign to designate that the
item is to be left justified.
A decimal number designating the field width may optionally be specified.
If the item is larger than the specified width it will be printed as is.
If the item is smaller,
the item will be padded with spaces.
If the first digit of the specified width is a '0' then the item
will be padded with zero's instead of spaces.
If the item is a string or
a floating point number a second field preceded by a period '.'
may be specified.
The second width field specifies the number of
digits to the right of the decimal point in the case of a floating
point and the maximum number of characters to be printed in the
case of a string.
.sp
The last item of a format statement describes the item we are
formatting.
They are 'c', 'd', 'e', 'f', 'u', 'o', 's', and 'x'.
.sp
.in +6
.ti -7
\ 'c'\ \ \ The argument to be printed is a single character.
.sp
.ti -7
\ 's'\ \ \ The argument is a string or character pointer.
All characters will be printed unless a maximum width field is in force.
.sp
.ti -7
\ 'd'\ \ \ The argument is a decimal numeric.
.sp
.ti -7
\ 'o'\ \ \ The argument is a octal numeric.
.sp
.ti -7
\ 'x'\ \ \ The argument is a hexidecimal numeric.
.sp
.ti -7
\ 'u'\ \ \ The argument will be interpreted as an unsigned decimal
integer in the range 0 to 65535.
.sp
.ti -7
\ 'f'\ \ \ The argument is either a floating point or double precision
number.
It will be of the form: an optional minus sign, digits,
a decimal point, and more digits.
If no second width field has
been specified there will be six digits to the right of the decimal point.
.sp
.ti -7
\ 'e'\ \ \ The argument is to be printed in scientific notation and is
either a floating point or double precision number.
The format is
exactly like the 'f' format except that only one digit is to the
right of the decimal point and a two digit exponent is specified after
the number.
.sp
Format descriptors 'd', 'o', 'x', and 'u' may optionally be preceeded
by a 'l' character to specify that the argument to be printed is a
long rather than an integer.
.sp
Any other character following a percent sign will be taken as a
literal and will itself be printed.
In this way you can print a percent sign or a double quote.
.sp

View File

@@ -0,0 +1,25 @@
.th PUTCHAR
.sh NAME
putchar - write a character
.sh SYNOPSIS
.ft B
int getchar(c)
.br
char c;
.ft R
.sh DESCRIPTION
Putchar writes one character to the standard output (VERSAdos file #6).
Putchar assumes it is writting ASCII characters and buffers all
characters until a '\\n' is received. Then the '\\n' is stripped
from the buffer and the record is written. Tab characters are left
as '\\t' -- they are not translated into the VERSAdos convention
of a negative number. Putchar returns the character received for
success and returns a negative integer for failure.
Putchar may aso be used to write ASCII characters to a file other than
the standard output. If the external variable named fout is set to
any valid file descriptor, then putchar writes to that file rather
than the standard output. The routine named flush which writes
any characters in the putchar output buffer may be called to
force a write; however, writes occur automatically at the end
of each record ('\\n' delimiter).