Index: ram/scfield.c
===================================================================
--- ram/scfield.c	(revision 5c13d6473fc3b87b0f3add3efa9e24cfc9622d76)
+++ ram/scfield.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
@@ -24,91 +24,91 @@
 /* functions defined elsewhere */
 
-extern	void	*memset(void *vp, char c, int n);
+extern	void	*memset(void *vp, int8_t c, int16_t n);
 
 extern	void	cxkstd(void);
 extern	void	cykstd(void);
 extern	void	select(void);
-extern	short	oktode(struct s_entry *ep);
-extern	short	stdctp3(void);
-extern	void	stddkey(short k);
+extern	int16_t	oktode(struct s_entry *ep);
+extern	int16_t	stdctp3(void);
+extern	void	stddkey(int16_t k);
 extern	void	nokey(void);
 extern	void	stdmkey(void);
 
-extern	short	et_strn(short n);
-extern	short	ef_strn(short n);
-extern	short	rd_strn(short n);
-extern	short	nd_strn(short n, short k);
-extern	short	et_snbt(short n);
-extern	short	ef_snbt(short n);
-extern	short	rd_snbt(short n);
-extern	short	nd_snbt(short n, short k);
-
-extern	short	et_ioas(short n);
-extern	short	ef_ioas(short n);
-extern	short	rd_ioas(short n);
-extern	short	nd_ioas(short n, short k);
-extern	short	et_tune(short n);
-extern	short	ef_tune(short n);
-extern	short	rd_tune(short n);
-extern	short	nd_tune(short n, short k);
-extern	short	et_tmpo(short n);
-extern	short	ef_tmpo(short n);
-extern	short	rd_tmpo(short n);
-extern	short	nd_tmpo(short n, short k);
-extern	short	et_intp(short n);
-extern	short	ef_intp(short n);
-extern	short	rd_intp(short n);
-extern	short	nd_intp(short n, short k);
-
-extern	short	et_inst(short n);
-extern	short	ef_inst(short n);
-extern	short	rd_inst(short n);
-extern	short	nd_inst(short n, short k);
-extern	short	et_trns(short n);
-extern	short	ef_trns(short n);
-extern	short	rd_trns(short n);
-extern	short	nd_trns(short n, short k);
-extern	short	et_dyn(short n);
-extern	short	ef_dyn(short n);
-extern	short	rd_dyn(short n);
-extern	short	nd_dyn(short n, short k);
-extern	short	et_loc(short n);
-extern	short	ef_loc(short n);
-extern	short	rd_loc(short n);
-extern	short	nd_loc(short n, short k);
-extern	short	et_vel(short n);
-extern	short	ef_vel(short n);
-extern	short	rd_vel(short n);
-extern	short	nd_vel(short n, short k);
-
-extern	short	et_res1(short n);
-extern	short	ef_res1(short n);
-extern	short	rd_res1(short n);
-extern	short	nd_res1(short n, short k);
-extern	short	et_aval(short n);
-extern	short	ef_aval(short n);
-extern	short	rd_aval(short n);
-extern	short	nd_aval(short n, short k);
-extern	short	et_agrp(short n);
-extern	short	ef_agrp(short n);
-extern	short	rd_agrp(short n);
-extern	short	nd_agrp(short n, short k);
-
-extern	short	et_scor(short n);
-extern	short	ef_scor(short n);
-extern	short	rd_scor(short n);
-extern	short	nd_scor(short n, short k);
+extern	int16_t	et_strn(int16_t n);
+extern	int16_t	ef_strn(int16_t n);
+extern	int16_t	rd_strn(int16_t n);
+extern	int16_t	nd_strn(int16_t n, int16_t k);
+extern	int16_t	et_snbt(int16_t n);
+extern	int16_t	ef_snbt(int16_t n);
+extern	int16_t	rd_snbt(int16_t n);
+extern	int16_t	nd_snbt(int16_t n, int16_t k);
+
+extern	int16_t	et_ioas(int16_t n);
+extern	int16_t	ef_ioas(int16_t n);
+extern	int16_t	rd_ioas(int16_t n);
+extern	int16_t	nd_ioas(int16_t n, int16_t k);
+extern	int16_t	et_tune(int16_t n);
+extern	int16_t	ef_tune(int16_t n);
+extern	int16_t	rd_tune(int16_t n);
+extern	int16_t	nd_tune(int16_t n, int16_t k);
+extern	int16_t	et_tmpo(int16_t n);
+extern	int16_t	ef_tmpo(int16_t n);
+extern	int16_t	rd_tmpo(int16_t n);
+extern	int16_t	nd_tmpo(int16_t n, int16_t k);
+extern	int16_t	et_intp(int16_t n);
+extern	int16_t	ef_intp(int16_t n);
+extern	int16_t	rd_intp(int16_t n);
+extern	int16_t	nd_intp(int16_t n, int16_t k);
+
+extern	int16_t	et_inst(int16_t n);
+extern	int16_t	ef_inst(int16_t n);
+extern	int16_t	rd_inst(int16_t n);
+extern	int16_t	nd_inst(int16_t n, int16_t k);
+extern	int16_t	et_trns(int16_t n);
+extern	int16_t	ef_trns(int16_t n);
+extern	int16_t	rd_trns(int16_t n);
+extern	int16_t	nd_trns(int16_t n, int16_t k);
+extern	int16_t	et_dyn(int16_t n);
+extern	int16_t	ef_dyn(int16_t n);
+extern	int16_t	rd_dyn(int16_t n);
+extern	int16_t	nd_dyn(int16_t n, int16_t k);
+extern	int16_t	et_loc(int16_t n);
+extern	int16_t	ef_loc(int16_t n);
+extern	int16_t	rd_loc(int16_t n);
+extern	int16_t	nd_loc(int16_t n, int16_t k);
+extern	int16_t	et_vel(int16_t n);
+extern	int16_t	ef_vel(int16_t n);
+extern	int16_t	rd_vel(int16_t n);
+extern	int16_t	nd_vel(int16_t n, int16_t k);
+
+extern	int16_t	et_res1(int16_t n);
+extern	int16_t	ef_res1(int16_t n);
+extern	int16_t	rd_res1(int16_t n);
+extern	int16_t	nd_res1(int16_t n, int16_t k);
+extern	int16_t	et_aval(int16_t n);
+extern	int16_t	ef_aval(int16_t n);
+extern	int16_t	rd_aval(int16_t n);
+extern	int16_t	nd_aval(int16_t n, int16_t k);
+extern	int16_t	et_agrp(int16_t n);
+extern	int16_t	ef_agrp(int16_t n);
+extern	int16_t	rd_agrp(int16_t n);
+extern	int16_t	nd_agrp(int16_t n, int16_t k);
+
+extern	int16_t	et_scor(int16_t n);
+extern	int16_t	ef_scor(int16_t n);
+extern	int16_t	rd_scor(int16_t n);
+extern	int16_t	nd_scor(int16_t n, int16_t k);
 
 /* forward references */
 
-short	et_null(short n);
-short	ef_null(short n);
-short	rd_null(short n);
-short	nd_null(short n, short k);
+int16_t	et_null(int16_t n);
+int16_t	ef_null(int16_t n);
+int16_t	rd_null(int16_t n);
+int16_t	nd_null(int16_t n, int16_t k);
 void	sdcxu(void);
 void	sdcyu(void);
 void	sdxkey(void);
 void	sdmkey(void);
-short	scntfld(short k);
+int16_t	scntfld(int16_t k);
 
 /* 
@@ -118,48 +118,48 @@
 /* variables defined elsewhere */
 
-extern	short	ancmsw;
-extern	short	angroup;
-extern	short	astat;
-extern	short	clkrun;
-extern	short	cmfirst;
-extern	short	cmtype;
-extern	short	curhold;
-extern	short	curscor;
-extern	short	cxrate;
-extern	short	cxval;
-extern	short	cyrate;
-extern	short	cyval;
-extern	short	ebflag;
-extern	short	hcwval;
-extern	short	insmode;
-extern	short	oldpk;
-extern	short	oldsl;
-extern	short	pkctrl;
-extern	short	recsw;
-extern	short	scmctl;
-extern	short	sdmctl;
-extern	short	sliders;
-extern	short	stccol;
-extern	short	stcrow;
-extern	short	thcwval;
-extern	short	tvcwval;
-extern	short	vcwval;
-extern	short	vtccol;
-extern	short	vtcrow;
-extern	short	vtxval;
-extern	short	vtyval;
-
-extern	long	ctime;
-extern	long	t_ins;
-
-extern	char	ebuf[MAXEBUF+1];
-
-extern	short	crate1[];
-extern	short	ehdlist[];
-extern	short	grpmode[];
-extern	short	grpstat[];
-extern	short	grptmap[];
-extern	short	sdmlim[][4];
-extern	short	varmode[8][16];
+extern	int16_t	ancmsw;
+extern	int16_t	angroup;
+extern	int16_t	astat;
+extern	int16_t	clkrun;
+extern	int16_t	cmfirst;
+extern	int16_t	cmtype;
+extern	int16_t	curhold;
+extern	int16_t	curscor;
+extern	int16_t	cxrate;
+extern	int16_t	cxval;
+extern	int16_t	cyrate;
+extern	int16_t	cyval;
+extern	int16_t	ebflag;
+extern	int16_t	hcwval;
+extern	int16_t	insmode;
+extern	int16_t	oldpk;
+extern	int16_t	oldsl;
+extern	int16_t	pkctrl;
+extern	int16_t	recsw;
+extern	int16_t	scmctl;
+extern	int16_t	sdmctl;
+extern	int16_t	sliders;
+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	vtxval;
+extern	int16_t	vtyval;
+
+extern	int32_t	ctime;
+extern	int32_t	t_ins;
+
+extern	int8_t	ebuf[MAXEBUF+1];
+
+extern	int16_t	crate1[];
+extern	int16_t	ehdlist[];
+extern	int16_t	grpmode[];
+extern	int16_t	grpstat[];
+extern	int16_t	grptmap[];
+extern	int16_t	sdmlim[][4];
+extern	int16_t	varmode[8][16];
 
 extern	LPF	(*swpt)[];
@@ -340,20 +340,20 @@
 */
 
-short et_null(short n)
+int16_t et_null(int16_t n)
 {
 	return(SUCCESS);
 }
 
-short ef_null(short n)
+int16_t ef_null(int16_t n)
 {
 	return(SUCCESS);
 }
 
-short rd_null(short n)
+int16_t rd_null(int16_t n)
 {
 	return(SUCCESS);
 }
 
-short nd_null(short n, short k)
+int16_t nd_null(int16_t n, int16_t k)
 {
 	return(SUCCESS);
@@ -419,5 +419,5 @@
 	register struct s_entry *ep, *tp, *rp;
 	struct s_entry *pp;
-	long endtime;
+	int32_t endtime;
 
 	if (NOT insmode)
@@ -543,7 +543,7 @@
 */
 
-short scntfld(short k)
-{
-	register short grp, fnc, var;
+int16_t scntfld(int16_t k)
+{
+	register int16_t grp, fnc, var;
 
 	if (NOT astat)
@@ -644,9 +644,9 @@
 */
 
-short cp2time(short cx)
-{
-	register long ct;
-
-	ct = t_cur + ((long)cx - PCENTER);
+int16_t cp2time(int16_t cx)
+{
+	register int32_t ct;
+
+	ct = t_cur + ((int32_t)cx - PCENTER);
 
 	if (ct < 0L)			/* if out of score time range */
@@ -667,10 +667,10 @@
 */
 
-short delevts(short etp, long thetime)
+int16_t delevts(int16_t etp, int32_t thetime)
 {
 	register struct s_entry *ep, *np;
-	register short et;
-	register short rc;
-	register short dsw;
+	register int16_t et;
+	register int16_t rc;
+	register int16_t dsw;
 
 	rc = FALSE;				/* intialize return code */
@@ -731,8 +731,8 @@
 */
 
-short deladat(void)
+int16_t deladat(void)
 {
 	register struct s_entry *ep, *rp;
-	register short grp, rc, var, vc, vn;
+	register int16_t grp, rc, var, vc, vn;
 
 	rc = FALSE;
@@ -848,5 +848,5 @@
 void sdxkey(void)
 {
-	register short col, grp, sect;
+	register int16_t col, grp, sect;
 	register struct s_entry *ep, *rp;
 
