| 1 | .TH LIBRETRO UCB 4/8/79 UCB |
| 2 | .SH NAME |
| 3 | libretro \- 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 |
| 10 | int getuid(); |
| 11 | .sp .1i |
| 12 | #include <sgtty.h> |
| 13 | .sp .1i |
| 14 | stty(unit, buf) |
| 15 | struct sgttyb *buf; |
| 16 | .sp .1i |
| 17 | gtty(unit, buf) |
| 18 | struct sgttyb *buf; |
| 19 | .sp .1i |
| 20 | #include <sys/types.h> |
| 21 | #include <sys/stat.h> |
| 22 | stat(name, stbuf) |
| 23 | char *name; |
| 24 | struct stat *stbuf; |
| 25 | .sp .1i |
| 26 | fstat(name, stbuf) |
| 27 | char *name; |
| 28 | struct stat *stbuf; |
| 29 | .sp .1i |
| 30 | char * |
| 31 | getenv(name) |
| 32 | char *name; |
| 33 | .sp .1i |
| 34 | isatty(unit) |
| 35 | int unit; |
| 36 | .sp .1i |
| 37 | wait(status) |
| 38 | int *status;\fR |
| 39 | .fi |
| 40 | .SH DESCRIPTION |
| 41 | These implement version 7 functions on version 6 systems. |
| 42 | .PP |
| 43 | .I Getuid |
| 44 | returns just the real user id; the high 8 bits are thus normally clear. |
| 45 | .I Stty |
| 46 | and |
| 47 | .I gtty |
| 48 | perform the normal operations, but rearrange the expand tabs bit into |
| 49 | ``tab3'' delay as version 7 does. |
| 50 | .PP |
| 51 | .I Stat |
| 52 | and |
| 53 | .I fstat |
| 54 | maps a version 6 stat into the version 7 structure. |
| 55 | .PP |
| 56 | .I Getenv |
| 57 | can 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. |
| 60 | It returns 0 for everything else. |
| 61 | .PP |
| 62 | .I Isatty |
| 63 | tells whether the specified unit is attaches to a terminal. |
| 64 | .PP |
| 65 | .I Wait |
| 66 | does not call |
| 67 | .I nargs |
| 68 | so it will work separate i/d. |
| 69 | .PP |
| 70 | This library also defines ``_ctype'' as in stdio, but fixed so that |
| 71 | end-of-file (\-1) has the correct attributes (as it does in version 7), |
| 72 | and contains the |
| 73 | .I htmp |
| 74 | routines 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 |
| 82 | UNIX Programmers manual, version 7. |
| 83 | .SH AUTHOR |
| 84 | William Joy |
| 85 | .SH BUGS |