strncpy (newtc, ptr1, i = ptr2 - ptr1); newtc += i; sprintf (newtc, "%d", li_first ? screen->max_col + 1 : screen->max_row + 1);
strncpy (temp, ptr1, i = ptr2 - ptr1); temp += i; sprintf (temp, "%d", li_first ? screen->max_col + 1 : screen->max_row + 1);
resize(TScreen *screen, register char *oldtc, register char *newtc){#ifndef USE_SYSV_ENVVARS	register char *ptr1, *ptr2;	register size_t i;	register int li_first = 0;	register char *temp;	if ((ptr1 = strindex (oldtc, "co#")) == NULL){		strcat (oldtc, "co#80:");		ptr1 = strindex (oldtc, "co#");	}	if ((ptr2 = strindex (oldtc, "li#")) == NULL){		strcat (oldtc, "li#24:");		ptr2 = strindex (oldtc, "li#");	}	if(ptr1 > ptr2) {		li_first++;		temp = ptr1;		ptr1 = ptr2;		ptr2 = temp;	}	ptr1 += 3;	ptr2 += 3;	strncpy (newtc, oldtc, i = ptr1 - oldtc);	newtc += i;	sprintf (newtc, "%d", li_first ? screen->max_row + 1 :	 screen->max_col + 1);	newtc += strlen(newtc);	ptr1 = strchr(ptr1, ':');	strncpy (newtc, ptr1, i = ptr2 - ptr1);	newtc += i;	sprintf (newtc, "%d", li_first ? screen->max_col + 1 :	 screen->max_row + 1);	ptr2 = strchr(ptr2, ':');	strcat (newtc, ptr2);#endif /* USE_SYSV_ENVVARS */}