aboutsummaryrefslogtreecommitdiff
path: root/term
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-03-18 23:18:11 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-03 00:22:08 +0200
commit0209b2c932994e9ca55d39d98a83ea02aacd1332 (patch)
treef8778cca656943ee36193b49a7727557ba82319b /term
parent6f3d68bc8b46bdc7b0f5f43918744d99746672a2 (diff)
downloadhurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.tar.gz
hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.tar.bz2
hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.zip
Modernize code by removing use of old style definitions.
Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
Diffstat (limited to 'term')
-rw-r--r--term/devio.c20
-rw-r--r--term/hurdio.c20
-rw-r--r--term/munge.c14
-rw-r--r--term/ptyio.c20
-rw-r--r--term/users.c10
5 files changed, 42 insertions, 42 deletions
diff --git a/term/devio.c b/term/devio.c
index 621ec937..6024acc2 100644
--- a/term/devio.c
+++ b/term/devio.c
@@ -262,7 +262,7 @@ bogus_speed_to_real_speed (int bspeed)
/* If there are characters on the output queue and no
pending output requests, then send them. */
static error_t
-devio_start_output ()
+devio_start_output (void)
{
char *cp;
int size;
@@ -395,21 +395,21 @@ device_read_reply_inband (mach_port_t replypt,
}
static error_t
-devio_set_break ()
+devio_set_break (void)
{
device_set_status (phys_device, TTY_SET_BREAK, 0, 0);
return 0;
}
static error_t
-devio_clear_break ()
+devio_clear_break (void)
{
device_set_status (phys_device, TTY_CLEAR_BREAK, 0, 0);
return 0;
}
static error_t
-devio_abandon_physical_output ()
+devio_abandon_physical_output (void)
{
int val = D_WRITE;
@@ -429,7 +429,7 @@ devio_abandon_physical_output ()
}
static error_t
-devio_suspend_physical_output ()
+devio_suspend_physical_output (void)
{
if (!output_stopped)
{
@@ -440,13 +440,13 @@ devio_suspend_physical_output ()
}
static error_t
-devio_notice_input_flushed ()
+devio_notice_input_flushed (void)
{
return 0;
}
static int
-devio_pending_output_size ()
+devio_pending_output_size (void)
{
/* Unfortunately, there's no way to get the amount back from Mach
that has actually been written from this... */
@@ -455,7 +455,7 @@ devio_pending_output_size ()
/* Do this the first time the device is to be opened */
static error_t
-initial_open ()
+initial_open (void)
{
error_t err;
@@ -492,7 +492,7 @@ initial_open ()
}
static error_t
-devio_desert_dtr ()
+devio_desert_dtr (void)
{
int bits;
@@ -506,7 +506,7 @@ devio_desert_dtr ()
}
static error_t
-devio_assert_dtr ()
+devio_assert_dtr (void)
{
error_t err;
diff --git a/term/hurdio.c b/term/hurdio.c
index 3456ef24..20a939f3 100644
--- a/term/hurdio.c
+++ b/term/hurdio.c
@@ -325,7 +325,7 @@ hurdio_writer_loop (void *arg)
/* If there are characters on the output queue, then send them. Is
called with global lock held. */
static error_t
-hurdio_start_output ()
+hurdio_start_output (void)
{
/* If the output was suspended earlier and not anymore, we have to
tell the underlying port to resume it. */
@@ -346,7 +346,7 @@ hurdio_start_output ()
/* Stop carrier on the line. Is called with global lock held. */
static error_t
-hurdio_set_break ()
+hurdio_set_break (void)
{
if (tioc_caps & TIOC_CAP_SBRK)
{
@@ -362,7 +362,7 @@ hurdio_set_break ()
/* Reassert carrier on the line. Is called with global lock held. */
static error_t
-hurdio_clear_break ()
+hurdio_clear_break (void)
{
if (tioc_caps & TIOC_CAP_CBRK)
{
@@ -382,7 +382,7 @@ hurdio_clear_break ()
called to flush whatever other such things may be going on. Is
called with global lock held. */
static error_t
-hurdio_abandon_physical_output ()
+hurdio_abandon_physical_output (void)
{
if (tioc_caps & TIOC_CAP_FLUSH)
{
@@ -405,7 +405,7 @@ hurdio_abandon_physical_output ()
output in the bottom handler as well. Is called with the global
lock held. */
static error_t
-hurdio_suspend_physical_output ()
+hurdio_suspend_physical_output (void)
{
if (!output_stopped)
{
@@ -425,7 +425,7 @@ hurdio_suspend_physical_output ()
/* This is called to notify the bottom half when an input flush has
occurred. It is necessary to support pty packet mode. */
static error_t
-hurdio_notice_input_flushed ()
+hurdio_notice_input_flushed (void)
{
if (tioc_caps & TIOC_CAP_FLUSH)
{
@@ -441,7 +441,7 @@ hurdio_notice_input_flushed ()
/* Determine the number of bytes of output pending. */
static int
-hurdio_pending_output_size ()
+hurdio_pending_output_size (void)
{
int queue_size = 0;
@@ -460,7 +460,7 @@ hurdio_pending_output_size ()
/* Desert the DTR. Is called with global lock held. */
static error_t
-hurdio_desert_dtr ()
+hurdio_desert_dtr (void)
{
if (writer_thread != MACH_PORT_NULL)
hurd_thread_cancel (writer_thread);
@@ -481,7 +481,7 @@ hurdio_desert_dtr ()
static error_t
-hurdio_assert_dtr ()
+hurdio_assert_dtr (void)
{
if (ioport == MACH_PORT_NULL)
{
@@ -614,7 +614,7 @@ hurdio_mdmctl (int how, int bits)
static int
-hurdio_mdmstate ()
+hurdio_mdmstate (void)
{
int oldbits;
diff --git a/term/munge.c b/term/munge.c
index e0e90453..3b304605 100644
--- a/term/munge.c
+++ b/term/munge.c
@@ -192,7 +192,7 @@ echo_double (char c, int quoted)
/* Do a single C-h SPC C-h sequence */
static inline void
-write_erase_sequence ()
+write_erase_sequence (void)
{
poutput ('\b');
poutput (' ');
@@ -236,7 +236,7 @@ echo_char (char c, int hderase, int quoted)
/* Re-echo the current rawq preceded by the VREPRINT char. */
static inline void
-reprint_line ()
+reprint_line (void)
{
short *cp;
@@ -613,7 +613,7 @@ alldone:
/* This is called by the lower half when a break is received. */
void
-input_break ()
+input_break (void)
{
struct queue **qp = termstate.c_lflag & ICANON ? &rawq : &inputq;
@@ -663,7 +663,7 @@ input_framing_error (int c)
/* Copy the characters in RAWQ to the end of INPUTQ and clear RAWQ. */
void
-copy_rawq ()
+copy_rawq (void)
{
while (qsize (rawq))
enqueue (&inputq, dequeue (rawq));
@@ -671,7 +671,7 @@ copy_rawq ()
/* Process all the characters in INPUTQ as if they had just been read. */
void
-rescan_inputq ()
+rescan_inputq (void)
{
short *buf;
int i, n;
@@ -687,7 +687,7 @@ rescan_inputq ()
error_t
-drop_output ()
+drop_output (void)
{
error_t err = (*bottom->abandon_physical_output) ();
if (!err)
@@ -697,7 +697,7 @@ drop_output ()
error_t
-drain_output ()
+drain_output (void)
{
int cancel = 0;
diff --git a/term/ptyio.c b/term/ptyio.c
index acd1015a..51f38078 100644
--- a/term/ptyio.c
+++ b/term/ptyio.c
@@ -125,7 +125,7 @@ pty_po_destroy_hook (struct trivfs_peropen *po)
}
static inline void
-wake_reader ()
+wake_reader (void)
{
if (pty_read_blocked)
{
@@ -139,7 +139,7 @@ wake_reader ()
/* Lower half for tty node */
static error_t
-ptyio_start_output ()
+ptyio_start_output (void)
{
if (packet_mode && output_stopped && (!(termflags & USER_OUTPUT_SUSP)))
{
@@ -152,7 +152,7 @@ ptyio_start_output ()
}
static error_t
-ptyio_abandon_physical_output ()
+ptyio_abandon_physical_output (void)
{
if (packet_mode)
{
@@ -163,7 +163,7 @@ ptyio_abandon_physical_output ()
}
static error_t
-ptyio_suspend_physical_output ()
+ptyio_suspend_physical_output (void)
{
if (packet_mode)
{
@@ -176,14 +176,14 @@ ptyio_suspend_physical_output ()
}
static int
-ptyio_pending_output_size ()
+ptyio_pending_output_size (void)
{
/* We don't maintain any pending output buffer separate from the outputq. */
return 0;
}
static error_t
-ptyio_notice_input_flushed ()
+ptyio_notice_input_flushed (void)
{
if (packet_mode)
{
@@ -194,14 +194,14 @@ ptyio_notice_input_flushed ()
}
static error_t
-ptyio_assert_dtr ()
+ptyio_assert_dtr (void)
{
dtr_on = 1;
return 0;
}
static error_t
-ptyio_desert_dtr ()
+ptyio_desert_dtr (void)
{
dtr_on = 0;
wake_reader ();
@@ -248,13 +248,13 @@ ptyio_set_bits (struct termios *state)
/* These do nothing. In BSD the associated ioctls get errors, but
I'd rather just ignore them. */
static error_t
-ptyio_set_break ()
+ptyio_set_break (void)
{
return 0;
}
static error_t
-ptyio_clear_break ()
+ptyio_clear_break (void)
{
return 0;
}
diff --git a/term/users.c b/term/users.c
index b7429a4f..ac3d6d25 100644
--- a/term/users.c
+++ b/term/users.c
@@ -86,7 +86,7 @@ struct protid_hook
};
void
-init_users ()
+init_users (void)
{
error_t err;
@@ -2019,13 +2019,13 @@ trivfs_S_io_map (struct trivfs_protid *cred,
}
static void
-report_sig_start ()
+report_sig_start (void)
{
sigs_in_progress++;
}
static void
-report_sig_end ()
+report_sig_end (void)
{
sigs_in_progress--;
if ((sigs_in_progress == 0) && input_sig_wakeup)
@@ -2099,7 +2099,7 @@ send_signal (int signo)
}
void
-report_carrier_off ()
+report_carrier_off (void)
{
clear_queue (inputq);
(*bottom->notice_input_flushed) ();
@@ -2110,7 +2110,7 @@ report_carrier_off ()
}
void
-report_carrier_on ()
+report_carrier_on (void)
{
termflags &= ~NO_CARRIER;
pthread_cond_broadcast (&carrier_alert);