+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
#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
Print a space first unless MESSAGE will start a new line. */
/* VARARGS */
-void
+static void
#ifdef __STDC__
wrapf (char *message, ...)
#else
/* 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;
return 1;
}
-void
+static void
set_control_char (info, arg, mode)
struct control_info *info;
char *arg;
mode->c_cc[info->offset] = value;
}
-void
+static void
set_speed (type, arg, mode)
enum speed_setting type;
char *arg;
}
#ifdef TIOCGWINSZ
-void
+static void
set_window_size (rows, cols)
int rows, cols;
{
error (1, errno, "standard input");
}
-void
+static void
display_window_size (fancy)
int fancy;
{
}
#endif
-int
+static int
screen_columns ()
{
#ifdef TIOCGWINSZ
return 80;
}
-tcflag_t *
+static tcflag_t *
mode_type_flag (type, mode)
enum mode_type type;
struct termios *mode;
}
}
-void
+static void
display_settings (output_type, mode)
enum output_type output_type;
struct termios *mode;
}
}
-void
+static void
display_changed (mode)
struct termios *mode;
{
current_col = 0;
}
-void
+static void
display_all (mode)
struct termios *mode;
{
current_col = 0;
}
-void
+static void
display_speed (mode, fancy)
struct termios *mode;
int fancy;
current_col = 0;
}
-void
+static void
display_recoverable (mode)
struct termios *mode;
{
putchar ('\n');
}
-int
+static int
recover_mode (arg, mode)
char *arg;
struct termios *mode;
{NULL, 0, 0}
};
-speed_t
+static speed_t
string_to_baud (arg)
char *arg;
{
return (speed_t) -1;
}
-unsigned long
+static unsigned long
baud_to_value (speed)
speed_t speed;
{
return 0;
}
-void
+static void
sane_mode (mode)
struct termios *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;
{
but allowing octal and hex numbers as in C. */
/* From `od' by Richard Stallman. */
-long
+static long
integer_arg (s)
char *s;
{
#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
#define MAXHOSTNAMELEN 64
#endif
-#define MESG_BIT 020 /* Group write bit. */
-
+#ifndef S_IWGRP
+#define S_IWGRP 020
+#endif
char *xmalloc ();
void error ();
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