-#include "busybox.h"
-
-
-#if ENABLE_FEATURE_USE_TERMIOS
-static int cin_fileno;
-#include <termios.h>
-#define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp)
-#define getTermSettings(fd, argp) tcgetattr(fd, argp);
-
-static struct termios initial_settings, new_settings;
-
-static void set_tty_to_initial_mode(void)
+//usage:#define more_trivial_usage
+//usage: "[FILE]..."
+//usage:#define more_full_usage "\n\n"
+//usage: "View FILE (or stdin) one screenful at a time"
+//usage:
+//usage:#define more_example_usage
+//usage: "$ dmesg | more\n"
+
+#include "libbb.h"
+
+/* Support for FEATURE_USE_TERMIOS */
+
+struct globals {
+ 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 new_settings (G.new_settings )
+#define cin_fileno (G.cin_fileno )
+
+#define setTermSettings(fd, argp) \
+do { \
+ if (ENABLE_FEATURE_USE_TERMIOS) \
+ tcsetattr(fd, TCSANOW, argp); \
+} while (0)
+#define getTermSettings(fd, argp) tcgetattr(fd, argp)
+
+static void gotsig(int sig UNUSED_PARAM)