string: Introduce arr_alloc(). Change all callers of alloc() which pass a product of two integers as the allocation size to call the new function instead. This function aborts if the multiplication overflows. With arr_alloc() in place, alloc() reduces to a trivial wrapper which calls new arr_alloc() with the first argument equal to one.
string: Rename para_calloc() -> zalloc(). Reword the documentation a bit since the function has never been a wrapper for calloc(3). No code changes.
string: Rename para_malloc() -> alloc(). Just because it's shorter and matches the naming of the new allocators we are about to introduce. The bulk of this patch was created with sed -i 's/para_malloc/alloc/g' *.c *.h yy/mp.y
Shorten copyright notice. The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
imdct.c: Replace pointless macro PASS. The macro defines pass(), a function with only a single caller. We may as well define the function directly, improving readability and enabling proper syntax colors.
Remove unnecessary system header includes. All these headers get included from para.h.
doxygen: Expand all macros, in particular config.h. This improves the generated documentation web pages since now all HAVE_XXX macros of config.h are taken into account.
imdct: Remove dead store. imdct.c:296:2: warning: Value stored to 'output' is never read output += n4; ^ ~~
Mark a couple of functions as const. Probably does not matter much..
Make some variables static. Found by sparse.
__aligned is already defined on NetBSD. Use __a_aligned in analogy to __a_unused which was introduced since __unused is already defined on MacOS. This fixes the warning gcc-compat.h:5:1: warning: "__aligned" redefined In file included from /usr/include/regex.h:77, from daemon.c:9: /usr/include/sys/cdefs.h:202:1: warning: this is the location of the previous definition on NetBSD and has the additional advantage that it keeps working even if the NetBSD people decide to redefine __aligned.
imdct: Use the 1/sqrt(2) constant from math.h. No need to define our own one.
imdct: Trivial whitespace cleanups.
imdct.c: Add some more documentation.
skip pointless ff_ prefix.
Add __aligned macro to gcc-compat.h. and use this instead of DECLARE_ALIGNED. Fix some whitespace issues in gcc-compat.h while we're at it.
More documentation updates.
Add some more documentation
Add documenatation of imdct_init().
use free() instead of pointless freep() in imdct_end().