// Global variables for use in functions below that can gradually disappear as code is cleaned up
long LNLENG;
long LNPOSN;
-signed char INLINE[LINESIZE+1];
+char INLINE[LINESIZE+1];
long I;
long K;
long KK;
fgets(INLINE + 1, sizeof(INLINE) - 1, OPENED);
}
while (!feof(OPENED) && INLINE[1] == '#');
-
+
LNLENG = 0;
- for (int i = 1; i <= sizeof(INLINE) && INLINE[i] != 0; ++i)
+ for (size_t i = 1; i <= sizeof(INLINE) && INLINE[i] != 0; ++i)
{
char val = INLINE[i] + 1;
- INLINE[i] = ascii_to_advent[val];
+ INLINE[i] = ascii_to_advent[(unsigned)val];
if (INLINE[i] != 0)
LNLENG = i;
}
* if K=0 we use a line that has already been read (and perhaps partially
* scanned). If we're at the end of the line or encounter an illegal
* character (not a digit, hyphen, or blank), we return 0. */
-
+
long DIGIT, GETNUM, SIGN;
if(source != NULL) MAPLIN(source);
}
int read_database(FILE* database) {
-
+
/* Clear out the various text-pointer arrays. All text is stored in array
* lines; each line is preceded by a word pointing to the next pointer (i.e.
* the word following the end of the line). The pointer is negative if this is
// include the header in the C file
fprintf(c_file, "#include \"database.h\"\n");
fprintf(c_file, "\n");
-
+
// content variables
write_0d(c_file, header_file, LINUSE, "LINUSE");
write_0d(c_file, header_file, TRVS, "TRVS");
write_hints(c_file, header_file, HINTS, HNTSIZ + 1, 5, "HINTS");
}
-int main(int argc, char** argv)
+int main()
{
- argc = argc;
- argv = argv;
-
FILE* database = fopen("adventure.text", "r");
read_database(database);
fclose(database);
write_files(c_file, header_file);
fclose(c_file);
fclose(header_file);
-
+
return(EXIT_SUCCESS);
}