Index: trunk/minix/commands/aal/Makefile
===================================================================
--- trunk/minix/commands/aal/Makefile	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-# Makefile for aal
-
-CC=exec cc
-CFLAGS=-I. -wo -DAAL -DSTB -DNDEBUG -DDISTRIBUTION -D_POSIX_SOURCE -D_MINIX
-LDFLAGS=-i
-
-all:	aal
-
-OFILES=	archiver.o \
-	print.o \
-	rd.o \
-	rd_arhdr.o \
-	rd_unsig2.o \
-	sprint.o \
-	wr_arhdr.o \
-	wr_bytes.o \
-	wr_int2.o \
-	wr_long.o \
-	wr_ranlib.o \
-	format.o \
-	rd_bytes.o \
-	system.o \
-	write.o \
-	long2str.o
-
-aal: $(OFILES)
-	$(CC) $(LDFLAGS) -o aal $(OFILES)
-	install -S 512k $@
-
-install:	/usr/bin/aal /usr/bin/ar
-
-/usr/bin/aal:	aal
-	install -cs -o bin aal $@
-
-/usr/bin/ar:	/usr/bin/aal
-	install -l $? $@
-
-archiver.o:
-print.o:
-rd.o:
-rd_arhdr.o:
-rd_unsig2.o:
-sprint.o:
-wr_arhdr.o:
-wr_bytes.o:
-wr_int2.o:
-wr_long.o:
-wr_ranlib.o:
-format.o:
-rd_bytes.o:
-system.o:
-write.o:
-long2str.o:
-
-clean:	
-	rm -f *.o core *.bak aal
Index: trunk/minix/commands/aal/arch.h
===================================================================
--- trunk/minix/commands/aal/arch.h	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/arch.h,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-
-#ifndef __ARCH_H_INCLUDED
-#define __ARCH_H_INCLUDED
-
-#define	ARMAG	0177545
-#define AALMAG	0177454
-
-struct	ar_hdr {
-	char	ar_name[14];
-	long	ar_date;
-	char	ar_uid;
-	char	ar_gid;
-	short	ar_mode;
-	long	ar_size;
-};
-
-#define AR_TOTAL	26
-#define AR_SIZE		22
-
-#endif /* __ARCH_H_INCLUDED */
Index: trunk/minix/commands/aal/archiver.c
===================================================================
--- trunk/minix/commands/aal/archiver.c	(revision 9)
+++ 	(revision )
@@ -1,800 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* ar - archiver		Author: Michiel Huisjes */
-/* Made into arch/aal by Ceriel Jacobs
- */
-
-static char RcsId[] = "$Header: /cvsup/minix/src/commands/aal/archiver.c,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $";
-
-/*
- * Usage: [arch|aal] [adprtvx] archive [file] ...
- *	  v: verbose
- *	  x: extract
- *	  a: append
- *	  r: replace (append when not in archive)
- *	  d: delete
- *	  t: print contents of archive
- *	  p: print named files
- *	  l: temporaries in current directory instead of /usr/tmp
- *	  c: don't give "create" message
- *	  u: replace only if dated later than member in archive
-#ifdef DISTRIBUTION
- *	  D: make distribution: use distr_time, uid=2, gid=2, mode=0644
-#endif
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifndef	S_IREAD
-#define	S_IREAD		S_IRUSR
-#endif
-#ifndef	S_IWRITE
-#define	S_IWRITE	S_IWUSR
-#endif
-#ifndef	S_IEXEC
-#define	S_IEXEC		S_IXUSR
-#endif
-#include <signal.h>
-#include <arch.h>
-#ifdef AAL
-#include <ranlib.h>
-#include <out.h>
-#define MAGIC_NUMBER	AALMAG
-long	offset;
-struct ranlib *tab;
-unsigned int	tnum = 0;
-char	*tstrtab;
-unsigned int	tssiz = 0;
-char	*malloc(), *realloc(), *strcpy(), *strncpy();
-long	time();
-unsigned int tabsz, strtabsz;
-#else
-#define MAGIC_NUMBER	ARMAG
-#endif
-long	lseek();
-
-#define odd(nr)		(nr & 01)
-#define even(nr)	(odd(nr) ? nr + 1 : nr)
-
-typedef char BOOL;
-#define FALSE		0
-#define TRUE		1
-
-#define READ		0
-#define APPEND		2
-#define CREATE		1
-
-#define MEMBER		struct ar_hdr
-
-#define NIL_PTR		((char *) 0)
-#define NIL_MEM		((MEMBER *) 0)
-#define NIL_LONG	((long *) 0)
-
-#define IO_SIZE		(10 * 1024)
-
-#define equal(str1, str2)	(!strncmp((str1), (str2), 14))
-#ifndef S_ISDIR
-#define S_ISDIR(m)	(m & S_IFDIR)		/* is a directory */
-#endif
-
-BOOL verbose;
-BOOL app_fl;
-BOOL ex_fl;
-BOOL show_fl;
-BOOL pr_fl;
-BOOL rep_fl;
-BOOL del_fl;
-BOOL nocr_fl;
-BOOL local_fl;
-BOOL update_fl;
-#ifdef DISTRIBUTION
-BOOL distr_fl;
-long distr_time;
-#endif
-
-int ar_fd;
-
-char io_buffer[IO_SIZE];
-
-char *progname;
-
-char temp_buf[32];
-char *temp_arch = &temp_buf[0];
-extern char *mktemp();
-extern char *ctime();
-
-usage()
-{
-	error(TRUE, "usage: %s %s archive [file] ...\n",
-		progname,
-#ifdef AAL
-		"[acdrtxvlu]"
-#else
-		"[acdprtxvlu]"
-#endif
-		);
-}
-
-/*VARARGS2*/
-error(quit, str1, str2, str3, str4)
-BOOL quit;
-char *str1, *str2, *str3, *str4;
-{
-	char errbuf[256];
-
-	sprint(errbuf, str1, str2, str3, str4);
-	write(2, errbuf, strlen(errbuf));
-  	if (quit) {
-		unlink(temp_arch);
-		_exit(1);
-  	}
-}
-
-char *basename(path)
-char *path;
-{
-  register char *ptr = path;
-  register char *last = NIL_PTR;
-
-  while (*ptr != '\0') {
-	if (*ptr == '/')
-		last = ptr;
-	ptr++;
-  }
-  if (last == NIL_PTR)
-	return path;
-  if (*(last + 1) == '\0') {
-	*last = '\0';
-	return basename(path);
-  }
-  return last + 1;
-}
-
-extern unsigned int rd_unsigned2();
-
-open_archive(name, mode)
-register char *name;
-register int mode;
-{
-  unsigned short magic = 0;
-  int fd;
-
-  if (mode == CREATE) {
-	if ((fd = creat(name, 0666)) < 0)
-		error(TRUE, "cannot creat %s\n", name);
-	magic = MAGIC_NUMBER;
-	wr_int2(fd, magic);
-	return fd;
-  }
-
-  if ((fd = open(name, mode)) < 0) {
-	if (mode == APPEND) {
-		close(open_archive(name, CREATE));
-		if (!nocr_fl) error(FALSE, "%s: creating %s\n", progname, name);
-		return open_archive(name, APPEND);
-	}
-	error(TRUE, "cannot open %s\n", name);
-  }
-  lseek(fd, 0L, 0);
-  magic = rd_unsigned2(fd);
-  if (magic != AALMAG && magic != ARMAG)
-	error(TRUE, "%s is not in ar format\n", name);
-  
-  return fd;
-}
-
-#if __STDC__
-void catch(int sig)
-#else
-catch()
-#endif
-{
-	unlink(temp_arch);
-	_exit (2);
-}
-
-main(argc, argv)
-int argc;
-char *argv[];
-{
-  register char *ptr;
-  int needs_arg = 0;
-
-  progname = argv[0];
-
-  if (argc < 3)
-	usage();
-  
-  for (ptr = argv[1]; *ptr; ptr++) {
-	switch (*ptr) {
-		case 't' :
-			show_fl = TRUE;
-			break;
-		case 'v' :
-			verbose = TRUE;
-			break;
-		case 'x' :
-			ex_fl = TRUE;
-			break;
-		case 'a' :
-			needs_arg = 1;
-			app_fl = TRUE;
-			break;
-		case 'c' :
-			nocr_fl = TRUE;
-			break;
-#ifndef AAL
-		case 'p' :
-			needs_arg = 1;
-			pr_fl = TRUE;
-			break;
-#endif
-		case 'd' :
-			needs_arg = 1;
-			del_fl = TRUE;
-			break;
-		case 'r' :
-			needs_arg = 1;
-			rep_fl = TRUE;
-			break;
-		case 'l' :
-			local_fl = TRUE;
-			break;
-		case 'u' :
-			update_fl = TRUE;
-			break;
-#ifdef DISTRIBUTION
-		case 'D' :
-			distr_fl = TRUE;
-			break;
-#endif
-		default :
-			usage();
-	}
-  }
-
-  if (needs_arg && argc <= 3)
-	usage();
-#ifdef DISTRIBUTION
-  if (distr_fl) {
-	struct stat statbuf;
-
-	stat(progname, &statbuf);
-	distr_time = statbuf.st_mtime;
-  }
-#endif
-  if (local_fl) strcpy(temp_arch, "ar.XXXXXX");
-  else	strcpy(temp_arch, "/usr/tmp/ar.XXXXXX");
-
-  if (app_fl + ex_fl + del_fl + rep_fl + show_fl + pr_fl != 1)
-	usage();
-
-  if (update_fl && !rep_fl)
-	usage();
-
-  if (rep_fl || del_fl
-#ifdef AAL
-	|| app_fl
-#endif
-     ) {
-	mktemp(temp_arch);
-  }
-#ifdef AAL
-  tab = (struct ranlib *) malloc(512 * sizeof(struct ranlib));
-  tstrtab = malloc(4096);
-  if (!tab || !tstrtab) error(TRUE,"Out of core\n");
-  tabsz = 512;
-  strtabsz = 4096;
-#endif
-
-  signal(SIGINT, catch);
-  get(argc, argv);
-  
-  return 0;
-}
-
-MEMBER *
-get_member()
-{
-  static MEMBER member;
-
-again:
-  if (rd_arhdr(ar_fd, &member) == 0)
-	return NIL_MEM;
-  if (member.ar_size < 0) {
-	error(TRUE, "archive has member with negative size\n");
-  }
-#ifdef AAL
-  if (equal(SYMDEF, member.ar_name)) {
-	lseek(ar_fd, member.ar_size, 1);
-	goto again;
-  }
-#endif
-  return &member;
-}
-
-char *get_mode();
-
-get(argc, argv)
-int argc;
-register char *argv[];
-{
-  register MEMBER *member;
-  int i = 0;
-  int temp_fd, read_chars;
-
-  ar_fd = open_archive(argv[2], (show_fl || pr_fl || ex_fl) ? READ : APPEND);
-  if (rep_fl || del_fl
-#ifdef AAL
-	|| app_fl
-#endif
-  )
-	temp_fd = open_archive(temp_arch, CREATE);
-  while ((member = get_member()) != NIL_MEM) {
-	if (argc > 3) {
-		for (i = 3; i < argc; i++) {
-			if (equal(basename(argv[i]), member->ar_name))
-				break;
-		}
-		if (i == argc || app_fl) {
-			if (rep_fl || del_fl
-#ifdef AAL
-				|| app_fl
-#endif
-			) {
-#ifdef AAL
-				if (i != argc) {
-					print("%s: already in archive\n", argv[i]);
-					argv[i] = "";
-				}
-#endif
-				wr_arhdr(temp_fd, member);
-				copy_member(member, ar_fd, temp_fd, 0);
-			}
-			else {
-#ifndef AAL
-				if (app_fl && i != argc) {
-					print("%s: already in archive\n", argv[i]);
-					argv[i] = "";
-				}
-#endif
-				lseek(ar_fd, even(member->ar_size),1);
-			}
-			continue;
-		}
-	}
-	if (ex_fl || pr_fl)
-		extract(member);
-	else {
-		if (rep_fl) {
-			int isold = 0;
-			if(update_fl) {
-				struct stat status;
-				if (stat(argv[i], &status) >= 0) {
-					if(status.st_mtime <= member->ar_date)
-						isold = 1;
-				}
-			}
-			if(!isold)
-				add(argv[i], temp_fd, "r - %s\n");
-			else {
-				wr_arhdr(temp_fd, member);
-				copy_member(member, ar_fd, temp_fd, 0);
-				if(verbose)
-					show("r - %s (old)\n", member->ar_name);
-			}
-		}
-		else if (show_fl) {
-			char buf[sizeof(member->ar_name) + 2];
-			register char *p = buf, *q = member->ar_name;
-
-			while (q <= &member->ar_name[sizeof(member->ar_name)-1] && *q) {
-				*p++ = *q++;
-			}
-			*p++ = '\n';
-			*p = '\0';
-			if (verbose) {
-				char *mode = get_mode(member->ar_mode);
-				char *date = ctime(&(member->ar_date));
-
-				*(date + 16) = '\0';
-				*(date + 24) = '\0';
-
-				print("%s%3u/%u%7ld %s %s %s",
-					mode,
-					(unsigned) (member->ar_uid & 0377),
-					(unsigned) (member->ar_gid & 0377),
-					member->ar_size,
-					date+4,
-					date+20,
-					buf);
-			}
-			else	print(buf);
-		}
-		else if (del_fl)
-			show("d - %s\n", member->ar_name);
-		lseek(ar_fd, even(member->ar_size), 1);
-	}
-	argv[i] = "";
-  }
-
-  if (argc > 3) {
-	for (i = 3; i < argc; i++)
-		if (argv[i][0] != '\0') {
-#ifndef AAL
-			if (app_fl)
-				add(argv[i], ar_fd, "a - %s\n");
-			else
-#endif
-			if (rep_fl
-#ifdef AAL
-				|| app_fl
-#endif
-			)
-				add(argv[i], temp_fd, "a - %s\n");
-			else {
-				print("%s: not found\n", argv[i]);
-			}
-		}
-  }
-
-  if (rep_fl || del_fl
-#ifdef AAL
-		|| app_fl
-#endif
-  ) {
-	signal(SIGINT, SIG_IGN);
-	close(ar_fd);
-	close(temp_fd);
-	ar_fd = open_archive(argv[2], CREATE);
-	temp_fd = open_archive(temp_arch, APPEND);
-#ifdef AAL
-	write_symdef();
-#endif
-	while ((read_chars = read(temp_fd, io_buffer, IO_SIZE)) > 0)
-		mwrite(ar_fd, io_buffer, read_chars);
-	close(temp_fd);
-	unlink(temp_arch);
-  }
-  close(ar_fd);
-}
-
-add(name, fd, mess)
-char *name;
-int fd;
-char *mess;
-{
-  static MEMBER member;
-  register int read_chars;
-  struct stat status;
-  int src_fd;
-
-  if (stat(name, &status) < 0) {
-	error(FALSE, "cannot find %s\n", name);
-	return;
-  }
-  else if (S_ISDIR(status.st_mode)) {
-	error(FALSE, "%s is a directory (ignored)\n", name);
-	return;
-  }
-  else if ((src_fd = open(name, 0)) < 0) {
-	error(FALSE, "cannot open %s\n", name);
-	return;
-  }
-
-  strncpy (member.ar_name, basename (name), sizeof(member.ar_name));
-  member.ar_uid = status.st_uid;
-  member.ar_gid = status.st_gid;
-  member.ar_mode = status.st_mode;
-  member.ar_date = status.st_mtime;
-  member.ar_size = status.st_size;
-#ifdef DISTRIBUTION
-  if (distr_fl) {
-	member.ar_uid = 2;
-	member.ar_gid = 2;
-	member.ar_mode = 0644;
-	member.ar_date = distr_time;
-  }
-#endif
-  wr_arhdr(fd, &member);
-#ifdef AAL
-  do_object(src_fd, member.ar_size);
-  lseek(src_fd, 0L, 0);
-  offset += AR_TOTAL + even(member.ar_size);
-#endif
-  while (status.st_size > 0) {
-	int x = IO_SIZE;
-
-	read_chars = x;
-	if (status.st_size < x) {
-		x = status.st_size;
-		read_chars = x;
-		status.st_size = 0;
-		x = even(x);
-	}
-	else	status.st_size -= x;
-  	if (read(src_fd, io_buffer, read_chars) != read_chars) {
-		error(FALSE,"%s seems to shrink\n", name);
-		break;
-	}
-	mwrite(fd, io_buffer, x);
-  }
-
-  if (verbose)
-	show(mess, member.ar_name);
-  close(src_fd);
-}
-
-extract(member)
-register MEMBER *member;
-{
-  int fd = 1;
-  char buf[sizeof(member->ar_name) + 1];
-
-  strncpy(buf, member->ar_name, sizeof(member->ar_name));
-  buf[sizeof(member->ar_name)] = 0;
-  if (pr_fl == FALSE && (fd = creat(buf, 0666)) < 0) {
-	error(FALSE, "cannot create %s\n", buf);
-	fd = -1;
-  }
-
-  if (verbose) {
-	if (pr_fl == FALSE) show("x - %s\n", buf);
-	else show("\n<%s>\n\n", buf);
-  }
-
-  copy_member(member, ar_fd, fd, 1);
-
-  if (fd >= 0 && fd != 1)
-  	close(fd);
-  if (pr_fl == FALSE) chmod(buf, member->ar_mode);
-}
-
-copy_member(member, from, to, extracting)
-register MEMBER *member;
-int from, to;
-{
-  register int rest;
-  long mem_size = member->ar_size;
-  BOOL is_odd = odd(mem_size) ? TRUE : FALSE;
-
-#ifdef AAL
-  if (! extracting) {
-  	long pos = lseek(from, 0L, 1);
-
-	do_object(from, mem_size);
-	offset += AR_TOTAL + even(mem_size);
-  	lseek(from, pos, 0);
-  }
-#endif
-  do {
-	rest = mem_size > (long) IO_SIZE ? IO_SIZE : (int) mem_size;
-	if (read(from, io_buffer, rest) != rest) {
-		char buf[sizeof(member->ar_name) + 1];
-
-		strncpy(buf, member->ar_name, sizeof(member->ar_name));
-		buf[sizeof(member->ar_name)] = 0;
-		error(TRUE, "read error on %s\n", buf);
-	}
-	if (to >= 0) mwrite(to, io_buffer, rest);
-	mem_size -= (long) rest;
-  } while (mem_size > 0L);
-
-  if (is_odd) {
-	lseek(from, 1L, 1);
-	if (to >= 0 && ! extracting)
-		lseek(to, 1L, 1);
-  }
-}
-
-char *
-get_mode(mode)
-register int mode;
-{
-  static char mode_buf[11];
-  register int tmp = mode;
-  int i;
-
-  mode_buf[9] = ' ';
-  for (i = 0; i < 3; i++) {
-	mode_buf[i * 3] = (tmp & S_IREAD) ? 'r' : '-';
-	mode_buf[i * 3 + 1] = (tmp & S_IWRITE) ? 'w' : '-';
-	mode_buf[i * 3 + 2] = (tmp & S_IEXEC) ? 'x' : '-';
-	tmp <<= 3;
-  }
-  if (mode & S_ISUID)
-	mode_buf[2] = 's';
-  if (mode & S_ISGID)
-	mode_buf[5] = 's';
-  return mode_buf;
-}
-
-wr_fatal()
-{
-	error(TRUE, "write error\n");
-}
-
-rd_fatal()
-{
-	error(TRUE, "read error\n");
-}
-
-mwrite(fd, address, bytes)
-int fd;
-register char *address;
-register int bytes;
-{
-  if (write(fd, address, bytes) != bytes)
-	error(TRUE, "write error\n");
-}
-
-show(s, name)
-char *s, *name;
-{
-  MEMBER x;
-  char buf[sizeof(x.ar_name)+1];
-  register char *p = buf, *q = name;
-
-  while (q <= &name[sizeof(x.ar_name)-1] && *q) *p++ = *q++;
-  *p++ = '\0';
-  print(s, buf);
-}
-
-#ifdef AAL
-/*
- * Write out the ranlib table: first 4 bytes telling how many ranlib structs
- * there are, followed by the ranlib structs,
- * then 4 bytes giving the size of the string table, followed by the string
- * table itself.
- */
-write_symdef()
-{
-	register struct ranlib	*ran;
-	register int	i;
-	register long	delta;
-	MEMBER	arbuf;
-
-	if (odd(tssiz))
-		tstrtab[tssiz++] = '\0';
-	for (i = 0; i < sizeof(arbuf.ar_name); i++)
-		arbuf.ar_name[i] = '\0';
-	strcpy(arbuf.ar_name, SYMDEF);
-	arbuf.ar_size = 4 + 2 * 4 * (long)tnum + 4 + (long)tssiz;
-	time(&arbuf.ar_date);
-	arbuf.ar_uid = getuid();
-	arbuf.ar_gid = getgid();
-	arbuf.ar_mode = 0444;
-#ifdef DISTRIBUTION
-	if (distr_fl) {
-		arbuf.ar_uid = 2;
-		arbuf.ar_gid = 2;
-		arbuf.ar_date = distr_time;
-	}
-#endif
-	wr_arhdr(ar_fd,&arbuf);
-	wr_long(ar_fd, (long) tnum);
-	/*
-	 * Account for the space occupied by the magic number
-	 * and the ranlib table.
-	 */
-	delta = 2 + AR_TOTAL + arbuf.ar_size;
-	for (ran = tab; ran < &tab[tnum]; ran++) {
-		ran->ran_pos += delta;
-	}
-
-	wr_ranlib(ar_fd, tab, (long) tnum);
-	wr_long(ar_fd, (long) tssiz);
-	wr_bytes(ar_fd, tstrtab, (long) tssiz);
-}
-
-/*
- * Return whether the bytes in `buf' form a good object header. 
- * The header is put in `headp'.
- */
-int
-is_outhead(headp)
-	register struct outhead	*headp;
-{
-
-	return !BADMAGIC(*headp) && headp->oh_nname != 0;
-}
-
-do_object(f, size)
-	long size;
-{
-	struct outhead	headbuf;
-
-	if (size < SZ_HEAD) {
-		/* It can't be an object file. */
-		return;
-	}
-	/*
-	 * Read a header to see if it is an object file.
-	 */
-	if (! rd_fdopen(f)) {
-		rd_fatal();
-	}
-	rd_ohead(&headbuf);
-	if (!is_outhead(&headbuf)) {
-		return;
-	}
-	do_names(&headbuf);
-}
-
-/*
- * First skip the names and read in the string table, then seek back to the
- * name table and read and write the names one by one. Update the ranlib table
- * accordingly.
- */
-do_names(headp)
-	struct outhead	*headp;
-{
-	register char	*strings;
-	register int	nnames = headp->oh_nname;
-#define NNAMES 100
-	struct outname	namebuf[NNAMES];
-	long xxx = OFF_CHAR(*headp);
-
-	if (	headp->oh_nchar != (unsigned int)headp->oh_nchar ||
-		(strings = malloc((unsigned int)headp->oh_nchar)) == (char *)0
-	   ) {
-		error(TRUE, "string table too big\n");
-	}
-	rd_string(strings, headp->oh_nchar);
-	while (nnames) {
-		int i = nnames >= NNAMES ? NNAMES : nnames;
-		register struct outname *p = namebuf;
-
-		nnames -= i;
-		rd_name(namebuf, i);
-		while (i--) {
-			long off = p->on_foff - xxx;
-			if (p->on_foff == (long)0) {
-				p++;
-				continue; /* An unrecognizable name. */
-			}
-			p->on_mptr = strings + off;
-			/*
-			 * Only enter names that are exported and are really
-			 * defined. Also enter common names. Note, that
-			 * this might cause problems when the name is really
-			 * defined in a later file, with a value != 0.
-			 * However, this problem also exists on the Unix
-			 * ranlib archives.
-			 */
-			if (	(p->on_type & S_EXT) &&
-				(p->on_type & S_TYP) != S_UND
-			   )
-				enter_name(p);
-			p++;
-		}
-	}
-	free(strings);
-}
-
-enter_name(namep)
-	struct outname *namep;
-{
-	register char	*cp;
-
-	if (tnum >= tabsz) {
-		tab = (struct ranlib *)
-			realloc((char *) tab, (tabsz += 512) * sizeof(struct ranlib));
-		if (! tab) error(TRUE, "Out of core\n");
-	}
-	tab[tnum].ran_off = tssiz;
-	tab[tnum].ran_pos = offset;
-
-	for (cp = namep->on_mptr;; cp++) {
-		if (tssiz >= strtabsz) {
-			tstrtab = realloc(tstrtab, (strtabsz += 4096));
-			if (! tstrtab) error(TRUE, "string table overflow\n");
-		}
-		tstrtab[tssiz++]  = *cp;
-		if (!*cp) break;
-	}
-	tnum++;
-}
-#endif AAL
Index: trunk/minix/commands/aal/build
===================================================================
--- trunk/minix/commands/aal/build	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-make clean
-make && make install
Index: trunk/minix/commands/aal/byte_order.h
===================================================================
--- trunk/minix/commands/aal/byte_order.h	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#if defined(mc68020) || defined(mc68000) || defined(sparc)
-#define BYTES_REVERSED 1
-#define WORDS_REVERSED 1
-#define CHAR_UNSIGNED 0
-#else
-#define BYTES_REVERSED 0
-#define WORDS_REVERSED 0
-#define CHAR_UNSIGNED 0
-#endif
Index: trunk/minix/commands/aal/format.c
===================================================================
--- trunk/minix/commands/aal/format.c	(revision 9)
+++ 	(revision )
@@ -1,112 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/format.c,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-extern char *long2str();
-
-static int
-integral(c)
-{
-	switch (c) {
-	case 'b':
-		return -2;
-	case 'd':
-		return 10;
-	case 'o':
-		return -8;
-	case 'u':
-		return -10;
-	case 'x':
-		return -16;
-	}
-	return 0;
-}
-
-/*VARARGS2*/
-/*FORMAT1 $
-	%s = char *
-	%l = long
-	%c = int
-	%[uxbo] = unsigned int
-	%d = int
-$ */
-int
-_format(buf, fmt, argp)
-	char *buf, *fmt;
-	register va_list argp;
-{
-	register char *pf = fmt;
-	register char *pb = buf;
-
-	while (*pf) {
-		if (*pf == '%') {
-			register width, base, pad, npad;
-			char *arg;
-			char cbuf[2];
-			char *badformat = "<bad format>";
-			
-			/* get padder */
-			if (*++pf == '0') {
-				pad = '0';
-				++pf;
-			}
-			else
-				pad = ' ';
-			
-			/* get width */
-			width = 0;
-			while (*pf >= '0' && *pf <= '9')
-				width = 10 * width + *pf++ - '0';
-			
-			if (*pf == 's') {
-				arg = va_arg(argp, char *);
-			}
-			else
-			if (*pf == 'c') {
-				cbuf[0] = va_arg(argp, int);
-				cbuf[1] = '\0';
-				arg = &cbuf[0];
-			}
-			else
-			if (*pf == 'l') {
-				/* alignment ??? */
-				if (base = integral(*++pf)) {
-					arg = long2str(va_arg(argp,long), base);
-				}
-				else {
-					pf--;
-					arg = badformat;
-				}
-			}
-			else
-			if (base = integral(*pf)) {
-				arg = long2str((long)va_arg(argp,int), base);
-			}
-			else
-			if (*pf == '%')
-				arg = "%";
-			else
-				arg = badformat;
-
-			npad = width - strlen(arg);
-
-			while (npad-- > 0)
-				*pb++ = pad;
-			
-			while (*pb++ = *arg++);
-			pb--;
-			pf++;
-		}
-		else
-			*pb++ = *pf++;
-	}
-	return pb - buf;
-}
Index: trunk/minix/commands/aal/local.h
===================================================================
--- trunk/minix/commands/aal/local.h	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/local.h,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* collection of options, selected by including or excluding 'defines' */
-
-/* Version number of the EM object code */
-#	define	VERSION		3	/* 16 bits number */
-
-/* The default machine used by ack, acc, apc */
-#	define	ACKM		"minix"
-
-/* size of local machine, either 0 (for 16 bit address space), or 1 */
-#	undef BIGMACHINE	1
-
-/* operating system, SYS_5, V7, BSD4_1 or BSD4_2; Do NOT delete the comment
-   in the next line! */
-#	define V7  1       /* SYSTEM */
Index: trunk/minix/commands/aal/long2str.c
===================================================================
--- trunk/minix/commands/aal/long2str.c	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/long2str.c,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* Integer to String translator
-	-> base is a value from [-16,-2] V [2,16]
-	-> base < 0: see 'val' as unsigned value
-	-> no checks for buffer overflow and illegal parameters
-	(1985, EHB)
-*/
-
-#define MAXWIDTH 32
-
-char *
-long2str(val, base)
-	register long val;
-	register base;
-{
-	static char numbuf[MAXWIDTH];
-	static char vec[] = "0123456789ABCDEF";
-	register char *p = &numbuf[MAXWIDTH];
-	int sign = (base > 0);
-
-	*--p = '\0';		/* null-terminate string	*/
-	if (val) {
-		if (base > 0) {
-			if (val < 0L) {
-				long v1 = -val;
-				if (v1 == val)
-					goto overflow;
-				val = v1;
-			}
-			else
-				sign = 0;
-		}
-		else
-		if (base < 0) {			/* unsigned */
-			base = -base;
-			if (val < 0L) {	/* taken from Amoeba src */
-				register mod, i;
-			overflow:
-				mod = 0;
-				for (i = 0; i < 8 * sizeof val; i++) {
-					mod <<= 1;
-					if (val < 0)
-						mod++;
-					val <<= 1;
-					if (mod >= base) {
-						mod -= base;
-						val++;
-					}
-				}
-				*--p = vec[mod];
-			}
-		}
-		do {
-			*--p = vec[(int) (val % base)];
-			val /= base;
-		} while (val != 0L);
-		if (sign)
-			*--p = '-';	/* don't forget it !!	*/
-	}
-	else
-		*--p = '0';		/* just a simple 0	*/
-	return p;
-}
Index: trunk/minix/commands/aal/object.h
===================================================================
--- trunk/minix/commands/aal/object.h	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/object.h,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include "byte_order.h"
-#include <local.h>
-#include <stdio.h>
-
-#if CHAR_UNSIGNED
-#define Xchar(ch)	(ch)
-#else
-#define Xchar(ch)	((ch) & 0377)
-#endif
-
-#if ! defined(BYTES_REVERSED)
-#define BYTES_REVERSED 1
-#endif
-
-#if ! defined(WORDS_REVERSED)
-#define WORDS_REVERSED 1
-#endif
-
-#if BYTES_REVERSED
-#define uget2(c)	(Xchar((c)[0]) | ((unsigned) Xchar((c)[1]) << 8))
-#define Xput2(i, c)	(((c)[0] = (i)), ((c)[1] = (i) >> 8))
-#define put2(i, c)	{ register int j = (i); Xput2(j, c); }
-#else
-#define uget2(c)	(* ((unsigned short *) (c)))
-#define Xput2(i, c)	(* ((short *) (c)) = (i))
-#define put2(i, c)	Xput2(i, c)
-#endif
-
-#define get2(c)		((short) uget2(c))
-
-#if WORDS_REVERSED || BYTES_REVERSED
-#define get4(c)		(uget2(c) | ((long) uget2((c)+2) << 16))
-#define put4(l, c)	{ register long x=(l); \
-			  Xput2((int)x,c); \
-			  Xput2((int)(x>>16),(c)+2); \
-			}
-#else
-#define get4(c)		(* ((long *) (c)))
-#define put4(l, c)	(* ((long *) (c)) = (l))
-#endif
-
-#define SECTCNT	3	/* number of sections with own output buffer */
-#if BIGMACHINE
-#define WBUFSIZ	(8*BUFSIZ)
-#else
-#define WBUFSIZ	BUFSIZ
-#endif
-
-struct fil {
-	int	cnt;
-	char	*pnow;
-	char	*pbegin;
-	long	currpos;
-	int	fd;
-	char	pbuf[WBUFSIZ];
-};
-
-extern struct fil __parts[];
-
-#define	PARTEMIT	0
-#define	PARTRELO	(PARTEMIT+SECTCNT)
-#define	PARTNAME	(PARTRELO+1)
-#define	PARTCHAR	(PARTNAME+1)
-#ifdef SYMDBUG
-#define PARTDBUG	(PARTCHAR+1)
-#else
-#define PARTDBUG	(PARTCHAR+0)
-#endif
-#define	NPARTS		(PARTDBUG + 1)
-
-#define getsect(s)      (PARTEMIT+((s)>=(SECTCNT-1)?(SECTCNT-1):(s)))
Index: trunk/minix/commands/aal/out.h
===================================================================
--- trunk/minix/commands/aal/out.h	(revision 9)
+++ 	(revision )
@@ -1,126 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/out.h,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-
-#ifndef __OUT_H_INCLUDED
-#define __OUT_H_INCLUDED
-/*
- * output format for ACK assemblers
- */
-#ifndef ushort
-#define ushort	unsigned short
-#endif /* ushort */
-
-struct outhead {
-	ushort 	oh_magic;	/* magic number */
-	ushort 	oh_stamp;	/* version stamp */
-	ushort	oh_flags;	/* several format flags */
-	ushort	oh_nsect;	/* number of outsect structures */
-	ushort	oh_nrelo;	/* number of outrelo structures */
-	ushort	oh_nname;	/* number of outname structures */
-	long	oh_nemit;	/* sum of all os_flen */
-	long	oh_nchar;	/* size of string area */
-};
-
-#define O_MAGIC	0x0201		/* magic number of output file */
-#define	O_STAMP	0		/* version stamp */
-#define MAXSECT	64		/* Maximum number of sections */
-
-#define	HF_LINK	0x0004		/* unresolved references left */
-#define	HF_8086	0x0008		/* os_base specially encoded */
-
-struct outsect {
-	long 	os_base;	/* startaddress in machine */
-	long	os_size;	/* section size in machine */
-	long	os_foff;	/* startaddress in file */
-	long	os_flen;	/* section size in file */
-	long	os_lign;	/* section alignment */
-};
-
-struct outrelo {
-	char	or_type;	/* type of reference */
-	char	or_sect;	/* referencing section */
-	ushort	or_nami;	/* referenced symbol index */
-	long	or_addr;	/* referencing address */
-};
-
-struct outname {
-	union {
-	  char	*on_ptr;	/* symbol name (in core) */
-	  long	on_off;		/* symbol name (in file) */
-	}	on_u;
-#define on_mptr	on_u.on_ptr
-#define on_foff	on_u.on_off
-	ushort	on_type;	/* symbol type */
-	ushort	on_desc;	/* debug info */
-	long	on_valu;	/* symbol value */
-};
-
-/*
- * relocation type bits
- */
-#define RELSZ	0x07		/* relocation length */
-#define RELO1	   1		/* 1 byte */
-#define RELO2	   2		/* 2 bytes */
-#define RELO4	   4		/* 4 bytes */
-#define RELPC	0x08		/* pc relative */
-#define RELBR	0x10		/* High order byte lowest address. */
-#define RELWR	0x20		/* High order word lowest address. */
-
-/*
- * section type bits and fields
- */
-#define S_TYP	0x007F		/* undefined, absolute or relative */
-#define S_EXT	0x0080		/* external flag */
-#define S_ETC	0x7F00		/* for symbolic debug, bypassing 'as' */
-
-/*
- * S_TYP field values
- */
-#define S_UND	0x0000		/* undefined item */
-#define S_ABS	0x0001		/* absolute item */
-#define S_MIN	0x0002		/* first user section */
-#define S_MAX	(S_TYP-1)	/* last user section */
-#define S_CRS	S_TYP		/* on_valu is symbol index which contains value */
-
-/*
- * S_ETC field values
- */
-#define S_SCT	0x0100		/* section names */
-#define S_LIN	0x0200		/* hll source line item */
-#define S_FIL	0x0300		/* hll source file item */
-#define S_MOD	0x0400		/* ass source file item */
-#define S_COM	0x1000		/* Common name. */
-#define S_STB	0xe000		/* entries with any of these bits set are
-				   reserved for debuggers
-				*/
-
-/*
- * structure format strings
- */
-#define SF_HEAD		"22222244"
-#define SF_SECT		"44444"
-#define SF_RELO		"1124"
-#define SF_NAME		"4224"
-
-/*
- * structure sizes (bytes in file; add digits in SF_*)
- */
-#define SZ_HEAD		20
-#define SZ_SECT		20
-#define SZ_RELO		8
-#define SZ_NAME		12
-
-/*
- * file access macros
- */
-#define BADMAGIC(x)	((x).oh_magic!=O_MAGIC)
-#define OFF_SECT(x)	SZ_HEAD
-#define OFF_EMIT(x)	(OFF_SECT(x) + ((long)(x).oh_nsect * SZ_SECT))
-#define OFF_RELO(x)	(OFF_EMIT(x) + (x).oh_nemit)
-#define OFF_NAME(x)	(OFF_RELO(x) + ((long)(x).oh_nrelo * SZ_RELO))
-#define OFF_CHAR(x)	(OFF_NAME(x) + ((long)(x).oh_nname * SZ_NAME))
-
-#endif /* __OUT_H_INCLUDED */
Index: trunk/minix/commands/aal/param.h
===================================================================
--- trunk/minix/commands/aal/param.h	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/param.h,v 1.1.1.1 2005/04/21 14:53:57 beng Exp $ */
-
-#define SSIZE 1024
Index: trunk/minix/commands/aal/print.c
===================================================================
--- trunk/minix/commands/aal/print.c	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/print.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <system.h>
-#include "param.h"
-
-/*VARARGS*/
-/*FORMAT0v $
-	%s = char *
-	%l = long
-	%c = int
-	%[uxbo] = unsigned int
-	%d = int
-$ */
-int
-#if __STDC__
-print(char *fmt, ...)
-#else
-print(fmt, va_alist)
-	char *fmt;
-	va_dcl
-#endif
-{
-	va_list args;
-	char buf[SSIZE];
-
-#if __STDC__
-	va_start(args, fmt);
-#else
-	va_start(args);
-#endif
-	sys_write(STDOUT, buf, _format(buf, fmt, args));
-	va_end(args);
-}
Index: trunk/minix/commands/aal/ranlib.h
===================================================================
--- trunk/minix/commands/aal/ranlib.h	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/ranlib.h,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-
-#ifndef __RANLIB_H_INCLUDED
-#define __RANLIB_H_INCLUDED
-
-#ifndef SYMDEF
-#	define SYMDEF	"__.SYMDEF"
-#endif /* SYMDEF */
-
-/*
- * Structure of the SYMDEF table of contents for an archive.
- * SYMDEF begins with a long giving the number of ranlib
- * structures that immediately follow, and then continues with a string
- * table consisting of a long giving the number of bytes of
- * strings that follow and then the strings themselves.
- */
-struct ranlib {
-	union {
-	  char	*ran__ptr;	/* symbol name (in core) */
-	  long	ran__off;	/* symbol name (in file) */
-	}	ran_u;
-#define ran_ptr ran_u.ran__ptr
-#define ran_off ran_u.ran__off
-	long	ran_pos;	/* library member is at this position */
-};
-
-#define SZ_RAN	8
-#define SF_RAN	"44"
-
-#endif /* __RANLIB_H_INCLUDED */
Index: trunk/minix/commands/aal/rd.c
===================================================================
--- trunk/minix/commands/aal/rd.c	(revision 9)
+++ 	(revision )
@@ -1,254 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/rd.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include <out.h>
-#include "object.h"
-
-extern long		lseek();
-
-/*
- * Parts of the output file.
- */
-#undef PARTEMIT
-#undef PARTRELO
-#undef PARTNAME
-#undef PARTCHAR
-#undef PARTDBUG
-#undef NPARTS
-
-#define	PARTEMIT	0
-#define	PARTRELO	1
-#define	PARTNAME	2
-#define	PARTCHAR	3
-#ifdef SYMDBUG
-#define PARTDBUG	4
-#else
-#define PARTDBUG	3
-#endif
-#define	NPARTS		(PARTDBUG + 1)
-
-static long		offset[MAXSECT];
-
-static int		outfile;
-static long		outseek[NPARTS];
-static long		currpos;
-static long		rd_base;
-#define OUTSECT(i) \
-	(outseek[PARTEMIT] = offset[i])
-#define BEGINSEEK(p, o) \
-	(outseek[(p)] = (o))
-
-static int sectionnr;
-
-static
-OUTREAD(p, b, n)
-	char *b;
-	long n;
-{
-	register long l = outseek[p];
-
-	if (currpos != l) {
-		lseek(outfile, l, 0);
-	}
-	rd_bytes(outfile, b, n);
-	l += n;
-	currpos = l;
-	outseek[p] = l;
-}
-
-/*
- * Open the output file according to the chosen strategy.
- */
-int
-rd_open(f)
-	char *f;
-{
-
-	if ((outfile = open(f, 0)) < 0)
-		return 0;
-	return rd_fdopen(outfile);
-}
-
-static int offcnt;
-
-rd_fdopen(fd)
-{
-	register int i;
-
-	for (i = 0; i < NPARTS; i++) outseek[i] = 0;
-	offcnt = 0;
-	rd_base = lseek(fd, 0L, 1);
-	if (rd_base < 0) {
-		return 0;
-	}
-	currpos = rd_base;
-	outseek[PARTEMIT] = currpos;
-	outfile = fd;
-	sectionnr = 0;
-	return 1;
-}
-
-rd_close()
-{
-
-	close(outfile);
-	outfile = -1;
-}
-
-rd_fd()
-{
-	return outfile;
-}
-
-rd_ohead(head)
-	register struct outhead	*head;
-{
-	register long off;
-
-	OUTREAD(PARTEMIT, (char *) head, (long) SZ_HEAD);
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-	if (sizeof(struct outhead) != SZ_HEAD)
-#endif
-	{
-		register char *c = (char *) head + (SZ_HEAD-4);
-		
-		head->oh_nchar = get4(c);
-		c -= 4; head->oh_nemit = get4(c);
-		c -= 2; head->oh_nname = uget2(c);
-		c -= 2; head->oh_nrelo = uget2(c);
-		c -= 2; head->oh_nsect = uget2(c);
-		c -= 2; head->oh_flags = uget2(c);
-		c -= 2; head->oh_stamp = uget2(c);
-		c -= 2; head->oh_magic = uget2(c);
-	}
-	off = OFF_RELO(*head) + rd_base;
-	BEGINSEEK(PARTRELO, off);
-	off += (long) head->oh_nrelo * SZ_RELO;
-	BEGINSEEK(PARTNAME, off);
-	off += (long) head->oh_nname * SZ_NAME;
-	BEGINSEEK(PARTCHAR, off);
-#ifdef SYMDBUG
-	off += head->oh_nchar;
-	BEGINSEEK(PARTDBUG, off);
-#endif
-}
-
-rd_rew_relos(head)
-	register struct outhead *head;
-{
-	register long off = OFF_RELO(*head) + rd_base;
-
-	BEGINSEEK(PARTRELO, off);
-}
-
-rd_sect(sect, cnt)
-	register struct outsect	*sect;
-	register unsigned int	cnt;
-{
-	register char *c = (char *) sect + cnt * SZ_SECT;
-
-	OUTREAD(PARTEMIT, (char *) sect, (long)cnt * SZ_SECT);
-	sect += cnt;
-	offcnt += cnt;
-	while (cnt--) {
-		sect--;
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-		if (sizeof(struct outsect) != SZ_SECT)
-#endif
-		{
-			c -= 4; sect->os_lign = get4(c);
-			c -= 4; sect->os_flen = get4(c);
-			c -= 4; sect->os_foff = get4(c);
-		}
-		offset[--offcnt] = sect->os_foff + rd_base;
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-		if (sizeof(struct outsect) != SZ_SECT)
-#endif
-		{
-			c -= 4; sect->os_size = get4(c);
-			c -= 4; sect->os_base = get4(c);
-		}
-	}
-}
-
-rd_outsect(s)
-{
-	OUTSECT(s);
-	sectionnr = s;
-}
-
-/*
- * We don't have to worry about byte order here.
- */
-rd_emit(emit, cnt)
-	char		*emit;
-	long		cnt;
-{
-	OUTREAD(PARTEMIT, emit, cnt);
-	offset[sectionnr] += cnt;
-}
-
-rd_relo(relo, cnt)
-	register struct outrelo	*relo;
-	register unsigned int cnt;
-{
-
-	OUTREAD(PARTRELO, (char *) relo, (long) cnt * SZ_RELO);
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-	if (sizeof(struct outrelo) != SZ_RELO)
-#endif
-	{
-		register char *c = (char *) relo + (long) cnt * SZ_RELO;
-
-		relo += cnt;
-		while (cnt--) {
-			relo--;
-			c -= 4; relo->or_addr = get4(c);
-			c -= 2; relo->or_nami = uget2(c);
-			relo->or_sect = *--c;
-			relo->or_type = *--c;
-		}
-	}
-}
-
-rd_name(name, cnt)
-	register struct outname	*name;
-	register unsigned int cnt;
-{
-
-	OUTREAD(PARTNAME, (char *) name, (long) cnt * SZ_NAME);
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-	if (sizeof(struct outname) != SZ_NAME)
-#endif
-	{
-		register char *c = (char *) name + (long) cnt * SZ_NAME;
-
-		name += cnt;
-		while (cnt--) {
-			name--;
-			c -= 4; name->on_valu = get4(c);
-			c -= 2; name->on_desc = uget2(c);
-			c -= 2; name->on_type = uget2(c);
-			c -= 4; name->on_foff = get4(c);
-		}
-	}
-}
-
-rd_string(addr, len)
-	char *addr;
-	long len;
-{
-	
-	OUTREAD(PARTCHAR, addr, len);
-}
-
-#ifdef SYMDBUG
-rd_dbug(buf, size)
-	char		*buf;
-	long		size;
-{
-	OUTREAD(PARTDBUG, buf, size);
-}
-#endif
Index: trunk/minix/commands/aal/rd_arhdr.c
===================================================================
--- trunk/minix/commands/aal/rd_arhdr.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/rd_arhdr.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include <arch.h>
-#include "object.h"
-
-int
-rd_arhdr(fd, arhdr)
-	register struct ar_hdr	*arhdr;
-{
-	char buf[AR_TOTAL];
-	register char *c = buf;
-	register char *p = arhdr->ar_name;
-	register int i;
-
-	i = read(fd, c, AR_TOTAL);
-	if (i == 0) return 0;
-	if (i != AR_TOTAL) {
-		rd_fatal();
-	}
-	i = 14;
-	while (i--) {
-		*p++ = *c++;
-	}
-	arhdr->ar_date = ((long) get2(c)) << 16; c += 2;
-	arhdr->ar_date |= ((long) get2(c)) & 0xffff; c += 2;
-	arhdr->ar_uid = *c++;
-	arhdr->ar_gid = *c++;
-	arhdr->ar_mode = get2(c); c += 2;
-	arhdr->ar_size = (long) get2(c) << 16; c += 2;
-	arhdr->ar_size |= (long) get2(c) & 0xffff;
-	return 1;
-}
Index: trunk/minix/commands/aal/rd_bytes.c
===================================================================
--- trunk/minix/commands/aal/rd_bytes.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/rd_bytes.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define MININT		(1 << (sizeof(int) * 8 - 1))
-#define MAXCHUNK	(~MININT)	/* Highest count we read(2).	*/
-/* Unfortunately, MAXCHUNK is too large with some  compilers. Put it in
-   an int!
-*/
-
-static int maxchunk = MAXCHUNK;
-
-/*
- * We don't have to worry about byte order here.
- * Just read "cnt" bytes from file-descriptor "fd".
- */
-int 
-rd_bytes(fd, string, cnt)
-	register char	*string;
-	register long	cnt;
-{
-
-	while (cnt) {
-		register int n = cnt >= maxchunk ? maxchunk : cnt;
-
-		if (read(fd, string, n) != n)
-			rd_fatal();
-		string += n;
-		cnt -= n;
-	}
-}
Index: trunk/minix/commands/aal/rd_unsig2.c
===================================================================
--- trunk/minix/commands/aal/rd_unsig2.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/rd_unsig2.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include "object.h"
-
-unsigned int
-rd_unsigned2(fd)
-{
-	char buf[2];
-
-	rd_bytes(fd, buf, 2L);
-	return uget2(buf);
-}
Index: trunk/minix/commands/aal/sprint.c
===================================================================
--- trunk/minix/commands/aal/sprint.c	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/sprint.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <system.h>
-#include "param.h"
-
-/*VARARGS*/
-/*FORMAT1v $
-	%s = char *
-	%l = long
-	%c = int
-	%[uxbo] = unsigned int
-	%d = int
-$ */
-char *
-#if __STDC__
-sprint(char *buf, char *fmt, ...)
-#else
-sprint(buf, fmt, va_alist)
-	char *buf, *fmt;
-	va_dcl
-#endif
-{
-	va_list args;
-
-#if __STDC__
-	va_start(args, fmt);
-#else
-	va_start(args);
-#endif
-	buf[_format(buf, fmt, args)] = '\0';
-	va_end(args);
-	return buf;
-}
Index: trunk/minix/commands/aal/system.c
===================================================================
--- trunk/minix/commands/aal/system.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* RCS: $Header: /cvsup/minix/src/commands/aal/system.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-
-#include <system.h>
-
-File _sys_ftab[SYS_NOPEN] = {
-	{ 0, OP_READ},
-	{ 1, OP_APPEND},
-	{ 2, OP_APPEND}
-};
-
-File *
-_get_entry()
-{
-	register File *fp;
-
-	for (fp = &_sys_ftab[0]; fp < &_sys_ftab[SYS_NOPEN]; fp++)
-		if (fp->o_flags == 0)
-			return fp;
-	return (File *)0;
-}
Index: trunk/minix/commands/aal/system.h
===================================================================
--- trunk/minix/commands/aal/system.h	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* RCS: $Header: /cvsup/minix/src/commands/aal/system.h,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-#ifndef __SYSTEM_INCLUDED__
-#define __SYSTEM_INCLUDED__
-
-struct _sys_fildes {
-	int o_fd;	/* UNIX filedescriptor */
-	int o_flags;	/* flags for open; 0 if not used */
-};
-
-typedef struct _sys_fildes File;
-
-extern File _sys_ftab[];
-
-/* flags for sys_open() */
-#define OP_READ		01
-#define OP_WRITE	02
-#define OP_APPEND	04
-
-/* flags for sys_access() */
-#define AC_EXIST	00
-#define AC_READ		04
-#define AC_WRITE	02
-#define AC_EXEC		01
-
-/* flags for sys_stop() */
-#define S_END	0
-#define S_EXIT	1
-#define S_ABORT	2
-
-/* standard file decsriptors */
-#define STDIN	&_sys_ftab[0]
-#define STDOUT	&_sys_ftab[1]
-#define STDERR	&_sys_ftab[2]
-
-/* maximum number of open files */
-#define SYS_NOPEN	20
-
-/* return value for sys_break */
-#define ILL_BREAK	((char *)0)
-
-/* system's idea of block */
-#define BUFSIZ	1024
-#endif __SYSTEM_INCLUDED__
Index: trunk/minix/commands/aal/varargs.h
===================================================================
--- trunk/minix/commands/aal/varargs.h	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/varargs.h,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-
-#ifndef _VARARGS_H
-#define _VARARGS_H
-
-typedef char *va_list;
-# define __va_sz(mode)	(((sizeof(mode) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
-# define va_dcl int va_alist;
-# define va_start(list) (list = (char *) &va_alist)
-# define va_end(list)
-# define va_arg(list,mode) (*((mode *)((list += __va_sz(mode)) - __va_sz(mode))))
-#endif /* _VARARGS_H */
Index: trunk/minix/commands/aal/wr_arhdr.c
===================================================================
--- trunk/minix/commands/aal/wr_arhdr.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/wr_arhdr.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include <arch.h>
-#include "object.h"
-
-wr_arhdr(fd, arhdr)
-	register struct ar_hdr	*arhdr;
-{
-	char buf[AR_TOTAL];
-	register char *c = buf;
-	register char *p = arhdr->ar_name;
-	register int i = 14;
-
-	while (i--) {
-		*c++ = *p++;
-	}
-	put2((int)(arhdr->ar_date>>16),c); c += 2;
-	put2((int)(arhdr->ar_date),c); c += 2;
-	*c++ = arhdr->ar_uid;
-	*c++ = arhdr->ar_gid;
-	put2(arhdr->ar_mode,c); c += 2;
-	put2((int)(arhdr->ar_size>>16),c); c += 2;
-	put2((int)(arhdr->ar_size),c);
-	wr_bytes(fd, buf, (long) AR_TOTAL);
-}
Index: trunk/minix/commands/aal/wr_bytes.c
===================================================================
--- trunk/minix/commands/aal/wr_bytes.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/wr_bytes.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define MININT		(1 << (sizeof(int) * 8 - 1))
-#define MAXCHUNK	(~MININT)	/* Highest count we write(2).	*/
-/* Notice that MAXCHUNK itself might be too large with some compilers.
-   You have to put it in an int!
-*/
-
-static int maxchunk = MAXCHUNK;
-
-/*
- * Just write "cnt" bytes to file-descriptor "fd".
- */
-wr_bytes(fd, string, cnt)
-	register char	*string;
-	register long	cnt;
-{
-
-	while (cnt) {
-		register int n = cnt >= maxchunk ? maxchunk : cnt;
-
-		if (write(fd, string, n) != n)
-			wr_fatal();
-		string += n;
-		cnt -= n;
-	}
-}
Index: trunk/minix/commands/aal/wr_int2.c
===================================================================
--- trunk/minix/commands/aal/wr_int2.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/wr_int2.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include "object.h"
-
-wr_int2(fd, i)
-{
-	char buf[2];
-
-	put2(i, buf);
-	wr_bytes(fd, buf, 2L);
-}
Index: trunk/minix/commands/aal/wr_long.c
===================================================================
--- trunk/minix/commands/aal/wr_long.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/wr_long.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include "object.h"
-
-wr_long(fd, l)
-	long l;
-{
-	char buf[4];
-
-	put4(l, buf);
-	wr_bytes(fd, buf, 4L);
-}
Index: trunk/minix/commands/aal/wr_ranlib.c
===================================================================
--- trunk/minix/commands/aal/wr_ranlib.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/* $Header: /cvsup/minix/src/commands/aal/wr_ranlib.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#include <ranlib.h>
-#include "object.h"
-
-wr_ranlib(fd, ran, cnt)
-	register struct ranlib	*ran;
-	register long	cnt;
-{
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-	if (sizeof (struct ranlib) != SZ_RAN)
-#endif
-	{
-		char buf[100 * SZ_RAN];
-
-		while (cnt) {
-			register int i = (cnt > 100) ? 100 : cnt;
-			register char *c = buf;
-			long j = i * SZ_RAN;
-
-			cnt -= i;
-			while (i--) {
-				put4(ran->ran_off,c); c += 4;
-				put4(ran->ran_pos,c); c += 4;
-				ran++;
-			}
-			wr_bytes(fd, buf, j);
-		}
-	}
-#if ! (BYTES_REVERSED || WORDS_REVERSED)
-	else	wr_bytes(fd, (char *) ran, cnt * SZ_RAN);
-#endif
-}
Index: trunk/minix/commands/aal/write.c
===================================================================
--- trunk/minix/commands/aal/write.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/commands/aal/write.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
-
-#include <system.h>
-
-int
-sys_write(fp, bufptr, nbytes)
-	File *fp;
-	char *bufptr;
-	int nbytes;
-{
-	if (! fp) return 0;
-	return write(fp->o_fd, bufptr, nbytes) == nbytes;
-}
