X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Ftset.c;h=915951bf73bf695c8694541aed4c3acc35cd655a;hp=9a05b3d06d0a7d1f1ea86b244983dbff6db03406;hb=5723efe1a5c87ef6a0afa2426538156241f380db;hpb=0819b56c3096ed77dd36312b0c4e8f37e7d46c88 diff --git a/progs/tset.c b/progs/tset.c index 9a05b3d0..915951bf 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2013,2015 Free Software Foundation, Inc. * + * Copyright (c) 1998-2015,2016 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 * @@ -119,7 +119,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 1.96 2015/04/12 15:36:06 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.98 2016/04/16 18:15:35 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -1210,7 +1210,7 @@ main(int argc, char **argv) obsolete(argv); noinit = noset = quiet = Sflag = sflag = showterm = 0; - while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:np:qQSrsVw")) != -1) { + while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:p:qQSrsVw")) != -1) { switch (ch) { case 'c': /* set control-chars */ opt_c = TRUE; @@ -1236,8 +1236,6 @@ main(int argc, char **argv) case 'm': /* map identifier to type */ add_mapping(0, optarg); break; - case 'n': /* OBSOLETE: set new tty driver */ - break; case 'p': /* OBSOLETE: map identifier to type */ add_mapping("plugboard", optarg); break; @@ -1293,7 +1291,7 @@ main(int argc, char **argv) reset_mode(); } - (void) get_termcap_entry(*argv); + ttype = get_termcap_entry(*argv); if (!noset) { #if HAVE_SIZECHANGE @@ -1327,9 +1325,6 @@ main(int argc, char **argv) } } - /* Get the terminal name from the entry. */ - ttype = _nc_first_name(cur_term->type.term_names); - if (noset) (void) printf("%s\n", ttype); else {