From: Jérôme Benoit Date: Tue, 6 Jun 2017 20:49:05 +0000 (+0200) Subject: White space cleanup X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b5e9ccd0c40a658ea3fc8245b3ada821b248daed;p=Project_algorithmic_C.git White space cleanup Signed-off-by: Jérôme Benoit --- diff --git a/lib/list.h b/lib/list.h index 3a76885..98b5b25 100644 --- a/lib/list.h +++ b/lib/list.h @@ -1,8 +1,8 @@ #ifndef __LIST_H #define __LIST_H -/* This file is from Linux Kernel (include/linux/list.h) - * and modified by simply removing hardware prefetching of list items. +/* This file is from Linux Kernel (include/linux/list.h) + * and modified by simply removing hardware prefetching of list items. * Here by copyright, credits attributed to wherever they belong. * Kulesh Shanmugasundaram (kulesh [squiggly] isis.poly.edu) */ @@ -31,7 +31,7 @@ struct list_head { } while (0) /* - * Insert a new entry between two known consecutive entries. + * Insert a new entry between two known consecutive entries. * * This is only for internal list manipulation where we know * the prev/next entries already! @@ -104,7 +104,7 @@ static inline void list_del(struct list_head *entry) static inline void list_del_init(struct list_head *entry) { __list_del(entry->prev, entry->next); - INIT_LIST_HEAD(entry); + INIT_LIST_HEAD(entry); } /** @@ -205,7 +205,7 @@ static inline void list_splice_init(struct list_head *list, #define list_for_each_prev(pos, head) \ for (pos = (head)->prev; pos != (head); \ pos = pos->prev) - + /** * list_for_each_safe - iterate over a list safe against removal of list entry * @pos: the &struct list_head to use as a loop counter. diff --git a/lib/othello.c b/lib/othello.c index 4e03069..a66a121 100644 --- a/lib/othello.c +++ b/lib/othello.c @@ -67,7 +67,7 @@ bool is_box_type(int y, int x, unsigned int pawn_array[board_size][board_size], } static bool is_valid_coordinates(int y, int x) { - + if ((y > 0 && y < board_size + 1) && \ (x > 0 && x < board_size + 1)) { return true; diff --git a/lib/ui.c b/lib/ui.c index 80a188b..4242ac0 100644 --- a/lib/ui.c +++ b/lib/ui.c @@ -3,7 +3,7 @@ * * Filename: ui.c * - * Description: Routines to handle the user interface + * Description: Routines to handle the user interface * * Version: 1.0 * Created: 24/04/2017 16:41:15 @@ -97,7 +97,7 @@ static void print_x(int y, int x, unsigned int type) { /* y = 1: y -> 0 x = 1: 1 -> 1 * y > 1: y -> y + 3 x > 1: x -> x + 5 */ static int remap_y(int y) { - + if (y == 1) { return 2; } else if (y > 1 && y <= board_size) { @@ -130,7 +130,7 @@ void print_pawns(int base_y, int base_x, unsigned int pawn_array[board_size][boa } int map_col_letter_to_index(char c) { - + if (c == 'a' || c == 'A') { return 1; } else if (c == 'b' || c == 'B') { @@ -154,7 +154,7 @@ int map_col_letter_to_index(char c) { /* return capital letters */ char map_col_index_to_letter(int index) { - + if (index == 1) { return 'A'; } else if (index == 2) {