From: fred Date: Sun, 24 Mar 2002 19:55:21 +0000 (+0000) Subject: lilypond-0.1.9 X-Git-Tag: release/1.5.59~4026 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=532cc76767f911ad74ae9d4d46e5babbee83a73b;p=lilypond.git lilypond-0.1.9 --- diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index c786a51efe..b380b1fd2d 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -16,7 +16,8 @@ char* strnlwr (char* start_l ,int n) { char * p = start_l + n; - while ( --p >= start_l) { + while (--p >= start_l) + { *p = tolower (*p); /* a macro on some compilers */ } return start_l; @@ -26,7 +27,8 @@ char* strnupr (char* start_l, int n) { char * p = start_l + n; - while ( --p >= start_l) { + while (--p >= start_l) + { *p = toupper (*p); /* a macro on some compilers */ } return start_l; @@ -40,17 +42,19 @@ strnupr (char* start_l, int n) char * memmem (Byte const * haystack, int haystack_len, - Byte const *needle,int needle_len) + Byte const *needle,int needle_len) { Byte const * end_haystack = haystack + haystack_len - needle_len; Byte const * end_needle = needle + needle_len ; /* Ahhh ... Some minimal lowlevel stuff. This *is* nice; Varation - is the spice of life */ - while (haystack < end_haystack) { + is the spice of life */ + while (haystack < end_haystack) + { Byte const *subneedle_l = needle; Byte const *subhaystack_l = haystack; - while (subneedle_l < end_needle) { + while (subneedle_l < end_needle) + { if (*subneedle_l++ != *subhaystack_l++) goto next; // yeah. I should be prosecuted. } @@ -68,7 +72,8 @@ Byte * memrchr (Byte const * p, int n, char c) { const Byte * q = p+n; - while (q > p) { + while (q > p) + { if (*--q == c) return (Byte*)q; } @@ -88,19 +93,20 @@ my_swap (T &t1, T &t2, T &tmp) Byte* strrev (Byte* byte_l, int length_i) { - Byte tmp_byte; + Byte tmp_byte; - Byte* left_l = byte_l; - Byte* right_l = byte_l + length_i; + Byte* left_l = byte_l; + Byte* right_l = byte_l + length_i; - while ( right_l > left_l) { - my_swap (*right_l-- , *left_l++ , tmp_byte); - } - return byte_l; + while (right_l > left_l) + { + my_swap (*right_l-- , *left_l++ , tmp_byte); + } + return byte_l; } #if ! HAVE_SNPRINTF -int snprintf ( char *str, size_t, +int snprintf (char *str, size_t, char const *format, ...) { va_list ap;