Put { of function on separate line.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 17 Dec 2008 08:26:26 +0000 (08:26 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 17 Dec 2008 08:26:26 +0000 (08:26 +0000)
[r24740]

adt/xmalloc.c
ast2firm.c
diagnostic.c
format_check.c
lexer.c
main.c
parser.c
preprocessor.c
type.c

index 4d91c77..bf3af9f 100644 (file)
 #include "util.h"
 
 static inline __attribute__((noreturn))
-void out_of_memory(void) {
+void out_of_memory(void)
+{
        panic("out of memory");
 }
 
-void *xmalloc(size_t size) {
+void *xmalloc(size_t size)
+{
        void *res = malloc(size);
 
        if (UNLIKELY(res == NULL))
@@ -55,7 +57,8 @@ void *xmalloc(size_t size) {
        return res;
 }
 
-void *xcalloc(size_t num, size_t size) {
+void *xcalloc(size_t num, size_t size)
+{
        void *res = calloc(num, size);
 
        if (UNLIKELY(res == NULL))
@@ -64,7 +67,8 @@ void *xcalloc(size_t num, size_t size) {
        return res;
 }
 
-void *xrealloc(void *ptr, size_t size) {
+void *xrealloc(void *ptr, size_t size)
+{
        void *res = realloc (ptr, size);
 
        if (UNLIKELY(res == NULL))
@@ -73,7 +77,8 @@ void *xrealloc(void *ptr, size_t size) {
        return res;
 }
 
-char *xstrdup(const char *str) {
+char *xstrdup(const char *str)
+{
        size_t len = strlen(str) + 1;
        char *res = xmalloc(len);
        memcpy(res, str, len);
index b3fedd8..020a3d2 100644 (file)
@@ -1446,7 +1446,8 @@ static ir_node *get_local_frame(ir_entity *const ent)
 /**
  * Keep all memory edges of the given block.
  */
-static void keep_all_memory(ir_node *block) {
+static void keep_all_memory(ir_node *block)
+{
        ir_node *old = get_cur_block();
 
        set_cur_block(block);
@@ -2192,7 +2193,8 @@ static ir_node *handle_assume_compare(dbg_info *dbi,
  * @param dbi    debug info
  * @param expr   the IL assume expression
  */
-static ir_node *handle_assume(dbg_info *dbi, const expression_t *expression) {
+static ir_node *handle_assume(dbg_info *dbi, const expression_t *expression)
+{
        switch(expression->kind) {
        case EXPR_BINARY_EQUAL:
        case EXPR_BINARY_NOTEQUAL:
@@ -5184,12 +5186,14 @@ static void asm_statement_to_firm(const asm_statement_t *statement)
        }
 }
 
-static void    ms_try_statement_to_firm(ms_try_statement_t *statement) {
+static void    ms_try_statement_to_firm(ms_try_statement_t *statement)
+{
        statement_to_firm(statement->try_statement);
        warningf(&statement->base.source_position, "structured exception handling ignored");
 }
 
-static void    leave_statement_to_firm(leave_statement_t *statement) {
+static void    leave_statement_to_firm(leave_statement_t *statement)
+{
        errorf(&statement->base.source_position, "__leave not supported yet");
 }
 
@@ -5437,7 +5441,8 @@ static void add_function_pointer(ir_type *segment, ir_entity *method,
 /**
  * Generate possible IJmp branches to a given label block.
  */
-static void gen_ijmp_branches(ir_node *block) {
+static void gen_ijmp_branches(ir_node *block)
+{
        ir_node *ijmp;
        for (ijmp = ijmp_list; ijmp != NULL; ijmp = get_irn_link(ijmp)) {
                add_immBlock_pred(block, ijmp);
index babdf9d..7d8c0ab 100644 (file)
@@ -40,7 +40,8 @@ static const source_position_t *curr_pos = NULL;
 /**
  * prints an additional source position
  */
-static void print_source_position(FILE *out, const source_position_t *pos) {
+static void print_source_position(FILE *out, const source_position_t *pos)
+{
        fprintf(out, "at line %u", pos->linenr);
        if (curr_pos == NULL || curr_pos->input_name != pos->input_name)
                fprintf(out, " of \"%s\"", pos->input_name);
index 626da87..5d7f0a1 100644 (file)
@@ -115,39 +115,46 @@ struct vchar_t {
        int (*is_digit)(unsigned vchar);
 };
 
-static unsigned string_first(vchar_t *self) {
+static unsigned string_first(vchar_t *self)
+{
        self->position = 0;
        const string_t *string = self->string;
        return string->begin[0];
 }
 
-static unsigned string_next(vchar_t *self) {
+static unsigned string_next(vchar_t *self)
+{
        ++self->position;
        const string_t *string = self->string;
        return string->begin[self->position];
 }
 
-static int string_isdigit(unsigned vchar) {
+static int string_isdigit(unsigned vchar)
+{
        return isdigit(vchar);
 }
 
-static unsigned wstring_first(vchar_t *self) {
+static unsigned wstring_first(vchar_t *self)
+{
        self->position = 0;
        const wide_string_t *wstring = self->string;
        return wstring->begin[0];
 }
 
-static unsigned wstring_next(vchar_t *self) {
+static unsigned wstring_next(vchar_t *self)
+{
        ++self->position;
        const wide_string_t *wstring = self->string;
        return wstring->begin[self->position];
 }
 
-static int wstring_isdigit(unsigned vchar) {
+static int wstring_isdigit(unsigned vchar)
+{
        return iswdigit(vchar);
 }
 
-static bool atend(vchar_t *self) {
+static bool atend(vchar_t *self)
+{
        return self->position + 1 == self->size;
 }
 
diff --git a/lexer.c b/lexer.c
index f7d97af..b90edcd 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -634,7 +634,8 @@ static void parse_floating_suffix(void)
  * A replacement for strtoull. Only those parts needed for
  * our parser are implemented.
  */
-static unsigned long long parse_int_string(const char *s, const char **endptr, int base) {
+static unsigned long long parse_int_string(const char *s, const char **endptr, int base)
+{
        unsigned long long v = 0;
 
        switch (base) {
@@ -1579,7 +1580,8 @@ typedef enum stdc_pragma_value_kind_t {
 /**
  * Parse a pragma directive.
  */
-static void parse_pragma(void) {
+static void parse_pragma(void)
+{
        bool unknown_pragma = true;
 
        next_pp_token();
diff --git a/main.c b/main.c
index 60b3695..8f0e58f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -512,7 +512,8 @@ static void usage(const char *argv0)
        fprintf(stderr, "Usage %s input [-o output] [-c]\n", argv0);
 }
 
-static void print_cparser_version(void) {
+static void print_cparser_version(void)
+{
        printf("cparser (%s) using libFirm (%u.%u",
               cparser_REVISION, ir_get_version_major(),
               ir_get_version_minor());
index 8469447..b729740 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -8872,7 +8872,8 @@ static void warn_div_by_zero(binary_expression_t const *const expression)
 /**
  * Check the semantic restrictions for a div/mod expression.
  */
-static void semantic_divmod_arithmetic(binary_expression_t *expression) {
+static void semantic_divmod_arithmetic(binary_expression_t *expression)
+{
        semantic_binexpr_arithmetic(expression);
        warn_div_by_zero(expression);
 }
@@ -10077,7 +10078,8 @@ end_error:
  *
  * @param statement  the switch statement to check
  */
-static void check_enum_cases(const switch_statement_t *statement) {
+static void check_enum_cases(const switch_statement_t *statement)
+{
        const type_t *type = skip_typeref(statement->expression->base.type);
        if (! is_type_enum(type))
                return;
index 7ba8282..570182c 100644 (file)
@@ -314,7 +314,8 @@ static inline bool is_octal_digit(int chr)
  * Returns the value of a digit.
  * The only portable way to do it ...
  */
-static int digit_value(int digit) {
+static int digit_value(int digit)
+{
        switch (digit) {
        case '0': return 0;
        case '1': return 1;
diff --git a/type.c b/type.c
index a0463e3..7d63ac5 100644 (file)
--- a/type.c
+++ b/type.c
@@ -1277,7 +1277,8 @@ type_t *skip_typeref(type_t *type)
        return type;
 }
 
-type_qualifiers_t get_type_qualifier(const type_t *type, bool skip_array_type) {
+type_qualifiers_t get_type_qualifier(const type_t *type, bool skip_array_type)
+{
        type_qualifiers_t qualifiers = TYPE_QUALIFIER_NONE;
 
        while (true) {
@@ -1356,7 +1357,8 @@ atomic_type_kind_t get_uintptr_kind(void)
 /**
  * Find the atomic type kind representing a given size (signed).
  */
-atomic_type_kind_t find_signed_int_atomic_type_kind_for_size(unsigned size) {
+atomic_type_kind_t find_signed_int_atomic_type_kind_for_size(unsigned size)
+{
        static atomic_type_kind_t kinds[32];
 
        assert(size < 32);
@@ -1383,7 +1385,8 @@ atomic_type_kind_t find_signed_int_atomic_type_kind_for_size(unsigned size) {
 /**
  * Find the atomic type kind representing a given size (signed).
  */
-atomic_type_kind_t find_unsigned_int_atomic_type_kind_for_size(unsigned size) {
+atomic_type_kind_t find_unsigned_int_atomic_type_kind_for_size(unsigned size)
+{
        static atomic_type_kind_t kinds[32];
 
        assert(size < 32);