| 104 |
|
|
| 105 |
static int _str_input(char *buffer, int buffer_length, int echo_mode) |
static int _str_input(char *buffer, int buffer_length, int echo_mode) |
| 106 |
{ |
{ |
| 107 |
char buf[256], ch; |
int c, offset = 0, i, hz = 0; |
|
int c, offset = 0, len, loop = 1, i, hz = 0; |
|
| 108 |
|
|
| 109 |
for (i = 0; i < buffer_length && buffer[i] != '\0'; i++) |
for (i = 0; i < buffer_length && buffer[i] != '\0'; i++) |
| 110 |
{ |
{ |
| 111 |
offset++; |
offset++; |
| 112 |
} |
} |
| 113 |
|
|
| 114 |
while (c = igetch_t(60)) |
while ((c = igetch_t(60))) |
| 115 |
{ |
{ |
| 116 |
if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) |
if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) |
| 117 |
{ |
{ |
| 225 |
int display_file_ex(const char *filename, int begin_line, int wait) |
int display_file_ex(const char *filename, int begin_line, int wait) |
| 226 |
{ |
{ |
| 227 |
char buffer[LINE_BUFFER_LEN]; |
char buffer[LINE_BUFFER_LEN]; |
|
char temp[LINE_BUFFER_LEN]; |
|
| 228 |
int ch = 0; |
int ch = 0; |
| 229 |
int input_ok, line, max_lines; |
int input_ok, line, max_lines; |
| 230 |
long int c_line_current = 0, c_line_total = 0; |
long int c_line_current = 0, c_line_total = 0; |
| 231 |
FILE *fin; |
FILE *fin; |
|
struct stat f_stat; |
|
| 232 |
long *p_line_offsets; |
long *p_line_offsets; |
| 233 |
int len; |
int len; |
| 234 |
int percentile; |
int percentile; |
| 356 |
case 'h': |
case 'h': |
| 357 |
case 'H': |
case 'H': |
| 358 |
// Display help information |
// Display help information |
| 359 |
strcpy(temp, app_home_dir); |
display_file_ex(DATA_READ_HELP, begin_line, 1); |
|
strcat(temp, "data/read_help.txt"); |
|
|
display_file_ex(temp, begin_line, 1); |
|
| 360 |
|
|
| 361 |
// Refresh after display help information |
// Refresh after display help information |
| 362 |
c_line_current -= (line - 1); |
c_line_current -= (line - 1); |
| 417 |
int show_bottom(char *msg) |
int show_bottom(char *msg) |
| 418 |
{ |
{ |
| 419 |
char str_time[LINE_BUFFER_LEN]; |
char str_time[LINE_BUFFER_LEN]; |
|
char str_time_onine[20]; |
|
| 420 |
char buffer[LINE_BUFFER_LEN]; |
char buffer[LINE_BUFFER_LEN]; |
| 421 |
time_t time_online; |
time_t time_online; |
| 422 |
struct tm *tm_online; |
struct tm *tm_online; |
| 448 |
int len; |
int len; |
| 449 |
int end_of_line; |
int end_of_line; |
| 450 |
|
|
|
sprintf(filename, "%sdata/active_board.txt", app_home_dir); |
|
|
|
|
| 451 |
clrline(3, 2 + ACTIVE_BOARD_HEIGHT); |
clrline(3, 2 + ACTIVE_BOARD_HEIGHT); |
| 452 |
|
|
| 453 |
if ((fin = fopen(filename, "r")) == NULL) |
if ((fin = fopen(DATA_ACTIVE_BOARD, "r")) == NULL) |
| 454 |
{ |
{ |
| 455 |
log_error("Unable to open file %s\n", filename); |
log_error("Unable to open file %s\n", filename); |
| 456 |
return -1; |
return -1; |