diff --git a/tools/clang-tidy.sh b/tools/clang-tidy.sh index 088b19be8..224814333 100755 --- a/tools/clang-tidy.sh +++ b/tools/clang-tidy.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash # Use clang-tidy to brace if statements and loops. This should be a feature of clang-format. -# The brace check is the only check being applied right now, -# but other checks (like naming scheme) may be added at a later time. +# The brace check is the only check being applied right now, +# but other checks (like naming scheme) may be added at a later time. # '--fix-errors` due to generated text_strings.h as well as the enhancement inc.c files -TIDY_OPTS="-p . --fix --fix-errors" +TIDY_OPTS="-p . --fix --fix-errors" COMPILER_OPTS="-nostdinc -fno-builtin -std=gnu90 -Iinclude -Isrc -D_LANGUAGE_C" VERSIONS="-DVERSION_US -DVERSION_JP -DVERSION_EU" @@ -15,7 +15,7 @@ cd "$( dirname $0 )" >/dev/null 2>&1; cd ../ if (( $# > 0 )); then printf "Tidy file(s) $*" echo - for VER in ${VERSIONS}; do + for VER in ${VERSIONS}; do echo "with compiler version flag ${VER}" clang-tidy ${TIDY_OPTS} "$@" -- ${COMPILER_OPTS} ${VER} done @@ -25,7 +25,7 @@ if (( $# > 0 )); then fi echo "Tidying all C files for all versions. This will take a bit" -for VER in ${VERSIONS}; do +for VER in ${VERSIONS}; do echo "Tidying for compiler version flag ${VER}" # Don't run clang-tidy on behaviors clang-tidy ${TIDY_OPTS} src/audio/*.c -- ${COMPILER_OPTS} ${VER} diff --git a/tools/create_patch.sh b/tools/create_patch.sh index 689f11ddd..ea75d9cca 100755 --- a/tools/create_patch.sh +++ b/tools/create_patch.sh @@ -21,5 +21,5 @@ fi git add . # Generate the patch. git diff -p --staged > "$1" -# Undo the 'git add'. +# Undo the 'git add'. git reset diff --git a/tools/demo_data_converter.py b/tools/demo_data_converter.py index e05b14bb3..86ea94c5e 100755 --- a/tools/demo_data_converter.py +++ b/tools/demo_data_converter.py @@ -23,7 +23,7 @@ def main(): prog_args.append(a) defines = [d.split("=")[0] for d in defines] - + if len(prog_args) < 1 or need_help: print("Usage: {} [-D ] > ".format(sys.argv[0])) sys.exit(0 if need_help else 1) diff --git a/tools/extract_data_for_mio.c b/tools/extract_data_for_mio.c index 68b2697eb..3d13185a1 100644 --- a/tools/extract_data_for_mio.c +++ b/tools/extract_data_for_mio.c @@ -145,7 +145,7 @@ uint16_t u16be(uint16_t val) { return __builtin_bswap16(val); #else return val; -#endif +#endif } static bool elf_get_section_range(uint8_t *file, const char *searched_name, uint32_t *address, uint32_t *offset, uint32_t *size, uint32_t *section_index) { diff --git a/tools/getGoddardSize.py b/tools/getGoddardSize.py index c127fd565..a3e528a69 100644 --- a/tools/getGoddardSize.py +++ b/tools/getGoddardSize.py @@ -4,7 +4,7 @@ with open(sys.argv[1]) as f: for line in f: if "GODDARD_SIZE" in line: tokens=line.split() - with open("build/%s/goddard.txt" % sys.argv[2], "w+") as f: + with open("build/%s_n64/goddard.txt" % sys.argv[2], "w+") as f: sz = int(tokens[0], 16) sz += 16 sz &= 0xFFFFFFF0 diff --git a/tools/n64graphics_ci_dir/README.md b/tools/n64graphics_ci_dir/README.md index 9f23e2a2c..14bda5da6 100644 --- a/tools/n64graphics_ci_dir/README.md +++ b/tools/n64graphics_ci_dir/README.md @@ -6,7 +6,7 @@ CI4 textures will always assume a 16 color palette is used, and CI8 textures a 2 ## Libraries Used (All MIT licensed) -* **Exoquant** by Dennis Ranke, for color reduction. https://github.com/exoticorn/exoquant +* **Exoquant** by Dennis Ranke, for color reduction. https://github.com/exoticorn/exoquant * **stb** by Sean Barrett, for loading PNG images. https://github.com/nothings/stb ## PNG -> CI4 + Palette diff --git a/tools/patch_elf_32bit.c b/tools/patch_elf_32bit.c index edf0c36bf..8e5295207 100644 --- a/tools/patch_elf_32bit.c +++ b/tools/patch_elf_32bit.c @@ -80,7 +80,7 @@ struct ar_header { //These constants found by inspecting output of objdump #define FLAGS_MIPS3 0x20 -#define FLAGS_O32ABI 0x100000 +#define FLAGS_O32ABI 0x100000 int fix_mips_elf(FILE *f, size_t filesize) { diff --git a/tools/slienc.c b/tools/slienc.c index d12b057ff..40c525566 100644 --- a/tools/slienc.c +++ b/tools/slienc.c @@ -38,24 +38,24 @@ int main(int argc, const char **argv, const char **envp) fprintf(stderr, "slienc [infile] [outfile]\n"); return 1; } - + strcpy(src, argv[1]); strcpy(dest, argv[2]); - + if ((fp = fopen(src, "rb")) == NULL) { fprintf(stderr, "FILE OPEN ERROR![%s]\n", src); return 1; } - + fseek(fp, 0, SEEK_END); insize = ftell(fp); fseek(fp, 0, SEEK_SET); - + bz = malloc(insize); - size_t fread_result = fread(bz, 1, insize, fp); + fread(bz, 1, insize, fp); fclose(fp); - + for (int i = 0; src[i]; i++) { if (src[i] == '.') @@ -64,31 +64,31 @@ int main(int argc, const char **argv, const char **envp) break; } } - + if ((fp = fopen(dest, "wb")) == NULL) { fprintf(stderr, "FILE CREATE ERROR![%s]\n", dest); exit(1); } - + encode(); - + fprintf(fp, "Yay0"); - + writeint4(insize); - + writeint4(4 * cp + 16); writeint4(2 * pp + 4 * cp + 16); - + for (int i = 0; i < cp; i++) writeint4(cmd[i]); - + for (int i = 0; i < pp; i++) writeshort(pol[i]); - + fwrite(def, 1u, dp, fp); fclose(fp); - + return 0; } @@ -299,7 +299,7 @@ void initskip(unsigned char *pattern, int len) { for (int i = 0; i < 256; i++) skip[i] = len; - + for (int i = 0; i < len; i++) skip[pattern[i]] = len - i - 1; } diff --git a/tools/stb/stb_image.h b/tools/stb/stb_image.h index acec20a1b..d9c21bc81 100644 --- a/tools/stb/stb_image.h +++ b/tools/stb/stb_image.h @@ -1077,8 +1077,8 @@ static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int byt stbi_uc *bytes = (stbi_uc *)image; for (slice = 0; slice < z; ++slice) { - stbi__vertical_flip(bytes, w, h, bytes_per_pixel); - bytes += slice_size; + stbi__vertical_flip(bytes, w, h, bytes_per_pixel); + bytes += slice_size; } } @@ -1237,15 +1237,15 @@ STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *u STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { unsigned char *result; - stbi__context s; - stbi__start_mem(&s,buffer,len); - + stbi__context s; + stbi__start_mem(&s,buffer,len); + result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { - stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); + stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); } - return result; + return result; } #endif @@ -6127,7 +6127,7 @@ typedef struct int w,h; stbi_uc *out; // output buffer (always 4 components) stbi_uc *background; // The current "background" as far as a gif is concerned - stbi_uc *history; + stbi_uc *history; int flags, bgindex, ratio, transparent, eflags; stbi_uc pal[256][4]; stbi_uc lpal[256][4]; @@ -6215,7 +6215,7 @@ static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) { stbi_uc *p, *c; - int idx; + int idx; // recurse to decode the prefixes, since the linked-list is backwards, // and working backwards through an interleaved image would be nasty @@ -6224,12 +6224,12 @@ static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) if (g->cur_y >= g->max_y) return; - idx = g->cur_x + g->cur_y; + idx = g->cur_x + g->cur_y; p = &g->out[idx]; - g->history[idx / 4] = 1; + g->history[idx / 4] = 1; c = &g->color_table[g->codes[code].suffix * 4]; - if (c[3] > 128) { // don't render transparent pixels; + if (c[3] > 128) { // don't render transparent pixels; p[0] = c[2]; p[1] = c[1]; p[2] = c[0]; @@ -6338,31 +6338,31 @@ static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) // two back is the image from two frames ago, used for a very specific disposal format static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) { - int dispose; - int first_frame; - int pi; - int pcount; + int dispose; + int first_frame; + int pi; + int pcount; // on first frame, any non-written pixels get the background colour (non-transparent) - first_frame = 0; + first_frame = 0; if (g->out == 0) { if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h); - g->background = (stbi_uc *) stbi__malloc(4 * g->w * g->h); - g->history = (stbi_uc *) stbi__malloc(g->w * g->h); + g->background = (stbi_uc *) stbi__malloc(4 * g->w * g->h); + g->history = (stbi_uc *) stbi__malloc(g->w * g->h); if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory"); - // image is treated as "tranparent" at the start - ie, nothing overwrites the current background; + // image is treated as "tranparent" at the start - ie, nothing overwrites the current background; // background colour is only used for pixels that are not rendered first frame, after that "background" - // color refers to teh color that was there the previous frame. - memset( g->out, 0x00, 4 * g->w * g->h ); + // color refers to teh color that was there the previous frame. + memset( g->out, 0x00, 4 * g->w * g->h ); memset( g->background, 0x00, 4 * g->w * g->h ); // state of the background (starts transparent) memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame - first_frame = 1; + first_frame = 1; } else { // second frame - how do we dispoase of the previous one? - dispose = (g->eflags & 0x1C) >> 2; - pcount = g->w * g->h; + dispose = (g->eflags & 0x1C) >> 2; + pcount = g->w * g->h; if ((dispose == 3) && (two_back == 0)) { dispose = 2; // if I don't have an image to revert back to, default to the old background @@ -6371,32 +6371,32 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i if (dispose == 3) { // use previous graphic for (pi = 0; pi < pcount; ++pi) { if (g->history[pi]) { - memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); + memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); } } - } else if (dispose == 2) { - // restore what was changed last frame to background before that frame; + } else if (dispose == 2) { + // restore what was changed last frame to background before that frame; for (pi = 0; pi < pcount; ++pi) { if (g->history[pi]) { - memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); + memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); } } } else { - // This is a non-disposal case eithe way, so just + // This is a non-disposal case eithe way, so just // leave the pixels as is, and they will become the new background // 1: do not dispose // 0: not specified. } - // background is what out is after the undoing of the previou frame; - memcpy( g->background, g->out, 4 * g->w * g->h ); + // background is what out is after the undoing of the previou frame; + memcpy( g->background, g->out, 4 * g->w * g->h ); } - // clear my history; + // clear my history; memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame for (;;) { - int tag = stbi__get8(s); + int tag = stbi__get8(s); switch (tag) { case 0x2C: /* Image Descriptor */ { @@ -6434,19 +6434,19 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i } else if (g->flags & 0x80) { g->color_table = (stbi_uc *) g->pal; } else - return stbi__errpuc("missing color table", "Corrupt GIF"); - + return stbi__errpuc("missing color table", "Corrupt GIF"); + o = stbi__process_gif_raster(s, g); if (o == NULL) return NULL; - // if this was the first frame, - pcount = g->w * g->h; + // if this was the first frame, + pcount = g->w * g->h; if (first_frame && (g->bgindex > 0)) { // if first frame, any pixel not drawn to gets the background color for (pi = 0; pi < pcount; ++pi) { if (g->history[pi] == 0) { - g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; - memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); + g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; + memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); } } } @@ -6457,7 +6457,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i case 0x21: // Comment Extension. { int len; - int ext = stbi__get8(s); + int ext = stbi__get8(s); if (ext == 0xF9) { // Graphic Control Extension. len = stbi__get8(s); if (len == 4) { @@ -6466,23 +6466,23 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i // unset old transparent if (g->transparent >= 0) { - g->pal[g->transparent][3] = 255; - } + g->pal[g->transparent][3] = 255; + } if (g->eflags & 0x01) { g->transparent = stbi__get8(s); if (g->transparent >= 0) { - g->pal[g->transparent][3] = 0; + g->pal[g->transparent][3] = 0; } } else { // don't need transparent - stbi__skip(s, 1); - g->transparent = -1; + stbi__skip(s, 1); + g->transparent = -1; } } else { stbi__skip(s, len); break; } - } + } while ((len = stbi__get8(s)) != 0) { stbi__skip(s, len); } @@ -6501,15 +6501,15 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { if (stbi__gif_test(s)) { - int layers = 0; + int layers = 0; stbi_uc *u = 0; stbi_uc *out = 0; - stbi_uc *two_back = 0; + stbi_uc *two_back = 0; stbi__gif g; - int stride; + int stride; memset(&g, 0, sizeof(g)); if (delays) { - *delays = 0; + *delays = 0; } do { @@ -6519,44 +6519,44 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, if (u) { *x = g.w; *y = g.h; - ++layers; - stride = g.w * g.h * 4; - + ++layers; + stride = g.w * g.h * 4; + if (out) { - out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); + out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); if (delays) { - *delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers ); + *delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers ); } } else { - out = (stbi_uc*)stbi__malloc( layers * stride ); + out = (stbi_uc*)stbi__malloc( layers * stride ); if (delays) { - *delays = (int*) stbi__malloc( layers * sizeof(int) ); + *delays = (int*) stbi__malloc( layers * sizeof(int) ); } } - memcpy( out + ((layers - 1) * stride), u, stride ); + memcpy( out + ((layers - 1) * stride), u, stride ); if (layers >= 2) { - two_back = out - 2 * stride; + two_back = out - 2 * stride; } if (delays) { - (*delays)[layers - 1U] = g.delay; + (*delays)[layers - 1U] = g.delay; } } - } while (u != 0); + } while (u != 0); - // free temp buffer; - STBI_FREE(g.out); - STBI_FREE(g.history); - STBI_FREE(g.background); + // free temp buffer; + STBI_FREE(g.out); + STBI_FREE(g.history); + STBI_FREE(g.background); - // do the final conversion after loading everything; + // do the final conversion after loading everything; if (req_comp && req_comp != 4) out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); - *z = layers; + *z = layers; return out; } else { - return stbi__errpuc("not GIF", "Image was not as a gif type."); + return stbi__errpuc("not GIF", "Image was not as a gif type."); } } @@ -6573,14 +6573,14 @@ static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req *y = g.h; // moved conversion to after successful load so that the same - // can be done for multiple frames. + // can be done for multiple frames. if (req_comp && req_comp != 4) u = stbi__convert_format(u, 4, req_comp, g.w, g.h); } - // free buffers needed for multiple frame loading; + // free buffers needed for multiple frame loading; STBI_FREE(g.history); - STBI_FREE(g.background); + STBI_FREE(g.background); return u; } diff --git a/tools/stb/stb_image_write.h b/tools/stb/stb_image_write.h index 6354335bd..c05e95812 100644 --- a/tools/stb/stb_image_write.h +++ b/tools/stb/stb_image_write.h @@ -10,7 +10,7 @@ Will probably not work correctly with strict-aliasing optimizations. - If using a modern Microsoft Compiler, non-safe versions of CRT calls may cause + If using a modern Microsoft Compiler, non-safe versions of CRT calls may cause compilation warnings or even errors. To avoid this, also before #including, #define STBI_MSC_SECURE_CRT @@ -103,7 +103,7 @@ USAGE: TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed data, set the global variable 'stbi_write_tga_with_rle' to 0. - + JPEG does ignore alpha channels in input data; quality is between 1 and 100. Higher quality looks better but results in a bigger image. JPEG baseline (no JPEG progressive). @@ -111,7 +111,7 @@ USAGE: CREDITS: - Sean Barrett - PNG/BMP/TGA + Sean Barrett - PNG/BMP/TGA Baldur Karlsson - HDR Jean-Sebastien Guay - TGA monochrome Tim Kelsey - misc enhancements @@ -1356,7 +1356,7 @@ static int stbi_write_jpg_core(stbi__write_context *s, int width, int height, in 37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99}; static const int UVQT[] = {17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99, 99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99}; - static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, + static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, 1.0f * 2.828427125f, 0.785694958f * 2.828427125f, 0.541196100f * 2.828427125f, 0.275899379f * 2.828427125f }; int row, col, i, k; @@ -1531,38 +1531,38 @@ This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------ ALTERNATIVE A - MIT License Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ ALTERNATIVE B - Public Domain (www.unlicense.org) This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ */ diff --git a/tools/util/audiofile_strip.patch b/tools/util/audiofile_strip.patch index 1ad5c3af0..e6e224700 100644 --- a/tools/util/audiofile_strip.patch +++ b/tools/util/audiofile_strip.patch @@ -36,10 +36,10 @@ index 64e798b..374838b 100644 @@ -47,7 +47,7 @@ AUpvlist AUpvnew (int maxitems) if (aupvlist == NULL) return AU_NULL_PVLIST; - + - aupvlist->items = calloc(maxitems, sizeof (struct _AUpvitem)); + aupvlist->items = (struct _AUpvitem *)calloc(maxitems, sizeof (struct _AUpvitem)); - + assert(aupvlist->items); if (aupvlist->items == NULL) diff --git a/libaudiofile/g711.c b/libaudiofile/g711.c @@ -72,7 +72,7 @@ index ffd0a63..51d2dc3 100644 +++ b/libaudiofile/units.cpp @@ -32,24 +32,12 @@ #include "units.h" - + #include "AIFF.h" -#include "AVR.h" -#include "CAF.h" @@ -85,16 +85,16 @@ index ffd0a63..51d2dc3 100644 -#include "SampleVision.h" -#include "VOC.h" #include "WAVE.h" - + #include "compression.h" - + -#include "modules/ALAC.h" -#include "modules/FLAC.h" #include "modules/G711.h" -#include "modules/IMA.h" #include "modules/MSADPCM.h" #include "modules/PCM.h" - + @@ -99,20 +87,6 @@ const Unit _af_units[_AF_NUM_UNITS] = _AF_AIFF_NUM_INSTPARAMS, _af_aiff_inst_params @@ -259,7 +259,7 @@ index ffd0a63..51d2dc3 100644 - NULL // instrument parameters - } }; - + const CompressionUnit _af_compression[_AF_NUM_COMPRESSION] = @@ -309,19 +145,6 @@ const CompressionUnit _af_compression[_AF_NUM_COMPRESSION] = _af_g711_format_ok,