Portability fixes, mostly from James for Palm purposes. Mostly

additions of missing 'static' and explicit 'void' in parameter lists,
plus one or two other things like explicitly casting chars in variadic
argument lists to int and using DBL_MAX if HUGE_VAL isn't available.

[originally from svn r9166]
This commit is contained in:
Simon Tatham
2011-05-04 18:41:21 +00:00
parent e7b2a9dd8d
commit 89bfecaa5a
5 changed files with 69 additions and 54 deletions

View File

@ -96,7 +96,7 @@
struct vector { int a, b, c, d; };
static vector v_origin()
static vector v_origin(void)
{
vector v;
v.a = v.b = v.c = v.d = 0;
@ -107,7 +107,7 @@ static vector v_origin()
* draw an isoceles triangle centred on the X axis. */
#ifdef TEST_VECTORS
static vector v_unit()
static vector v_unit(void)
{
vector v;
@ -219,7 +219,7 @@ static const char *v_debug(vector v)
* Tiling routines.
*/
vector xform_coord(vector vo, int shrink, vector vtrans, int ang)
static vector xform_coord(vector vo, int shrink, vector vtrans, int ang)
{
if (shrink < 0)
vo = v_shrinkphi(vo);
@ -539,7 +539,7 @@ int test_cb(penrose_state *state, vector *vs, int n, int depth)
return 0;
}
void usage_exit()
void usage_exit(void)
{
fprintf(stderr, "Usage: penrose-test [--recursion] P2|P3 SIZE DEPTH\n");
exit(1);