summaryrefslogtreecommitdiff
path: root/src/stty.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-01-17 17:44:22 +0000
committerJim Meyering <jim@meyering.net>1996-01-17 17:44:22 +0000
commite23e3f656a70365a420475dc1a2eafa00b9af3f8 (patch)
tree2aaff336c944b6e765df31026684043022fb6961 /src/stty.c
parent4ad4b8aaec3e4780dba1a3de39d8f5b4622d0361 (diff)
downloadcoreutils-e23e3f656a70365a420475dc1a2eafa00b9af3f8.tar.xz
Break some long lines.
Add const attribute to a few parameters.
Diffstat (limited to 'src/stty.c')
-rw-r--r--src/stty.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/stty.c b/src/stty.c
index 87ca09a39..0ed540f79 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -385,19 +385,24 @@ static const char *visible __P ((unsigned int ch));
static unsigned long baud_to_value __P ((speed_t speed));
static int recover_mode __P ((char *arg, struct termios *mode));
static int screen_columns __P ((void));
-static int set_mode __P ((struct mode_info *info, int reversed, struct termios *mode));
-static long integer_arg __P ((char *s));
-static speed_t string_to_baud __P ((char *arg));
-static tcflag_t *mode_type_flag __P ((enum mode_type type, struct termios *mode));
+static int set_mode __P ((struct mode_info *info, int reversed,
+ struct termios *mode));
+static long integer_arg __P ((const char *s));
+static speed_t string_to_baud __P ((const char *arg));
+static tcflag_t *mode_type_flag __P ((enum mode_type type,
+ struct termios *mode));
static void display_all __P ((struct termios *mode));
static void display_changed __P ((struct termios *mode));
static void display_recoverable __P ((struct termios *mode));
-static void display_settings __P ((enum output_type output_type, struct termios *mode));
+static void display_settings __P ((enum output_type output_type,
+ struct termios *mode));
static void display_speed __P ((struct termios *mode, int fancy));
static void display_window_size __P ((int fancy));
static void sane_mode __P ((struct termios *mode));
-static void set_control_char __P ((struct control_info *info, char *arg, struct termios *mode));
-static void set_speed __P ((enum speed_setting type, char *arg, struct termios *mode));
+static void set_control_char __P ((struct control_info *info, const char *arg,
+ struct termios *mode));
+static void set_speed __P ((enum speed_setting type, const char *arg,
+ struct termios *mode));
static void set_window_size __P ((int rows, int cols));
/* The width of the screen, for output wrapping. */
@@ -1137,7 +1142,8 @@ set_mode (struct mode_info *info, int reversed, struct termios *mode)
}
static void
-set_control_char (struct control_info *info, char *arg, struct termios *mode)
+set_control_char (struct control_info *info, const char *arg,
+ struct termios *mode)
{
unsigned char value;
@@ -1160,7 +1166,7 @@ set_control_char (struct control_info *info, char *arg, struct termios *mode)
}
static void
-set_speed (enum speed_setting type, char *arg, struct termios *mode)
+set_speed (enum speed_setting type, const char *arg, struct termios *mode)
{
speed_t baud;
@@ -1546,7 +1552,7 @@ struct speed_map speeds[] =
};
static speed_t
-string_to_baud (char *arg)
+string_to_baud (const char *arg)
{
int i;
@@ -1653,7 +1659,7 @@ visible (unsigned int ch)
/* From `od' by Richard Stallman. */
static long
-integer_arg (char *s)
+integer_arg (const char *s)
{
long value;
if (xstrtol (s, NULL, 0, &value, "bB") != LONGINT_OK)