]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/clear.c
ncurses 6.2 - patch 20210323
[ncurses.git] / progs / clear.c
index 7eac9b1e5b5bb4087f104d24170b2faf2246e998..97cb0f3651deb65c53365b78821cde7601173e1d 100644 (file)
@@ -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            *
 #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"
@@ -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);