* device/lib/pic16/libc/stdio/vfprintf.c,
[fw/sdcc] / device / lib / printf_tiny.c
index 4d70072d05f71c549eeb69b9f985e703773e9293..4d8543854f643a5d7b31b69d538056f6e4f9ef34 100644 (file)
@@ -22,7 +22,7 @@
  * interrupt routine).  Code size is under 270 bytes.  Only one library
  * function is called (_gptrget, 41 bytes), in addition to calls to
  * putchar().
- * 
+ *
  * Five simple formats are supported
  *
  *     %d      signed 16 bit integer decimal (-32768 to 32767)
@@ -33,7 +33,7 @@
  *
  * For a more complete printf that supports longs, floating point and
  * field width, try using printf_fast() or printf_large().
- */    
+ */
 
 
 // This removes the negative number code, causing "%d" to be the same
@@ -61,6 +61,9 @@
 #warning "printf_tiny not built, does not support --xstack"
 #elif defined(_SDCC_NO_ASM_LIB_FUNCS)
 #warning "printf_tiny not built, _SDCC_NO_ASM_LIB_FUNCS defined"
+#else
+/* Disable "ISO C forbids an empty source file" wraning message */
+#pragma disable_warning 190
 #endif
 #else // defines are compatible with printf_tiny
 
@@ -136,7 +139,7 @@ printf_format_c:
 
 printf_format_d:
        //cjne  a, #'d', printf_format_u
-       cjne    a, #100, printf_format_u
+       cjne    a, #100, printf_format_x
 #ifndef ALWAYS_PRINT_UNSIGNED
        mov     a, @r0
        jnb     acc.7, printf_uint