*
* Termios corrects by Vladimir Oleynik <dzo@simtreas.ru>
*
- * Licensed under GPLv2 or later, see file License in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
int cin_fileno;
struct termios initial_settings;
struct termios new_settings;
-};
+} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() ((void)0)
#define initial_settings (G.initial_settings)
#define setTermSettings(fd, argp) do { \
if (ENABLE_FEATURE_USE_TERMIOS) tcsetattr(fd, TCSANOW, argp); \
- } while(0)
+ } while (0)
#define getTermSettings(fd, argp) tcgetattr(fd, argp)
static void gotsig(int sig UNUSED_PARAM)
int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int more_main(int argc UNUSED_PARAM, char **argv)
{
- int c = c; /* for gcc */
+ int c = c; /* for compiler */
int lines;
int input = 0;
int spaces = 0;
if (input != 'r' && please_display_more_prompt) {
len = printf("--More-- ");
if (st.st_size > 0) {
- len += printf("(%d%% of %"OFF_FMT"d bytes)",
+ len += printf("(%u%% of %"OFF_FMT"u bytes)",
(int) (ftello(file)*100 / st.st_size),
st.st_size);
}
- fflush(stdout);
+ fflush_all();
/*
* We've just displayed the "--More--" prompt, so now we need
putchar(c);
}
fclose(file);
- fflush(stdout);
+ fflush_all();
} while (*argv && *++argv);
end:
setTermSettings(cin_fileno, &initial_settings);