Index: ram/adfield.c
===================================================================
--- ram/adfield.c	(revision 5c13d6473fc3b87b0f3add3efa9e24cfc9622d76)
+++ ram/adfield.c	(revision 8618599ab825088c720c202c6e50a52572282c0f)
@@ -18,106 +18,106 @@
 
 extern	void	select(void);
-extern	short	whatbox(void);
+extern	int16_t	whatbox(void);
 extern	void	nokey(void);
-extern	short	nonf(short k);
-extern	short	stdctp4(void);
+extern	int16_t	nonf(int16_t k);
+extern	int16_t	stdctp4(void);
 extern	void	cxkstd(void);
 extern	void	cykstd(void);
 extern	void	stdmkey(void);
-extern	void	stddkey(short k);
-
-extern	short	et_null(short n);
-extern	short	ef_null(short n);
-extern	short	rd_null(short n);
-extern	short	nd_null(short n, short k);
-extern	short	et_atab(short n);
-extern	short	ef_atab(short n);
-extern	short	rd_atab(short nn);
-extern	short	nd_atab(short nn, short k);
-extern	short	et_aopt(short n);
-extern	short	ef_aopt(short n);
-extern	short	rd_aopt(short nn);
-extern	short	nd_aopt(short nn, short k);
-extern	short	et_avgr(short nn);
-extern	short	ef_avgr(short nn);
-extern	short	rd_avgr(short nn);
-extern	short	nd_avgr(short nn, short k);
-extern	short	et_accn(short n);
-extern	short	ef_accn(short n);
-extern	short	rd_accn(short nn);
-extern	short	nd_accn(short nn, short k);
-extern	short	et_agpt(short n);
-extern	short	ef_agpt(short n);
-extern	short	rd_agpt(short nn);
-extern	short	nd_agpt(short nn, short k);
-extern	short	et_agch(short n);
-extern	short	ef_agch(short n);
-extern	short	rd_agch(short nn);
-extern	short	nd_agch(short nn, short k);
-extern	short	et_ains(short n);
-extern	short	ef_ains(short n);
-extern	short	rd_ains(short nn);
-extern	short	nd_ains(short nn, short k);
-extern	short	et_adyn(short n);
-extern	short	ef_adyn(short n);
-extern	short	rd_adyn(short nn);
-extern	short	nd_adyn(short nn, short k);
-extern	short	et_atun(short n);
-extern	short	ef_atun(short n);
-extern	short	rd_atun(short nn);
-extern	short	nd_atun(short nn, short k);
-extern	short	et_aprg(short n);
-extern	short	ef_aprg(short n);
-extern	short	rd_aprg(short nn);
-extern	short	nd_aprg(short nn, short k);
-extern	short	et_aint(short n);
-extern	short	ef_aint(short n);
-extern	short	rd_aint(short nn);
-extern	short	nd_aint(short nn, short k);
-extern	short	et_arat(short n);
-extern	short	ef_arat(short n);
-extern	short	rd_arat(short nn);
-extern	short	nd_arat(short nn, short k);
-extern	short	et_adep(short n);
-extern	short	ef_adep(short n);
-extern	short	rd_adep(short nn);
-extern	short	nd_adep(short nn, short k);
-
-extern	void	vcputsv(int *obase, int nw, int fg, int bg, int row, int col, char *str, int pitch);
-
-extern	void	*memset(void *vp, char c, int n);
-
-extern	short	adnamsw;
-extern	short	asgmod;
-extern	short	astat;
-extern	short	cmtype;
-extern	short	cmfirst;
-extern	short	curasg;
-extern	short	curhold;
-extern	short	curmop;
-extern	short	curslim;
-extern	short	cxval;
-extern	short	cyval;
-extern	short	cxrate;
-extern	short	cyrate;
-extern	short	hcwval;
-extern	short	hitbox;
-extern	short	hitcx;
-extern	short	hitcy;
-extern	short	stccol;
-extern	short	stcrow;
-extern	short	thcwval;
-extern	short	tvcwval;
-extern	short	vcwval;
-extern	short	vtccol;
-extern	short	vtcrow;
-extern	short	vtwcol;
-extern	short	vtwrow;
-extern	short	vtxval;
-extern	short	vtyval;
-
-extern	short	crate1[];
-
-extern	unsigned *asgob;
+extern	void	stddkey(int16_t k);
+
+extern	int16_t	et_null(int16_t n);
+extern	int16_t	ef_null(int16_t n);
+extern	int16_t	rd_null(int16_t n);
+extern	int16_t	nd_null(int16_t n, int16_t k);
+extern	int16_t	et_atab(int16_t n);
+extern	int16_t	ef_atab(int16_t n);
+extern	int16_t	rd_atab(int16_t nn);
+extern	int16_t	nd_atab(int16_t nn, int16_t k);
+extern	int16_t	et_aopt(int16_t n);
+extern	int16_t	ef_aopt(int16_t n);
+extern	int16_t	rd_aopt(int16_t nn);
+extern	int16_t	nd_aopt(int16_t nn, int16_t k);
+extern	int16_t	et_avgr(int16_t nn);
+extern	int16_t	ef_avgr(int16_t nn);
+extern	int16_t	rd_avgr(int16_t nn);
+extern	int16_t	nd_avgr(int16_t nn, int16_t k);
+extern	int16_t	et_accn(int16_t n);
+extern	int16_t	ef_accn(int16_t n);
+extern	int16_t	rd_accn(int16_t nn);
+extern	int16_t	nd_accn(int16_t nn, int16_t k);
+extern	int16_t	et_agpt(int16_t n);
+extern	int16_t	ef_agpt(int16_t n);
+extern	int16_t	rd_agpt(int16_t nn);
+extern	int16_t	nd_agpt(int16_t nn, int16_t k);
+extern	int16_t	et_agch(int16_t n);
+extern	int16_t	ef_agch(int16_t n);
+extern	int16_t	rd_agch(int16_t nn);
+extern	int16_t	nd_agch(int16_t nn, int16_t k);
+extern	int16_t	et_ains(int16_t n);
+extern	int16_t	ef_ains(int16_t n);
+extern	int16_t	rd_ains(int16_t nn);
+extern	int16_t	nd_ains(int16_t nn, int16_t k);
+extern	int16_t	et_adyn(int16_t n);
+extern	int16_t	ef_adyn(int16_t n);
+extern	int16_t	rd_adyn(int16_t nn);
+extern	int16_t	nd_adyn(int16_t nn, int16_t k);
+extern	int16_t	et_atun(int16_t n);
+extern	int16_t	ef_atun(int16_t n);
+extern	int16_t	rd_atun(int16_t nn);
+extern	int16_t	nd_atun(int16_t nn, int16_t k);
+extern	int16_t	et_aprg(int16_t n);
+extern	int16_t	ef_aprg(int16_t n);
+extern	int16_t	rd_aprg(int16_t nn);
+extern	int16_t	nd_aprg(int16_t nn, int16_t k);
+extern	int16_t	et_aint(int16_t n);
+extern	int16_t	ef_aint(int16_t n);
+extern	int16_t	rd_aint(int16_t nn);
+extern	int16_t	nd_aint(int16_t nn, int16_t k);
+extern	int16_t	et_arat(int16_t n);
+extern	int16_t	ef_arat(int16_t n);
+extern	int16_t	rd_arat(int16_t nn);
+extern	int16_t	nd_arat(int16_t nn, int16_t k);
+extern	int16_t	et_adep(int16_t n);
+extern	int16_t	ef_adep(int16_t n);
+extern	int16_t	rd_adep(int16_t nn);
+extern	int16_t	nd_adep(int16_t nn, int16_t k);
+
+extern	void	vcputsv(int16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *str, int16_t pitch);
+
+extern	void	*memset(void *vp, int8_t c, int16_t n);
+
+extern	int16_t	adnamsw;
+extern	int16_t	asgmod;
+extern	int16_t	astat;
+extern	int16_t	cmtype;
+extern	int16_t	cmfirst;
+extern	int16_t	curasg;
+extern	int16_t	curhold;
+extern	int16_t	curmop;
+extern	int16_t	curslim;
+extern	int16_t	cxval;
+extern	int16_t	cyval;
+extern	int16_t	cxrate;
+extern	int16_t	cyrate;
+extern	int16_t	hcwval;
+extern	int16_t	hitbox;
+extern	int16_t	hitcx;
+extern	int16_t	hitcy;
+extern	int16_t	stccol;
+extern	int16_t	stcrow;
+extern	int16_t	thcwval;
+extern	int16_t	tvcwval;
+extern	int16_t	vcwval;
+extern	int16_t	vtccol;
+extern	int16_t	vtcrow;
+extern	int16_t	vtwcol;
+extern	int16_t	vtwrow;
+extern	int16_t	vtxval;
+extern	int16_t	vtyval;
+
+extern	int16_t	crate1[];
+
+extern	uint16_t *asgob;
 
 extern	struct	asgent	asgtab[];
@@ -126,8 +126,8 @@
 extern	struct	selbox	*csbp;
 
-extern	short	grp2prt[12][2];
-extern	short	key2grp[];
-extern	short	mctlnum[];
-extern	short	vce2grp[];
+extern	int16_t	grp2prt[12][2];
+extern	int16_t	key2grp[];
+extern	int16_t	mctlnum[];
+extern	int16_t	vce2grp[];
 
 /* forward references */
@@ -234,5 +234,5 @@
 */
 
-short	adbox[][8] = {		/* display box parameters */
+int16_t	adbox[][8] = {		/* display box parameters */
 
 	{  1,   1,  94,  27, ACFBX00, ACBBX00,  0,  1},	/* 0 */
@@ -249,5 +249,5 @@
 };
 
-char	*adbxlb[] = {		/* display box labels */
+int8_t	*adbxlb[] = {		/* display box labels */
 
 	"Asgnmnt",			/* 0 */
@@ -365,5 +365,5 @@
 void ad_xkey(void)
 {
-	register short row, col, grp, i;
+	register int16_t row, col, grp, i;
 
 	if (astat) {
