Fixing a few more compiler warnings.
This commit is contained in:
parent
bd9d1bc038
commit
0eb6bb8e6d
@ -70,7 +70,7 @@ int main(int, char**) {
|
|||||||
# define srand48(x) (srand((x)))
|
# define srand48(x) (srand((x)))
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
# define drand48() (((float) rand())/((float) RAND_MAX))
|
# define drand48() (((float) rand())/((float) RAND_MAX))
|
||||||
# define srand48(x) (srand((x)))
|
# define srand48(x) (srand((int)(x)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum { NOTALLOWED, MOUNTAIN, TREE, ISLAND, BIGMTN, STEM, LEAF,
|
typedef enum { NOTALLOWED, MOUNTAIN, TREE, ISLAND, BIGMTN, STEM, LEAF,
|
||||||
|
|||||||
@ -452,8 +452,7 @@ const char *test[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (reset) { index = 0; return 0; }
|
if (reset) { index = 0; return 0; }
|
||||||
return show_test(test, index);} {selected
|
return show_test(test, index);} {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Function {test_esc_rgbcolors(bool reset)} {
|
Function {test_esc_rgbcolors(bool reset)} {
|
||||||
comment {--- 0020: Test RGB Colors} return_type {static int}
|
comment {--- 0020: Test RGB Colors} return_type {static int}
|
||||||
@ -1373,7 +1372,7 @@ for ( int t=0; t<count; t++ )
|
|||||||
}
|
}
|
||||||
Function {do_command(const char *cmd)} {
|
Function {do_command(const char *cmd)} {
|
||||||
comment {Run the command, output appends to terminal
|
comment {Run the command, output appends to terminal
|
||||||
} return_type void
|
} open return_type void
|
||||||
} {
|
} {
|
||||||
code {// Run command in pipe, return output to tty
|
code {// Run command in pipe, return output to tty
|
||||||
// TODO: This should probably be reimplemented as a thread.
|
// TODO: This should probably be reimplemented as a thread.
|
||||||
@ -1420,13 +1419,14 @@ while (1) {
|
|||||||
Fl::wait(0.05);
|
Fl::wait(0.05);
|
||||||
SSIZE_T bytes = READ(fd, s, sizeof(s)); // shout in uppercase so windows can hear us
|
SSIZE_T bytes = READ(fd, s, sizeof(s)); // shout in uppercase so windows can hear us
|
||||||
if (bytes == -1 && errno == EAGAIN) continue; // no data yet
|
if (bytes == -1 && errno == EAGAIN) continue; // no data yet
|
||||||
else if (bytes > 0) G_tty->append(s, bytes); // write block to terminal, handles utf8
|
else if (bytes > 0) G_tty->append(s, (int)bytes); // write block to terminal, handles utf8
|
||||||
else break; // pipe closed
|
else break; // pipe closed
|
||||||
}
|
}
|
||||||
|
|
||||||
PCLOSE(fp);
|
PCLOSE(fp);
|
||||||
G_tty->append_ascii("\\033[33;2m<<END_OF_OUTPUT>>\\033[0m\\n");
|
G_tty->append_ascii("\\033[33;2m<<END_OF_OUTPUT>>\\033[0m\\n");
|
||||||
G_tty->redraw();} {}
|
G_tty->redraw();} {selected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
decl {////// GUI LAYOUT //////} {private local
|
decl {////// GUI LAYOUT //////} {private local
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user