BSD 2 development
[unix-history] / man / libretro.u
CommitLineData
ad1b34df
MT
1.TH LIBRETRO UCB 4/8/79 UCB
2.SH NAME
3libretro \- library to fit version 7 programs on version 6 systems
4.SH SYNOPSIS
5.nf
6\fBcc \-I/usr/include/retrofit ... -lretro -lS
7.sp .1i
8#include <retrofit.h>
9.sp .1i
10int getuid();
11.sp .1i
12#include <sgtty.h>
13.sp .1i
14stty(unit, buf)
15struct sgttyb *buf;
16.sp .1i
17gtty(unit, buf)
18struct sgttyb *buf;
19.sp .1i
20#include <sys/types.h>
21#include <sys/stat.h>
22stat(name, stbuf)
23char *name;
24struct stat *stbuf;
25.sp .1i
26fstat(name, stbuf)
27char *name;
28struct stat *stbuf;
29.sp .1i
30char *
31getenv(name)
32char *name;
33.sp .1i
34isatty(unit)
35int unit;
36.sp .1i
37wait(status)
38int *status;\fR
39.fi
40.SH DESCRIPTION
41These implement version 7 functions on version 6 systems.
42.PP
43.I Getuid
44returns just the real user id; the high 8 bits are thus normally clear.
45.I Stty
46and
47.I gtty
48perform the normal operations, but rearrange the expand tabs bit into
49``tab3'' delay as version 7 does.
50.PP
51.I Stat
52and
53.I fstat
54maps a version 6 stat into the version 7 structure.
55.PP
56.I Getenv
57can be called with
58``HOME'' to return the home directory of the real user, or
59``TERM'' to return a string giving the terminal type in use.
60It returns 0 for everything else.
61.PP
62.I Isatty
63tells whether the specified unit is attaches to a terminal.
64.PP
65.I Wait
66does not call
67.I nargs
68so it will work separate i/d.
69.PP
70This library also defines ``_ctype'' as in stdio, but fixed so that
71end-of-file (\-1) has the correct attributes (as it does in version 7),
72and contains the
73.I htmp
74routines used to fake
75.I getenv.
76.SH FILES
77.DT
78/usr/include/retrofit root for header files
79.br
80/etc/htmp data base for \fIgetenv\fR
81.SH SEE ALSO
82UNIX Programmers manual, version 7.
83.SH AUTHOR
84William Joy
85.SH BUGS