~donmcc/astr

d8397ad7edb5f65175ec00a0144c0233c65a220b — Don McCaughey 1 year, 8 months ago 8f2fd99
Move inline declarations to the end of the header.

Place inline declarations at the end of the `astr.h` file, so that they
can be alphabetized as a group and can use previously declared
functions.

Place the extern declarations of inline functions at the end of the
`astr.c` file to mirror the order in the header.
2 files changed, 14 insertions(+), 14 deletions(-)

M astr.c
M astr.h
M astr.c => astr.c +7 -8
@@ 4,10 4,6 @@
#include <stdio.h>


extern char *
astr_alloc_empty(void);


char *
astr_alloc_format(char const *format, ...)
{


@@ 36,10 32,6 @@ astr_alloc_format_args(char const *format, va_list arguments)
}


extern bool
astr_eq_bytes(char const *s1, char const *s2);


size_t
astr_len_format(char const *format, ...)
{


@@ 66,3 58,10 @@ astr_len_format_args(char const *format, va_list arguments)
    return length;
}


extern char *
astr_alloc_empty(void);

extern bool
astr_eq_bytes(char const *s1, char const *s2);


M astr.h => astr.h +7 -6
@@ 13,6 13,13 @@ astr_alloc_format(char const *format, ...);
char *
astr_alloc_format_args(char const *format, va_list arguments);

size_t
astr_len_format(char const *format, ...);

size_t
astr_len_format_args(char const *format, va_list arguments);


inline char *
astr_alloc_empty(void)
{


@@ 27,12 34,6 @@ astr_eq_bytes(char const *s1, char const *s2)
    return 0 == strcmp(s1, s2);
}

size_t
astr_len_format(char const *format, ...);

size_t
astr_len_format_args(char const *format, va_list arguments);


#endif