1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-13 10:21:18 +00:00

git subrepo pull (merge) tools/fado (#1501)

subrepo:
  subdir:   "tools/fado"
  merged:   "8d896ee97"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "8d896ee97"
git-subrepo:
  version:  "0.4.5"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "dbb99be"
This commit is contained in:
Dragorn421 2023-02-26 20:04:00 +01:00 committed by GitHub
parent 9f0b7bb8a3
commit d4a6b21d46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 160 additions and 101 deletions

View file

@ -15,7 +15,7 @@
#include "version.inc"
void PrintVersion() {
void PrintVersion(void) {
printf("Fado (Fairy-Assisted relocations for Decompiled Overlays), version %s\n", versionNumber);
printf("Copyright (C) 2021 Elliptic Ellipsis\n");
printf("%s\n", credits);
@ -88,7 +88,7 @@ static size_t posArgCount = ARRAY_COUNT(posArgInfo);
static size_t optCount = ARRAY_COUNT(optInfo);
static struct option longOptions[ARRAY_COUNT(optInfo)];
void ConstructLongOpts() {
void ConstructLongOpts(void) {
size_t i;
for (i = 0; i < optCount; i++) {
@ -133,14 +133,15 @@ int main(int argc, char** argv) {
outputFileName = optarg;
outputFile = fopen(optarg, "wb");
if (outputFile == NULL) {
fprintf(stderr, "error: unable to open output file '%s' for writing", optarg);
fprintf(stderr, "error: unable to open output file '%s' for writing\n", optarg);
return EXIT_FAILURE;
}
break;
case 'v':
if (sscanf(optarg, "%u", &gVerbosity) == 0) {
fprintf(stderr, "warning: verbosity argument '%s' should be a nonnegative decimal integer", optarg);
fprintf(stderr, "warning: verbosity argument '%s' should be a nonnegative decimal integer\n",
optarg);
}
break;
@ -182,7 +183,7 @@ int main(int argc, char** argv) {
FAIRY_INFO_PRINTF("Using input file %s\n", argv[optind + i]);
inputFiles[i] = fopen(argv[optind + i], "rb");
if (inputFiles[i] == NULL) {
fprintf(stderr, "error: unable to open input file '%s' for reading", argv[optind + i]);
fprintf(stderr, "error: unable to open input file '%s' for reading\n", argv[optind + i]);
return EXIT_FAILURE;
}
}
@ -214,14 +215,14 @@ int main(int argc, char** argv) {
FILE* dependencyFile = fopen(dependencyFileName, "w");
if (dependencyFile == NULL) {
fprintf(stderr, "error: unable to open dependency file '%s' for writing", dependencyFileName);
fprintf(stderr, "error: unable to open dependency file '%s' for writing\n", dependencyFileName);
return EXIT_FAILURE;
}
strcpy(objectFile, outputFileName);
extensionStart = strrchr(objectFile, '.');
if (extensionStart == objectFile + fileNameLength) {
fprintf(stderr, "error: file name should not end in a '.'");
fprintf(stderr, "error: file name should not end in a '.'\n");
return EXIT_FAILURE;
}
strcpy(extensionStart, ".o");