strcpy (tempstr, prompt); 
strcpy(tempstr, prompt); 
print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x){    int newl, cur_x, cur_y;    int i, prompt_len, room, wlen;    char tempstr[MAX_LEN + 1], *word, *sp, *sp2;    strcpy (tempstr, prompt);    prompt_len = strlen(tempstr);	    /*     * Remove newlines     */    for(i=0; i<prompt_len; i++) {	if(tempstr[i] == '\n') tempstr[i] = ' ';    }    if (prompt_len <= width - x * 2) {	/* If prompt is short */	wmove (win, y, (width - prompt_len) / 2);	waddstr (win, tempstr);    } else {	cur_x = x;	cur_y = y;	newl = 1;	word = tempstr;	while (word && *word) {	    sp = index(word, ' ');	    if (sp)	        *sp++ = 0;	    /* Wrap to next line if either the word does not fit,	       or it is the first word of a new sentence, and it is	       short, and the next word does not fit. */	    room = width - cur_x;	    wlen = strlen(word);	    if (wlen > room ||	       (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room		     && (!(sp2 = index(sp, ' ')) || wlen+1+(sp2-sp) > room))) {		cur_y++;		cur_x = x;	    }	    wmove (win, cur_y, cur_x);	    waddstr (win, word);	    getyx (win, cur_y, cur_x);	    cur_x++;	    if (sp && *sp == ' ') {	        cur_x++;	/* double space */		while (*++sp == ' ');		newl = 1;	    } else	        newl = 0;	    word = sp;	}    }}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b1c5f1c635f4a821f834ed51ccd8a2a1515fffd2/util.c/clean/scripts/lxdialog/util.c