Index: uspace/app/tester/print/print6.c
===================================================================
--- uspace/app/tester/print/print6.c	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/app/tester/print/print6.c	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -1,2 +1,30 @@
+/*
+ * Copyright (c) 2012 Adam Hraska
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include <stdio.h>
 #include <unistd.h>
@@ -4,7 +32,4 @@
 
 #include <str.h>
-
-
-
 
 const char *test_print6(void)
@@ -28,5 +53,8 @@
 		{ 0.099999999999999999, "%g",  "0.1", 0 },   
 
-		/* gcc and msvc convert "3.4567e-317" to different binary doubles. */
+		/*
+		 * gcc and msvc convert "3.4567e-317" to different binary
+		 * doubles.
+		 */
 		{ 3.4567e-317, "%g",  "3.4567e-317", "3.456998e-317" },   
 		{ 3.4567e-318, "%g",  "3.4567e-318", 0 },   
@@ -56,38 +84,56 @@
 
 		/* full padding */
-		{ 1e-1, "%+010.3e",  "+1.000e-01", 0 },  /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+
+		/* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+		{ 1e-1, "%+010.3e",  "+1.000e-01", 0 },
 		{ 1e-1, "%+10.3e",  "+1.000e-01", 0 },   
-		{ 1e-1, "%+-10.3e",  "+1.000e-01", 0 },  /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_LEFTALIGNED */
+		/* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_LEFTALIGNED */
+		{ 1e-1, "%+-10.3e",  "+1.000e-01", 0 },
 
 		/* padding */
-		{ 1e-1, "%+010.2e",  "+01.00e-01", 0 },  /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+
+		/* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+		{ 1e-1, "%+010.2e",  "+01.00e-01", 0 },
 		{ 1e-1, "%+10.2e",  " +1.00e-01", 0 },   
-		{ 1e-1, "%+-10.2e",  "+1.00e-01 ", 0 },  /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_LEFTALIGNED */
-
-		{ 1e-1, "% 010.2e",  " 01.00e-01", 0 },  /* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */
-		{ 1e-1, "%010.2e",  "001.00e-01", 0 },   /* __PRINTF_FLAG_ZEROPADDED */
-		{ 1e-1, "% 10.2e",  "  1.00e-01", 0 },   /* __PRINTF_FLAG_SPACESIGN */
+		/* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_LEFTALIGNED */
+		{ 1e-1, "%+-10.2e",  "+1.00e-01 ", 0 },
+		/* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */
+		{ 1e-1, "% 010.2e",  " 01.00e-01", 0 },
+		/* __PRINTF_FLAG_ZEROPADDED */
+		{ 1e-1, "%010.2e",  "001.00e-01", 0 },
+		/* __PRINTF_FLAG_SPACESIGN */
+		{ 1e-1, "% 10.2e",  "  1.00e-01", 0 },
 		{ 1e-1, "%10.2e",  "  1.00e-01", 0 },   
 
 		/* padding fractionals */
-		{ 1.08e29, "%+010.3e",  "+1.080e+29", 0 },  /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+
+		/* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+		{ 1.08e29, "%+010.3e",  "+1.080e+29", 0 },
 		{ 1.08e29, "%+10.3e",  "+1.080e+29", 0 },  
-		{ 1.08e29, "%+011.2e",  "+001.08e+29", 0 }, /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+		/* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */
+		{ 1.08e29, "%+011.2e",  "+001.08e+29", 0 },
 		{ 1.085e29, "%11.2e", "   1.09e+29", 0 },   
 
 		/* rounding */
+
 		{ 1.345e2, "%+10.2e",  " +1.35e+02", 0 }, 
 		{ 9.995e2, "%+10.2e",  " +1.00e+03", 0 }, 
 		{ -9.99499999e2, "%10.2e",  " -9.99e+02", 0 },   
 		{ -9.99499999e2, "%10.0e",  "    -1e+03", 0 },   
-		{ -9.99499999e2, "%#10.0e",  "   -1.e+03", 0 }, /* __PRINTF_FLAG_DECIMALPT */
-		{ -1.2345006789e+231, "%#10.10e",   "-1.2345006789e+231", 0 },  /* __PRINTF_FLAG_DECIMALPT */
-		{ -1.23450067995e+231, "%#10.10e",  "-1.2345006800e+231", 0 },  /* __PRINTF_FLAG_DECIMALPT */
+		/* __PRINTF_FLAG_DECIMALPT */
+		{ -9.99499999e2, "%#10.0e",  "   -1.e+03", 0 },
+		/* __PRINTF_FLAG_DECIMALPT */
+		{ -1.2345006789e+231, "%#10.10e",   "-1.2345006789e+231", 0 },
+		/* __PRINTF_FLAG_DECIMALPT */
+		{ -1.23450067995e+231, "%#10.10e",  "-1.2345006800e+231", 0 },
 			
 		/* special */
+
 		{ 1e300 * 1e300, "%10.5e",  "       inf", 0 },   
 		{ -1.0 /(1e300 * 1e300), "%10.2e",  " -0.00e+00", 0 },   
-		{ 1e300 * 1e300, "%10.5E",  "       INF", 0 },          /* __PRINTF_FLAG_BIGCHARS */
-		{ -1.0 /(1e300 * 1e300), "%10.2E",  " -0.00E+00", 0 },  /* __PRINTF_FLAG_BIGCHARS */
+		/* __PRINTF_FLAG_BIGCHARS */
+		{ 1e300 * 1e300, "%10.5E",  "       INF", 0 },
+		/* __PRINTF_FLAG_BIGCHARS */
+		{ -1.0 /(1e300 * 1e300), "%10.2E",  " -0.00E+00", 0 },
 
 		/*
@@ -96,10 +142,18 @@
 		 
 		/* padding */
-		{ 1e-1, "% 010.3f",  " 00000.100", 0 },  /* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */
-		{ 1e-1, "% 0-10.3f",  " 0.100    ", 0 }, /* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED | __PRINTF_FLAG_LEFTALIGNED */
-		{ 1e-1, "% 010.3f",  " 00000.100", 0 },  /* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */
+
+		/* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */
+		{ 1e-1, "% 010.3f",  " 00000.100", 0 },
+		/*
+		 * __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED |
+		 * __PRINTF_FLAG_LEFTALIGNED
+		 */
+		{ 1e-1, "% 0-10.3f",  " 0.100    ", 0 },
+		/* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */
+		{ 1e-1, "% 010.3f",  " 00000.100", 0 },
 		{ 1e-1, "%10.3f",  "     0.100", 0 },   
 
 		/* rounding */
+
 		{ -0.0, "%10.0f",     "        -0", 0 },   
 		{ -0.099, "%+10.3f",   "    -0.099", 0 }, 
@@ -111,11 +165,15 @@
 		{ 0.1, "%+10.6f",      " +0.100000", 0 }, 
 
-		/* The compiler will go for closer 0.10..055 instead of 0.09..917 */
+		/*
+		 * The compiler will go for closer 0.10..055 instead of
+		 * 0.09..917
+		 */
 		{ 0.1, "%+10.20f",  "+0.10000000000000000550", 0 },  
 		/* Next closest to 0.1 */
-		{ 0.0999999999999999917, "%+10.20f",  "+0.09999999999999999170", 0 }, 
-		{ 0.0999999999999999917, "%+10f",  " +0.100000", 0 },
-		{ 0.0999999999999998945, "%10.20f",  "0.09999999999999989450", 0 },   
-		
+		{ 0.0999999999999999917, "%+10.20f", "+0.09999999999999999170",
+		    0 }, 
+		{ 0.0999999999999999917, "%+10f",    " +0.100000", 0 },
+		{ 0.0999999999999998945, "%10.20f",  "0.09999999999999989450",
+		    0 },   
 	};
 
@@ -125,5 +183,6 @@
 	char buf[256 + 1] = { 0 };
 	
-	TPRINTF("Test printing of floating point numbers via printf(\"%%f\"):\n");
+	TPRINTF("Test printing of floating point numbers via "
+	    "printf(\"%%f\"):\n");
 	
 	for (int i = 0; i < patterns_len; ++i) {
@@ -131,12 +190,15 @@
 		snprintf(buf, buf_size, pat[i].fmt, pat[i].val);
 		
-		if (0 == str_cmp(buf, pat[i].exp_str)) {
-			TPRINTF("ok:  %s |%s| == |%s|\n", pat[i].fmt, buf, pat[i].exp_str);
+		if (!str_cmp(buf, pat[i].exp_str)) {
+			TPRINTF("ok:  %s |%s| == |%s|\n",
+			    pat[i].fmt, buf, pat[i].exp_str);
 		} else {
-			if (pat[i].warn_str && 0 == str_cmp(buf, pat[i].warn_str)) {
-				TPRINTF("warn: %s |%s| != |%s|\n", pat[i].fmt, buf, pat[i].exp_str);
+			if (pat[i].warn_str && !str_cmp(buf, pat[i].warn_str)) {
+				TPRINTF("warn: %s |%s| != |%s|\n",
+				    pat[i].fmt, buf, pat[i].exp_str);
 			} else {
 				++failed;
-				TPRINTF("ERR: %s |%s| != |%s|\n", pat[i].fmt, buf, pat[i].exp_str);
+				TPRINTF("ERR: %s |%s| != |%s|\n",
+				    pat[i].fmt, buf, pat[i].exp_str);
 			}
 		}
Index: uspace/lib/c/generic/double_to_str.c
===================================================================
--- uspace/lib/c/generic/double_to_str.c	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/lib/c/generic/double_to_str.c	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -26,4 +26,5 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #include <double_to_str.h>
 
Index: uspace/lib/c/generic/ieee_double.c
===================================================================
--- uspace/lib/c/generic/ieee_double.c	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/lib/c/generic/ieee_double.c	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -26,4 +26,5 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #include <ieee_double.h>
 
Index: uspace/lib/c/generic/power_of_ten.c
===================================================================
--- uspace/lib/c/generic/power_of_ten.c	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/lib/c/generic/power_of_ten.c	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -26,4 +26,5 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #include "private/power_of_ten.h"
 
Index: uspace/lib/c/generic/private/power_of_ten.h
===================================================================
--- uspace/lib/c/generic/private/power_of_ten.h	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/lib/c/generic/private/power_of_ten.h	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -26,4 +26,5 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef POWER_OF_TEN_H_
 #define POWER_OF_TEN_H_
@@ -32,8 +33,5 @@
 struct fp_num_t_tag;
 
-
-void get_power_of_ten(int binary_exp, struct fp_num_t_tag *power_of_10, 
-	int *decimal_exp);
-
+extern void get_power_of_ten(int, struct fp_num_t_tag *, int *);
 
 #endif
Index: uspace/lib/c/include/double_to_str.h
===================================================================
--- uspace/lib/c/include/double_to_str.h	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/lib/c/include/double_to_str.h	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -26,4 +26,5 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef DOUBLE_TO_STR_H_
 #define DOUBLE_TO_STR_H_
@@ -45,15 +46,10 @@
 #define MAX_DOUBLE_STR_BUF_SIZE  21
 
-
 /* Fwd decl.*/
 struct ieee_double_t_tag;
 
-
-int double_to_short_str(struct ieee_double_t_tag val, char *buf, size_t buf_size, 
-	int *dec_exponent);
-
-int double_to_fixed_str(struct ieee_double_t_tag ieee_val, int signif_d_cnt,
-	int frac_d_cnt, char *buf, size_t buf_size, int *dec_exponent);
-
+extern int double_to_short_str(struct ieee_double_t_tag, char *, size_t, int *);
+extern int double_to_fixed_str(struct ieee_double_t_tag, int, int, char *,
+    size_t, int *);
 
 #endif 
Index: uspace/lib/c/include/ieee_double.h
===================================================================
--- uspace/lib/c/include/ieee_double.h	(revision 34b92999226bf07be2f5361c23d768bda9cfc55e)
+++ uspace/lib/c/include/ieee_double.h	(revision 82d062d84ee0879d721eb52383c754e968797d93)
@@ -26,4 +26,5 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef IEEE_DOUBLE_H_
 #define IEEE_DOUBLE_H_
@@ -31,5 +32,4 @@
 #include <stdint.h>
 #include <bool.h>
-
 
 /** Represents a non-negative floating point number: significand * 2^exponent */
@@ -40,5 +40,4 @@
 	int exponent;
 } fp_num_t;
-
 
 /** Double number description according to IEEE 754. */
@@ -66,6 +65,5 @@
 } ieee_double_t;
 
-
-ieee_double_t extract_ieee_double(double val);
+extern ieee_double_t extract_ieee_double(double);
 
 #endif
