Index: trunk/minix/lib/sysutil/Makedepend-ack
===================================================================
--- trunk/minix/lib/sysutil/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' kmalloc.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' kprintf.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' kputc.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tickdelay.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getuptime.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_get_prm.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_parse.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_panic.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_prefix.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fkey_ctl.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' report.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' taskcall.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
Index: trunk/minix/lib/sysutil/Makedepend-gnu
===================================================================
--- trunk/minix/lib/sysutil/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' kmalloc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' kprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' kputc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tickdelay.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' getuptime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_get_prm.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_parse.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_panic.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_prefix.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fkey_ctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' report.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' taskcall.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
Index: trunk/minix/lib/sysutil/Makefile
===================================================================
--- trunk/minix/lib/sysutil/Makefile	(revision 9)
+++ 	(revision )
@@ -1,129 +1,0 @@
-#Generated from ./sysutil/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./sysutil ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./sysutil ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libsysutil.a
-
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(kmalloc.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(kprintf.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(kputc.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(tickdelay.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(getuptime.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_get_prm.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_parse.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_panic.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_prefix.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(fkey_ctl.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(report.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(taskcall.o)
-
-../obj-ack//libsysutil.a:
-	ar cr ../obj-ack//libsysutil.a ../obj-ack//./sysutil/*.o
-	rm ../obj-ack//./sysutil/*.o
-
-../obj-ack//libsysutil.a(kmalloc.o): kmalloc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/kmalloc.o kmalloc.c
-../obj-ack//libsysutil.a(kprintf.o): kprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/kprintf.o kprintf.c
-../obj-ack//libsysutil.a(kputc.o): kputc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/kputc.o kputc.c
-../obj-ack//libsysutil.a(tickdelay.o): tickdelay.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/tickdelay.o tickdelay.c
-../obj-ack//libsysutil.a(getuptime.o): getuptime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/getuptime.o getuptime.c
-../obj-ack//libsysutil.a(env_get_prm.o): env_get_prm.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_get_prm.o env_get_prm.c
-../obj-ack//libsysutil.a(env_parse.o): env_parse.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_parse.o env_parse.c
-../obj-ack//libsysutil.a(env_panic.o): env_panic.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_panic.o env_panic.c
-../obj-ack//libsysutil.a(env_prefix.o): env_prefix.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_prefix.o env_prefix.c
-../obj-ack//libsysutil.a(fkey_ctl.o): fkey_ctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/fkey_ctl.o fkey_ctl.c
-../obj-ack//libsysutil.a(report.o): report.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/report.o report.c
-../obj-ack//libsysutil.a(taskcall.o): taskcall.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/taskcall.o taskcall.c
-
-all-gnu: ../obj-gnu/libsysutil.a
-
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/kmalloc.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/kprintf.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/kputc.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/tickdelay.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/getuptime.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_get_prm.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_parse.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_panic.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_prefix.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/fkey_ctl.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/report.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/taskcall.o
-
-../obj-gnu/libsysutil.a:
-	gar cr ../obj-gnu/libsysutil.a $?
-
-../obj-gnu/./sysutil/kmalloc.o: kmalloc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/kmalloc.o kmalloc.c
-
-../obj-gnu/./sysutil/kprintf.o: kprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/kprintf.o kprintf.c
-
-../obj-gnu/./sysutil/kputc.o: kputc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/kputc.o kputc.c
-
-../obj-gnu/./sysutil/tickdelay.o: tickdelay.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/tickdelay.o tickdelay.c
-
-../obj-gnu/./sysutil/getuptime.o: getuptime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/getuptime.o getuptime.c
-
-../obj-gnu/./sysutil/env_get_prm.o: env_get_prm.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_get_prm.o env_get_prm.c
-
-../obj-gnu/./sysutil/env_parse.o: env_parse.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_parse.o env_parse.c
-
-../obj-gnu/./sysutil/env_panic.o: env_panic.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_panic.o env_panic.c
-
-../obj-gnu/./sysutil/env_prefix.o: env_prefix.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_prefix.o env_prefix.c
-
-../obj-gnu/./sysutil/fkey_ctl.o: fkey_ctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/fkey_ctl.o fkey_ctl.c
-
-../obj-gnu/./sysutil/report.o: report.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/report.o report.c
-
-../obj-gnu/./sysutil/taskcall.o: taskcall.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/taskcall.o taskcall.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./sysutil/*
-	rm -f ../obj-gnu/./sysutil/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/sysutil/Makefile.in
===================================================================
--- trunk/minix/lib/sysutil/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-# Makefile for lib/utils.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libsysutil
-
-libsysutil_FILES=" \
-	kmalloc.c \
-	kprintf.c \
-	kputc.c \
-	tickdelay.c \
-	getuptime.c \
-	env_get_prm.c \
-	env_parse.c \
-	env_panic.c \
-	env_prefix.c \
-	fkey_ctl.c \
-	report.c \
-	taskcall.c"
-
-TYPE=both
Index: trunk/minix/lib/sysutil/env_get_prm.c
===================================================================
--- trunk/minix/lib/sysutil/env_get_prm.c	(revision 9)
+++ 	(revision )
@@ -1,97 +1,0 @@
-#include "sysutil.h"
-#include <minix/config.h>
-#include <string.h>
-
-PRIVATE int argc = 0;
-PRIVATE char **argv = NULL;
-
-FORWARD _PROTOTYPE( char *find_key, (const char *params, const char *key));
-
-/*===========================================================================*
- *				env_setargs				     *
- *===========================================================================*/
-PUBLIC void env_setargs(arg_c, arg_v)
-int arg_c;
-char *arg_v[];
-{
-	argc= arg_c;
-	argv= arg_v;
-}
-
-/*===========================================================================*
- *				env_get_param				     *
- *===========================================================================*/
-PUBLIC int env_get_param(key, value, max_len)
-char *key;				/* which key to look up */
-char *value;				/* where to store value */
-int max_len;				/* maximum length of value */
-{
-  message m;
-  static char mon_params[128*sizeof(char *)];	/* copy parameters here */
-  char *key_value;
-  int i, s, keylen;
-
-  if (key == NULL)
-  	return EINVAL;
-
-  keylen= strlen(key);
-  for (i= 1; i<argc; i++)
-  {
-  	if (strncmp(argv[i], key, keylen) != 0)
-  		continue;
-	if (strlen(argv[i]) <= keylen)
-		continue;
-	if (argv[i][keylen] != '=')
-		continue;
-	key_value= argv[i]+keylen+1;
-	if (strlen(key_value)+1 > EP_BUF_SIZE)
-	      return(E2BIG);
-	strcpy(value, key_value);
-	return OK;
-  }
-
-  /* Get copy of boot monitor parameters. */
-  m.m_type = SYS_GETINFO;
-  m.I_REQUEST = GET_MONPARAMS;
-  m.I_ENDPT = SELF;
-  m.I_VAL_LEN = sizeof(mon_params);
-  m.I_VAL_PTR = mon_params;
-  if ((s=_taskcall(SYSTASK, SYS_GETINFO, &m)) != OK) {
-	printf("SYS_GETINFO: %d (size %u)\n", s, sizeof(mon_params));
-	return(s);
-  }
-
-  /* We got a copy, now search requested key. */
-  if ((key_value = find_key(mon_params, key)) == NULL)
-	return(ESRCH);
-
-  /* Value found, make the actual copy (as far as possible). */
-  strncpy(value, key_value, max_len);
-
-  /* See if it fits in the client's buffer. */
-  if ((strlen(key_value)+1) > max_len) return(E2BIG);
-  return(OK);
-}
-
-
-/*==========================================================================*
- *				find_key					    *
- *==========================================================================*/
-PRIVATE char *find_key(params,name)
-const char *params;
-const char *name;
-{
-  register const char *namep;
-  register char *envp;
-
-  for (envp = (char *) params; *envp != 0;) {
-	for (namep = name; *namep != 0 && *namep == *envp; namep++, envp++)
-		;
-	if (*namep == '\0' && *envp == '=') 
-		return(envp + 1);
-	while (*envp++ != 0)
-		;
-  }
-  return(NULL);
-}
-
Index: trunk/minix/lib/sysutil/env_panic.c
===================================================================
--- trunk/minix/lib/sysutil/env_panic.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include "sysutil.h"
-#include <string.h>
-
-/*=========================================================================*
- *				env_panic				   *
- *=========================================================================*/
-PUBLIC void env_panic(key)
-char *key;		/* environment variable whose value is bogus */
-{
-  static char value[EP_BUF_SIZE] = "<unknown>";
-  int s;
-  if ((s=env_get_param(key, value, sizeof(value))) == 0) {
-  	if (s != ESRCH)		/* only error allowed */
-  	printf("WARNING: get_mon_param() failed in env_panic(): %d\n", s);
-  }
-  printf("Bad environment setting: '%s = %s'\n", key, value);
-  panic("","", NO_NUM);
-}
-
Index: trunk/minix/lib/sysutil/env_parse.c
===================================================================
--- trunk/minix/lib/sysutil/env_parse.c	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#include "sysutil.h"
-#include <stdlib.h>
-#include <string.h>
-
-
-/*=========================================================================*
- *				env_parse				   *
- *=========================================================================*/
-PUBLIC int env_parse(env, fmt, field, param, min, max)
-char *env;		/* environment variable to inspect */
-char *fmt;		/* template to parse it with */
-int field;		/* field number of value to return */
-long *param;		/* address of parameter to get */
-long min, max;		/* minimum and maximum values for the parameter */
-{
-/* Parse an environment variable setting, something like "DPETH0=300:3".
- * Panic if the parsing fails.  Return EP_UNSET if the environment variable
- * is not set, EP_OFF if it is set to "off", EP_ON if set to "on" or a
- * field is left blank, or EP_SET if a field is given (return value through
- * *param).  Punctuation may be used in the environment and format string,
- * fields in the environment string may be empty, and punctuation may be
- * missing to skip fields.  The format string contains characters 'd', 'o',
- * 'x' and 'c' to indicate that 10, 8, 16, or 0 is used as the last argument
- * to strtol().  A '*' means that a field should be skipped.  If the format
- * string contains something like "\4" then the string is repeated 4 characters
- * to the left.
- */
-  char *val, *end;
-  char value[EP_BUF_SIZE];
-  char PUNCT[] = ":,;.";
-  long newpar;
-  int s, i, radix, r, keylen;
-
-  if ((s=env_get_param(env, value, sizeof(value))) != 0) { 
-      if (s == ESRCH) return(EP_UNSET);		/* only error allowed */ 
-      printf("WARNING: get_mon_param() failed in env_parse(): %d\n",s);
-      return(EP_EGETKENV);
-  }
-  val = value;
-  if (strcmp(val, "off") == 0) return(EP_OFF);
-  if (strcmp(val, "on") == 0) return(EP_ON);
-
-  i = 0;
-  r = EP_ON;
-  for (;;) {
-	while (*val == ' ') val++;	/* skip spaces */
-	if (*val == 0) return(r);	/* the proper exit point */
-	if (*fmt == 0) break;		/* too many values */
-
-	if (strchr(PUNCT, *val) != NULL) {
-		/* Time to go to the next field. */
-		if (strchr(PUNCT, *fmt) != NULL) i++;
-		if (*fmt++ == *val) val++;
-		if (*fmt < 32) fmt -= *fmt;	/* step back? */
-	} else {
-		/* Environment contains a value, get it. */
-		switch (*fmt) {
-		case '*':	radix =   -1;	break;
-		case 'd':	radix =   10;	break;
-		case 'o':	radix =  010;	break;
-		case 'x':	radix = 0x10;	break;
-		case 'c':	radix =    0;	break;
-		default:	goto badenv;
-		}
-		
-		if (radix < 0) {
-			/* Skip. */
-			while (strchr(PUNCT, *val) == NULL) val++;
-			continue;
-		} else {
-			/* A number. */
-			newpar = strtol(val, &end, radix);
-
-			if (end == val) break;	/* not a number */
-			val = end;
-		}
-
-		if (i == field) {
-			/* The field requested. */
-			if (newpar < min || newpar > max) break;
-			*param = newpar;
-			r = EP_SET;
-		}
-	}
-  }
-badenv:
-  env_panic(env);
-}
-
-
Index: trunk/minix/lib/sysutil/env_prefix.c
===================================================================
--- trunk/minix/lib/sysutil/env_prefix.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#include "sysutil.h"
-#include <stdlib.h>
-#include <string.h>
-
-/*=========================================================================*
- *				env_prefix				   *
- *=========================================================================*/
-PUBLIC int env_prefix(env, prefix)
-char *env;		/* environment variable to inspect */
-char *prefix;		/* prefix to test for */
-{
-/* An environment setting may be prefixed by a word, usually "pci".  
- * Return TRUE if a given prefix is used.
- */
-  char value[EP_BUF_SIZE];
-  char punct[] = ":,;.";
-  int i, s, keylen;
-  char *val;
-  size_t n;
-
-  if ((s = env_get_param(env, value, sizeof(value))) != 0) {
-  	if (s != ESRCH)		/* only error allowed */
-  	printf("WARNING: get_mon_param() failed in env_prefix(): %d\n", s);	
-  }
-  n = strlen(prefix);
-  return(value != NULL
-	&& strncmp(value, prefix, n) == 0
-	&& strchr(punct, value[n]) != NULL);
-}
-
Index: trunk/minix/lib/sysutil/fkey_ctl.c
===================================================================
--- trunk/minix/lib/sysutil/fkey_ctl.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#include "sysutil.h" 
-
-/*===========================================================================*
- *				fkey_ctl				     *
- *===========================================================================*/
-PUBLIC int fkey_ctl(request, fkeys, sfkeys)
-int request;				/* request to perform */
-int *fkeys;				/* bit masks for F1-F12 keys */
-int *sfkeys;				/* bit masks for Shift F1-F12 keys */
-{
-/* Send a message to the TTY server to request notifications for function 
- * key presses or to disable notifications. Enabling succeeds unless the key
- * is already bound to another process. Disabling only succeeds if the key is
- * bound to the current process.   
- */ 
-    message m;
-    int s;
-    m.FKEY_REQUEST = request;
-    m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
-    m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
-    s = _taskcall(TTY_PROC_NR, FKEY_CONTROL, &m);
-    if (fkeys) *fkeys = m.FKEY_FKEYS;
-    if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
-    return(s);
-}
-
-
Index: trunk/minix/lib/sysutil/getuptime.c
===================================================================
--- trunk/minix/lib/sysutil/getuptime.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include "sysutil.h"
-
-/*===========================================================================*
- *                               getuptime			    	     *
- *===========================================================================*/
-PUBLIC int getuptime(ticks)
-clock_t *ticks;				/* uptime in ticks */
-{
-    message m;
-    int s;
-
-    m.m_type = SYS_TIMES;		/* request time information */
-    m.T_ENDPT = NONE;			/* ignore process times */
-    s = _taskcall(SYSTASK, SYS_TIMES, &m);
-    *ticks = m.T_BOOT_TICKS;
-    return(s);
-}
-
-
-
-
-
Index: trunk/minix/lib/sysutil/kmalloc.c
===================================================================
--- trunk/minix/lib/sysutil/kmalloc.c	(revision 9)
+++ 	(revision )
@@ -1,177 +1,0 @@
-/*	malloc(), realloc(), free() - simple memory allocation routines
- *
- * This is a very small and simple minded malloc	Author: Kees J. Bot
- * implementation.  Ideal for things like a			29 Jan 1994
- * bootstrap program, or for debugging.  Six times
- * slower than any good malloc.
- */
-#define nil 0
-
-#define sbrk _sbrk
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <limits.h>
-#if !DEBUG
-#define NDEBUG	1
-#define debug(expr)	((void) 0)
-#else
-#define debug(expr)	expr
-#endif
-#include <assert.h>
-
-typedef struct cell {
-	size_t		size;		/* Size of a malloc()'ed object. */
-#if DEBUG
-	unsigned	magic;		/* To recognize a cell. */
-#endif
-	struct cell	*next;		/* Next cell on the free list. */
-#if DEBUG
-	unsigned	sacred;		/* Don't touch while unallocated. */
-#endif
-} cell_t;
-
-#if UINT_MAX <= 0xFFFF
-#define MAGIC	0x537B
-#else
-#define MAGIC	0x537BC0D8
-#endif
-
-/* Size of the header of an object. */
-#define HDR_SIZE	offsetof(cell_t, next)
-
-/* An offset from a cell pointer to a next cell. */
-#define offset(cp, size)	((cell_t *) ((char *) (cp) + (size)))
-
-/* Address of the object in a cell and back. */
-#define cell2obj(cp)		((void *) ((char *) (cp) + HDR_SIZE))
-#define obj2cell(op)		((cell_t *) ((char *) (op) - HDR_SIZE))
-
-/* The free list. */
-static cell_t *freelist;
-
-void *malloc(size_t size)
-/* Allocate an object of at least the given size. */
-{
-	cell_t **pcp, *cp;
-
-	size += HDR_SIZE;
-	if (size < sizeof(cell_t)) size= sizeof(cell_t);
-
-	/* Align to a word.  Use a real malloc if you need better alignment. */
-	size= (size + sizeof(int) - 1) & ~(sizeof(int) - 1);
-
-	/* Space for a magic number at the end of the chunk. */
-	debug(size += sizeof(unsigned));
-
-	for (;;) {
-		/* Do a first fit search. */
-		pcp= &freelist;
-		while ((cp= *pcp) != nil) {
-			cell_t *next= cp->next;
-
-			assert(cp->magic == MAGIC);
-			assert(cp->sacred == MAGIC);
-
-			if (offset(cp, cp->size) == next) {
-				/* Join adjacent free cells. */
-				assert(next->magic == MAGIC);
-				assert(next->sacred == MAGIC);
-
-				cp->size+= next->size;
-				cp->next= next->next;
-
-				continue;		/* Try again. */
-			}
-			if (size <= cp->size) break;	/* Big enough. */
-
-			/* Next cell. */
-			pcp= &cp->next;
-		}
-
-		if (cp != nil) break;	/* Found a big enough chunk. */
-
-		/* Allocate a new chunk at the break. */
-		if ((cp= (cell_t *) sbrk(size)) == (cell_t *) -1) {
-			return nil;
-		}
-
-		cp->size= size;
-		cp->next= nil;
-		debug(cp->magic= MAGIC);
-		debug(cp->sacred= MAGIC);
-		*pcp= cp;
-	}
-
-	/* We've got a cell that is big enough.  Can we break it up? */
-	if (cp->size >= size + sizeof(cell_t)) {
-		cell_t *next= offset(cp, size);
-
-		next->size= cp->size - size;
-		next->next= cp->next;
-		debug(next->magic= MAGIC);
-		debug(next->sacred= MAGIC);
-		cp->size= size;
-		cp->next= next;
-	}
-
-	/* Unchain the cell we've found and return an address in it. */
-	*pcp= cp->next;
-	debug(memset(cell2obj(cp), 0xAA, cp->size - HDR_SIZE));
-	debug(((unsigned *) offset(cp, cp->size))[-1]= MAGIC);
-
-	return cell2obj(cp);
-}
-
-void free(void *op)
-/* Deallocate an object. */
-{
-	cell_t **prev, *next, *cp;
-
-	if (op == nil) return;		/* Aaargh. */
-
-	cp= obj2cell(op);
-	assert(cp->magic == MAGIC);
-	assert(((unsigned *) offset(cp, cp->size))[-1] == MAGIC);
-	debug(cp->sacred= MAGIC);
-
-	/* Find the spot where the object belongs. */
-	prev= &freelist;
-	while ((next= *prev) != nil && next < cp) {
-		assert(next->magic == MAGIC);
-		assert(next->sacred == MAGIC);
-		prev= &next->next;
-	}
-
-	/* Put the new free cell in the list. */
-	*prev= cp;
-	cp->next= next;
-
-#if DEBUG
-	/* Check the rest of the list. */
-	while (next != nil) {
-		assert(next->magic == MAGIC);
-		assert(next->sacred == MAGIC);
-		next= next->next;
-	}
-#endif
-}
-
-void *realloc(void *op, size_t size)
-/* Change the size of an object.  Don't bother being smart, just copy it. */
-{
-	size_t oldsize;
-	void *new;
-
-	oldsize= op == nil ? 0 : obj2cell(op)->size - HDR_SIZE;
-
-	new= malloc(size);
-	memcpy(new, op, oldsize > size ? size : oldsize);
-	free(op);
-	return new;
-}
-
-/*
- * $PchId: malloc.c,v 1.4 1996/02/22 09:15:56 philip Exp $
- */
Index: trunk/minix/lib/sysutil/kprintf.c
===================================================================
--- trunk/minix/lib/sysutil/kprintf.c	(revision 9)
+++ 	(revision )
@@ -1,191 +1,0 @@
-/*	printf() - system services printf()		Author: Kees J. Bot
- *								15 Jan 1994
- */
-#define nil 0
-#include <stdarg.h>
-#include <stddef.h>
-#include <limits.h>
-
-#define isdigit(c)	((unsigned) ((c) - '0') <  (unsigned) 10)
-
-#if !__STDC__
-/* Classic C stuff, ignore. */
-void kputc();
-int printf(fmt) char *fmt;
-#else
-
-/* Printf() uses kputc() to print characters. */
-void kputc(int c);
-
-#define count_kputc(c) do { charcount++; kputc(c); } while(0)
-
-int printf(const char *fmt, ...)
-#endif
-{
-	int c, charcount = 0;
-	enum { LEFT, RIGHT } adjust;
-	enum { LONG, INT } intsize;
-	int fill;
-	int width, max, len, base;
-	static char X2C_tab[]= "0123456789ABCDEF";
-	static char x2c_tab[]= "0123456789abcdef";
-	char *x2c;
-	char *p;
-	long i;
-	unsigned long u;
-	char temp[8 * sizeof(long) / 3 + 2];
-
-	va_list argp;
-
-	va_start(argp, fmt);
-
-	while ((c= *fmt++) != 0) {
-		if (c != '%') {
-			/* Ordinary character. */
-			count_kputc(c);
-			continue;
-		}
-
-		/* Format specifier of the form:
-		 *	%[adjust][fill][width][.max]keys
-		 */
-		c= *fmt++;
-
-		adjust= RIGHT;
-		if (c == '-') {
-			adjust= LEFT;
-			c= *fmt++;
-		}
-
-		fill= ' ';
-		if (c == '0') {
-			fill= '0';
-			c= *fmt++;
-		}
-
-		width= 0;
-		if (c == '*') {
-			/* Width is specified as an argument, e.g. %*d. */
-			width= va_arg(argp, int);
-			c= *fmt++;
-		} else
-		if (isdigit(c)) {
-			/* A number tells the width, e.g. %10d. */
-			do {
-				width= width * 10 + (c - '0');
-			} while (isdigit(c= *fmt++));
-		}
-
-		max= INT_MAX;
-		if (c == '.') {
-			/* Max field length coming up. */
-			if ((c= *fmt++) == '*') {
-				max= va_arg(argp, int);
-				c= *fmt++;
-			} else
-			if (isdigit(c)) {
-				max= 0;
-				do {
-					max= max * 10 + (c - '0');
-				} while (isdigit(c= *fmt++));
-			}
-		}
-
-		/* Set a few flags to the default. */
-		x2c= x2c_tab;
-		i= 0;
-		base= 10;
-		intsize= INT;
-		if (c == 'l' || c == 'L') {
-			/* "Long" key, e.g. %ld. */
-			intsize= LONG;
-			c= *fmt++;
-		}
-		if (c == 0) break;
-
-		switch (c) {
-			/* Decimal. */
-		case 'd':
-			i= intsize == LONG ? va_arg(argp, long)
-						: va_arg(argp, int);
-			u= i < 0 ? -i : i;
-			goto int2ascii;
-
-			/* Octal. */
-		case 'o':
-			base= 010;
-			goto getint;
-
-			/* Pointer, interpret as %X or %lX. */
-		case 'p':
-			if (sizeof(char *) > sizeof(int)) intsize= LONG;
-
-			/* Hexadecimal.  %X prints upper case A-F, not %lx. */
-		case 'X':
-			x2c= X2C_tab;
-		case 'x':
-			base= 0x10;
-			goto getint;
-
-			/* Unsigned decimal. */
-		case 'u':
-		getint:
-			u= intsize == LONG ? va_arg(argp, unsigned long)
-						: va_arg(argp, unsigned int);
-		int2ascii:
-			p= temp + sizeof(temp)-1;
-			*p= 0;
-			do {
-				*--p= x2c[(ptrdiff_t) (u % base)];
-			} while ((u /= base) > 0);
-			goto string_length;
-
-			/* A character. */
-		case 'c':
-			p= temp;
-			*p= va_arg(argp, int);
-			len= 1;
-			goto string_print;
-
-			/* Simply a percent. */
-		case '%':
-			p= temp;
-			*p= '%';
-			len= 1;
-			goto string_print;
-
-			/* A string.  The other cases will join in here. */
-		case 's':
-			p= va_arg(argp, char *);
-
-		string_length:
-			for (len= 0; p[len] != 0 && len < max; len++) {}
-
-		string_print:
-			width -= len;
-			if (i < 0) width--;
-			if (fill == '0' && i < 0) count_kputc('-');
-			if (adjust == RIGHT) {
-				while (width > 0) { count_kputc(fill); width--; }
-			}
-			if (fill == ' ' && i < 0) count_kputc('-');
-			while (len > 0) { count_kputc((unsigned char) *p++); len--; }
-			while (width > 0) { count_kputc(fill); width--; }
-			break;
-
-			/* Unrecognized format key, echo it back. */
-		default:
-			count_kputc('%');
-			count_kputc(c);
-		}
-	}
-
-	/* Mark the end with a null (should be something else, like -1). */
-	kputc(0);
-	va_end(argp);
-	return charcount;
-}
-
-/*
- * $PchId: kprintf.c,v 1.5 1996/04/11 06:59:05 philip Exp $
- */
Index: trunk/minix/lib/sysutil/kputc.c
===================================================================
--- trunk/minix/lib/sysutil/kputc.c	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/* A server must occasionally print some message.  It uses a simple version of 
- * printf() found in the system lib that calls kputc() to output characters.
- * Printing is done with a call to the kernel, and not by going through FS.
- *
- * This routine can only be used by servers and device drivers.  The kernel
- * must define its own kputc(). Note that the log driver also defines its own 
- * kputc() to directly call the TTY instead of going through this library.
- */
-
-#include "sysutil.h"
-
-/*===========================================================================*
- *				kputc					     *
- *===========================================================================*/
-void kputc(c)
-int c;
-{
-/* Accumulate another character.  If 0 or buffer full, print it. */
-  static int buf_count;		/* # characters in the buffer */
-  static char print_buf[80];	/* output is buffered here */
-  message m;
-
-  if ((c == 0 && buf_count > 0) || buf_count == sizeof(print_buf)) {
-	int procs[] = OUTPUT_PROCS_ARRAY;
-	int p;
-
-	for(p = 0; procs[p] != NONE; p++) {
-		/* Send the buffer to this output driver. */
-		m.DIAG_BUF_COUNT = buf_count;
-		m.DIAG_PRINT_BUF = print_buf;
-		m.DIAG_ENDPT = SELF;
-		m.m_type = DIAGNOSTICS;
-		(void) _sendrec(procs[p], &m);
-	}
-	buf_count = 0;
-
-	/* If the output fails, e.g., due to an ELOCKED, do not retry output
-         * at the FS as if this were a normal user-land printf(). This may 
-         * result in even worse problems. 
-         */
-  }
-  if (c != 0) { 
-        
-        /* Append a single character to the output buffer. */
-  	print_buf[buf_count++] = c;
-  }
-}
Index: trunk/minix/lib/sysutil/report.c
===================================================================
--- trunk/minix/lib/sysutil/report.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#include "sysutil.h" 
-
-/*===========================================================================*
- *				    report					     *
- *===========================================================================*/
-PUBLIC void report(who, mess, num)
-char *who;				/* server identification */
-char *mess;				/* message format to print */
-int num;				/* number to go with the message */
-{
-/* Display a message for a server. */ 
-
-  if (num != NO_NUM) {
-      printf("%s: %s %d\n", who, mess, num);
-  } else {
-      printf("%s: %s\n", who, mess);
-  }
-}
-
-
Index: trunk/minix/lib/sysutil/sysutil.h
===================================================================
--- trunk/minix/lib/sysutil/sysutil.h	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-/*	sysutil.h - System library utilities.	*/
-
-#define _SYSTEM
-
-#include <lib.h>		/* common to all libraries */
-#include <minix/com.h>		/* need task numbers + message types */
-#include <minix/syslib.h>	/* need sendrec, _taskcall, etc */
-#include <minix/sysutil.h>	/* prototypes in this library */
Index: trunk/minix/lib/sysutil/taskcall.c
===================================================================
--- trunk/minix/lib/sysutil/taskcall.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/* _taskcall() is the same as _syscall() except it returns negative error
- * codes directly and not in errno.  This is a better interface for MM and
- * FS.
- */
-
-#include <lib.h>
-#include <minix/syslib.h>
-
-PUBLIC int _taskcall(who, syscallnr, msgptr)
-int who;
-int syscallnr;
-register message *msgptr;
-{
-  int status;
-
-  msgptr->m_type = syscallnr;
-  status = _sendrec(who, msgptr);
-  if (status != 0) return(status);
-  return(msgptr->m_type);
-}
Index: trunk/minix/lib/sysutil/tickdelay.c
===================================================================
--- trunk/minix/lib/sysutil/tickdelay.c	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#include "sysutil.h"
-#include <timers.h>
-
-/*===========================================================================*
- *                               tickdelay			    	     *
- *===========================================================================*/
-PUBLIC int tickdelay(ticks)
-long ticks;				/* number of ticks to wait */
-{
-/* This function uses the synchronous alarm to delay for a while. This works
- * even if a previous synchronous alarm was scheduled, because the remaining
- * tick of the previous alarm are returned so that it can be rescheduled.
- * Note however that a long tick_delay (longer than the remaining time of the
- * previous) alarm will also delay the previous alarm.
- */
-    message m, m_alarm;
-    clock_t time_left;
-    int s;
-
-    if (ticks <= 0) return;		/* check for robustness */
-
-    m.ALRM_ENDPT = SELF;		/* SELF means this process nr */
-    m.ALRM_EXP_TIME = ticks;		/* request message after ticks */
-    m.ALRM_ABS_TIME = 0;		/* ticks are relative to now */
-    s = _taskcall(SYSTASK, SYS_SETALARM, &m);
-    if (s != OK) return(s);
-
-    receive(CLOCK,&m_alarm);		/* await synchronous alarm */
-
-    /* Check if we must reschedule the current alarm. */
-    if (m.ALRM_TIME_LEFT > 0 && m.ALRM_TIME_LEFT != TMR_NEVER) {
-    	m.ALRM_EXP_TIME = m.ALRM_TIME_LEFT - ticks;
-    	if (m.ALRM_EXP_TIME <= 0) 
-    		m.ALRM_EXP_TIME = 1;
-    	s = _taskcall(SYSTASK, SYS_SETALARM, &m);
-    }
-
-    return(s);
-}
-
-
-
-
-
