summaryrefslogtreecommitdiff
path: root/term-utils/setterm.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-04build-sys: Fix check for __GNU_LIBRARY__Michael Forney1-1/+1
If we are not on glibc, __GNU_LIBRARY__ will not exist causing the check to always fail and try to use syscalls directly. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-30setterm: fix term.h/ncurses.h include orderingMike Frysinger1-2/+3
The ncurses term.h header has logic in it to detect if nucrses.h has already been included and void defining things when it has. But since setterm includes term.h and the ncurses.h, it doesn't work and we can get fun build-time warnings like: CC term-utils/setterm-setterm.o In file included from term-utils/setterm.c:109:0: /usr/include/ncursesw/ncurses.h:827:12: warning: redundant redeclaration of 'tigetflag' [-Wredundant-decls] extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */ ^ In file included from term-utils/setterm.c:106:0: /usr/include/ncursesw/term.h:775:12: note: previous declaration of 'tigetflag' was here extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); ^ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-05setterm: fix various color option argument listsSami Kerola1-37/+37
The lists did not have correct colors in usage(). Because the usage() had to be fixed, it is best to make the output easy for translators to work with. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-03-27setterm: fix memory leak [coverity scan]Karel Zak1-1/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-06textual: spell and encode the name of Arkadiusz Miƛkiewicz correctlyBenno Schulenberg1-1/+1
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2012-12-20setterm: fix compiler warningKarel Zak1-1/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-21setterm: make error message more informativePetr Uzel1-3/+7
If `setterm -dump` fails because of lack of permission to read /dev/vcsa, it should not report that it couldn't read /dev/vcsa0. This could be misleading if there is only /dev/vcsa, but not /dev/vcsa0. Before: $ ./setterm -dump setterm: Couldn't read /dev/vcsa0 After: $ ./setterm -dump setterm: Couldn't read neither /dev/vcsa0 nor /dev/vcsa (Note: /dev/vcsa0 does not exist and the user does not have read permission on /dev/vcsa in this case). Addresses: https://bugzilla.novell.com/show_bug.cgi?id=780615 Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl> Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-26setterm: fix shadow declarationSami Kerola1-3/+3
term-utils/setterm.c:221:55: warning: declaration of 'opt_term' shadows a global declaration [-Wshadow] term-utils/setterm.c:181:5: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-05Fix typos in comments and wall's man pageBernhard Voelker1-1/+1
Culprits identified again by (newer) misspellings: $ git ls-files | misspellings -f - | grep -v '^po/' * wall: Fix typo in man page. * Fix typos in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-04-04term-utils: verify writing to streams was successfulSami Kerola1-1/+4
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30setterm: correct manual page referenceSami Kerola1-1/+1
An error from commit faa0548de47df5691cf56dd49daaba8dbc89d34a Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-08-16setterm: cleanup usage()Karel Zak1-43/+42
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06setterm: use xmalloc()Karel Zak1-6/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06setterm: fix variable types, and unused argument warningsSami Kerola1-3/+4
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06setterm: function screendump coding style fixedSami Kerola1-60/+61
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06setterm: use libc error printing facilitiesSami Kerola1-21/+27
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06setterm: support -help and -version optionsSami Kerola1-61/+65
[kzak@redhat.com: - merge all options to the one string] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06setterm: segfault with long dump file nameSami Kerola1-2/+3
The patch will make too long path to be truncated to MAX_PATH lenght. If user supplies too long file name that is caught at fopen. Some users might find this unintuitive, so the altered behavior will be mantioned in manual page. Bug in earlier version was visible with a command bellow. setterm -dump -file $(for i in $(seq 254); do printf x ; done) Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-03-02build-sys: move setterm to term-utils/Karel Zak1-0/+1277
Signed-off-by: Karel Zak <kzak@redhat.com>