[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r8808 - in /libdfp/trunk: Makefile.in printf_dfp.c



Author: ryanarn
Date: Wed Aug 12 14:23:54 2009
New Revision: 8808

Log:
2009-08-12  Carlos Eduardo Seo  <cseo@xxxxxxxxxxxxxxxxxx>

	* Makefile.in: Added 'make install0headers' feature.

2009-08-12  Ryan S. Arnold  <rsa@xxxxxxxxxx>

	* printf_dfp.c: (padn, wpadn): Changed usage of size_t to 'int' to
	avoid compiler warnings about unsigned to signed comparisons.

Modified:
    libdfp/trunk/Makefile.in
    libdfp/trunk/printf_dfp.c

Modified: libdfp/trunk/Makefile.in
==============================================================================
--- libdfp/trunk/Makefile.in (original)
+++ libdfp/trunk/Makefile.in Wed Aug 12 14:23:54 2009
@@ -307,6 +307,12 @@
 	$(INSTALL) -t $(install_root)/$(includedir)/dfp '$(top_srcdir)'/dfp/*
 .PHONY: install
 
+install-headers:
+	$(INSTALL) -d $(install_root)/$(includedir)
+	$(INSTALL) -d $(install_root)/$(includedir)/dfp
+	$(INSTALL) -t $(install_root)/$(includedir)/dfp '$(top_srcdir)'/dfp/*
+.PHONY: install-headers
+
 # Clean out the existing .SUFFIXES setting.
 .SUFFIXES:
 # Prioritize .S over .c when searching for target files.  The .os suffix

Modified: libdfp/trunk/printf_dfp.c
==============================================================================
--- libdfp/trunk/printf_dfp.c (original)
+++ libdfp/trunk/printf_dfp.c Wed Aug 12 14:23:54 2009
@@ -61,11 +61,11 @@
    the GNU I/O library.	 */
 //#define PUT(f, s, n) _IO_sputn (f, s, n)
 
-static size_t
-wpadn (FILE *fp, wint_t pad, size_t count)
-{
-  unsigned int i;
-  size_t written = 0;
+static int
+wpadn (FILE *fp, wint_t pad, int count)
+{
+  int i;
+  int written = 0;
 
   for (i=0;i<count;i++)
       if(putwc(pad,fp) != WEOF)
@@ -74,11 +74,11 @@
   return written;
 }
 
-static size_t
-padn (FILE *fp, int pad, size_t count)
-{
-  unsigned int i;
-  size_t written = 0;
+static int
+padn (FILE *fp, int pad, int count)
+{
+  int i;
+  int written = 0;
 
   for (i=0;i<count;i++)
       if(putc(pad,fp) != EOF)
@@ -130,7 +130,7 @@
 #define PADN(ch, len)							      \
   do									      \
     {									      \
-      if (PAD (fp, ch, len) != len)					      \
+      if ((PAD (fp, ch, len)) != len)					      \
 	{								      \
 	  return -1;							      \
 	}								      \