Skip to content

Instantly share code, notes, and snippets.

@DanielO
Created August 12, 2020 08:02
Show Gist options
  • Save DanielO/a6fb8039c8670b30c88a9f0f6a063750 to your computer and use it in GitHub Desktop.
Save DanielO/a6fb8039c8670b30c88a9f0f6a063750 to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index 95c7c17..ae88370 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,8 @@
#
# Conquer news mailing list: conquer-news-request@bu-cs.bu.edu.
#
-MAKE = /usr/bin/make
-CC = /usr/bin/gcc
+MAKE = /usr/local/bin/gmake
+CC = cc -std=c89 -Wnone
RM = /bin/rm -f
# LN must be "ln -s" if source and default directories span disks
@@ -289,7 +289,7 @@ $(HELPSCR).1: newhelp
newhelp
$(HELPSCR).2: newhelp
- newhelp
+ ./newhelp
newhelp: dataG.o newhelp.o
$(CC) $(OPTFLG) dataG.o newhelp.o -o newhelp
diff --git a/admin.c b/admin.c
index ba01fc4..32739f2 100644
--- a/admin.c
+++ b/admin.c
@@ -49,7 +49,7 @@ int remake=FALSE;
FILE *fexe, *fopen();
-void
+int
main(argc,argv)
int argc;
char **argv;
diff --git a/data.h b/data.h
index 88fecba..af9dd20 100644
--- a/data.h
+++ b/data.h
@@ -622,7 +622,8 @@ extern int units_in_sector(), num_powers(), tofood(), mailopen();
extern int get_god(), flightcost(), todigit(), getclass(), startcost();
extern int water_2reachp(),tg_ok(), readmap(), avian();
extern int cbonus(), armymove(),takeover(),getnewname();
-extern int getleader(),execute(),peasant_revolt(),other_revolt();
+extern int getleader(),execute(),other_revolt();
+extern void peasant_revolt();
extern int aretheyon(),armygoto(),navygoto(),getselunit();
extern int unitvalid(),access(),orctake(),fort_val();
extern int addgships(),addmships(),addwships(),fltships();
@@ -634,7 +635,7 @@ extern void getjewel(),getmetal(),loadfleet(),removemgk(),exenewmgk();
extern struct s_sector *rand_sector();
extern void subgships(),submships(),subwships(),getspace(),sackem();
extern void sleep(), whatcansee(), reset_god(), get_nname(), camp_info();
-extern void main(), makebottom(), makeside(), check_mail(), centermap();
+extern void makebottom(), makeside(), check_mail(), centermap();
extern void checkout(),copyscreen(),bye(),credits(),init_hasseen();
extern void combinearmies(),change_status(),reducearmy(),splitarmy();
extern void errormsg(), clear_bottom(), addgroup(),ext_cmd();
diff --git a/main.c b/main.c
index 995010c..d9114a3 100644
--- a/main.c
+++ b/main.c
@@ -57,7 +57,7 @@ FILE *fexe, *fopen();
/************************************************************************/
/* MAIN() - main loop for conquer */
/************************************************************************/
-void
+int
main(argc,argv)
int argc;
char **argv;
@@ -350,7 +350,7 @@ char **argv;
fprintf(stderr," or %s",ntn[0].leader);
}
fprintf(stderr,".\n");
- return;
+ return 1;
} else if(country==0 && !pflag) {
sprintf(filename,"%sadd",isonfile);
if(check_lock(filename,FALSE)==TRUE) {
diff --git a/newhelp.c b/newhelp.c
index 201f12d..6c292fd 100644
--- a/newhelp.c
+++ b/newhelp.c
@@ -16,7 +16,7 @@
#include "data.h"
#include "patchlevel.h"
-void
+int
main()
{
FILE *fp, *fp2, *fopen();
diff --git a/randeven.c b/randeven.c
index e71c21b..d3b2fec 100644
--- a/randeven.c
+++ b/randeven.c
@@ -956,7 +956,7 @@ char *event;
if(ispc(ntn[cntry].active)) mailclose(cntry);
}
-int
+void
peasant_revolt(newnation) /* peasant revolt */
int *newnation; /* return nation id */
{
diff --git a/spew.c b/spew.c
index ba78ef5..bf5da68 100644
--- a/spew.c
+++ b/spew.c
@@ -95,6 +95,10 @@ int CompMain; /* class # of MAIN class when compressed */
char InLine[MAXLINE];
+void instring(register char *where, register int how_many );
+void display(char *s, int deftag, FILE *fp);
+void setup(register classrec *cp);
+
makemess(n,fp)
int n;
FILE *fp;
@@ -169,6 +173,7 @@ readtext(){
* variants. If that variant tag is '&', the tag 'deftag' is used, which
* is the active variant of the containing activation.
*/
+void
display(s,deftag,fp)
char *s;
int deftag;
@@ -312,6 +317,7 @@ char *str;
/*
* setup a class record. The 'class' line is in InLine.
*/
+void
setup(cp)
register classrec *cp;
{
@@ -485,6 +491,7 @@ register classrec *cp;
*dput = NULL; /* last one */
}
+void
instring( where, how_many )
register char *where;
register int how_many;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment