summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Lange <kevin.lange@dakko.us>2012-03-23 18:08:37 -0500
committerKevin Lange <kevin.lange@dakko.us>2012-03-23 18:08:37 -0500
commited21034c7bd21cf93481ad7ea64a1d1ad77e1305 (patch)
tree867c07464576ffead76fe68e72fe069d69209246
parent98345ae45d1cae20134cb7a1d9530c466762a936 (diff)
downloadnyancat-ed21034c7bd21cf93481ad7ea64a1d1ad77e1305.tar.gz
(style)
-rw-r--r--src/nyancat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index 1bc0294..d22c6e3 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -237,6 +237,9 @@ void send_command(int cmd, int opt) {
}
}
+/*
+ * Print the usage / help text describing options
+ */
void usage(char * argv[]) {
printf(
"Terminal Nyancat\n"
@@ -251,7 +254,6 @@ void usage(char * argv[]) {
int main(int argc, char ** argv) {
- /* I have a bad habit of being very C99, so this may not be everything */
/* The default terminal is ANSI */
char term[1024] = {'a','n','s','i', 0};
int terminal_width = 80;
@@ -261,6 +263,7 @@ int main(int argc, char ** argv) {
char sb[1024] = {0};
char sb_len = 0;
+ /* Whether or not to show the MOTD intro */
char show_intro = 0;
/* Long option names */
@@ -423,8 +426,9 @@ int main(int argc, char ** argv) {
/* We are running standalone, retrieve the
* terminal type from the environment. */
char * nterm = getenv("TERM");
- if (nterm)
+ if (nterm) {
strcpy(term, nterm);
+ }
/* Also get the number of columns */
struct winsize w;
@@ -438,7 +442,9 @@ int main(int argc, char ** argv) {
}
/* We don't want terminals wider than 80 columns */
- if(terminal_width > 80) terminal_width = 80;
+ if(terminal_width > 80) {
+ terminal_width = 80;
+ }
/* Do our terminal detection */
if (strstr(term, "xterm")) {
77bd959d1a5a928e5f6b4ecee&follow=1'>[lcd4linux @ 2005-04-02 05:28:58 by reinelt]reinelt3-19/+27 fixed gcc4 warnings about signed/unsigned mismatches 2005-04-01[lcd4linux @ 2005-04-01 05:16:04 by reinelt]reinelt5-584/+694 moved plugin init stuff to a seperate function called on first use 2005-03-30[lcd4linux @ 2005-03-30 04:57:50 by reinelt]reinelt3-23/+67 Evaluator speedup: use bsearch for finding functions and variables 2005-03-28[lcd4linux @ 2005-03-28 22:29:23 by reinelt]reinelt1-250/+346 HD44780 multiple displays patch from geronet 2005-03-28[lcd4linux @ 2005-03-28 19:39:14 by reinelt]reinelt9-256/+1147 HD44780/I2C patch from Luis merged (still does not work for me) 2005-03-25[lcd4linux @ 2005-03-25 15:44:43 by reinelt]reinelt1-2/+5 HD44780 Backlight fixed (thanks to geronet) 2005-03-23[lcd4linux @ 2005-03-23 12:23:35 by reinelt]reinelt1-27/+32 fixed some signed/unsigned char mismatches in the Crystalfontz driver (ticket #12) 2005-02-24[lcd4linux @ 2005-02-24 07:07:55 by reinelt]reinelt1-0/+53 ChangeLog 2005-02-24[lcd4linux @ 2005-02-24 07:06:45 by reinelt]reinelt11-28/+347 SimpleLCD driver added 2005-02-24[lcd4linux @ 2005-02-24 06:51:40 by reinelt]reinelt1-4/+5 LCD-Linux driver GOTO_COST corrected 2005-01-30[lcd4linux @ 2005-01-30 06:43:22 by reinelt]reinelt4-69/+95 driver for LCD-Linux finished 2005-01-29[lcd4linux @ 2005-01-29 09:30:56 by reinelt]reinelt1-8/+11 minor HD44780 cleanups 2005-01-22[lcd4linux @ 2005-01-22 22:57:57 by reinelt]reinelt9-47/+382 LCD-Linux driver added 2005-01-22[lcd4linux @ 2005-01-22 12:44:41 by reinelt]reinelt1-3/+6 MatrixOrbital backlight micro-fix 2005-01-18[lcd4linux @ 2005-01-18 06:30:21 by reinelt]reinelt89-261/+603 added (C) to all copyright statements 2005-01-17[lcd4linux @ 2005-01-17 06:38:48 by reinelt]reinelt1-1/+6 info about backlight and brightness 2005-01-17[lcd4linux @ 2005-01-17 06:29:24 by reinelt]reinelt3-33/+85 added software-controlled backlight support to HD44780