diff options
author | Jim Meyering <jim@meyering.net> | 1993-11-30 15:51:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-11-30 15:51:34 +0000 |
commit | 4ebaf0fd9c392eccc6458af85c657f641f7d0052 (patch) | |
tree | 720418782ff7c695fda7f9d6c6295150e74f86a6 | |
parent | 80d70870f52674ecb7e1dd6f7c517d689ab6be1f (diff) | |
download | coreutils-4ebaf0fd9c392eccc6458af85c657f641f7d0052.tar.xz |
merge with 1.9.1b
-rw-r--r-- | old/sh-utils/ChangeLog | 24 | ||||
-rw-r--r-- | old/sh-utils/NEWS | 4 | ||||
-rw-r--r-- | src/stty.c | 75 | ||||
-rw-r--r-- | src/who.c | 10 |
4 files changed, 71 insertions, 42 deletions
diff --git a/old/sh-utils/ChangeLog b/old/sh-utils/ChangeLog index 0dee1d0ee..07e26795b 100644 --- a/old/sh-utils/ChangeLog +++ b/old/sh-utils/ChangeLog @@ -1,3 +1,27 @@ +Sat Nov 27 15:11:21 1993 Jim Meyering (meyering@comco.com) + + * nice.c (main): If an adjustment is specified, but no command is + given, give a diagnostic in addition to the usage message. + (isinteger): Accept a leading `+'. + +Fri Nov 26 18:49:42 1993 Jim Meyering (meyering@comco.com) + + * stty.c [GWINSZ_BROKEN]: Define TIOCGWINSZ to TCGETS for Solaris-2.2. + On that system, ioctl (0, TIOCGWINSZ, &win) always fails, but using + TCGETS works. Reported by Francois Pinard. + + * configure.in [GWINSZ_BROKEN]: New test to detect Solaris' inability + to get window size from ioctl using TIOCGWINSZ. + * acconfig.h [GWINSZ_BROKEN]: Add an #undef. + +Mon Nov 22 23:40:21 1993 Jim Meyering (meyering@comco.com) + + * who.c [defined (UTMPX_FILE)]: (undef and) define UTMP_FILE to + this value even if UTMP_FILE is already defined. Because some + systems define both symbols. From Arne H. Juul. + * [MESG_BIT]: Rename to S_IWGRP (from sys/stat.h>) and define only + if not already defined. + Fri Nov 19 23:08:03 1993 Jim Meyering (meyering@comco.com) * who.c (print_entry): Produce reasonably formatted output even when diff --git a/old/sh-utils/NEWS b/old/sh-utils/NEWS index 68e493af1..7aa3f47c5 100644 --- a/old/sh-utils/NEWS +++ b/old/sh-utils/NEWS @@ -1,5 +1,7 @@ User visible changes in release 1.9.2: -* fix a minor problem in formatting of output from `stty -a' +* stty works on Solaris-2.2 +* who output is better formatted on Solaris and other SysVr4 systems +* fix a minor problem in formatting the output from `stty -a' * yes with arguments outputs newlines again * partial stty failures are reported diff --git a/src/stty.c b/src/stty.c index 5ba820bef..2e9a3f760 100644 --- a/src/stty.c +++ b/src/stty.c @@ -131,25 +131,26 @@ #define CSTATUS Control ('t') #endif -char *visible (); -unsigned long baud_to_value (); -int recover_mode (); -int screen_columns (); -int set_mode (); -long integer_arg (); -speed_t string_to_baud (); -tcflag_t *mode_type_flag (); -void display_all (); -void display_changed (); -void display_recoverable (); -void display_settings (); -void display_speed (); -void display_window_size (); +static char *visible (); +static unsigned long baud_to_value (); +static int recover_mode (); +static int screen_columns (); +static int set_mode (); +static long integer_arg (); +static speed_t string_to_baud (); +static tcflag_t *mode_type_flag (); +static void display_all (); +static void display_changed (); +static void display_recoverable (); +static void display_settings (); +static void display_speed (); +static void display_window_size (); +static void sane_mode (); +static void set_control_char (); +static void set_speed (); +static void set_window_size (); + void error (); -void sane_mode (); -void set_control_char (); -void set_speed (); -void set_window_size (); /* Which speeds to set. */ enum speed_setting @@ -414,7 +415,7 @@ char *program_name; Print a space first unless MESSAGE will start a new line. */ /* VARARGS */ -void +static void #ifdef __STDC__ wrapf (char *message, ...) #else @@ -830,7 +831,7 @@ done:; /* Return 0 if not applied because not reversible; otherwise return 1. */ -int +static int set_mode (info, reversed, mode) struct mode_info *info; int reversed; @@ -1029,7 +1030,7 @@ set_mode (info, reversed, mode) return 1; } -void +static void set_control_char (info, arg, mode) struct control_info *info; char *arg; @@ -1055,7 +1056,7 @@ set_control_char (info, arg, mode) mode->c_cc[info->offset] = value; } -void +static void set_speed (type, arg, mode) enum speed_setting type; char *arg; @@ -1071,7 +1072,7 @@ set_speed (type, arg, mode) } #ifdef TIOCGWINSZ -void +static void set_window_size (rows, cols) int rows, cols; { @@ -1087,7 +1088,7 @@ set_window_size (rows, cols) error (1, errno, "standard input"); } -void +static void display_window_size (fancy) int fancy; { @@ -1101,7 +1102,7 @@ display_window_size (fancy) } #endif -int +static int screen_columns () { #ifdef TIOCGWINSZ @@ -1117,7 +1118,7 @@ screen_columns () return 80; } -tcflag_t * +static tcflag_t * mode_type_flag (type, mode) enum mode_type type; struct termios *mode; @@ -1144,7 +1145,7 @@ mode_type_flag (type, mode) } } -void +static void display_settings (output_type, mode) enum output_type output_type; struct termios *mode; @@ -1165,7 +1166,7 @@ display_settings (output_type, mode) } } -void +static void display_changed (mode) struct termios *mode; { @@ -1237,7 +1238,7 @@ display_changed (mode) current_col = 0; } -void +static void display_all (mode) struct termios *mode; { @@ -1286,7 +1287,7 @@ display_all (mode) current_col = 0; } -void +static void display_speed (mode, fancy) struct termios *mode; int fancy; @@ -1302,7 +1303,7 @@ display_speed (mode, fancy) current_col = 0; } -void +static void display_recoverable (mode) struct termios *mode; { @@ -1316,7 +1317,7 @@ display_recoverable (mode) putchar ('\n'); } -int +static int recover_mode (arg, mode) char *arg; struct termios *mode; @@ -1382,7 +1383,7 @@ struct speed_map speeds[] = {NULL, 0, 0} }; -speed_t +static speed_t string_to_baud (arg) char *arg; { @@ -1394,7 +1395,7 @@ string_to_baud (arg) return (speed_t) -1; } -unsigned long +static unsigned long baud_to_value (speed) speed_t speed; { @@ -1406,7 +1407,7 @@ baud_to_value (speed) return 0; } -void +static void sane_mode (mode) struct termios *mode; { @@ -1440,7 +1441,7 @@ sane_mode (mode) /* Return a string that is the printable representation of character CH. */ /* Adapted from `cat' by Torbjorn Granlund. */ -char * +static char * visible (ch) unsigned char ch; { @@ -1493,7 +1494,7 @@ visible (ch) but allowing octal and hex numbers as in C. */ /* From `od' by Richard Stallman. */ -long +static long integer_arg (s) char *s; { @@ -67,7 +67,8 @@ #define UTMP_FILE _PATH_UTMP #endif -#if !defined (UTMP_FILE) && defined (UTMPX_FILE) /* Solaris, SysVr4 */ +#if defined (UTMPX_FILE) /* Solaris, SysVr4 */ +#undef UTMP_FILE #define UTMP_FILE UTMPX_FILE #endif @@ -79,8 +80,9 @@ #define MAXHOSTNAMELEN 64 #endif -#define MESG_BIT 020 /* Group write bit. */ - +#ifndef S_IWGRP +#define S_IWGRP 020 +#endif char *xmalloc (); void error (); @@ -288,7 +290,7 @@ print_entry (this) line[sizeof (this->ut_line)] = 0; if (stat (line, &stats) == 0) { - mesg = (stats.st_mode & MESG_BIT) ? '+' : '-'; + mesg = (stats.st_mode & S_IWGRP) ? '+' : '-'; last_change = stats.st_atime; } else |