/****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <clear_cmd.h>
#include <tty_settings.h>
-MODULE_ID("$Id: clear.c,v 1.19 2017/08/19 13:40:22 tom Exp $")
+MODULE_ID("$Id: clear.c,v 1.24 2021/03/20 18:23:14 tom Exp $")
const char *_nc_progname = "clear";
-static void
+static GCC_NORETURN void
usage(void)
{
#define KEEP(s) s "\n"
switch (c) {
case 'T':
use_env(FALSE);
+ use_tioctl(TRUE);
term = optarg;
break;
case 'V':
if (optind < argc)
usage();
- fd = save_tty_settings(&tty_settings);
+ fd = save_tty_settings(&tty_settings, FALSE);
setupterm(term, fd, (int *) 0);