Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions virtualgcc/virtualgcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ unsigned int game_checksum;
#define CL_DLLTYPE 5
#define CL_CHECKSUM 6
typedef struct {
char *string;
const char *string;
unsigned short command;
} tCommandLineOption;
tCommandLineOption CommandLineOptions[] = {{"-F", CL_SOURCEFILE}, {"-D", CL_DEBUGINFO}, {"-O", CL_OUTPUTFILE},
Expand All @@ -67,7 +67,7 @@ tCommandLineOption CommandLineOptions[] = {{"-F", CL_SOURCEFILE}, {"-D", CL_

bool FindGCCPath(char *gcc_bin_path);

void output(char *format, ...) {
void output(const char *format, ...) {
char buffer[512];
va_list list;
va_start(list, format);
Expand Down Expand Up @@ -303,11 +303,11 @@ char WarningLevelString[256];
char DebugLevelString[32];
char ChecksumString[64];

void main(int argc, char *argv[]) {
int main(int argc, char *argv[]) {
output("Virtual GCC Compiler layer for Descent 3\n");
output("Copyright 1999 Outrage Entertainment\n");
if (!CollectArguments(argc, argv))
return;
return EXIT_FAILURE;

STARTUPINFO si = {0};
// Make child process use this app's standard files.
Expand Down Expand Up @@ -337,7 +337,7 @@ void main(int argc, char *argv[]) {
}

if (missing_variables) {
return;
return EXIT_FAILURE;
}

if (Level_DLL_build) {
Expand Down Expand Up @@ -403,6 +403,8 @@ void main(int argc, char *argv[]) {
output("Done.");

SetCurrentDirectory(old_path);

return EXIT_SUCCESS;
}

bool Step1(STARTUPINFO *si) {
Expand Down
12 changes: 7 additions & 5 deletions virtualms/virtualMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ unsigned int game_checksum;
#define CL_DLLTYPE 5
#define CL_CHECKSUM 6
typedef struct {
char *string;
const char *string;
unsigned short command;
} tCommandLineOption;
tCommandLineOption CommandLineOptions[] = {{"-F", CL_SOURCEFILE}, {"-D", CL_DEBUGINFO}, {"-O", CL_OUTPUTFILE},
{"-W", CL_WARNINGLVL}, {"-DIR", CL_DIRECTORY}, {"-LEVEL", CL_DLLTYPE},
{"-CHECKSUM", CL_CHECKSUM}};

void output(char *format, ...) {
void output(const char *format, ...) {
char buffer[512];
va_list list;
va_start(list, format);
Expand Down Expand Up @@ -257,11 +257,11 @@ char WarningLevelString[256];
char DebugLevelString[32];
char ChecksumString[64];

void main(int argc, char *argv[]) {
int main(int argc, char *argv[]) {
output("Virtual MS Compiler layer for Descent 3\n");
output("Copyright 1999 Outrage Entertainment\n");
if (!CollectArguments(argc, argv))
return;
return EXIT_FAILURE;

STARTUPINFO si = {0};
// Make child process use this app's standard files.
Expand Down Expand Up @@ -304,7 +304,7 @@ void main(int argc, char *argv[]) {
}

if (missing_variables) {
return;
return EXIT_FAILURE;
}

if (Level_DLL_build) {
Expand Down Expand Up @@ -364,6 +364,8 @@ void main(int argc, char *argv[]) {
output("Done.");

SetCurrentDirectory(old_path);

return EXIT_SUCCESS;
}

int Step1(STARTUPINFO *si) {
Expand Down