int ir_Chk_Table(void) { if (ir_table == (RGBpixel *)PIXEL_NULL) { get_Input(input_ln, MAX_LN, "Enter minimum temperature : "); if (sscanf(input_ln, "%d", &ir_min) != 1) { prnt_Scroll("Could not read minimum temperature."); return 0; } get_Input(input_ln, MAX_LN, "Enter maximum temperature : "); if (sscanf(input_ln, "%d", &ir_max) != 1) { prnt_Scroll("Could not read maximum temperature."); return 0; } if (! init_Temp_To_RGB()) return 0; } return 1; }
void prnt_Paged_Menu(char **menu) { int done = FALSE; int lines = (PROMPT_LINE-TOP_SCROLL_WIN); if (! tty) { for (; *menu != NULL; menu++) bu_log("%s\n", *menu); return; } for (; *menu != NULL && ! done;) { for (; lines > 0 && *menu != NULL; menu++, --lines) prnt_Scroll("%-*s\n", co, *menu); if (*menu != NULL) done = ! do_More(&lines); prnt_Prompt(""); } (void) fflush(stdout); return; }
int main(int argc, char **argv) { int i; bu_setlinebuf(stderr); bu_log("\n\nThis program is deprecated and will not be supported in future releases\n"); bu_log("\tPlease use \"rtedge\" instead\n"); bu_log("\tPlease notify \"[email protected]\" if you need enhancements to \"rtedge\"\n"); bu_log("\nPress \"Enter\" to continue\n\n"); (void)getchar(); npsw = bu_avail_cpus(); if (npsw > MAX_PSW) npsw = MAX_PSW; if (npsw > 1) RTG.rtg_parallel = 1; else RTG.rtg_parallel = 0; bu_semaphore_init(RT_SEM_LAST); init_Lgts(); if (! pars_Argv(argc, argv)) { prnt_Usage(); return 1; } for (i = 0; i < NSIG; i++) switch (i) { case SIGINT : if ((norml_sig = signal(i, SIG_IGN)) == SIG_IGN) { if (! tty) abort_sig = SIG_IGN; else { /* MEX windows on IRIS (other than the console) ignore SIGINT. */ prnt_Scroll("WARNING: Signal 1 was being ignored!"); goto tty_sig; } } else { tty_sig: norml_sig = intr_sig; abort_sig = abort_RT; (void) signal(i, norml_sig); } break; case SIGCHLD : break; /* Leave SIGCHLD alone. */ case SIGPIPE : (void) signal(i, SIG_IGN); break; case SIGQUIT : break; case SIGTSTP : (void) signal(i, stop_sig); break; } /* Main loop. */ user_Interaction(); /*NOTREACHED*/ return 99; /* Stupid UTX compiler considers this as reachable. */ }
/* l g t _ P r i n t _ D b ( ) Print light source database entry. */ int lgt_Print_Db(int id) { Lgt_Source *entry; int stop; int lines = (PROMPT_LINE-TOP_SCROLL_WIN); if ( id >= lgt_db_size ) return 0; else if ( id < 0 ) { stop = lgt_db_size - 1; id = 0; } else stop = id; for (; id <= stop; id++, lines-- ) { entry = &lgts[id]; if ( lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( "\n" ); if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( "LIGHT SOURCE [%d] %s\n", id, entry->name ); if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " manual override\t(%s)\n", entry->over ? "ON" : "OFF" ); if ( entry->stp == SOLTAB_NULL || entry->over ) { if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " azimuth\t\t(%g)\n", entry->azim*RAD2DEG ); if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " elevation\t(%g)\n", entry->elev*RAD2DEG ); } if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " distance\t\t(%g)\n", entry->dist ); if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " location\t\t<%g,%g,%g>\n", entry->loc[X], entry->loc[Y], entry->loc[Z] ); if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " gaussian beam\t(%s)\n", entry->beam ? "ON" : "OFF" ); if ( entry->beam ) { if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " beam radius\t(%g)\n", entry->radius ); } if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " intensity\t(%g)\n", entry->energy ); if ( --lines <= 0 && ! do_More( &lines ) ) break; prnt_Scroll( " color\t\t(%d %d %d)\n", entry->rgb[0], entry->rgb[1], entry->rgb[2] ); } (void) fflush( stdout ); return 1; }