switch source tree from k&r to c99

This commit is contained in:
nhmall
2021-01-26 21:06:16 -05:00
parent a2a9cb7b4f
commit f963c5aca7
232 changed files with 12099 additions and 17782 deletions

View File

@@ -44,7 +44,7 @@ extern unsigned _stklen = STKSIZ;
#undef PACKED_FILE
#endif
extern char *FDECL(tilename, (int, int));
extern char *tilename(int, int);
#ifdef PLANAR_FILE
char masktable[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
@@ -66,10 +66,10 @@ int num_colors;
pixel pixels[TILE_Y][TILE_X];
struct tibhdr_struct tibheader;
static void FDECL(write_tibtile, (int));
static void FDECL(write_tibheader, (FILE *, struct tibhdr_struct *));
static void FDECL(build_tibtile, (pixel(*) [TILE_X], BOOLEAN_P));
static void NDECL(remap_colors);
static void write_tibtile(int);
static void write_tibheader(FILE *, struct tibhdr_struct *);
static void build_tibtile(pixel(*) [TILE_X], boolean);
static void remap_colors(void);
#ifndef OVERVIEW_FILE
char *tilefiles[] = { "../win/share/monsters.txt", "../win/share/objects.txt",
@@ -84,9 +84,7 @@ int filenum;
int paletteflag;
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
int i;
struct tm *newtime;
@@ -223,9 +221,7 @@ char *argv[];
}
static void
write_tibheader(fileptr, tibhdr)
FILE *fileptr;
struct tibhdr_struct *tibhdr;
write_tibheader(FILE *fileptr, struct tibhdr_struct *tibhdr)
{
if (fseek(fileptr, 0L, SEEK_SET)) {
Fprintf(stderr, "Error writing header to tile file\n");
@@ -234,9 +230,7 @@ struct tibhdr_struct *tibhdr;
}
static void
build_tibtile(pixels, statues)
pixel (*pixels)[TILE_X];
boolean statues;
build_tibtile(pixel (*pixels)[TILE_X], boolean statues)
{
static int graymappings[] = {
/* . A B C D E F G H I J K L M N O P */
@@ -314,8 +308,7 @@ boolean statues;
}
static void
write_tibtile(recnum)
int recnum;
write_tibtile(int recnum)
{
long fpos;
@@ -352,7 +345,7 @@ int recnum;
}
static void
remap_colors()
remap_colors(void)
{
char swap;