]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.9
authorfred <fred>
Sun, 24 Mar 2002 19:55:21 +0000 (19:55 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:55:21 +0000 (19:55 +0000)
flower/libc-extension.cc

index c786a51efe456b41bf4e4406293cdbc11ce8f0bc..b380b1fd2d90671ac2a7e1b5d731ad6a139e484f 100644 (file)
@@ -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;