/****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <sys/ptem.h>
#endif
-MODULE_ID("$Id: reset_cmd.c,v 1.23 2020/09/05 22:54:47 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.26 2021/06/26 19:44:08 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
static bool use_reset = FALSE; /* invoked as reset */
static bool use_init = FALSE; /* invoked as init */
-static void
+static GCC_NORETURN void
failed(const char *msg)
{
int code = errno;
bool sent = FALSE;
if (file != 0) {
- if ((fp = fopen(file, "r")) == 0)
+ if ((fp = safe_fopen(file, "r")) == 0)
failed(file);
while ((nr = fread(buf, sizeof(char), sizeof(buf), fp)) != 0) {
{
#if defined(EXP_WIN32_DRIVER)
/* noop */
+ (void) tty_settings;
+ (void) my_erase;
+ (void) my_intr;
+ (void) my_kill;
#else
if (DISABLED(tty_settings->c_cc[VERASE]) || my_erase >= 0) {
tty_settings->c_cc[VERASE] = UChar((my_erase >= 0)
#if defined(EXP_WIN32_DRIVER)
/* noop */
+ (void) old_settings;
+ (void) new_settings;
+ (void) name;
+ (void) which;
+ (void) def;
#else
newer = new_settings->c_cc[which];
older = old_settings->c_cc[which];