X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Fclear.c;h=97cb0f3651deb65c53365b78821cde7601173e1d;hb=63d26709472433a4660c88461162252bf0e5fde8;hp=7eac9b1e5b5bb4087f104d24170b2faf2246e998;hpb=0485620c03e69b1b58a6b12e5e45c98415fc7575;p=ncurses.git diff --git a/progs/clear.c b/progs/clear.c index 7eac9b1e..97cb0f36 100644 --- a/progs/clear.c +++ b/progs/clear.c @@ -1,5 +1,6 @@ /**************************************************************************** - * 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 * @@ -40,11 +41,11 @@ #include #include -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" @@ -80,6 +81,7 @@ main( switch (c) { case 'T': use_env(FALSE); + use_tioctl(TRUE); term = optarg; break; case 'V': @@ -96,7 +98,7 @@ main( if (optind < argc) usage(); - fd = save_tty_settings(&tty_settings); + fd = save_tty_settings(&tty_settings, FALSE); setupterm(term, fd, (int *) 0);