/* * Called after returning from ! or ^Z */ void gettty(){ register int i; erase_char = '\b'; kill_char = 21; /* cntl-U */ flags.cbreak = TRUE; #ifdef TEXTCOLOR init_ttycolor(); #endif }
/* * Called after returning from ! or ^Z */ void gettty() { #ifndef TEXTCOLOR int k; #endif erase_char = '\b'; kill_char = 21; /* cntl-U */ iflags.cbreak = TRUE; #ifdef TEXTCOLOR init_ttycolor(); #else for(k=0; k < CLR_MAX; ++k) ttycolors[k] = 7; #endif }
/* * OPTIONS=videocolors:1-2-3-4-5-6-7-8-9-10-11-12-13-14-15 * Left to right assignments for: * red green brown blue magenta cyan gray black * orange br.green yellow br.blue br.mag br.cyan white */ int assign_videocolors(char *colorvals) { int i,icolor; uchar *tmpcolor; init_ttycolor(); i = strlen(colorvals); tmpcolor = (uchar *)alloc(i); if (convert_uchars(colorvals,tmpcolor,i) < 0) return FALSE; icolor = CLR_RED; for( i = 0; tmpcolor[i] != 0; ++i) { if (icolor <= CLR_WHITE) ttycolors[icolor++] = tmpcolor[i]; } colorflag = TRUE; free((genericptr_t)tmpcolor); return 1; }