summaryrefslogtreecommitdiffstats
path: root/term-utils/setterm.c
Commit message (Collapse)AuthorAgeFilesLines
...
* setterm: convert various constant number definitions to enumsSami Kerola2014-05-121-20/+26
| | | | | | The enum strings are visible when using debugger. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: cleanup printf() usageKarel Zak2014-05-121-58/+24Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: remove unused codeSami Kerola2014-05-121-68/+3Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: Fix check for __GNU_LIBRARY__Michael Forney2013-10-041-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>
* setterm: fix term.h/ncurses.h include orderingMike Frysinger2013-09-301-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>
* setterm: fix various color option argument listsSami Kerola2013-04-051-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>
* setterm: fix memory leak [coverity scan]Karel Zak2013-03-271-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: spell and encode the name of Arkadiusz Miƛkiewicz correctlyBenno Schulenberg2013-02-061-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* setterm: fix compiler warningKarel Zak2012-12-201-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: make error message more informativePetr Uzel2012-09-211-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>
* setterm: fix shadow declarationSami Kerola2012-07-261-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>
* Fix typos in comments and wall's man pageBernhard Voelker2012-06-051-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>
* term-utils: verify writing to streams was successfulSami Kerola2012-04-041-1/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: correct manual page referenceSami Kerola2012-03-301-1/+1
| | | | | | An error from commit faa0548de47df5691cf56dd49daaba8dbc89d34a Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: cleanup usage()Karel Zak2011-08-161-43/+42Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: use xmalloc()Karel Zak2011-04-061-6/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: fix variable types, and unused argument warningsSami Kerola2011-04-061-3/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: function screendump coding style fixedSami Kerola2011-04-061-60/+61
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: use libc error printing facilitiesSami Kerola2011-04-061-21/+27
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: support -help and -version optionsSami Kerola2011-04-061-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>
* setterm: segfault with long dump file nameSami Kerola2011-04-061-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>
* build-sys: move setterm to term-utils/Karel Zak2011-03-021-0/+1277
Signed-off-by: Karel Zak <kzak@redhat.com>