Compare commits

..
1 Commits
Author SHA1 Message Date
Denis Vlasenko 9924ce1cdc apply four post-1.8.2 patches; bump to 1.8.3 2008-03-21 08:50:06 +00:00
5 changed files with 15 additions and 10 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
VERSION = 1
PATCHLEVEL = 8
SUBLEVEL = 2
SUBLEVEL = 3
EXTRAVERSION =
NAME = Unnamed
+1 -1
View File
@@ -17,7 +17,7 @@
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is unsuitable for static linking anyway.
#warning If you still want to do it, remove -Wl,--gc-sections
#warning from top-level Makefile and remove this warning.
#warning from file scripts/trylink and remove this warning.
#error Aborting compilation.
#endif
+6 -3
View File
@@ -184,6 +184,7 @@ struct globals {
#if ENABLE_FEATURE_VI_COLON
char *initial_cmds[3]; // currently 2 entries, NULL terminated
#endif
char readbuffer[MAX_LINELEN];
};
#define G (*ptr_to_globals)
#define text (G.text )
@@ -200,6 +201,10 @@ struct globals {
#define term_orig (G.term_orig )
#define term_vi (G.term_vi )
#define initial_cmds (G.initial_cmds )
#define readbuffer (G.readbuffer )
#define INIT_G() do { \
PTR_TO_GLOBALS = xzalloc(sizeof(G)); \
} while (0)
static int init_text_buffer(char *); // init from file or create new
static void edit_file(char *); // edit one file
@@ -321,7 +326,7 @@ int vi_main(int argc, char **argv)
my_pid = getpid();
#endif
PTR_TO_GLOBALS = xzalloc(sizeof(G));
INIT_G();
#if ENABLE_FEATURE_VI_CRASHME
srand((long) my_pid);
@@ -2142,8 +2147,6 @@ static int mysleep(int hund) // sleep for 'h' 1/100 seconds
return safe_poll(pfd, 1, hund*10) > 0;
}
#define readbuffer bb_common_bufsiz1
static int readed_for_parse;
//----- IO Routines --------------------------------------------
+5 -4
View File
@@ -1211,7 +1211,7 @@ static void parse_prompt(const char *prmt_ptr)
#endif
#define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp)
#define getTermSettings(fd, argp) tcgetattr(fd, argp);
#define getTermSettings(fd, argp) tcgetattr(fd, argp)
static sighandler_t previous_SIGWINCH_handler;
@@ -1270,9 +1270,10 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
smalluint prevc;
#endif
getTermSettings(0, (void *) &initial_settings);
/* Happens when e.g. stty -echo was run before */
if (!(initial_settings.c_lflag & ECHO)) {
if (getTermSettings(0, (void *) &initial_settings) < 0
/* Happens when e.g. stty -echo was run before */
|| !(initial_settings.c_lflag & ECHO)
) {
parse_prompt(prompt);
fflush(stdout);
fgets(command, maxsize, stdin);
+2 -1
View File
@@ -207,7 +207,8 @@ static int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
}
if (last) {
printf(" %u.%03ums\n", last / 1000, last % 1000);
unsigned diff = MONOTONIC_US() - last;
printf(" %u.%03ums\n", diff / 1000, diff % 1000);
} else {
printf(" UNSOLICITED?\n");
}