X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Ftset.c;h=f7f00c5ef94c397308c7dc0cbdc92a245d56ad06;hp=7a5c5b8a2704221d7fe4696e63a413697bbb9a55;hb=938680fa3bc29d2a086031a2f648dfd6cadcb51e;hpb=43bb25186a3fa2cc24c08b3a1eedbb1e860c59a9 diff --git a/progs/tset.c b/progs/tset.c index 7a5c5b8a..f7f00c5e 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. * + * Copyright (c) 1998-2011,2012 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.86 2012/01/07 20:23:20 juergen Exp $") +MODULE_ID("$Id: tset.c,v 1.90 2012/12/15 23:01:17 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -213,10 +213,10 @@ failed(const char *msg) size_t len = strlen(_nc_progname) + 2; if ((int) len < (int) sizeof(temp) - 12) { - strcpy(temp, _nc_progname); - strcat(temp, ": "); + _nc_STRCPY(temp, _nc_progname, sizeof(temp)); + _nc_STRCAT(temp, ": ", sizeof(temp)); } else { - strcpy(temp, "tset: "); + _nc_STRCPY(temp, "tset: ", sizeof(temp)); } perror(strncat(temp, msg, sizeof(temp) - strlen(temp) - 2)); exit_error(); @@ -474,9 +474,6 @@ add_mapping(const char *port, char *arg) mapp->speed = tbaudrate(p); } - if (arg == (char *) 0) /* Non-optional type. */ - goto badmopt; - mapp->type = arg; /* Terminate porttype, if specified. */