Index: ram/idfield.c
===================================================================
--- ram/idfield.c	(revision 5c13d6473fc3b87b0f3add3efa9e24cfc9622d76)
+++ ram/idfield.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
@@ -20,94 +20,94 @@
 extern	void	select(void);
 extern	void	stdmkey(void);
-extern	void	stddkey(short k);
+extern	void	stddkey(int16_t k);
 extern	void	nokey(void);
 extern	void	cxkstd(void);
 extern	void	cykstd(void);
-extern	short	vtoy(short val, short window);
-extern	short	ttox(unsigned time, short window);
-extern	short	timeto(short fn, short pj);
-extern	void	vcputsv(int *obase, int nw, int fg, int bg, int row, int col, char *str, int pitch);
-extern	void	dswin(short n);
-extern	short	stdctp1(void);
-extern	short	whatbox(void);
-extern	short	inspnt(struct instdef *ip, short fn, short inpnt);
+extern	int16_t	vtoy(int16_t val, int16_t window);
+extern	int16_t	ttox(uint16_t time, int16_t window);
+extern	int16_t	timeto(int16_t fn, int16_t pj);
+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	dswin(int16_t n);
+extern	int16_t	stdctp1(void);
+extern	int16_t	whatbox(void);
+extern	int16_t	inspnt(struct instdef *ip, int16_t fn, int16_t inpnt);
 extern	void	pntsel(void);
-extern	void	setseg(short pn, unsigned ptime);
-extern	void	showpt(short q);
-
-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_ipnt(short n);
-extern	short	ef_ipnt(short n);
-extern	short	rd_ipnt(short n);
-extern	short	nd_ipnt(short n, short k);
-extern	short	et_idin(short n);
-extern	short	ef_idin(short n);
-extern	short	rd_idin(short n);
-extern	short	nd_idin(short n, short k);
-extern	short	et_ivce(short n);
-extern	short	ef_ivce(short n);
-extern	short	rd_ivce(short n);
-extern	short	nd_ivce(short n, short k);
-extern	short	et_icnf(short n);
-extern	short	ef_icnf(short n);
-extern	short	rd_icnf(short n);
-extern	short	nd_icnf(short n, short k);
-extern	short	et_ival(short n);
-extern	short	ef_ival(short n);
-extern	short	rd_ival(short n);
-extern	short	nd_ival(short n, short k);
-extern	short	et_itim(short n);
-extern	short	ef_itim(short n);
-extern	short	rd_itim(short n);
-extern	short	nd_itim(short n, short k);
-extern	short	et_iosc(short nn);
-extern	short	ef_iosc(short nn);
-extern	short	rd_iosc(short nn);
-extern	short	nd_iosc(short nn, short k);
-extern	short	et_iact(short nn);
-extern	short	ef_iact(short nn);
-extern	short	rd_iact(short nn);
-extern	short	nd_iact(short nn, short k);
-extern	short	et_iwsn(short nn);
-extern	short	ef_iwsn(short nn);
-extern	short	rd_iwsn(short nn);
-extern	short	nd_iwsn(short nn, short k);
-extern	short	et_ires(short n);
-extern	short	ef_ires(short n);
-extern	short	rd_ires(short n);
-extern	short	nd_ires(short n, short k);
-extern	short	et_imlt(short n);
-extern	short	ef_imlt(short n);
-extern	short	rd_imlt(short n);
-extern	short	nd_imlt(short n, short k);
-
-extern	unsigned	fromfpu(unsigned fputime);
-
-extern	void	*memset(void *vp, char c, int n);
-
-/* 
-
-*/
-
-extern	short	curvce, curfunc, curpnt, hitbox, astat, idnamsw;
-extern	short	cxval, cyval, cxrate, cyrate, curslim, cmtype, cmfirst;
-extern	short	pecase, pntsv, npts, subj, idimsw, wcflag, imflag;
-extern	short	idcfsw, idsrcsw, vtcrow, vtccol, stcrow, stccol;
-extern	short	vtxval, vtyval;
-
-extern	short	temax, temin;
-
-extern	short	*cratex, *cratey, crate0[], crate1[];
-
-extern	unsigned	*instob;
-
-extern	char	bfs[];
-extern	char	*idbxlbl[];
-
-extern	short	fnoff[];
-extern	short	idbox[][8];
+extern	void	setseg(int16_t pn, uint16_t ptime);
+extern	void	showpt(int16_t q);
+
+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_ipnt(int16_t n);
+extern	int16_t	ef_ipnt(int16_t n);
+extern	int16_t	rd_ipnt(int16_t n);
+extern	int16_t	nd_ipnt(int16_t n, int16_t k);
+extern	int16_t	et_idin(int16_t n);
+extern	int16_t	ef_idin(int16_t n);
+extern	int16_t	rd_idin(int16_t n);
+extern	int16_t	nd_idin(int16_t n, int16_t k);
+extern	int16_t	et_ivce(int16_t n);
+extern	int16_t	ef_ivce(int16_t n);
+extern	int16_t	rd_ivce(int16_t n);
+extern	int16_t	nd_ivce(int16_t n, int16_t k);
+extern	int16_t	et_icnf(int16_t n);
+extern	int16_t	ef_icnf(int16_t n);
+extern	int16_t	rd_icnf(int16_t n);
+extern	int16_t	nd_icnf(int16_t n, int16_t k);
+extern	int16_t	et_ival(int16_t n);
+extern	int16_t	ef_ival(int16_t n);
+extern	int16_t	rd_ival(int16_t n);
+extern	int16_t	nd_ival(int16_t n, int16_t k);
+extern	int16_t	et_itim(int16_t n);
+extern	int16_t	ef_itim(int16_t n);
+extern	int16_t	rd_itim(int16_t n);
+extern	int16_t	nd_itim(int16_t n, int16_t k);
+extern	int16_t	et_iosc(int16_t nn);
+extern	int16_t	ef_iosc(int16_t nn);
+extern	int16_t	rd_iosc(int16_t nn);
+extern	int16_t	nd_iosc(int16_t nn, int16_t k);
+extern	int16_t	et_iact(int16_t nn);
+extern	int16_t	ef_iact(int16_t nn);
+extern	int16_t	rd_iact(int16_t nn);
+extern	int16_t	nd_iact(int16_t nn, int16_t k);
+extern	int16_t	et_iwsn(int16_t nn);
+extern	int16_t	ef_iwsn(int16_t nn);
+extern	int16_t	rd_iwsn(int16_t nn);
+extern	int16_t	nd_iwsn(int16_t nn, int16_t k);
+extern	int16_t	et_ires(int16_t n);
+extern	int16_t	ef_ires(int16_t n);
+extern	int16_t	rd_ires(int16_t n);
+extern	int16_t	nd_ires(int16_t n, int16_t k);
+extern	int16_t	et_imlt(int16_t n);
+extern	int16_t	ef_imlt(int16_t n);
+extern	int16_t	rd_imlt(int16_t n);
+extern	int16_t	nd_imlt(int16_t n, int16_t k);
+
+extern	uint16_t	fromfpu(uint16_t fputime);
+
+extern	void	*memset(void *vp, int8_t c, int16_t n);
+
+/* 
+
+*/
+
+extern	int16_t	curvce, curfunc, curpnt, hitbox, astat, idnamsw;
+extern	int16_t	cxval, cyval, cxrate, cyrate, curslim, cmtype, cmfirst;
+extern	int16_t	pecase, pntsv, npts, subj, idimsw, wcflag, imflag;
+extern	int16_t	idcfsw, idsrcsw, vtcrow, vtccol, stcrow, stccol;
+extern	int16_t	vtxval, vtyval;
+
+extern	int16_t	temax, temin;
+
+extern	int16_t	*cratex, *cratey, crate0[], crate1[];
+
+extern	uint16_t	*instob;
+
+extern	int8_t	bfs[];
+extern	int8_t	*idbxlbl[];
+
+extern	int16_t	fnoff[];
+extern	int16_t	idbox[][8];
 
 extern	struct	selbox	*csbp;
@@ -124,5 +124,5 @@
 
 void	idx_key(void);
-short	idnfld(short k);
+int16_t	idnfld(int16_t k);
 void	idcxupd(void);
 void	idcyupd(void);
@@ -134,7 +134,7 @@
 */
 
-short	zonemax[9] = { 63, 119, 175, 231, 287, 343, 399, 455, 509};
-
-short	zoneinc[9] = {  2,   2,   4,   9,  18,  36,  73, 146, 303};
+int16_t	zonemax[9] = { 63, 119, 175, 231, 287, 343, 399, 455, 509};
+
+int16_t	zoneinc[9] = {  2,   2,   4,   9,  18,  36,  73, 146, 303};
 
 struct	fet	id_fet1[] = {
@@ -163,5 +163,5 @@
 };
 
-char	*srctbl[] = {		/* source label table */
+int8_t	*srctbl[] = {		/* source label table */
 
 	"       ",	/*  0 */
@@ -248,5 +248,5 @@
 void idcyupd(void)
 {
-	register short pval, vh, vl;
+	register int16_t pval, vh, vl;
 
 	if (wcflag NE -1)		/* ws/cf menu page can't be up */
@@ -317,7 +317,7 @@
 void idcxupd(void)
 {
-	register unsigned th, tl;
-	register unsigned fptime, stime;
-	short zone;
+	register uint16_t th, tl;
+	register uint16_t fptime, stime;
+	int16_t zone;
 
 	if (idimsw) {			/* see if instrument menu is up */
@@ -435,7 +435,7 @@
 */
 
-short idnfld(short k)
+int16_t idnfld(int16_t k)
 {
-	register short endpnt, basepnt, t, fn;
+	register int16_t endpnt, basepnt, t, fn;
 	register struct idfnhdr *fp;
 	register struct instdef *ip;
@@ -541,5 +541,5 @@
 	register struct sment *smp;
 	register struct valent *vep;
-	register short i;
+	register int16_t i;
 	register struct instdef *ip;
 
