Update code style

Limit source code to 80 chars, and declare functions return type and
modifiers on a separate line.

This allows to avoid very long lines, and all function names are
aligned.

(We do this on VLC, and I like it.)
This commit is contained in:
Romain Vimont
2019-03-02 20:09:56 +01:00
parent b2fe005498
commit aeda583a2c
45 changed files with 813 additions and 409 deletions

View File

@@ -10,7 +10,8 @@ struct index {
Uint32 color;
};
static SDL_bool find_color(struct index *index, int len, char c, Uint32 *color) {
static SDL_bool
find_color(struct index *index, int len, char c, Uint32 *color) {
// there are typically very few color, so it's ok to iterate over the array
for (int i = 0; i < len; ++i) {
if (index[i].c == c) {
@@ -30,7 +31,8 @@ static SDL_bool find_color(struct index *index, int len, char c, Uint32 *color)
//
// Parameter is not "const char *" because XPM formats are generally stored in a
// (non-const) "char *"
SDL_Surface *read_xpm(char *xpm[]) {
SDL_Surface *
read_xpm(char *xpm[]) {
#if SDL_ASSERT_LEVEL >= 2
// patch the XPM to change the icon color in debug mode
xpm[2] = ". c #CC00CC";