]> git.lyx.org Git - lyx.git/blobdiff - src/support/snprintf.c
fix typo that put too many include paths for most people
[lyx.git] / src / support / snprintf.c
index 56d09ba754363534e92f32b1fb2d51f58126307c..cd1780af9a0ac1389f931c6f0cf1313b1fe664bd 100644 (file)
@@ -306,7 +306,9 @@ int asnprintf  (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
 int vasnprintf (char **ptr, size_t str_m, const char *fmt, va_list ap);
 #endif
 
+#ifndef va_copy
 #define va_copy(ap2,ap) ap2 = ap
+#endif
 
 #if defined(HAVE_SNPRINTF)
 /* declare our portable snprintf  routine under name portable_snprintf  */
@@ -691,7 +693,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
          /* Actually it uses 0x prefix even for a zero value. */
                    && long_arg != 0
 #endif
-                  ) { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = 'x'; }
+                 ) { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = 'x'; }
 #endif
         }
         zero_padding_insertion_ind = str_arg_l;
@@ -703,7 +705,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
           * converting a zero value with a precision of zero is a null string.
           * Actually it returns all zeroes. */
 #endif
-        ) {  /* converted to null string */  }
+       ) {  /* converted to null string */  }
         else {
           char f[5]; int f_l = 0;
           f[f_l++] = '%';
@@ -736,7 +738,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
               && !(zero_padding_insertion_ind < str_arg_l
                    && tmp[zero_padding_insertion_ind] == '0')
 #endif
-          ) {      /* assure leading zero for alternative-form octal numbers */
+         ) {      /* assure leading zero for alternative-form octal numbers */
             if (!precision_specified || precision < num_of_digits+1)
               { precision = num_of_digits+1; precision_specified = 1; }
           }