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

@ -65,19 +65,26 @@ int distortion_requires_colors(magic_api * api, int which);
void distortion_shutdown(magic_api * api);
void distortion_click(magic_api * api, int which, int mode,
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect);
void distortion_release(magic_api * api, int which,
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect);
SDL_Surface * canvas, SDL_Surface * snapshot, int x,
int y, SDL_Rect * update_rect);
void distortion_release(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * snapshot, int x, int y,
SDL_Rect * update_rect);
void distortion_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
void distortion_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
void distortion_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
void distortion_switchin(magic_api * api, int which, int mode,
SDL_Surface * canvas);
void distortion_switchout(magic_api * api, int which, int mode,
SDL_Surface * canvas);
int distortion_modes(magic_api * api, int which);
void distortion_drag(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect);
SDL_Surface * snapshot, int ox, int oy, int x, int y,
SDL_Rect * update_rect);
static void distortion_line_callback(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y);
static void distortion_line_callback(void *ptr, int which,
SDL_Surface * canvas,
SDL_Surface * snapshot, int x, int y);
/* Setup Functions: */
@ -95,7 +102,8 @@ int distortion_init(magic_api * api)
{
char fname[1024];
snprintf(fname, sizeof(fname), "%ssounds/magic/distortion.ogg", api->data_directory);
snprintf(fname, sizeof(fname), "%ssounds/magic/distortion.ogg",
api->data_directory);
// Try to load the file!
@ -119,7 +127,8 @@ SDL_Surface *distortion_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
{
char fname[1024];
snprintf(fname, sizeof(fname), "%simages/magic/distortion.png", api->data_directory);
snprintf(fname, sizeof(fname), "%simages/magic/distortion.png",
api->data_directory);
// Try to load the image, and return the results to Tux Paint:
@ -130,7 +139,8 @@ SDL_Surface *distortion_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
// Report our "Magic" tool names
char *distortion_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
char *distortion_get_name(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED)
{
return (strdup(gettext_noop("Distortion")));
}
@ -138,7 +148,8 @@ char *distortion_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_
// Report our "Magic" tool groups
int distortion_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
int distortion_get_group(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED)
{
return MAGIC_TYPE_DISTORTS;
}
@ -146,15 +157,19 @@ int distortion_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_U
// Report our "Magic" tool descriptions
char *distortion_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
char *distortion_get_description(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED,
int mode ATTRIBUTE_UNUSED)
{
return (strdup(gettext_noop("Click and drag the mouse to cause distortion in your picture.")));
return (strdup
(gettext_noop
("Click and drag the mouse to cause distortion in your picture.")));
}
// Report whether we accept colors
int distortion_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
int distortion_requires_colors(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED)
{
return 0;
}
@ -174,7 +189,8 @@ void distortion_shutdown(magic_api * api ATTRIBUTE_UNUSED)
// Affect the canvas on click:
void distortion_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y, SDL_Rect * update_rect)
SDL_Surface * canvas, SDL_Surface * snapshot, int x,
int y, SDL_Rect * update_rect)
{
distortion_drag(api, which, canvas, snapshot, x, y, x, y, update_rect);
}
@ -183,25 +199,27 @@ void distortion_click(magic_api * api, int which, int mode ATTRIBUTE_UNUSED,
// Affect the canvas on drag:
void distortion_drag(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * snapshot, int ox, int oy, int x, int y, SDL_Rect * update_rect)
SDL_Surface * snapshot, int ox, int oy, int x, int y,
SDL_Rect * update_rect)
{
api->line((void *)api, which, canvas, snapshot, ox, oy, x, y, 1, distortion_line_callback);
api->line((void *) api, which, canvas, snapshot, ox, oy, x, y, 1,
distortion_line_callback);
if (ox > x)
{
int tmp = ox;
{
int tmp = ox;
ox = x;
x = tmp;
}
ox = x;
x = tmp;
}
if (oy > y)
{
int tmp = oy;
{
int tmp = oy;
oy = y;
y = tmp;
}
oy = y;
y = tmp;
}
update_rect->x = ox - 8;
@ -217,14 +235,18 @@ void distortion_drag(magic_api * api, int which, SDL_Surface * canvas,
// Affect the canvas on release:
void distortion_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * snapshot ATTRIBUTE_UNUSED,
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
void distortion_release(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED,
SDL_Surface * snapshot ATTRIBUTE_UNUSED,
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED,
SDL_Rect * update_rect ATTRIBUTE_UNUSED)
{
}
void distortion_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED,
void distortion_set_color(magic_api * api ATTRIBUTE_UNUSED,
Uint8 r ATTRIBUTE_UNUSED, Uint8 g ATTRIBUTE_UNUSED,
Uint8 b ATTRIBUTE_UNUSED)
{
}
@ -233,7 +255,8 @@ void distortion_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r ATTRIBUTE_UN
// Our "callback" function
static void distortion_line_callback(void *ptr, int which ATTRIBUTE_UNUSED,
SDL_Surface * canvas, SDL_Surface * snapshot, int x, int y)
SDL_Surface * canvas,
SDL_Surface * snapshot, int x, int y)
{
magic_api *api = (magic_api *) ptr;
int xx, yy;
@ -244,28 +267,34 @@ static void distortion_line_callback(void *ptr, int which ATTRIBUTE_UNUSED,
// Tux Paint sends to us with the values we enumerated above.
for (yy = -8; yy < 8; yy++)
{
for (xx = -8; xx < 8; xx++)
{
for (xx = -8; xx < 8; xx++)
{
if (api->in_circle(xx, yy, 8))
{
api->putpixel(canvas, x + xx, y + yy, api->getpixel(snapshot, x + xx / 2, y + yy));
}
}
if (api->in_circle(xx, yy, 8))
{
api->putpixel(canvas, x + xx, y + yy,
api->getpixel(snapshot, x + xx / 2, y + yy));
}
}
}
}
void distortion_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
void distortion_switchin(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED,
int mode ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED)
{
}
void distortion_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
void distortion_switchout(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED,
int mode ATTRIBUTE_UNUSED,
SDL_Surface * canvas ATTRIBUTE_UNUSED)
{
}
int distortion_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
int distortion_modes(magic_api * api ATTRIBUTE_UNUSED,
int which ATTRIBUTE_UNUSED)
{
return (MODE_PAINT);
}