Skip to content

Commit

Permalink
Merge pull request #16 from jeffs/master
Browse files Browse the repository at this point in the history
Fix compiler warnings, and have Git ignore build product.
  • Loading branch information
mtoyoda committed Jun 16, 2014
2 parents e4c01af + 7d3a25b commit 0fd8d6f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/sl
22 changes: 16 additions & 6 deletions sl.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/*========================================
* sl.c: SL version 5.01
* sl.c: SL version 5.02
* Copyright 1993,1998,2014
* Toyoda Masashi
* ([email protected])
* Last Modified: 2014/03/31
* Last Modified: 2014/06/03
*========================================
*/
/* sl version 5.02 : Fix compiler warnings. */
/* by Jeff Schwab 2014/06/03 */
/* sl version 5.01 : removed cursor and handling of IO */
/* by Chris Seymour 2014/01/03 */
/* sl version 5.00 : add -c option */
Expand Down Expand Up @@ -39,6 +41,14 @@
#include <unistd.h>
#include "sl.h"

void add_smoke(int y, int x);
void add_man(int y, int x);
int add_C51(int x);
int add_D51(int x);
int add_sl(int x);
void option(char *str);
int my_mvaddstr(int y, int x, char *str);

int ACCIDENT = 0;
int LOGO = 0;
int FLY = 0;
Expand Down Expand Up @@ -145,7 +155,7 @@ int add_sl(int x)
}


add_D51(int x)
int add_D51(int x)
{
static char *d51[D51PATTERNS][D51HIGHT + 1]
= {{D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7,
Expand Down Expand Up @@ -185,7 +195,7 @@ add_D51(int x)
return OK;
}

add_C51(int x)
int add_C51(int x)
{
static char *c51[C51PATTERNS][C51HIGHT + 1]
= {{C51STR1, C51STR2, C51STR3, C51STR4, C51STR5, C51STR6, C51STR7,
Expand Down Expand Up @@ -226,7 +236,7 @@ add_C51(int x)
}


int add_man(int y, int x)
void add_man(int y, int x)
{
static char *man[2][2] = {{"", "(O)"}, {"Help!", "\\O/"}};
int i;
Expand All @@ -237,7 +247,7 @@ int add_man(int y, int x)
}


int add_smoke(int y, int x)
void add_smoke(int y, int x)
#define SMOKEPTNS 16
{
static struct smokes {
Expand Down
4 changes: 2 additions & 2 deletions sl.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*========================================
* sl.h: SL version 5.1
* sl.h: SL version 5.02
* Copyright 1993,2002,2014
* Toyoda Masashi
* ([email protected])
* Last Modified: 2014/03/31
* Last Modified: 2014/06/03
*========================================
*/

Expand Down

1 comment on commit 0fd8d6f

@prollycause
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

God i love GitHub. Accidentally discovered this and instantly wanted to see how the train worked thinking it was a shell script at first, came out understanding the logic in c, even if i'm novice at c/++

Please sign in to comment.