Re-ran indent on all .c & .h source code files

Like so --
  find . -name "*.c" -or -name "*.h" -exec  indent -nbfda -npcs -npsl -bli0 --no-tabs {} \;

The `indent` invocation differs from the last one noted in
CHANGES.txt (from 2006!?), in that I've added "--no-tabs",
to ensure indents are all space-based.
This commit is contained in:
Bill Kendrick 2022-09-15 00:11:16 -07:00
parent 09f332367f
commit cc05925d9e
99 changed files with 31659 additions and 27102 deletions

View file

@ -46,16 +46,19 @@ char *waves_get_name(magic_api * api, int which);
int waves_get_group(magic_api * api, int which);
char *waves_get_description(magic_api * api, int which, int mode);
void waves_drag(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect);
void waves_click(magic_api * api, int which, int mode,
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
void waves_release(magic_api * api, int which,
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
SDL_Surface * last, int ox, int oy, int x, int y,
SDL_Rect * update_rect);
void waves_click(magic_api * api, int which, int mode, SDL_Surface * canvas,
SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
void waves_release(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
void waves_shutdown(magic_api * api);
void waves_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
int waves_requires_colors(magic_api * api, int which);
void waves_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
void waves_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
void waves_switchin(magic_api * api, int which, int mode,
SDL_Surface * canvas);
void waves_switchout(magic_api * api, int which, int mode,
SDL_Surface * canvas);
int waves_modes(magic_api * api, int which);
Uint32 waves_api_version(void)
@ -69,10 +72,12 @@ int waves_init(magic_api * api)
{
char fname[1024];
snprintf(fname, sizeof(fname), "%ssounds/magic/waves.ogg", api->data_directory);
snprintf(fname, sizeof(fname), "%ssounds/magic/waves.ogg",
api->data_directory);
waves_snd[0] = Mix_LoadWAV(fname);
snprintf(fname, sizeof(fname), "%ssounds/magic/wavelet.ogg", api->data_directory);
snprintf(fname, sizeof(fname), "%ssounds/magic/wavelet.ogg",
api->data_directory);
waves_snd[1] = Mix_LoadWAV(fname);
@ -91,15 +96,18 @@ SDL_Surface *waves_get_icon(magic_api * api, int which)
char fname[1024];
if (!which)
snprintf(fname, sizeof(fname), "%simages/magic/waves.png", api->data_directory);
snprintf(fname, sizeof(fname), "%simages/magic/waves.png",
api->data_directory);
else
snprintf(fname, sizeof(fname), "%simages/magic/wavelet.png", api->data_directory);
snprintf(fname, sizeof(fname), "%simages/magic/wavelet.png",
api->data_directory);
return (IMG_Load(fname));
}
// Return our group (both the same):
int waves_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
int waves_get_group(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED)
{
return MAGIC_TYPE_PICTURE_WARPS;
}
@ -114,7 +122,8 @@ char *waves_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
}
// Return our descriptions, localized:
char *waves_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode ATTRIBUTE_UNUSED)
char *waves_get_description(magic_api * api ATTRIBUTE_UNUSED, int which,
int mode ATTRIBUTE_UNUSED)
{
if (!which)
return (strdup
@ -126,9 +135,10 @@ char *waves_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mod
}
void waves_drag(magic_api * api ATTRIBUTE_UNUSED, int which, SDL_Surface * canvas,
SDL_Surface * last, int ox ATTRIBUTE_UNUSED, int oy ATTRIBUTE_UNUSED, int x, int y,
SDL_Rect * update_rect)
void waves_drag(magic_api * api ATTRIBUTE_UNUSED, int which,
SDL_Surface * canvas, SDL_Surface * last,
int ox ATTRIBUTE_UNUSED, int oy ATTRIBUTE_UNUSED, int x,
int y, SDL_Rect * update_rect)
{
int xx, yy;
SDL_Rect src, dest;
@ -138,46 +148,46 @@ void waves_drag(magic_api * api ATTRIBUTE_UNUSED, int which, SDL_Surface * canva
SDL_BlitSurface(last, NULL, canvas, NULL);
if (which == 0)
{
//waves effect
width = ((x * 10) / canvas->w) + 10;
height = ((canvas->h - y) / 10) + 1;
for (yy = 0; yy < canvas->h; yy++)
{
//waves effect
width = ((x * 10) / canvas->w) + 10;
height = ((canvas->h - y) / 10) + 1;
xx = sin((yy * height) * M_PI / 180.0) * width;
for (yy = 0; yy < canvas->h; yy++)
{
xx = sin((yy * height) * M_PI / 180.0) * width;
src.x = 0;
src.y = yy;
src.w = canvas->w;
src.h = 1;
src.x = 0;
src.y = yy;
src.w = canvas->w;
src.h = 1;
dest.x = xx;
dest.y = yy;
dest.x = xx;
dest.y = yy;
SDL_BlitSurface(last, &src, canvas, &dest);
}
SDL_BlitSurface(last, &src, canvas, &dest);
}
}
else
{
width = ((x * 10) / canvas->w) + 10;
height = ((canvas->h - y) / 10) + 1;
for (xx = 0; xx < canvas->w; xx++)
{
width = ((x * 10) / canvas->w) + 10;
height = ((canvas->h - y) / 10) + 1;
yy = sin((xx * height) * M_PI / 180.0) * width;
for (xx = 0; xx < canvas->w; xx++)
{
yy = sin((xx * height) * M_PI / 180.0) * width;
src.x = xx;
src.y = 0;
src.w = 1;
src.h = canvas->h;
src.x = xx;
src.y = 0;
src.w = 1;
src.h = canvas->h;
dest.x = xx;
dest.y = yy;
dest.x = xx;
dest.y = yy;
SDL_BlitSurface(last, &src, canvas, &dest);
}
SDL_BlitSurface(last, &src, canvas, &dest);
}
}
update_rect->x = 0;
update_rect->y = 0;
update_rect->w = canvas->w;
@ -186,16 +196,20 @@ void waves_drag(magic_api * api ATTRIBUTE_UNUSED, int which, SDL_Surface * canva
// Affect the canvas on click:
void waves_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect)
SDL_Surface * canvas, SDL_Surface * last, int x, int y,
SDL_Rect * update_rect)
{
waves_drag(api, which, canvas, last, x, y, x, y, update_rect);
api->playsound(waves_snd[which], 128, 255);
}
// Affect the canvas on release:
void waves_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
void waves_release(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED,
SDL_Surface * last ATTRIBUTE_UNUSED,
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED,
SDL_Rect * update_rect ATTRIBUTE_UNUSED)
{
}
@ -209,23 +223,27 @@ void waves_shutdown(magic_api * api ATTRIBUTE_UNUSED)
}
// Record the color from Tux Paint:
void waves_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED,
void waves_set_color(magic_api * api ATTRIBUTE_UNUSED,
Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED,
Uint8 b ATTRIBUTE_UNUSED)
{
}
// Use colors:
int waves_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
int waves_requires_colors(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED)
{
return 0;
}
void waves_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
void waves_switchin(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED)
{
}
void waves_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
void waves_switchout(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED)
{
}