Delete 689 undead files.
These files "magically reappeared" after the conversion from CVS to Mercurial. The old CVS repository deleted these files but did not record *when* it deleted these files. The conversion resurrected these files because they have no history of deletion. These files were probably deleted before year 1995. The CVS repository begins to record deletions around 1995. These files may still appear in older revisions of this Mercurial repository, when they should already be deleted. There is no way to fix this, because the CVS repository provides no dates of deletion. See http://sourceforge.net/mailarchive/message.php?msg_id=29823032
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
# $Header$
|
||||
MACH=minix
|
||||
|
||||
all: libsys_o.a end.o head_em.o
|
||||
|
||||
install: all
|
||||
../../install libsys_o.a tail_mon
|
||||
../../install head_em.o head_em
|
||||
../../install end.o end_em
|
||||
|
||||
cmp: all
|
||||
-../../compare libsys_o.a tail_mon
|
||||
-../../compare head_em.o head_em
|
||||
-../../compare end.o end_em
|
||||
|
||||
|
||||
end.o: end.s
|
||||
$(MACH) -I../../../h -O -c end.s
|
||||
|
||||
head_em.o: head_em.s
|
||||
$(MACH) -I../../../h -O -c head_em.s
|
||||
|
||||
libsys.a: libsys_s.a
|
||||
ASAR=aal ; export ASAR ;\
|
||||
march . libsys.a
|
||||
|
||||
libsys_o.a: libsys.a ../../../lib/i86/tail_em
|
||||
mkdir X; cd X; aal x ../../../../lib/i86/tail_em; aal x ../libsys.a; aal rv ../libsys_o.a *.o ; cd ..
|
||||
rm -rf X
|
||||
|
||||
clean:
|
||||
rm -f *.o libsys_o.a libsys.a
|
||||
|
||||
opr :
|
||||
make pr | opr
|
||||
|
||||
pr:
|
||||
@pr `pwd`/head_em.s
|
||||
@arch pv libsys.a | pr -h `pwd`/libsys.a
|
||||
@pr `pwd`/end.s
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int access(name, mode)
|
||||
char *name;
|
||||
int mode;
|
||||
{
|
||||
return callm3(FS, ACCESS, mode, name);
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int alarm(sec)
|
||||
unsigned sec;
|
||||
{
|
||||
return callm1(MM, ALARM, (int) sec, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
extern char *brksize;
|
||||
|
||||
PUBLIC char *brk(addr)
|
||||
char *addr;
|
||||
{
|
||||
int k;
|
||||
|
||||
k = callm1(MM, BRK, 0, 0, 0, addr, NIL_PTR, NIL_PTR);
|
||||
if (k == OK) {
|
||||
brksize = M.m2_p1;
|
||||
return(NIL_PTR);
|
||||
} else {
|
||||
return( (char*) -1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PUBLIC char *sbrk(incr)
|
||||
int incr;
|
||||
{
|
||||
char *newsize, *oldsize;
|
||||
|
||||
oldsize = brksize;
|
||||
newsize = brksize + incr;
|
||||
if (incr > 0 && newsize < oldsize || incr < 0 && newsize > oldsize)
|
||||
return( (char *) -1);
|
||||
if (brk(newsize) == 0)
|
||||
return(oldsize);
|
||||
else
|
||||
return( (char *) -1 );
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int chdir(name)
|
||||
char *name;
|
||||
{
|
||||
return callm3(FS, CHDIR, 0, name);
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int chmod(name, mode)
|
||||
char* name;
|
||||
int mode;
|
||||
{
|
||||
return callm3(FS, CHMOD, mode, name);
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int chown(name, owner, grp)
|
||||
char *name;
|
||||
int owner, grp;
|
||||
{
|
||||
return callm1(FS, CHOWN, len(name), owner, grp, name, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int chroot(name)
|
||||
char* name;
|
||||
{
|
||||
return callm3(FS, CHROOT, 0, name);
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int close(fd)
|
||||
int fd;
|
||||
{
|
||||
return callm1(FS, CLOSE, fd, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
if minix -c -L -LIB $1 1>&2
|
||||
then echo `basename $1 $2`.o
|
||||
else exit 1
|
||||
fi
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int creat(name, mode)
|
||||
char* name;
|
||||
int mode;
|
||||
{
|
||||
return callm3(FS, CREAT, mode, name);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int dup(fd)
|
||||
int fd;
|
||||
{
|
||||
return callm1(FS, DUP, fd, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int dup2(fd, fd2)
|
||||
int fd, fd2;
|
||||
{
|
||||
return callm1(FS, DUP, fd+0100, fd2, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define endtext,enddata,endbss
|
||||
.define _end,_etext,_edata
|
||||
|
||||
! $Header$
|
||||
.sect .text
|
||||
endtext:
|
||||
_etext:
|
||||
.align 2
|
||||
.sect .data
|
||||
enddata:
|
||||
_edata:
|
||||
.align 2
|
||||
.sect .endsect
|
||||
_end:
|
||||
endbss:
|
||||
.align 2
|
||||
@@ -1,103 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
extern char **environ; /* environment pointer */
|
||||
|
||||
#define PTRSIZE sizeof(char *)
|
||||
|
||||
PUBLIC int execl(name, arg0)
|
||||
char *name;
|
||||
char *arg0;
|
||||
{
|
||||
return execve(name, &arg0, environ);
|
||||
}
|
||||
|
||||
PUBLIC int execle(name, argv)
|
||||
char *name, *argv;
|
||||
{
|
||||
char **p;
|
||||
p = (char **) &argv;
|
||||
while (*p++) /* null statement */ ;
|
||||
return execve(name, &argv, *p);
|
||||
}
|
||||
|
||||
PUBLIC int execv(name, argv)
|
||||
char *name, *argv[];
|
||||
{
|
||||
return execve(name, argv, environ);
|
||||
}
|
||||
|
||||
|
||||
PUBLIC int execve(name, argv, envp)
|
||||
char *name; /* pointer to name of file to be executed */
|
||||
char *argv[]; /* pointer to argument array */
|
||||
char *envp[]; /* pointer to environment */
|
||||
{
|
||||
char stack[MAX_ISTACK_BYTES];
|
||||
char **argorg, **envorg, *hp, **ap, *p;
|
||||
int i, nargs, nenvps, stackbytes, offset;
|
||||
extern errno;
|
||||
|
||||
/* Count the argument pointers and environment pointers. */
|
||||
nargs = 0;
|
||||
nenvps = 0;
|
||||
argorg = argv;
|
||||
envorg = envp;
|
||||
while (*argorg++ != NIL_PTR) nargs++;
|
||||
while (*envorg++ != NIL_PTR) nenvps++;
|
||||
|
||||
/* Prepare to set up the initial stack. */
|
||||
hp = &stack[(nargs + nenvps + 3) * PTRSIZE];
|
||||
if (hp + nargs + nenvps >= &stack[MAX_ISTACK_BYTES]) {
|
||||
errno = E2BIG;
|
||||
return(-1);
|
||||
}
|
||||
ap = (char **) stack;
|
||||
*ap++ = (char *) nargs;
|
||||
|
||||
/* Prepare the argument pointers and strings. */
|
||||
for (i = 0; i < nargs; i++) {
|
||||
offset = hp - stack;
|
||||
*ap++ = (char *) offset;
|
||||
p = *argv++;
|
||||
while (*p) {
|
||||
*hp++ = *p++;
|
||||
if (hp >= &stack[MAX_ISTACK_BYTES]) {
|
||||
errno = E2BIG;
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
*hp++ = (char) 0;
|
||||
}
|
||||
*ap++ = NIL_PTR;
|
||||
|
||||
/* Prepare the environment pointers and strings. */
|
||||
for (i = 0; i < nenvps; i++) {
|
||||
offset = hp - stack;
|
||||
*ap++ = (char *) offset;
|
||||
p = *envp++;
|
||||
while (*p) {
|
||||
*hp++ = *p++;
|
||||
if (hp >= &stack[MAX_ISTACK_BYTES]) {
|
||||
errno = E2BIG;
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
*hp++ = (char) 0;
|
||||
}
|
||||
*ap++ = NIL_PTR;
|
||||
stackbytes = ( ( (int)(hp - stack) + PTRSIZE - 1)/PTRSIZE) * PTRSIZE;
|
||||
return callm1(MM_PROC_NR, EXEC, len(name), stackbytes, 0,name, stack,NIL_PTR);
|
||||
}
|
||||
|
||||
|
||||
PUBLIC execn(name)
|
||||
char *name; /* pointer to file to be exec'd */
|
||||
{
|
||||
/* Special version used when there are no args and no environment. This call
|
||||
* is principally used by INIT, to avoid having to allocate MAX_ISTACK_BYTES.
|
||||
*/
|
||||
|
||||
static char stack[3 * PTRSIZE];
|
||||
|
||||
return callm1(MM_PROC_NR, EXEC, len(name), sizeof(stack), 0, name, stack, NIL_PTR);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int fork()
|
||||
{
|
||||
return callm1(MM, FORK, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int fstat(fd, buffer)
|
||||
int fd;
|
||||
char *buffer;
|
||||
{
|
||||
int n;
|
||||
n = callm1(FS, FSTAT, fd, 0, 0, buffer, NIL_PTR, NIL_PTR);
|
||||
return(n);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC gid getegid()
|
||||
{
|
||||
int k;
|
||||
k = callm1(MM, GETGID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
if (k < 0) return ( (gid) k);
|
||||
return( (gid) M.m2_i1);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC uid geteuid()
|
||||
{
|
||||
int k;
|
||||
k = callm1(MM, GETUID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
if (k < 0) return ( (uid) k);
|
||||
return ((uid) M.m2_i1);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC gid getgid()
|
||||
{
|
||||
int k;
|
||||
k = callm1(MM, GETGID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
return( (gid) k);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int getpid()
|
||||
{
|
||||
return callm1(MM, GETPID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC uid getuid()
|
||||
{
|
||||
int k;
|
||||
k = callm1(MM, GETUID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
return( (uid) k);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include <sgtty.h>
|
||||
|
||||
gtty(fd, argp)
|
||||
int fd;
|
||||
char *argp;
|
||||
{
|
||||
return ioctl(fd, TIOCGETP, argp);
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
#include "lib.h"
|
||||
#include <minix/com.h>
|
||||
#include <sgtty.h>
|
||||
|
||||
PUBLIC int ioctl(fd, request, u)
|
||||
int fd;
|
||||
int request;
|
||||
union {
|
||||
struct sgttyb *argp;
|
||||
struct tchars *argt;
|
||||
} u;
|
||||
|
||||
{
|
||||
int n, ispeed, ospeed;
|
||||
long erase, kill, intr, quit, xon, xoff, eof, brk, speed;
|
||||
|
||||
M.TTY_REQUEST = request;
|
||||
M.TTY_LINE = fd;
|
||||
|
||||
switch(request) {
|
||||
case TIOCSETP:
|
||||
erase = u.argp->sg_erase & BYTE;
|
||||
kill = u.argp->sg_kill & BYTE;
|
||||
M.TTY_SPEK = (erase << 8) | kill;
|
||||
M.TTY_FLAGS = u.argp->sg_flags;
|
||||
M.TTY_SPEED = (u.argp->sg_ospeed << 8) | u.argp->sg_ispeed;
|
||||
n = callx(FS, IOCTL);
|
||||
return(n);
|
||||
|
||||
case TIOCSETC:
|
||||
intr = u.argt->t_intrc & BYTE;
|
||||
quit = u.argt->t_quitc & BYTE;
|
||||
xon = u.argt->t_startc & BYTE;
|
||||
xoff = u.argt->t_stopc & BYTE;
|
||||
eof = u.argt->t_eofc & BYTE;
|
||||
brk = u.argt->t_brkc & BYTE; /* not used at the moment */
|
||||
M.TTY_SPEK = (intr<<24) | (quit<<16) | (xon<<8) | (xoff<<0);
|
||||
M.TTY_FLAGS = (eof<<8) | (brk<<0);
|
||||
n = callx(FS, IOCTL);
|
||||
return(n);
|
||||
|
||||
case TIOCGETP:
|
||||
n = callx(FS, IOCTL);
|
||||
u.argp->sg_erase = (M.TTY_SPEK >> 8) & BYTE;
|
||||
u.argp->sg_kill = (M.TTY_SPEK >> 0) & BYTE;
|
||||
u.argp->sg_flags = M.TTY_FLAGS & 0xFFFF;
|
||||
speed = (M.TTY_FLAGS >> 16) & 0xFFFFL;
|
||||
u.argp->sg_ispeed = speed & BYTE;
|
||||
u.argp->sg_ospeed = (speed >> 8) & BYTE;
|
||||
return(n);
|
||||
|
||||
case TIOCGETC:
|
||||
n = callx(FS, IOCTL);
|
||||
u.argt->t_intrc = (M.TTY_SPEK >> 24) & BYTE;
|
||||
u.argt->t_quitc = (M.TTY_SPEK >> 16) & BYTE;
|
||||
u.argt->t_startc = (M.TTY_SPEK >> 8) & BYTE;
|
||||
u.argt->t_stopc = (M.TTY_SPEK >> 0) & BYTE;
|
||||
u.argt->t_eofc = (M.TTY_FLAGS >> 8) & BYTE;
|
||||
u.argt->t_brkc = (M.TTY_FLAGS >> 8) & BYTE;
|
||||
return(n);
|
||||
|
||||
default:
|
||||
n = -1;
|
||||
errno = -(EINVAL);
|
||||
return(n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int kill(proc, sig)
|
||||
int proc; /* which process is to be sent the signal */
|
||||
int sig; /* signal number */
|
||||
{
|
||||
return callm1(MM, KILL, proc, sig, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#include <minix/const.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/callnr.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern message M;
|
||||
|
||||
#define MM 0
|
||||
#define FS 1
|
||||
|
||||
extern int callm1(), callm3(), callx(), len();
|
||||
extern int errno;
|
||||
extern int begsig(); /* interrupts all vector here */
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int link(name, name2)
|
||||
char *name, *name2;
|
||||
{
|
||||
return callm1(FS, LINK, len(name), len(name2), 0, name, name2, NIL_PTR);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC long lseek(fd, offset, whence)
|
||||
int fd;
|
||||
long offset;
|
||||
int whence;
|
||||
{
|
||||
int k;
|
||||
M.m2_i1 = fd;
|
||||
M.m2_l1 = offset;
|
||||
M.m2_i2 = whence;
|
||||
k = callx(FS, LSEEK);
|
||||
if (k != OK) return( (long) k); /* send itself failed */
|
||||
return(M.m2_l1);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int mknod(name, mode, addr)
|
||||
char *name;
|
||||
int mode, addr;
|
||||
{
|
||||
return callm1(FS, MKNOD, len(name), mode, addr, name, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/* mktemp - make a name for a temporary file */
|
||||
|
||||
char *mktemp(template)
|
||||
char *template;
|
||||
{
|
||||
int pid, k;
|
||||
char *p;
|
||||
|
||||
pid = getpid(); /* get process id as semi-unique number */
|
||||
p = template;
|
||||
while (*p++) ; /* find end of string */
|
||||
p--; /* backup to last character */
|
||||
|
||||
/* Replace XXXXXX at end of template with pid. */
|
||||
while (*--p == 'X') {
|
||||
*p = '0' + (pid % 10);
|
||||
pid = pid/10;
|
||||
}
|
||||
return(template);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int mount(special, name, rwflag)
|
||||
char *name, *special;
|
||||
int rwflag;
|
||||
{
|
||||
return callm1(FS, MOUNT, len(special), len(name), rwflag, special, name, NIL_PTR);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int open(name, mode)
|
||||
char* name;
|
||||
int mode;
|
||||
{
|
||||
return callm3(FS, OPEN, mode, name);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int pause()
|
||||
{
|
||||
return callm1(MM, PAUSE, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int pipe(fild)
|
||||
int fild[2];
|
||||
{
|
||||
int k;
|
||||
k = callm1(FS, PIPE, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
if (k >= 0) {
|
||||
fild[0] = M.m1_i1;
|
||||
fild[1] = M.m1_i2;
|
||||
return(0);
|
||||
} else
|
||||
return(k);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int read(fd, buffer, nbytes)
|
||||
int fd;
|
||||
char *buffer;
|
||||
int nbytes;
|
||||
{
|
||||
int n;
|
||||
n = callm1(FS, READ, fd, nbytes, 0, buffer, NIL_PTR, NIL_PTR);
|
||||
return(n);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int setgid(grp)
|
||||
int grp;
|
||||
{
|
||||
return callm1(MM, SETGID, grp, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int setuid(usr)
|
||||
int usr;
|
||||
{
|
||||
return callm1(MM, SETUID, usr, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
#include "lib.h"
|
||||
#include <signal.h>
|
||||
|
||||
int (*vectab[NSIG])(); /* array of functions to catch signals */
|
||||
|
||||
/* The definition of signal really should be
|
||||
* PUBLIC int (*signal(signr, func))()
|
||||
* but some compilers refuse to accept this, even though it is correct.
|
||||
* The only thing to do if you are stuck with such a defective compiler is
|
||||
* change it to
|
||||
* PUBLIC int *signal(signr, func)
|
||||
* and change ../h/signal.h accordingly.
|
||||
*/
|
||||
|
||||
PUBLIC int (*signal(signr, func))()
|
||||
int signr; /* which signal is being set */
|
||||
int (*func)(); /* pointer to function that catches signal */
|
||||
{
|
||||
int r,(*old)();
|
||||
|
||||
old = vectab[signr - 1];
|
||||
vectab[signr - 1] = func;
|
||||
M.m6_i1 = signr;
|
||||
M.m6_f1 = ( (func == SIG_IGN || func == SIG_DFL) ? func : begsig);
|
||||
r = callx(MM, SIGNAL);
|
||||
if (r == 1) old = SIG_IGN;
|
||||
return( (r < 0 ? (int (*)()) r : old) );
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int stat(name, buffer)
|
||||
char *name;
|
||||
char *buffer;
|
||||
{
|
||||
int n;
|
||||
n = callm1(FS, STAT, len(name), 0, 0, name, buffer, NIL_PTR);
|
||||
return(n);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
std_err(s)
|
||||
char *s;
|
||||
{
|
||||
char *p = s;
|
||||
|
||||
while(*p != 0) p++;
|
||||
write(2, s, (int)(p - s));
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int stime(top)
|
||||
long *top;
|
||||
{
|
||||
M.m2_l1 = *top;
|
||||
return callx(FS, STIME);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include <sgtty.h>
|
||||
|
||||
stty(fd, argp)
|
||||
int fd;
|
||||
char *argp;
|
||||
{
|
||||
return ioctl(fd, TIOCSETP, argp);
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int sync()
|
||||
{
|
||||
return callm1(FS, SYNC, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC long time(tp)
|
||||
long *tp;
|
||||
{
|
||||
int k;
|
||||
long l;
|
||||
k = callm1(FS, TIME, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
if (M.m_type < 0 || k != OK) {errno = -M.m_type; return(-1L);}
|
||||
l = M.m2_l1;
|
||||
if (tp != (long *) 0) *tp = l;
|
||||
return(l);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#include "lib.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/times.h>
|
||||
|
||||
PUBLIC int times(buf)
|
||||
struct tms *buf;
|
||||
{
|
||||
int k;
|
||||
k = callm1(FS, TIMES, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
buf->tms_utime = M.m4_l1;
|
||||
buf->tms_stime = M.m4_l2;
|
||||
buf->tms_cutime = M.m4_l3;
|
||||
buf->tms_cstime = M.m4_l4;
|
||||
return(k);
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
.sect .text ; .sect .rom; .sect .data; .sect .bss
|
||||
.define .trpdivz
|
||||
.define .trpilin
|
||||
.define .trpcase
|
||||
.define .trprang
|
||||
.define .trpset
|
||||
.define .trpnofp
|
||||
.define .trpheap
|
||||
.define .trp
|
||||
.define .stop
|
||||
|
||||
.sect .text
|
||||
.extern .trpdivz
|
||||
.extern .trpilin
|
||||
.extern .trpcase
|
||||
.extern .trprang
|
||||
.extern .trpset
|
||||
.extern .trpnofp
|
||||
.extern .trpheap
|
||||
.extern .trp
|
||||
|
||||
.trpdivz:
|
||||
mov ax,6
|
||||
mov dx,.Mdivz
|
||||
jmp .Trp
|
||||
.trpilin:
|
||||
mov ax,18
|
||||
mov dx,.Milin
|
||||
jmp .Trp
|
||||
.trpcase:
|
||||
mov ax,20
|
||||
mov dx,.Mcase
|
||||
jmp .Trp
|
||||
.trprang:
|
||||
mov ax,1
|
||||
mov dx,.Mrang
|
||||
jmp .Trp
|
||||
.trpset:
|
||||
mov ax,2
|
||||
mov dx,.Mset
|
||||
jmp .Trp
|
||||
.trpnofp:
|
||||
mov ax,18
|
||||
mov dx,.Mnofp
|
||||
jmp .Trp
|
||||
.trpheap:
|
||||
mov ax,17
|
||||
mov dx,.Mheap
|
||||
jmp .Trp
|
||||
|
||||
.Trp:
|
||||
xor bx,bx
|
||||
.extern .trppc
|
||||
xchg bx,(.trppc)
|
||||
test bx,bx
|
||||
jz 2f
|
||||
push ax
|
||||
call (bx)
|
||||
pop ax
|
||||
ret
|
||||
2:
|
||||
mov bx,22
|
||||
push bx
|
||||
push dx
|
||||
mov ax,2
|
||||
push ax
|
||||
call _write
|
||||
.stop:
|
||||
call _exit
|
||||
|
||||
.trp:
|
||||
mov dx,ax
|
||||
cmp dx,21
|
||||
jae 1f
|
||||
sal dx,1
|
||||
mov bx,.Mtable
|
||||
add bx,dx
|
||||
mov bx,(bx)
|
||||
test bx,bx
|
||||
jz 1f
|
||||
mov dx,bx
|
||||
jmp 2f
|
||||
1:
|
||||
mov bx,.Mtrp+14
|
||||
mov cx,6
|
||||
mov dx,ax
|
||||
1:
|
||||
and dx,7
|
||||
add dx,'0'
|
||||
movb (bx),dl
|
||||
dec bx
|
||||
sar dx,1
|
||||
sar dx,1
|
||||
sar dx,1
|
||||
loop 1b
|
||||
mov dx,.Mtrp
|
||||
2:
|
||||
jmp .Trp
|
||||
|
||||
.sect .rom
|
||||
.Mtable:
|
||||
.data2 0, .Mrang, .Mset, 0, 0, 0, .Mdivz, 0
|
||||
.data2 0, 0, 0, 0, 0, 0, 0, 0
|
||||
.data2 0, .Mheap, .Milin, .Milin, .Mcase
|
||||
|
||||
.Mdivz: .asciz "Error: Division by 0 \n"
|
||||
.Milin: .asciz "Illegal EM instruct'n\n"
|
||||
.Mcase: .asciz "Err in EM case instr \n"
|
||||
.Mrang: .asciz "Variable out of range\n"
|
||||
.Mset: .asciz "Err in EM set instr \n"
|
||||
.Mnofp: .asciz "Floating pt not impl.\n"
|
||||
.Mheap: .asciz "Heap overflow \n"
|
||||
|
||||
.Mtrp: .asciz "EM trap 0000000 octal\n"
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int umask(complmode)
|
||||
int complmode;
|
||||
{
|
||||
return callm1(FS, UMASK, complmode, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int umount(name)
|
||||
char* name;
|
||||
{
|
||||
return callm3(FS, UMOUNT, 0, name);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int unlink(name)
|
||||
char *name;
|
||||
{
|
||||
return callm3(FS, UNLINK, 0, name);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int utime(name, timp)
|
||||
char *name;
|
||||
long timp[2];
|
||||
{
|
||||
M.m2_i1 = len(name);
|
||||
M.m2_l1 = timp[0];
|
||||
M.m2_l2 = timp[1];
|
||||
M.m2_p1 = name;
|
||||
return callx(FS, UTIME);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int wait(status)
|
||||
int *status;
|
||||
{
|
||||
int k;
|
||||
k = callm1(MM, WAIT, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
|
||||
if (k >= 0 && status != 0) *status = M.m2_i1;
|
||||
return(k);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "lib.h"
|
||||
|
||||
PUBLIC int write(fd, buffer, nbytes)
|
||||
char *buffer;
|
||||
int nbytes;
|
||||
{
|
||||
return callm1(FS, WRITE, fd, nbytes, 0, buffer, NIL_PTR, NIL_PTR);
|
||||
}
|
||||
Reference in New Issue
Block a user