int freq_display(void) { extern float freq; extern int trxmode; int x_position = 40; int y_position = 17; int location = 0; char fbuffer[8]; print_space(y_position, x_position); print_space(y_position + 1, x_position); print_space(y_position + 2, x_position); print_space(y_position + 3, x_position); print_space(y_position + 4, x_position); nicebox(16, 39, 5, 35, "TRX"); print_dot(y_position + 4, 28 + x_position + 1); sprintf(fbuffer, "%7.1f", freq); location = 32; if (fbuffer[0] != ' ') print_big_number(fbuffer[0] - 48, y_position, x_position, 4); if (fbuffer[1] != ' ') print_big_number(fbuffer[1] - 48, y_position, x_position, 9); if (fbuffer[2] != ' ') print_big_number(fbuffer[2] - 48, y_position, x_position, 14); if (fbuffer[3] != ' ') print_big_number(fbuffer[3] - 48, y_position, x_position, 19); if (fbuffer[4] != ' ') print_big_number(fbuffer[4] - 48, y_position, x_position, 24); if (fbuffer[6] != ' ') print_big_number(fbuffer[6] - 48, y_position, x_position, 31); attron(COLOR_PAIR(C_HEADER) | A_STANDOUT); if (trxmode == CWMODE) mvprintw(18, 41, "CW"); else if (trxmode == SSBMODE) mvprintw(19, 41, "SSB"); else mvprintw(19, 41, "DIG"); refreshp(); return (0); }
int message_change(int x) { extern char backgrnd_str[]; extern char message[15][80]; extern char sp_return[]; extern char cq_return[]; int j; int count; int mes_length; int bufnr = 0; char printbuf[80]; clear_display(); attron(COLOR_PAIR(C_LOG) | A_STANDOUT); for (j = 13; j <= 23; j++) { mvprintw(j, 0, backgrnd_str); } nicebox(14, 3, 2, 60, "Enter message (F1-12, C, S)"); attron(COLOR_PAIR(C_LOG) | A_STANDOUT); while (1) { bufnr = onechar(); if ((bufnr == 'C') || (bufnr == 'S')) break; if (bufnr >= 129 && bufnr <= 141) break; } if (bufnr == 'S') { bufnr = 12; } else if (bufnr == 'C') { bufnr = 13; } else { if (bufnr <= 138) { bufnr = bufnr - 129; } else { bufnr = bufnr - 130; } } printbuf[0] = '\0'; strncat(printbuf, message[bufnr], strlen(message[bufnr]) - 1); mvprintw(15, 4, "%s", printbuf); refreshp(); mvprintw(16, 4, ""); message[bufnr][0] = '\0'; echo(); getnstr(message[bufnr], 60); noecho(); strcat(message[bufnr], "\n"); mes_length = strlen(message[bufnr]); if (mes_length < 2) { clear_display(); attron(COLOR_PAIR(C_LOG) | A_STANDOUT); for (j = 13; j <= 23; j++) { mvprintw(j, 0, backgrnd_str); } return (1); } for (count = 0; count <= mes_length; count++) { if ((message[bufnr][count] > 96) && (message[bufnr][count] < 123)) message[bufnr][count] = message[bufnr][count] - 32; } mvprintw(12, 29, ""); refreshp(); clear_display(); attron(COLOR_PAIR(C_LOG) | A_STANDOUT); for (j = 13; j <= 23; j++) { mvprintw(j, 0, backgrnd_str); } writeparas(); strncpy(sp_return, message[12], 79); strncpy(cq_return, message[13], 79); return (0); }
int show_zones(int bandinx) { extern int zonedisplay; extern int bandindex; extern int zones[41]; int i = 0, j = 0; int xloc = 19; int yloc = 15; if (zonedisplay != 1) return (0); switch (bandinx) { case 0:{ bandindex = BAND160; break; } case 1:{ bandindex = BAND80; break; } case 2:{ bandindex = BAND40; break; } case 4:{ bandindex = BAND20; break; } case 6:{ bandindex = BAND15; break; } case 8: bandindex = BAND10; } attron(COLOR_PAIR(C_INPUT) | A_STANDOUT); for (i = 0; i <= 7; i++) { for (j = 1; j <= 5; j++) { if ((zones[(i * 5) + j] & bandindex) == 0) { mvprintw(i + yloc, (j * 3) + xloc, " %02d", (i * 5) + j); } else { mvprintw(i + yloc, (j * 3) + xloc, " "); } } } nicebox(14, 22, 8, 14, "Zones"); return (0); }