void show_user_parms(void) { int i; char s[80]; extern char serport_name[10]; FILE *Fp; // Show the user parameters on screen // and issue hardware commands if required. // Use hware_flag to direct calls to control_hware() when cpu time // is available in case whatever you want to do takes too much time // to be done immediately. // Note that mouse control is done in the narrowband processing thread // and that you can not use lir_sleep to wait for hardware response here. hide_mouse(ug.xleft, ug.xright,ug.ytop,ug.ybottom); sprintf(s,"CALIBRATE"); settextcolor(11); lir_pixwrite(ug.xleft+.5*text_width,ug.ytop+0.35*text_height,s); sprintf(s," CAT FREQUENCY CONTROL FOR TRX: %s ",list[transceiver_number].name); settextcolor(14); lir_pixwrite(ug.xleft+10.5*text_width,ug.ytop+0.35*text_height,s); settextcolor(15); sprintf(s," SERIAL PORT:%s ",serport_name); lir_pixwrite(ug.xleft+.5*text_width,ug.ytop+1.5*text_height,s); settextcolor(7); show_offset(); //DISPLAY MESSAGES IN MESSAGE-AREA OF USERGRAPH // Fill message with blanks up to character MAX_MSGSIZE-2 blankfill_ugmsg(ug_msg0); blankfill_ugmsg(ug_msg1); blankfill_ugmsg(ug_msg2); settextcolor(ug_msg_color); lir_pixwrite(ug.xleft+31*text_width,ug.ytop+1.5*text_height,ug_msg0); lir_pixwrite(ug.xleft+31*text_width,ug.ytop+2.5*text_height,ug_msg1); lir_pixwrite(ug.xleft+31*text_width,ug.ytop+3.5*text_height,ug_msg2); settextcolor(7); //save screenposition and offset-values in usergraph, to usergraph parameter file Fp=fopen(ugfile,"w"); fprintf(Fp,"%d\n%d\n%i\n%i\n",ug.xleft,ug.ytop,serport_number,transceiver_number); for(i=0; i<NO_OF_BANDS; i++)fprintf(Fp,"%d\n",ug.offs_hz[i]); for(i=0; i<NO_OF_BANDS; i++)fprintf(Fp,"%d\n",ug.offs_khz[i]); fclose(Fp); }
int main(void) { printf("Size/offsets of data structures:\n"); show_size(attr_t); show_size(chtype); #if NCURSES_WIDECHAR show_size(cchar_t); #endif show_size(mmask_t); show_size(MEVENT); show_size(NCURSES_BOOL); printf("\n"); show_size(SCREEN); show_offset(SCREEN, _panelHook); #if USE_REENTRANT show_offset(SCREEN, _ttytype); #endif #ifdef TRACE show_offset(SCREEN, tracechr_buf); #endif #ifdef USE_SP_WINDOWLIST show_offset(SCREEN, _windowlist); #endif show_offset(SCREEN, rsp); #if NCURSES_EXT_FUNCS #if USE_NEW_PAIR show_offset(SCREEN, _ordered_pairs); #endif #if NCURSES_SP_FUNCS show_offset(SCREEN, use_tioctl); #endif #endif #if USE_WIDEC_SUPPORT show_offset(SCREEN, _screen_acs_fix); #endif printf("\n"); show_size(TERMINAL); show_offset(TERMINAL, type); show_offset(TERMINAL, Filedes); #if defined(TERMIOS) show_offset(TERMINAL, Ottyb); show_offset(TERMINAL, Nttyb); #endif show_offset(TERMINAL, _baudrate); show_offset(TERMINAL, _termname); #if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR show_offset(TERMINAL, type2); #endif printf("\n"); show_size(TERMTYPE); #if NCURSES_XNAMES show_offset(TERMTYPE, ext_str_table); show_offset(TERMTYPE, ext_Strings); #endif printf("\n"); show_size(WINDOW); #if NCURSES_WIDECHAR show_offset(WINDOW, _bkgrnd); #if NCURSES_EXT_COLORS show_offset(WINDOW, _color); #endif #endif return EXIT_SUCCESS; }