void solidbox(DigiWin *dw) { int y, x; WINDOW *w = GetWin(dw); wattron (w, make_attr (A_STANDOUT, BLACK, BLUE)); for (x = 0; x < GetWidth(dw); x++) { mvwaddch (w, 0, x, ' '); mvwaddch (w, GetHeight(dw) - 1, x, ' '); } for (y = 0; y < GetHeight(dw); y++) { mvwaddch (w, y, 0, ' '); mvwaddch (w, y, GetWidth(dw) - 1, ' '); } wattroff (w, make_attr (A_STANDOUT, BLACK, BLUE)); }
void tui_make_shadow(int x, int y, int width, int height) { int i, j; _farsetsel(_dos_ds); for (i = 0; i < height; i++) { int addr = screen_addr(x, y + i) + 1; for (j = 0; j < width; j++, addr += 2) { _farnspokeb(addr, make_attr(DARKGRAY, BLACK, 0)); } } }
void print_channel(struct deviceinfo *unit) { int i = 0, option = EOF, scr_opt = 0; int rc; fd_set rfds; struct timeval tv; int max_fd; struct digi_node node; struct digi_chan chan; int port = 0; char ttyname[100]; int d_invokes_capture = 1; /* 0 if 'D' should invoke "exam_panel" */ /* 1 if 'D' should invoke "scope_panel" */ WINDOW *chanwin = GetWin(ChanWin); /* * scr_opt is just used to determine which field to * highlight. */ show_panel (GetPan(ChanWin)); update_panels (); doupdate (); DPAOpenDevice(unit); while ((option != 'Q') && (option != 'q') && (option != ESC)) { /* Get port info for current port */ DPAGetNode(unit, &node); DPAGetChannel(unit, &chan, port); if (DPAGetPortName(unit, &node, &chan, port, ttyname) == NULL) { ttyname[0] = '\0'; } max_fd = 0; FD_ZERO(&rfds); FD_SET(0, &rfds); mvwprintw (chanwin, 1, 2, "Device Description: %-54.54s", node.nd_ps_desc); mvwprintw (chanwin, 5, 35, "Name: %-10.10s", ttyname); wattrset (chanwin, make_attr (A_BOLD, WHITE, BLACK)); mvwprintw (chanwin, 5, 56, "Status: %-10.10s", chan.ch_open ? "Open" : "Closed"); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); if (scr_opt == 1) { wattrset (chanwin, make_attr (A_REVERSE | A_STANDOUT, WHITE, BLACK)); mvwprintw (chanwin, 3, 5, "Unit IP Address: %-15.15s", unit->host); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); mvwprintw (chanwin, 5, 8, "Port Number : %-2d", port + 1); } else if (scr_opt == 2) { wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); mvwprintw (chanwin, 3, 5, "Unit IP Address: %-15.15s", unit->host); wattrset (chanwin, make_attr (A_REVERSE | A_STANDOUT, WHITE, BLACK)); mvwprintw (chanwin, 5, 8, "Port Number : %-2d", port + 1); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); } else { mvwprintw (chanwin, 3, 5, "Unit IP Address: %-15.15s", unit->host); mvwprintw (chanwin, 5, 8, "Port Number : %-2d", port + 1); } if (!vanilla) wattrset (chanwin, make_attr (A_ALTCHARSET, GREEN, BLACK)); else wattrset (chanwin, make_attr (A_NORMAL, GREEN, BLACK)); for (i = 0; i < 62; i++) mvwaddch (chanwin, 6, 8 + i, mapchar(ACS_HLINE)); mvwaddch (chanwin, 6, 7, mapchar(ACS_ULCORNER)); mvwaddch (chanwin, 6, 70, mapchar(ACS_URCORNER)); mvwaddch (chanwin, 7, 7, mapchar(ACS_VLINE)); mvwaddch (chanwin, 7, 70, mapchar(ACS_VLINE)); mvwaddch (chanwin, 8, 7, mapchar(ACS_VLINE)); mvwaddch (chanwin, 8, 70, mapchar(ACS_VLINE)); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); mvwprintw (chanwin, 12, 24, "Signal Active = "); wattrset (chanwin, make_attr (A_STANDOUT, WHITE, GREEN)); waddstr (chanwin, "X"); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); mvwaddstr (chanwin, 12, 46, "Inactive ="); wattrset (chanwin, make_attr (A_NORMAL, GREEN, BLACK)); mvwaddstr (chanwin, 12, 57, "_"); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); mvwaddstr (chanwin, 8, 13, "Tx: RTS CTS DSR DCD DTR RI OFC IFC"); mvwaddstr (chanwin, 9, 13, "Rx: "); if (!vanilla) wattrset (chanwin, make_attr (A_ALTCHARSET, GREEN, BLACK)); else wattrset (chanwin, make_attr (A_NORMAL, GREEN, BLACK)); mvwaddch (chanwin, 9, 7, mapchar(ACS_VLINE)); mvwaddch (chanwin, 9, 70, mapchar(ACS_VLINE)); mvwaddch (chanwin, 10, 7, mapchar(ACS_VLINE)); mvwaddch (chanwin, 10, 70, mapchar(ACS_VLINE)); mvwaddch (chanwin, 11, 7, mapchar(ACS_LLCORNER)); mvwaddch (chanwin, 11, 70, mapchar(ACS_LRCORNER)); for (i = 0; i < 62; i++) mvwaddch (chanwin, 11, 8 + i, mapchar(ACS_HLINE)); wattrset (chanwin, make_attr (A_NORMAL, GREEN, BLACK)); mvwprintw (chanwin, 8, 17, "%-10d", chan.ch_txcount); mvwprintw (chanwin, 9, 17, "%-10d", chan.ch_rxcount); { int msigs=6; int mbits[] = { MS_RTS, MS_CTS, MS_DSR, MS_DCD, MS_DTR, MS_RI }; char *mhstr[] = { "X", "X", "X", "X", "X", "X" }; char *mlstr[] = { "_", "_", "_", "_", "_", "_" }; int mpos[] = { 30, 35, 40, 45, 50, 55 }; int sig=0; for(sig = 0; sig < msigs; sig++) { if (chan.ch_s_mstat & mbits[sig]) { wattrset (chanwin, make_attr (A_STANDOUT, WHITE, GREEN)); mvwprintw (chanwin, 9, mpos[sig], mhstr[sig]); } else { wattrset (chanwin, make_attr (A_NORMAL, GREEN, BLACK)); mvwprintw (chanwin, 9, mpos[sig], mlstr[sig]); } } } { int events=2; int ebits[] = { EV_OPALL, EV_IPALL }; char *ehstr[] = { "X", "X" }; char *elstr[] = { "_", "_" }; int epos[] = { 59, 64 }; int ev=0; for(ev=0; ev<events; ev++) { if (chan.ch_s_estat & ebits[ev]) { wattrset (chanwin, make_attr (A_STANDOUT, WHITE, GREEN)); mvwprintw (chanwin, 9, epos[ev], ehstr[ev]); } else { wattrset (chanwin, make_attr (A_NORMAL, GREEN, BLACK)); mvwprintw (chanwin, 9, epos[ev], elstr[ev]); } } } wattrset (chanwin, make_attr (A_BOLD, WHITE, BLACK)); mvwaddstr (chanwin, 14, 1, " Input Modes "); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); wprintw (chanwin, " "); wmove (chanwin, 14, 15); if (chan.ch_s_iflag & IF_IGNBRK) wprintw (chanwin, ":IGNBRK"); if (chan.ch_s_iflag & IF_BRKINT) wprintw (chanwin, ":BRKINT"); if (chan.ch_s_iflag & IF_IGNPAR) wprintw (chanwin, ":IGNPAR"); if (chan.ch_s_iflag & IF_PARMRK) wprintw (chanwin, ":PARMRK"); if (chan.ch_s_iflag & IF_INPCK) wprintw (chanwin, ":INPCK"); if (chan.ch_s_iflag & IF_ISTRIP) wprintw (chanwin, ":ISTRIP"); if (chan.ch_s_iflag & IF_IXON) wprintw (chanwin, ":IXON"); if (chan.ch_s_iflag & IF_IXANY) wprintw (chanwin, ":IXANY"); if (chan.ch_s_iflag & IF_IXOFF) wprintw (chanwin, ":IXOFF"); if (chan.ch_s_xflag & XF_XIXON) wprintw (chanwin, ":IXONA"); if (chan.ch_s_xflag & XF_XTOSS) wprintw (chanwin, ":ITOSS"); if (chan.ch_s_iflag & IF_DOSMODE) wprintw (chanwin, ":DOSMODE"); wprintw (chanwin, ":"); wattrset (chanwin, make_attr (A_BOLD, WHITE, BLACK)); mvwprintw (chanwin, 15, 1, " Output Modes "); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); wprintw (chanwin, " "); wmove (chanwin, 15, 15); if (chan.ch_s_xflag & XF_XCASE) wprintw (chanwin, ":XCASE"); if (chan.ch_s_oflag & OF_OLCUC) wprintw (chanwin, ":OLCUC"); if (chan.ch_s_oflag & OF_ONLCR) wprintw (chanwin, ":ONLCR"); if (chan.ch_s_oflag & OF_OCRNL) wprintw (chanwin, ":OCRNL"); if (chan.ch_s_oflag & OF_ONOCR) wprintw (chanwin, ":ONOCR"); if (chan.ch_s_oflag & OF_ONLRET) wprintw (chanwin, ":ONLRET"); /* TODO -- tab expansion / TABDLY interpretation */ wprintw (chanwin, ":"); wattrset (chanwin, make_attr (A_BOLD, WHITE, BLACK)); mvwprintw (chanwin, 16, 1, "Control Modes "); wattrset (chanwin, make_attr (A_NORMAL, WHITE, BLACK)); /* * clear the field, then write the new one */ wprintw (chanwin, " "); wmove (chanwin, 16, 15); if (chan.ch_open) { /* Jira RP-77: In early stages of a port open, ch_open is set before ch_s_brate * is initialized, which, undetected, causes an arithmetic exception here. */ if (chan.ch_s_brate) wprintw (chanwin, ":%d Baud", PDIVIDEND / chan.ch_s_brate); else wprintw (chanwin, ":?? Baud"); switch (chan.ch_s_cflag & CF_CSIZE) { case CF_CS5: wprintw (chanwin, ":5 Char Bits"); break; case CF_CS6: wprintw (chanwin, ":6 Char Bits"); break; case CF_CS7: wprintw (chanwin, ":7 Char Bits"); break; case CF_CS8: wprintw (chanwin, ":8 Char Bits"); break; default: wprintw (chanwin, ":No Char Bits"); break; } if (chan.ch_s_cflag & CF_CSTOPB) wprintw (chanwin, ":2 Stop Bits"); else wprintw (chanwin, ":1 Stop Bits"); if (chan.ch_s_cflag & CF_PARENB) { if (chan.ch_s_xflag & XF_XPAR) { if (chan.ch_s_cflag & CF_PARODD) wprintw (chanwin, ":Parity Odd"); else wprintw (chanwin, ":Parity Even"); } else { if (chan.ch_s_cflag & CF_PARODD) wprintw (chanwin, ":Parity Space"); else wprintw (chanwin, ":Parity Mark"); } } else { wprintw (chanwin, ":No Parity"); } } else { wprintw (chanwin, ":"); } wattrset (GetWin(MainWin), make_attr (A_NORMAL, WHITE, BLUE)); commandline (clbuf, helpstr, "ESC=Quit", lrudstr, "T=LoopBack", "D=DataMonitor", "^P=Print", NULL); mvwprintw (GetWin(MainWin), KEY_LINE, 0, clbuf); wattroff (GetWin(MainWin), make_attr (A_NORMAL, WHITE, BLUE)); wrefresh (GetWin(MainWin)); wrefresh (chanwin); change_term (0, TIMEOUT); option = EOF; tv.tv_sec = 0; tv.tv_usec = 500000; rc = select( max_fd + 1, &rfds, NULL, NULL, &tv ); if (rc < 0) { fprintf (stderr, "FATAL ERROR: select failure.\n"); EndCurses (-13); /* FIXME: This code will not be executed as EndCurses() calls exit(). */ exit (-2); } else if (rc > 0) { if (FD_ISSET(0, &rfds)) { option = getch(); } } else { scr_opt = 0; } /* * If the user hasn't selected anything keep doing the * original screen. */ switch (option) { case EOF: break; case '': scr_opt = 0; refresh_screen (); break; #ifdef KEY_LEFT case KEY_LEFT: #endif case 'H': case 'h': port--; if (port < 0) port = unit->nports - 1; scr_opt = 2; break; #ifdef KEY_RIGHT case KEY_RIGHT: #endif case 'L': case 'l': port++; if (port >= (int) unit->nports) port = 0; scr_opt = 2; break; #ifdef KEY_UP case KEY_UP: #endif case 'K': case 'k': { int curr_unit = unit->unit_number; do { curr_unit--; if (curr_unit < 0) curr_unit = num_devices - 1; } while (device_info[curr_unit].status != UP); unit = &device_info[curr_unit]; if (port >= (int) unit->nports) port = unit->nports - 1; } scr_opt = 1; break; #ifdef KEY_DOWN case KEY_DOWN: #endif case 'J': case 'j': { int curr_unit = unit->unit_number; do { if (curr_unit < num_devices - 1) curr_unit++; else curr_unit = 0; } while (device_info[curr_unit].status != UP); unit = &device_info[curr_unit]; if (port >= (int) unit->nports) port = unit->nports - 1; } scr_opt = 1; break; case 'q': case 'Q': case ESC: hide_panel (GetPan(ChanWin)); erase_win (ChanWin); update_panels (); doupdate (); scr_opt = 0; break; case 'T': case 't': scr_opt = 0; hide_panel (GetPan(ChanWin)); update_panels (); doupdate (); handle_loopback(unit, &node, &chan, port); change_term (0, TIMEOUT); show_panel (GetPan(ChanWin)); update_panels (); doupdate (); wrefresh (chanwin); break; case 'D': case 'd': scr_opt = 0; { int invoke_one = 1; while (invoke_one) { if (d_invokes_capture) { invoke_one = handle_scope (unit, &node, &chan, port); } else { invoke_one = handle_exam (unit, &node, port); } if (invoke_one) d_invokes_capture = 1 - d_invokes_capture; } } touchwin (chanwin); wrefresh (chanwin); update_panels (); doupdate (); break; #ifdef KEY_PRINT case KEY_PRINT: #endif case '': scr_opt = 0; screen_save (ChanWin, logfile); touchwin (chanwin); wrefresh (chanwin); update_panels (); doupdate (); break; case KEY_F (1): /* Help info */ case '?': scr_opt = 0; info_screen (dpa_info2, dpa_info2_len, NULL); update_panels (); doupdate (); break; default: scr_opt = 0; mvwprintw (chanwin, 16, 60, "Invalid key"); wrefresh (chanwin); sleep (1); mvwprintw (chanwin, 16, 60, " "); wrefresh (chanwin); break; } /* End Case */ } /* End While */ }
void handle_loopback (struct deviceinfo *unit, struct digi_node *node, struct digi_chan *chan, int port) { char full_line[81]; int i = 0, option = EOF; struct termios sv_tios; char test_data[TBUFSIZ + 1]; char read_data[TBUFSIZ + 1]; char string[200], ttyname[200]; int r = 3; int rwfd; WINDOW *lbwin = GetWin(LBWin); #define TITLE_LINE 1 #define DESC_LINE 2 #define DESC2_LINE 3 #define SEP_LINE 4 #define FIRST_DATA 5 #define SEP2_LINE 15 #define RESULT_LINE 16 show_panel (GetPan(LBWin)); update_panels (); doupdate (); next_result = 0; test_cases = 0; test_passes = 0; if (DPAGetPortName(unit, node, chan, port, ttyname) == NULL) { ttyname[0] ='\0'; } while (option == EOF) { erase_win (LBWin); wattrset (lbwin, make_attr (A_BOLD, WHITE, BLUE)); mvwprintw (lbwin, TITLE_LINE, 1, "%-*.*s", 76, 76, " "); mvwprintw (lbwin, RESULT_LINE, 1, "%-*.*s", 76, 76, " "); mvwprintw (lbwin, TITLE_LINE, 32, " Loop Back Test "); sprintf (full_line, "Tests Executed: %-12d Passed: %-12d Failed: %d", test_cases, test_passes, test_cases - test_passes); mvwprintw (lbwin, RESULT_LINE, center(LBWin, strlen(full_line)), full_line); sprintf (clbuf, "Unit IP Address: %s Port #: %d Name: %s", unit->host, port + 1, ttyname); i = strlen (clbuf); mvwprintw (GetWin(LBWin), DESC_LINE, 1, "%*s", GetWidth(LBWin) - 2, " "); mvwprintw (GetWin(LBWin), DESC2_LINE, 1, "%*s", GetWidth(LBWin) - 2, " "); mvwprintw (lbwin, DESC2_LINE, 2, clbuf); mvwprintw (lbwin, DESC_LINE, 2, "Device Description: %-*.*s", GetWidth(LBWin) - 2 - 2 - 2 - 20, GetWidth(LBWin) - 2 - 2 - 2 - 20, node->nd_ps_desc); if (!vanilla) wattrset (lbwin, make_attr (A_ALTCHARSET, CYAN, BLACK)); else wattrset (lbwin, make_attr (A_NORMAL, CYAN, BLACK)); wmove (lbwin, SEP_LINE, 1); for (i = 0; i < 77; i++) waddch (lbwin, mapchar(ACS_HLINE)); mvwaddch (lbwin, SEP_LINE, 0, mapchar(ACS_LTEE)); mvwaddch (lbwin, SEP_LINE, 77, mapchar(ACS_RTEE)); wmove (lbwin, SEP2_LINE, 1); for (i = 0; i < 77; i++) waddch (lbwin, mapchar(ACS_HLINE)); mvwaddch (lbwin, SEP2_LINE, 0, mapchar(ACS_LTEE)); mvwaddch (lbwin, SEP2_LINE, 77, mapchar(ACS_RTEE)); wattrset (lbwin, make_attr (A_NORMAL, WHITE, BLACK)); wrefresh (lbwin); wattrset (GetWin(MainWin), make_attr (A_NORMAL, WHITE, BLUE)); commandline (clbuf, "Press ANY key to Halt the test", NULL); mvwprintw (GetWin(MainWin), KEY_LINE, 0, clbuf); wattroff (GetWin(MainWin), make_attr (A_NORMAL, WHITE, BLUE)); wrefresh (GetWin(MainWin)); change_term (0, 10); option = EOF; r = 5; if (chan->ch_open) { mvwprintw (lbwin, r++, 2, "***** Port is Busy."); wrefresh(lbwin); test_cases++; sleep(1); goto user_input; } for (i = 0; i < 256; i++) { test_data[i] = (char) i; } test_data[TBUFSIZ]='\0'; /* Get port name. Can't run the test without it. */ if (DPAGetPortName(unit, node, chan, port, ttyname) == NULL) { mvwprintw (lbwin, r++, 2, "***** Loop Back Test Failure. Port has no known tty name"); test_cases++; wrefresh (lbwin); sleep(1); goto user_input; } sprintf(string, "/dev/%s", ttyname); if( (rwfd = tty_open(string, &sv_tios )) < 0 ) { test_cases++; goto user_input; } tcflush(rwfd, TCIOFLUSH); if ((i = test_send (test_data, TBUFSIZ, rwfd)) != 0) { mvwprintw (lbwin, r++, 2, "***** Loop Back Test Failure=%d, Sending %d Bytes", i, TBUFSIZ); wrefresh (lbwin); tty_close (rwfd, &sv_tios); test_cases++; goto user_input; } mvwprintw (lbwin, r++, 2, "Loop Back: %d Bytes Sent.", TBUFSIZ); wrefresh (lbwin); mvwprintw (lbwin, r++, 2, "Loop Back: Receiving %d Bytes.", TBUFSIZ); wrefresh (lbwin); if ((i = test_recv (read_data, TBUFSIZ, 5, rwfd)) != TBUFSIZ) { mvwprintw (lbwin, r++, 2, "***** Loop Back Failure=%d Receiving %d bytes.", i, TBUFSIZ); wrefresh (lbwin); tty_close (rwfd, &sv_tios); test_cases++; goto user_input; } /* Reset termios as before and close channel */ tty_close (rwfd, &sv_tios); mvwprintw (lbwin, r++, 2, "Loop Back: Verifying %d bytes.", TBUFSIZ); wrefresh (lbwin); if (memcmp (test_data, read_data, TBUFSIZ)) { mvwprintw (lbwin, r++, 2, "***** Loop Back Failure Verifying %d Bytes.", TBUFSIZ); mvwprintw (lbwin, r++, 2, "***** Data Incorrectly Transferred."); wrefresh (lbwin); test_cases++; goto user_input; } else { mvwprintw (lbwin, r++, 2, "Loop Back: Test Passed."); wrefresh (lbwin); test_cases++; test_passes++; } user_input: option = getch(); /* * If the user hasn't selected anything, loop. * Otherwise, break. */ switch (option) { case EOF: break; case '': refresh_screen (); option = EOF; break; #ifdef KEY_PRINT case KEY_PRINT: #endif case '': screen_save (LBWin, logfile); touchwin (lbwin); wrefresh (lbwin); update_panels (); doupdate (); option = EOF; break; default: break; } /* End Case */ } /* End While */ hide_panel (GetPan(LBWin)); update_panels (); doupdate (); return; }
void map_attributes(core_common& attr, attribute_map_t& attrs) { attrs.emplace("id", make_attr(attr.id)); attrs.emplace("base", make_attr(attr.base)); attrs.emplace("lang", make_attr(attr.lang)); attrs.emplace("class", make_attr(attr._class)); attrs.emplace("role", make_attr(attr.role)); attrs.emplace("rel", make_attr(attr.rel)); attrs.emplace("rev", make_attr(attr.rev)); attrs.emplace("typeof", make_attr(attr._typeof)); attrs.emplace("content", make_attr(attr.content)); attrs.emplace("datatype", make_attr(attr.datatype)); attrs.emplace("resource", make_attr(attr.resource)); attrs.emplace("about", make_attr(attr.about)); attrs.emplace("property", make_attr(attr.property)); }
void map_attributes(svg& attr, attribute_map_t& attrs) { map_attributes(attr.properties, attrs); attrs.emplace("focusHighlight", make_attr(attr.focusHighlight)); attrs.emplace("externalResourcesRequired", make_attr(attr.externalResourcesRequired)); attrs.emplace("focusable", make_attr(attr.focusable)); attrs.emplace("nav_next", make_attr(attr.nav_next)); attrs.emplace("nav_prev", make_attr(attr.nav_prev)); attrs.emplace("nav_up", make_attr(attr.nav_up)); attrs.emplace("nav_up_right", make_attr(attr.nav_up_right)); attrs.emplace("nav_right", make_attr(attr.nav_right)); attrs.emplace("nav_down_right", make_attr(attr.nav_down_right)); attrs.emplace("nav_down", make_attr(attr.nav_down)); attrs.emplace("nav_down_left", make_attr(attr.nav_down_left)); attrs.emplace("nav_left", make_attr(attr.nav_left)); attrs.emplace("nav_up_left", make_attr(attr.nav_up_left)); attrs.emplace("syncBehaviorDefault", make_attr(attr.syncBehaviorDefault)); attrs.emplace("syncToleranceDefault", make_attr(attr.syncToleranceDefault)); map_attributes(attr.core, attrs); attrs.emplace("width", make_attr(attr.width)); attrs.emplace("height", make_attr(attr.height)); attrs.emplace("preserveAspectRatio", make_attr(attr.preserveAspectRatio)); attrs.emplace("viewBox", make_attr(attr.viewBox)); attrs.emplace("zoomAndPan", make_attr(attr.zoomAndPan)); attrs.emplace("version", make_attr(attr.version)); attrs.emplace("baseProfile", make_attr(attr.baseProfile)); attrs.emplace("contentScriptType", make_attr(attr.contentScriptType)); attrs.emplace("snapshotTime", make_attr(attr.snapshotTime)); attrs.emplace("timelineBegin", make_attr(attr.timelineBegin)); attrs.emplace("playbackOrder", make_attr(attr.playbackOrder)); }
void tui_set_attr(int foreground_color, int background_color, int blink) { current_attr = make_attr(foreground_color, background_color, blink); }