summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Lange <k@dakko.us>2011-12-04 04:05:52 -0600
committerKevin Lange <k@dakko.us>2011-12-04 04:05:52 -0600
commitab1fc8c49a073ba02bb7ac96c09bacb3d1ff93c3 (patch)
treea1e6d6e73cbce6e94ed34fd9ecb36495c24f422a
parent0efd68d3f0bbf1d5fd660b43ca6f0354b6e435fd (diff)
downloadnyancat-ab1fc8c49a073ba02bb7ac96c09bacb3d1ff93c3.tar.gz
[minor]
-rw-r--r--src/nyancat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index 5f4c702..853cad0 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -90,7 +90,10 @@ jmp_buf environment;
/*
* I refuse to include libm to keep this low
* on external dependencies.
- * */
+ *
+ * Count the number of digits in a number for
+ * use with string output.
+ */
int digits(int val) {
int d = 1, c;
if (val >= 0) for (c = 10; c <= val; c *= 10) d++;
@@ -100,7 +103,7 @@ int digits(int val) {
/*
* These values crop the animation, as we have a full 64x64 stored,
- * but we only want to display 80x24.
+ * but we only want to display 40x24 (double width).
*/
#define MIN_ROW 20
#define MAX_ROW 43
@@ -219,7 +222,7 @@ 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'};
+ char term[1024] = {'a','n','s','i', 0};
int k, ttype;
uint32_t option = 0, done = 0, sb_mode = 0, do_echo = 0;
/* Various pieces for the telnet communication */
0000'>2011-12-08Removed compiler warningsonic741-1/+1 2011-12-08SGC supportsonic741-111/+254 2011-08-31Fix spelling errors. Flagged by Debian lintian checkjmccrohan4-4/+4 2011-07-28driver for Futaba MDM166A Graphic(96x16) vf-displays by Andreas Bracholdmichael9-2/+684 2011-07-27driver for Newhaven's NHD‐0420D3Z‐FL‐GBW. 4x20 LCD by Rusty Clarksonmichael9-4/+573 2011-07-27indentation :-(michael1-3/+3 2011-07-27magic bold escape char by Andrew Thompsonmichael1-1/+9 2011-07-27picoLCDGraphics needs keypad linkedmichael2-0/+2 2011-07-27various compiler warnings fixedmichael13-60/+39 2011-07-27Autoconf 2.68michael3-1455/+2751 2011-07-27run smoketest on all of my 8 coresmichael1-2/+2 2011-07-27indentationmichael4-330/+320 2011-07-27patch to replace outdate library libmpd with recent library libmpdclient from...michael2-240/+427 2011-07-27lcd4linux-wireless.patch from Hans de Goedemichael1-1/+1 2011-07-27st2205-width-height-swap.patch from Hans de Goedemichael1-2/+2 2011-07-27hwmon patch from Hans de Goedemichael1-0/+14 2011-07-27patch to support SureElectronicsDE-LD023 from Matt Joicemichael1-3/+16 2011-05-06Fixed keypad widget in GLCD2USBharbaum1-0/+7 2011-02-12timer.c: fixed detection of positive clock skew (and some typos)mzuther4-10/+10 2011-01-23timer.c: fixed clock skew detectionmzuther1-26/+46 2011-01-23timer.c: skip intermediate timer intervalsmzuther2-16/+46 2011-01-05fix for a bug introduced in the DE-LD021 drivermichael1-3/+3 2011-01-04indentationmichael2-3/+3 2011-01-04support for Sure Electronics DE-LD021 by Natanael Olaizmichael1-10/+8 2011-01-02driver for EFN LED modules by Tilman Glötznermichael9-21/+469 2010-11-28commented, corrected and beautified both timer and timer group codemzuther11-197/+511 2010-11-27finished commenting the timer codemzuther2-46/+138 2010-11-20started commenting the timer codemzuther5-52/+170 2010-11-19Added brightness support for GLCD2USBharbaum5-28/+8014