rem: adddefaults()
add: adddefaults(void)
context: adddefaults(){	char *cap;	int sg;	if (verbose > 1)		(void) fprintf(trace, "assigning defaults.\n");	/* cr was assumed to be ^M, unless nc was given, */	/* which meant it could not be done. */	/* Also, xr meant that ^M acted strangely. */	if ((getinfostr("cr") == NULL) && !oboolval[uselevel][cap_nc] &&	    !oboolval[uselevel][cap_xr])		if ((cap = getcapstr("cr")) == NULL)			putstr("cr", "\r");		else			putstr("cr", cap);	/* cursor down was assumed to be ^J if not specified by nl */	if (getinfostr("cud1") == NULL)		if (ostrval[uselevel][cap_nl] != NULL)			putstr("cud1", ostrval[uselevel][cap_nl]);		else			putstr("cud1", "\n");	/* ind was assumed to be ^J, unless ns was given, */	/* which meant it could not be done. */	if ((getinfostr("ind") == NULL) && !oboolval[uselevel][cap_ns])		if (ostrval[uselevel][cap_nl] == NULL)			putstr("ind", "\n");		else			putstr("ind", ostrval[uselevel][cap_nl]);	/* bel was assumed to be ^G */	if (getinfostr("bel") == NULL)		putstr("bel", "\07");	/* if bs, then could do backspacing, */	/* with value of bc, default of ^H */	if ((getinfostr("cub1") == NULL) && oboolval[uselevel][cap_bs])		if (ostrval[uselevel][cap_bc] != NULL)			putstr("cub1", ostrval[uselevel][cap_bc]);		else			putstr("cub1", "\b");	/* default xon to true */	if (!otgetflag("xo"))		putbool("xon", 1);	/* if pt, then hardware tabs are allowed, */	/* with value of ta, default of ^I */	if ((getinfostr("ht") == NULL) && oboolval[uselevel][cap_pt])		if ((cap = getcapstr("ta")) == NULL)			putstr("ht", "\t");		else			putstr("ht", cap);	/* The dX numbers are now stored as padding */	/* in the appropriate terminfo string. */	addpadding(onumval[uselevel][cap_dB], "cub1");	addpadding(onumval[uselevel][cap_dC], "cr");	addpadding(onumval[uselevel][cap_dF], "ff");	addpadding(onumval[uselevel][cap_dN], "cud1");	addpadding(onumval[uselevel][cap_dT], "ht");	/* The ug and sg caps were essentially identical, */	/* so ug almost never got used. We set sg from ug */	/* if it hasn't already been set. */	if (onumval[uselevel][cap_ug] >= 0 && (sg = otgetnum("sg")) < 0)		putnum("xmc", onumval[uselevel][cap_ug]);	else if ((onumval[uselevel][cap_ug] >= 0) &&	    (sg >= 0) && (onumval[uselevel][cap_ug] != sg))		(void) fprintf(stderr,		    "%s: TERM=%s: Warning: termcap sg and ug had different "		    "values (%d<->%d).\n", progname, term_name, sg,		    onumval[uselevel][cap_ug]);	/* The MT boolean was never really part of termcap, */	/* but we can check for it anyways. */	if (oboolval[uselevel][cap_MT] && !otgetflag("km"))		putbool("km", 1);	/* the rs string was renamed r2 (info rs2) */	if ((ostrval[uselevel][cap_rs] != NULL) &&	    (ostrval[uselevel][cap_rs][0] != NULL))		putstr("rs2", ostrval[uselevel][cap_rs]);	handleko();	handlema();}