MODULE MiNT;

CONST
  SIGNULL = 0; SIGHUP = 1; SIGINT = 2; SIGQUIT = 3; SIGILL = 4;
  SIGTRAP = 5; SIGABRT = 6; SIGPRIV = 7; SIGFPE = 8; SIGKILL = 9;
  SIGBUS = 10; SIGSEGV = 11; SIGSYS = 12; SIGPIPE = 13; SIGALRM = 14;
  SIGTERM = 15; SIGURG = 16; SIGSTOP = 17; SIGTSTP = 18; SIGCONT = 19;
  SIGCHLD = 20; SIGTTIN = 21; SIGTTOU = 22; SIGIO = 23; SIGXCPU = 24;
  SIGXFSZ = 25; SIGVTALRM = 26; SIGPROF = 27; SIGWINCH = 28;
  SIGUSR1 = 29; SIGUSR2 = 30;
  SIGDFL = 0; SIGIGN = 1;
  NOCLDSTOP = 1; 
  
TYPE
  sigaction = RECORD 
                Handler : LONGINT;
                Mask    : SET;
                Flags   : INTEGER;
              END;
              
PROCEDURE Syield();

PROCEDURE Fpipe(VAR ptr : INTEGER) : INTEGER;

PROCEDURE Fcntl(cmd : INTEGER; arg : LONGINT; f : INTEGER) : LONGINT;

PROCEDURE Finstat(f : INTEGER) : LONGINT;

PROCEDURE Foutstat(f : INTEGER) : LONGINT;

PROCEDURE Fgetchar(mode,f : INTEGER) : LONGINT;

PROCEDURE Fputchar(mode : INTEGER; c : LONGINT; f : INTEGER) : LONGINT;

PROCEDURE Pwait() : LONGINT;

PROCEDURE Pnice(delta : INTEGER) : INTEGER;

PROCEDURE Pgetpid() : INTEGER;

PROCEDURE Pgetppid() : INTEGER;

PROCEDURE Pgetpgrp() : INTEGER;

PROCEDURE Psetpgrp(pid,newgrp : INTEGER) : INTEGER;

PROCEDURE Pgetuid() : INTEGER;

PROCEDURE Psetuid(id : INTEGER) : INTEGER;

PROCEDURE Pkill(sig,pid : INTEGER) : INTEGER;

PROCEDURE Psignal(handler : LONGINT; sig : INTEGER) : LONGINT;

PROCEDURE Pvfork() : INTEGER;

PROCEDURE Pgetgid() : INTEGER;

PROCEDURE Psetgid(id: INTEGER) : INTEGER;

PROCEDURE Psigblock(mask: SET) : LONGINT;

PROCEDURE Psigsetmask(mask: SET) : LONGINT;

PROCEDURE Pusrval(arg: LONGINT) : LONGINT;

PROCEDURE Pdomain(newdom: INTEGER) : INTEGER;

PROCEDURE Psigreturn();

PROCEDURE Pfork() : INTEGER;

PROCEDURE Pwait3(VAR rusage: LONGINT; flag : INTEGER) : LONGINT;

PROCEDURE Fselect(VAR xfds,wfds,rfds : LONGINT; timeout : INTEGER) : INTEGER;

PROCEDURE Prusage(r : LONGINT);

PROCEDURE Psetlimit(value: LONGINT; lim : INTEGER) : LONGINT;

PROCEDURE Talarm(secs : LONGINT) : LONGINT;

PROCEDURE Pause();

PROCEDURE Sysconf(n : INTEGER) : LONGINT;

PROCEDURE Psigpending() : LONGINT;

PROCEDURE Dpathconf(n : INTEGER; name : LONGINT) : LONGINT;

PROCEDURE Pmsg(msg,mbox : LONGINT; mode : INTEGER) : LONGINT;

PROCEDURE Fmidipipe(out,in,pid : INTEGER) : LONGINT;

PROCEDURE Prenice(delta,pid : INTEGER) : INTEGER;

PROCEDURE Dopendir(flag : INTEGER; name : LONGINT) : LONGINT;

PROCEDURE Dreaddir(buf,dir : LONGINT; buflen : INTEGER) : LONGINT;

PROCEDURE Drewinddir(dir : LONGINT) : LONGINT;

PROCEDURE Dclosedir(dir : LONGINT) : LONGINT;

PROCEDURE Fxattr(buf,name : LONGINT; flag : INTEGER) : LONGINT;

PROCEDURE Flink(newname,oldname : LONGINT) : LONGINT;

PROCEDURE Fsymlink(newname,oldname : LONGINT) : LONGINT;

PROCEDURE Freadlink(name,buf : LONGINT; siz : INTEGER) : LONGINT;

PROCEDURE Dcntl(arg,name : LONGINT; cmd : INTEGER) : LONGINT;

PROCEDURE Fchown(gid,uid : INTEGER; name : LONGINT) : LONGINT;

PROCEDURE Fchmod(mode : INTEGER; name : LONGINT) : LONGINT;

PROCEDURE Pumask(mask : INTEGER) : INTEGER;

PROCEDURE Psemaphore(timeout,id : LONGINT; mode : INTEGER) : LONGINT;

PROCEDURE Dlock(drive,mode : INTEGER) : INTEGER;

PROCEDURE Psigpause(sigmask : SET);

PROCEDURE Psigaction(oact,act : LONGINT; sig : INTEGER) : LONGINT;

PROCEDURE Pgeteuid() : LONGINT;

PROCEDURE Pgetegid() : LONGINT;

PROCEDURE Pwaitpid(rusage : LONGINT; flag,pid : INTEGER);

PROCEDURE Dgetcwd(size,drv : INTEGER; path : LONGINT);

PROCEDURE Salert(msg : LONGINT);

END MiNT.