Index: libcio/atoi.c
===================================================================
--- libcio/atoi.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/atoi.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stddefs.h"
-#include "ctype.h"
+#include "all.h"
 
 int16_t atoi(int8_t *cp)
@@ -33,2 +32,3 @@
 }
 
+
Index: libcio/atoi.x
===================================================================
--- libcio/atoi.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/atoi.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	atoi.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		atoi(int8_t *cp);
+
Index: libcio/atol.c
===================================================================
--- libcio/atol.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/atol.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stddefs.h"
-#include "ctype.h"
+#include "all.h"
 
 int32_t atol(int8_t *cp)
@@ -32,2 +31,3 @@
 	return(sign ? -n : n);
 }
+
Index: libcio/atol.x
===================================================================
--- libcio/atol.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/atol.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	atol.c -- global functions
+   =============================================================================
+*/
+
+extern	int32_t		atol(int8_t *cp);
+
Index: libcio/blkrd.c
===================================================================
--- libcio/blkrd.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/blkrd.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -26,11 +26,5 @@
 #define	DEBUGIT		0
 
-#include "stddefs.h"
-#include "biosdefs.h"
-#include "errno.h"
-#include "errdefs.h"
-#include "fspars.h"
-
-#include "memory.h"
+#include "all.h"
 
 /* 
@@ -177,2 +171,3 @@
 	return(0);	/* return -- all sectors read */
 }
+
Index: libcio/blkrd.x
===================================================================
--- libcio/blkrd.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/blkrd.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	blkrd.c -- global functions
+   =============================================================================
+*/
+
+extern	int32_t		_secrd(int8_t *buf, int16_t rec);
+extern	int16_t		blkrd(struct fcb *fcp, int8_t *buf, int16_t ns);
+
Index: libcio/blkwr.c
===================================================================
--- libcio/blkwr.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/blkwr.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -18,11 +18,5 @@
 #define	DEBUGIT		0
 
-#include "stddefs.h"
-#include "biosdefs.h"
-#include "errno.h"
-#include "errdefs.h"
-#include "fspars.h"
-
-#include "memory.h"
+#include "all.h"
 
 extern	int16_t	_nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp);
@@ -281,2 +275,3 @@
 	return(ns);	/* return (will be zero or negative) */
 }
+
Index: libcio/blkwr.x
===================================================================
--- libcio/blkwr.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/blkwr.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	blkwr.c -- global functions
+   =============================================================================
+*/
+
+extern	int32_t		_secwr(int8_t *buf, int16_t rec);
+extern	int16_t		blkwr(struct fcb *fcp, int8_t *buf, int16_t ns);
+
Index: libcio/close.c
===================================================================
--- libcio/close.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/close.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,9 +6,5 @@
 */
 
-#include "biosdefs.h"
-#include "errno.h"
-#include "fcntl.h"
-#include "io.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int16_t	_badfd(void);
@@ -137,2 +133,3 @@
 	_clsvol();			/* write modified directory adn FAT */
 }
+
Index: libcio/close.x
===================================================================
--- libcio/close.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/close.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	close.c -- global functions
+   =============================================================================
+*/
+
+extern	void		_clsdir(void);
+extern	void		_clsfat(void);
+extern	void		_fd_cls(void);
+extern	int16_t		_filecl(struct fcb *fp);
+extern	int16_t		close(int16_t fd);
+
Index: libcio/clusmap.c
===================================================================
--- libcio/clusmap.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/clusmap.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,9 +6,5 @@
 */
 
-#include "biosdefs.h"
-#include "errno.h"
-#include "io.h"
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int16_t	micons(int16_t wi);
@@ -83,5 +79,5 @@
 */
 
-static int16_t waitcr(void)
+int16_t waitcr(void)
 {
 	int8_t	c;
@@ -402,2 +398,3 @@
 	return(chantab[fp->_unit].c_arg);
 }
+
Index: libcio/clusmap.x
===================================================================
--- libcio/clusmap.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/clusmap.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	clusmap.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		ClusMap(struct fcb *fcp);
+extern	struct	fcb	*FCBmode(struct fcb *fcp);
+extern	FILE		*FILEfl(FILE *fp);
+extern	void		FILEpr(FILE *fp);
+extern	void		MapFAT(int8_t *fat, int16_t ncl, int16_t stops);
+extern	struct	fcb	*SnapFCB(struct fcb *fcp);
+extern	struct	fcb	*fd2fcb(int16_t fd);
+extern	struct	fcb	*fp2fcb(FILE *fp);
+
Index: libcio/conin.c
===================================================================
--- libcio/conin.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/conin.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,9 +8,5 @@
 #define	_FS_DEF_		/* to avoid unnecessary externals */
 
-#include "biosdefs.h"
-#include "io.h"
-#include "errno.h"
-#include "fcntl.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	void	*memcpy(void *vp1, void *vp2, int16_t n);
@@ -54,2 +50,3 @@
 	return (l);
 }
+
Index: libcio/conin.x
===================================================================
--- libcio/conin.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/conin.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	conin.c -- global variables
+   =============================================================================
+*/
+
+extern	int16_t		_CBused;
+extern	int8_t		_ConBuf[258];
+
+/*
+   =============================================================================
+	conin.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		_conin(int8_t *buff, int16_t len);
+
Index: libcio/conwr.c
===================================================================
--- libcio/conwr.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/conwr.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,8 +8,5 @@
 #define	_FS_DEF_		/* to avoid unnecessary externals */
 
-#include "biosdefs.h"
-#include "io.h"
-#include "errno.h"
-#include "stddefs.h"
+#include "all.h"
 
 /*
@@ -28,2 +25,3 @@
 	return(count);
 }
+
Index: libcio/conwr.x
===================================================================
--- libcio/conwr.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/conwr.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	conwr.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		_conwr(int16_t kind, int8_t *buff, int16_t len);
+
Index: libcio/dirfns.c
===================================================================
--- libcio/dirfns.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/dirfns.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stddefs.h"
-#include "biosdefs.h"
+#include "all.h"
 
 extern	int32_t	sprintf(int8_t *str, int8_t *fmt, ...);
@@ -136,2 +135,3 @@
 	return(s);
 }
+
Index: libcio/dirfns.x
===================================================================
--- libcio/dirfns.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/dirfns.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	dirfns.c -- global functions
+   =============================================================================
+*/
+
+extern	int8_t		*atrstr(int16_t atr, int8_t s[]);
+extern	int8_t		*dtunpk(int16_t din, int16_t tin, int16_t fmt, int8_t *s);
+extern	int8_t		*mname(int16_t n);
+
Index: libcio/fgets.c
===================================================================
--- libcio/fgets.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fgets.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 #define	EATCHAR	'\n'	/* character to be "eaten" on input */
@@ -74,2 +73,3 @@
 }
 
+
Index: libcio/fgets.x
===================================================================
--- libcio/fgets.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fgets.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fgets.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		agetc(FILE *ptr);
+extern	int8_t		*fgets(int8_t *s, int16_t n, FILE *fp);
+extern	int8_t		*gets(int8_t *line);
+
Index: libcio/filesys.c
===================================================================
--- libcio/filesys.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/filesys.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -14,10 +14,5 @@
 #define	_FS_DEF_	/* to avoid unnecessary externals */
 
-#include "stddefs.h"
-#include "biosdefs.h"
-#include "errno.h"
-#include "memory.h"
-#include "io.h"
-#include "fcntl.h"
+#include "all.h"
 
 #define	FAT_EOF		0x0FF8
@@ -1192,2 +1187,3 @@
 	return(SUCCESS);
 }
+
Index: libcio/filesys.x
===================================================================
--- libcio/filesys.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/filesys.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,50 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	filesys.c -- global variables
+   =============================================================================
+*/
+
+extern	int32_t		_berrno;
+extern	int16_t		_bpbin;
+extern	int16_t		_dirin;
+extern	int16_t		_dirmod;
+extern	struct	dirent	*_dptr;
+extern	int16_t		_fatin;
+extern	int16_t		_fatmod;
+extern	struct	bpb	*_thebpb;
+extern	struct	dirent	_thedir[224];
+extern	uint16_t	_thefat[7 * 256];
+
+/*
+   =============================================================================
+	filesys.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		ClsFile(struct fcb *fcp);
+extern	int16_t		DelFile(struct fcb *fcp);
+extern	int16_t		_alcnew(struct fcb *fcp);
+extern	uint16_t	_cl2lsn(struct bpb *bpp, uint16_t clnum);
+extern	void		_clsvol(void);
+extern	void		_deadio(struct fcb *fcp, int16_t err);
+extern	struct	dirent	*_dsnew(void);
+extern	struct	dirent	*_dsrch(struct dirent *de);
+extern	int16_t		_fmake(struct fcb *fcp);
+extern	int16_t		_ftrnc(struct dirent *dp);
+extern	uint16_t	_getfat(uint16_t *bufad, uint16_t nfat, struct bpb *bpp);
+extern	uint16_t	_gtcl12(int8_t *fat, uint16_t cl);
+extern	int16_t		_inifcb(struct fcb *fcp, int8_t *name, int8_t *ext, int16_t mode);
+extern	int16_t		_newcls(void);
+extern	int16_t		_nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp);
+extern	int16_t		_opfcb(struct fcb *fcp);
+extern	int16_t		_opnvol(void);
+extern	int16_t		_rdfat(uint16_t *bufad, struct bpb *bpp);
+extern	int16_t		_rdroot(uint16_t *buf, struct bpb *bpp);
+extern	int16_t		_seek(struct fcb *fcp);
+extern	int16_t		fcbinit(int8_t *name, struct fcb *fcp);
+
Index: libcio/filname.c
===================================================================
--- libcio/filname.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/filname.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,5 +8,5 @@
 #define	TESTER	0		/* define non-zero for test routine */
 
-#include <stddefs.h>
+#include "all.h"
 
 #define	MAX_NAME	8	/* maximum length of a file name */
@@ -142,2 +142,3 @@
 
 #endif
+
Index: libcio/filname.x
===================================================================
--- libcio/filname.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/filname.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	filname.c -- global functions
+   =============================================================================
+*/
+
+extern	int8_t		*FilExt(int8_t *s, int8_t *p);
+extern	int8_t		*FilName(int8_t *s, int8_t *p);
+
Index: libcio/flread.c
===================================================================
--- libcio/flread.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/flread.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 #define	CHUNK	32256		/* largest practical sized chunk of data */
@@ -47,2 +46,3 @@
 }
 
+
Index: libcio/flread.x
===================================================================
--- libcio/flread.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/flread.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	flread.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		flread(int8_t *buff, int32_t len, FILE *fp);
+
Index: libcio/fopen.c
===================================================================
--- libcio/fopen.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fopen.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,8 +6,5 @@
 */
 
-#include "stdio.h"
-#include "fcntl.h"
-#include "errno.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int32_t	lseek(int16_t fd, int32_t pos, int16_t how);
@@ -87,2 +84,3 @@
 	return(_opener(name, mode, O_RAW));
 }
+
Index: libcio/fopen.x
===================================================================
--- libcio/fopen.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fopen.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fopen.c -- global functions
+   =============================================================================
+*/
+
+extern	FILE		*_opener(int8_t *name, int8_t *mode, int16_t aflag);
+extern	FILE		*fopen(int8_t *name, int8_t *mode);
+extern	FILE		*fopena(int8_t *name, int8_t *mode);
+extern	FILE		*fopenb(int8_t *name, int8_t *mode);
+
Index: libcio/fprintf.c
===================================================================
--- libcio/fprintf.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fprintf.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,7 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
-#include "stdarg.h"
+#include "all.h"
 
 static FILE *Stream;
@@ -33,2 +31,3 @@
 	return(aputc(c, Stream));
 }
+
Index: libcio/fprintf.x
===================================================================
--- libcio/fprintf.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fprintf.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fprintf.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		fprintf(FILE *stream, int8_t *fmt, ...);
+
Index: libcio/fputs.c
===================================================================
--- libcio/fputs.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fputs.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 int16_t puts(int8_t *str)
@@ -36,2 +35,3 @@
 	return(0);
 }
+
Index: libcio/fputs.x
===================================================================
--- libcio/fputs.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fputs.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fputs.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		aputc(int16_t c, FILE *ptr);
+extern	int16_t		fputs(int8_t *s, FILE *fp);
+extern	int16_t		puts(int8_t *str);
+
Index: libcio/fread.c
===================================================================
--- libcio/fread.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fread.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 /*
@@ -34,2 +33,3 @@
 }
 
+
Index: libcio/fread.x
===================================================================
--- libcio/fread.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fread.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fread.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		fread(int8_t *buffer, uint16_t size, int16_t number, FILE *stream);
+
Index: libcio/fscanf.c
===================================================================
--- libcio/fscanf.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fscanf.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern int16_t agetc(FILE *ptr);
@@ -42,2 +41,3 @@
 	return(scanfmt(gchar, fmt, &args));
 }
+
Index: libcio/fscanf.x
===================================================================
--- libcio/fscanf.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fscanf.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fscanf.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		fscanf(FILE *fp, int8_t *fmt, int16_t *args);
+extern	int16_t		scanf(int8_t *fmt, int16_t *args);
+
Index: libcio/fseek.c
===================================================================
--- libcio/fseek.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fseek.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,8 +6,5 @@
 */
 
-#include "stdio.h"
-#include "biosdefs.h"
-#include "io.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int32_t	lseek(int16_t fd, int32_t pos, int16_t how);
@@ -51,2 +48,3 @@
 }
 
+
Index: libcio/fseek.x
===================================================================
--- libcio/fseek.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fseek.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fseek.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		fseek(FILE *fp, int32_t pos, int16_t mode);
+
Index: libcio/fsinit.c
===================================================================
--- libcio/fsinit.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fsinit.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,11 +8,5 @@
 #define	_FS_DEF_	/* define so that stdio.h and io.h get things right */
 
-#include "biosdefs.h"
-#include "errno.h"
-#include "io.h"
-#include "stdio.h"
-#include "stddefs.h"
-
-#include "memory.h"
+#include "all.h"
 
 extern	int16_t	_bpbin, _dirin, _fatin, _dirmod, _fatmod;
@@ -159,2 +153,3 @@
 #endif
 }
+
Index: libcio/fsinit.x
===================================================================
--- libcio/fsinit.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fsinit.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,36 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "io.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fsinit.c -- global variables
+   =============================================================================
+*/
+
+extern	FILE		Cbuffs[11];
+extern	int32_t		Stdbuf[8][256];
+extern	int8_t		*Stdbufs;
+extern	int8_t		Wrkbuf[512];
+extern	int16_t		_b_sect;
+extern	int16_t		_b_side;
+extern	int16_t		_b_tbuf[9][256];
+extern	int16_t		_b_trak;
+extern	int16_t		_b_tsec;
+extern	struct	fcb	_fcbtab[8];
+extern	struct	channel	chantab[11];
+
+/*
+   =============================================================================
+	fsinit.c -- global functions
+   =============================================================================
+*/
+
+extern	void		InitCH(struct channel *cp, int8_t rdi, int8_t wri, int8_t ioi, int8_t ski, int16_t (*cfp)(), io_arg charg);
+extern	void		InitFS(void);
+extern	void		Init_CB(FILE *fp, int8_t unit, int8_t flags, int32_t *bufad, int16_t bufsize);
+extern	int16_t		_badfd(void);
+extern	int16_t		_noper(void);
+
Index: libcio/fsize.c
===================================================================
--- libcio/fsize.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fsize.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,8 +6,5 @@
 */
 
-#include "stdio.h"
-#include "biosdefs.h"
-#include "io.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	uint16_t	_gtcl12(int8_t *fat, uint16_t cl);
@@ -94,2 +91,3 @@
 	}
 }
+
Index: libcio/fsize.x
===================================================================
--- libcio/fsize.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fsize.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fsize.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		dspace(int16_t which);
+extern	int32_t		fsize(FILE *fp, int16_t how);
+
Index: libcio/fstubs.c
===================================================================
--- libcio/fstubs.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fstubs.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,9 +6,5 @@
 */
 
-#include "biosdefs.h"
-#include "errno.h"
-#include "stdio.h"
-#include "io.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern void xtrap15(void);
@@ -47,2 +43,3 @@
 	return(1);
 }
+
Index: libcio/fstubs.x
===================================================================
--- libcio/fstubs.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fstubs.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fstubs.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		readbuf(int16_t dev, int8_t *buf);
+
Index: libcio/ftell.c
===================================================================
--- libcio/ftell.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/ftell.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,8 +8,5 @@
 #define	DEBUGIT		0
 
-#include "biosdefs.h"
-#include "stdio.h"
-#include "io.h"
-#include "stddefs.h"
+#include "all.h"
 
 #if	DEBUGIT
@@ -93,2 +90,3 @@
 	return(pos);
 }
+
Index: libcio/ftell.x
===================================================================
--- libcio/ftell.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/ftell.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	ftell.c -- global functions
+   =============================================================================
+*/
+
+extern	int32_t		ftell(FILE *fp);
+
Index: libcio/fwrite.c
===================================================================
--- libcio/fwrite.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/fwrite.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 /*
@@ -38,2 +37,3 @@
 }
 
+
Index: libcio/fwrite.x
===================================================================
--- libcio/fwrite.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/fwrite.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	fwrite.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		fwrite(int8_t *buffer, int16_t size, int16_t number, FILE *stream);
+
Index: libcio/getbuff.c
===================================================================
--- libcio/getbuff.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/getbuff.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 void getbuff(FILE *ptr)
@@ -35,2 +34,3 @@
 	return;
 }
+
Index: libcio/getbuff.x
===================================================================
--- libcio/getbuff.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/getbuff.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,10 @@
+#pragma once
+
+/*
+   =============================================================================
+	getbuff.c -- global functions
+   =============================================================================
+*/
+
+extern	void		getbuff(FILE *ptr);
+
Index: libcio/getc.c
===================================================================
--- libcio/getc.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/getc.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern int16_t read(int16_t fd, int8_t *buff, uint16_t len);
@@ -37,2 +36,3 @@
 	return(*ptr->_bp++ & 0xFF);
 }
+
Index: libcio/getc.x
===================================================================
--- libcio/getc.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/getc.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	getc.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		getc(FILE *ptr);
+
Index: libcio/getl.c
===================================================================
--- libcio/getl.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/getl.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,5 +6,5 @@
 */
 
-#include "stdio.h"
+#include "all.h"
 
 /*
@@ -31,2 +31,3 @@
 	return(temp);
 }
+
Index: libcio/getl.x
===================================================================
--- libcio/getl.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/getl.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	getl.c -- global functions
+   =============================================================================
+*/
+
+extern	int32_t		getl(FILE *stream);
+
Index: libcio/getw.c
===================================================================
--- libcio/getw.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/getw.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,5 +6,5 @@
 */
 
-#include "stdio.h"
+#include "all.h"
 
 /*
@@ -29,2 +29,3 @@
 	return(temp);
 }
+
Index: libcio/getw.x
===================================================================
--- libcio/getw.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/getw.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	getw.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		getw(FILE *stream);
+
Index: libcio/lseek.c
===================================================================
--- libcio/lseek.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/lseek.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,8 +8,5 @@
 #define	DEBUGIT		0
 
-#include "io.h"
-#include "biosdefs.h"
-#include "errno.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int16_t	_seek(struct fcb *fcp);
@@ -118,2 +115,3 @@
 }
 
+
Index: libcio/lseek.x
===================================================================
--- libcio/lseek.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/lseek.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	lseek.c -- global functions
+   =============================================================================
+*/
+
+extern	int32_t		lseek(int16_t fd, int32_t pos, int16_t how);
+
Index: libcio/open.c
===================================================================
--- libcio/open.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/open.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,11 +6,5 @@
 */
 
-#include "biosdefs.h"
-#include "errno.h"
-#include "fcntl.h"
-#include "io.h"
-#include "stddefs.h"
-
-#include "strings.h"
+#include "all.h"
 
 extern	int16_t	_badfd(void);
@@ -250,2 +244,3 @@
 }
 
+
Index: libcio/open.x
===================================================================
--- libcio/open.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/open.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "io.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	open.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		_fileop(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp);
+extern	int16_t		creat(int8_t *name, int16_t mode);
+extern	int16_t		creata(int8_t *name, int16_t mode);
+extern	int16_t		creatb(int8_t *name, int16_t mode);
+extern	int16_t		open(int8_t *name, int16_t flag, int16_t mode);
+extern	int16_t		opena(int8_t *name, int16_t flag, int16_t mode);
+extern	int16_t		openb(int8_t *name, int16_t flag, int16_t mode);
+
Index: libcio/posit.c
===================================================================
--- libcio/posit.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/posit.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,8 +6,5 @@
 */
 
-#include "biosdefs.h"
-#include "io.h"
-#include "errno.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int16_t	_seek(struct fcb *fcp);
@@ -51,2 +48,3 @@
 	return(SUCCESS);
 }
+
Index: libcio/posit.x
===================================================================
--- libcio/posit.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/posit.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	posit.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		posit(int16_t fd, uint16_t pos);
+
Index: libcio/putc.c
===================================================================
--- libcio/putc.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/putc.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 extern	int16_t	write(int16_t fd, int8_t *buff, uint16_t len);
@@ -167,2 +166,3 @@
 }
 
+
Index: libcio/putc.x
===================================================================
--- libcio/putc.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/putc.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	putc.c -- global variables
+   =============================================================================
+*/
+
+extern	int16_t		_ClFlag;
+
+/*
+   =============================================================================
+	putc.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		fclose(FILE *ptr);
+extern	int16_t		fflush(FILE *ptr);
+extern	int16_t		flush_(FILE *ptr, int16_t data);
+extern	int16_t		putc(int16_t c, FILE *ptr);
+extern	int16_t		puterr(int16_t c);
+
Index: libcio/putl.c
===================================================================
--- libcio/putl.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/putl.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,6 +8,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 void putl(int32_t w, FILE *stream)
@@ -24,2 +23,3 @@
 	putc((w & 0xFF), stream);
 }
+
Index: libcio/putl.x
===================================================================
--- libcio/putl.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/putl.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,10 @@
+#pragma once
+
+/*
+   =============================================================================
+	putl.c -- global functions
+   =============================================================================
+*/
+
+extern	void		putl(int32_t w, FILE *stream);
+
Index: libcio/putw.c
===================================================================
--- libcio/putw.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/putw.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,6 +8,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 void putw(uint16_t w, FILE *stream)
@@ -18,2 +17,3 @@
 	putc((w & 0xFF), stream);
 }
+
Index: libcio/putw.x
===================================================================
--- libcio/putw.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/putw.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,10 @@
+#pragma once
+
+/*
+   =============================================================================
+	putw.c -- global functions
+   =============================================================================
+*/
+
+extern	void		putw(uint16_t w, FILE *stream);
+
Index: libcio/read.c
===================================================================
--- libcio/read.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/read.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -36,9 +36,5 @@
 #define	DEBUGIT		0
 
-#include "biosdefs.h"
-#include "io.h"
-#include "errno.h"
-#include "fcntl.h"
-#include "stddefs.h"
+#include "all.h"
 
 #if	DEBUGIT
@@ -176,2 +172,3 @@
 	return(len);				/* return - got the whole thing */
 }
+
Index: libcio/read.x
===================================================================
--- libcio/read.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/read.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	read.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		_filerd(struct fcb *fp, int8_t *buffer, uint16_t len);
+extern	int16_t		_getsec(struct fcb *fp, int8_t *buf, uint16_t len);
+extern	int16_t		read(int16_t fd, int8_t *buff, uint16_t len);
+
Index: libcio/readrn.c
===================================================================
--- libcio/readrn.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/readrn.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -16,9 +16,5 @@
 #define	DEBUGIT		0
 
-#include "stddefs.h"
-#include "biosdefs.h"
-#include "errno.h"
-#include "errdefs.h"
-#include "fspars.h"
+#include "all.h"
 
 #if	DEBUGIT
@@ -80,2 +76,3 @@
 	return(SUCCESS);		/* return:  SUCCESS */
 }
+
Index: libcio/readrn.x
===================================================================
--- libcio/readrn.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/readrn.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	readrn.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		ReadRN(struct fcb *fcp, int8_t *buf);
+
Index: libcio/rename.c
===================================================================
--- libcio/rename.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/rename.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,4 +6,6 @@
 */
 
+#include "all.h"
+
 int16_t rename(int8_t *old, int8_t *new)
 {
Index: libcio/rename.x
===================================================================
--- libcio/rename.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/rename.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	rename.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		rename(int8_t *old, int8_t *new);
+
Index: libcio/scan.c
===================================================================
--- libcio/scan.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/scan.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,7 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
-#include "ctype.h"
+#include "all.h"
 
 static int16_t maxwide;
@@ -386,2 +384,3 @@
 }
 
+
Index: libcio/scan.x
===================================================================
--- libcio/scan.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/scan.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	scan.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		scanfmt(int16_t (*getsub)(), int8_t *fmt, int16_t **args);
+extern	int16_t		sscanf(int8_t *string, int8_t *fmt, int16_t *args);
+
Index: libcio/setbuf.c
===================================================================
--- libcio/setbuf.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/setbuf.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,5 +6,5 @@
 */
 
-#include "stdio.h"
+#include "all.h"
 
 void setbuf(FILE *stream, int8_t *buffer)
@@ -24,2 +24,3 @@
 	}
 }
+
Index: libcio/setbuf.x
===================================================================
--- libcio/setbuf.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/setbuf.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	setbuf.c -- global functions
+   =============================================================================
+*/
+
+extern	void		setbuf(FILE *stream, int8_t *buffer);
+
Index: libcio/ungetc.c
===================================================================
--- libcio/ungetc.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/ungetc.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -6,6 +6,5 @@
 */
 
-#include "stdio.h"
-#include "stddefs.h"
+#include "all.h"
 
 int16_t ungetc(int16_t c, FILE *ptr)
@@ -18,2 +17,3 @@
 	return(c);
 }
+
Index: libcio/ungetc.x
===================================================================
--- libcio/ungetc.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/ungetc.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	ungetc.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		ungetc(int16_t c, FILE *ptr);
+
Index: libcio/unlink.c
===================================================================
--- libcio/unlink.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/unlink.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,6 +8,5 @@
 #define	DEBUGIT		0
 
-#include "biosdefs.h"
-#include "stddefs.h"
+#include "all.h"
 
 #if	DEBUGIT
@@ -45,2 +44,3 @@
 }
 
+
Index: libcio/unlink.x
===================================================================
--- libcio/unlink.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/unlink.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "stdint.h"
+
+/*
+   =============================================================================
+	unlink.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		unlink(int8_t *name);
+
Index: libcio/write.c
===================================================================
--- libcio/write.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/write.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -8,10 +8,5 @@
 #define	DEBUGIT		0
 
-#include "biosdefs.h"
-#include "io.h"
-#include "errno.h"
-#include "stddefs.h"
-
-#include "memory.h"
+#include "all.h"
 
 int16_t	_filewr(struct fcb *fp, int8_t *buffer, uint16_t len);
@@ -262,2 +257,3 @@
 	return((*wr_tab[chp->c_write])(chp->c_arg, buff, len));
 }
+
Index: libcio/write.x
===================================================================
--- libcio/write.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/write.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	write.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		_filewr(struct fcb *fp, int8_t *buffer, uint16_t len);
+extern	int16_t		_putsec(struct fcb *fp, int8_t *buf, uint16_t len);
+extern	int16_t		write(int16_t fd, int8_t *buff, uint16_t len);
+
Index: libcio/writern.c
===================================================================
--- libcio/writern.c	(revision 411371e1e37956255823b10718da35900ee85cac)
+++ libcio/writern.c	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -16,9 +16,5 @@
 #define	DEBUGIT		0
 
-#include "stddefs.h"
-#include "biosdefs.h"
-#include "errno.h"
-#include "errdefs.h"
-#include "fspars.h"
+#include "all.h"
 
 extern	int32_t	_berrno;
@@ -106,2 +102,3 @@
 	return(SUCCESS);		/* return:  SUCCESS */
 }
+
Index: libcio/writern.x
===================================================================
--- libcio/writern.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
+++ libcio/writern.x	(revision 6262b5c7974b08ad57f56d797cf7106c80531276)
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "biosdefs.h"
+#include "stdint.h"
+
+/*
+   =============================================================================
+	writern.c -- global functions
+   =============================================================================
+*/
+
+extern	int16_t		WriteRN(struct fcb *fcp, int8_t *buf);
+
