Source-Changes-HG archive

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

[src/trunk]: src Update to C89 style.



details:   https://anonhg.NetBSD.org/src/rev/d586c55ec397
branches:  trunk
changeset: 766918:d586c55ec397
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 04 06:23:50 2011 +0000

description:
Update to C89 style.
Fix name of floatundidf (uns -> un).

diffstat:

 common/lib/libc/quad/quad.h  |   4 +-
 lib/libc/quad/Makefile.inc   |   4 +-
 lib/libc/quad/fixdfdi.c      |   7 ++--
 lib/libc/quad/fixunsdfdi.c   |   7 ++--
 lib/libc/quad/floatdidf.c    |   7 ++--
 lib/libc/quad/floatdisf.c    |   7 ++--
 lib/libc/quad/floatundidf.c  |  61 +++++++++++++++++++++++++++++++++++++++++++
 lib/libc/quad/floatunsdidf.c |  62 --------------------------------------------
 8 files changed, 77 insertions(+), 82 deletions(-)

diffs (276 lines):

diff -r a394f65e4136 -r d586c55ec397 common/lib/libc/quad/quad.h
--- a/common/lib/libc/quad/quad.h       Mon Jul 04 05:10:23 2011 +0000
+++ b/common/lib/libc/quad/quad.h       Mon Jul 04 06:23:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quad.h,v 1.1 2005/12/20 20:29:40 christos Exp $        */
+/*     $NetBSD: quad.h,v 1.2 2011/07/04 06:23:50 matt Exp $    */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -122,7 +122,7 @@
 u_quad_t __fixunssfdi __P((float));
 double __floatdidf __P((quad_t));
 float __floatdisf __P((quad_t));
-double __floatunsdidf __P((u_quad_t));
+double __floatundidf __P((u_quad_t));
 quad_t __iordi3 __P((quad_t, quad_t));
 quad_t __lshldi3 __P((quad_t, qshift_t));
 quad_t __lshrdi3 __P((quad_t, qshift_t));
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/Makefile.inc
--- a/lib/libc/quad/Makefile.inc        Mon Jul 04 05:10:23 2011 +0000
+++ b/lib/libc/quad/Makefile.inc        Mon Jul 04 06:23:50 2011 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.11 2009/12/06 05:34:42 uebayasi Exp $
+#      $NetBSD: Makefile.inc,v 1.12 2011/07/04 06:23:50 matt Exp $
 #      @(#)Makefile.inc        8.1 (Berkeley) 6/4/93
 
 # Quad support
 SRCS.quad=     cmpdi2.c divdi3.c fixdfdi.c fixsfdi.c fixunsdfdi.c \
-       fixunssfdi.c floatdidf.c floatdisf.c floatunsdidf.c \
+       fixunssfdi.c floatdidf.c floatdisf.c floatundidf.c \
        moddi3.c muldi3.c negdi2.c qdivrem.c \
        ucmpdi2.c udivdi3.c umoddi3.c 
 
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/fixdfdi.c
--- a/lib/libc/quad/fixdfdi.c   Mon Jul 04 05:10:23 2011 +0000
+++ b/lib/libc/quad/fixdfdi.c   Mon Jul 04 06:23:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fixdfdi.c,v 1.4 2003/08/07 16:43:16 agc Exp $  */
+/*     $NetBSD: fixdfdi.c,v 1.5 2011/07/04 06:23:50 matt Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)fixdfdi.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: fixdfdi.c,v 1.4 2003/08/07 16:43:16 agc Exp $");
+__RCSID("$NetBSD: fixdfdi.c,v 1.5 2011/07/04 06:23:50 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,8 +49,7 @@
  * We clamp anything that is out of range.
  */
 quad_t
-__fixdfdi(x)
-       double x;
+__fixdfdi(double x)
 {
        if (x < 0)
                if (x <= QUAD_MIN)
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/fixunsdfdi.c
--- a/lib/libc/quad/fixunsdfdi.c        Mon Jul 04 05:10:23 2011 +0000
+++ b/lib/libc/quad/fixunsdfdi.c        Mon Jul 04 06:23:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fixunsdfdi.c,v 1.7 2003/08/07 16:43:16 agc Exp $       */
+/*     $NetBSD: fixunsdfdi.c,v 1.8 2011/07/04 06:23:50 matt Exp $      */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)fixunsdfdi.c       8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: fixunsdfdi.c,v 1.7 2003/08/07 16:43:16 agc Exp $");
+__RCSID("$NetBSD: fixunsdfdi.c,v 1.8 2011/07/04 06:23:50 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -54,8 +54,7 @@
  * of range becomes UQUAD_MAX.
  */
 u_quad_t
-__fixunsdfdi(x)
-       double x;
+__fixunsdfdi(double x)
 {
        union uu t;
        unsigned int tmp;
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/floatdidf.c
--- a/lib/libc/quad/floatdidf.c Mon Jul 04 05:10:23 2011 +0000
+++ b/lib/libc/quad/floatdidf.c Mon Jul 04 06:23:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: floatdidf.c,v 1.6 2003/08/07 16:43:16 agc Exp $        */
+/*     $NetBSD: floatdidf.c,v 1.7 2011/07/04 06:23:50 matt Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)floatdidf.c        8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: floatdidf.c,v 1.6 2003/08/07 16:43:16 agc Exp $");
+__RCSID("$NetBSD: floatdidf.c,v 1.7 2011/07/04 06:23:50 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -48,8 +48,7 @@
  * Convert (signed) quad to double.
  */
 double
-__floatdidf(x)
-       quad_t x;
+__floatdidf(quad_t x)
 {
        double d;
        union uu u;
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/floatdisf.c
--- a/lib/libc/quad/floatdisf.c Mon Jul 04 05:10:23 2011 +0000
+++ b/lib/libc/quad/floatdisf.c Mon Jul 04 06:23:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: floatdisf.c,v 1.6 2003/08/07 16:43:16 agc Exp $        */
+/*     $NetBSD: floatdisf.c,v 1.7 2011/07/04 06:23:50 matt Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)floatdisf.c        8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: floatdisf.c,v 1.6 2003/08/07 16:43:16 agc Exp $");
+__RCSID("$NetBSD: floatdisf.c,v 1.7 2011/07/04 06:23:50 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -48,8 +48,7 @@
  * Convert (signed) quad to float.
  */
 float
-__floatdisf(x)
-       quad_t x;
+__floatdisf(quad_t x)
 {
        float f;
        union uu u;
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/floatundidf.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/quad/floatundidf.c       Mon Jul 04 06:23:50 2011 +0000
@@ -0,0 +1,61 @@
+/*     $NetBSD: floatundidf.c,v 1.1 2011/07/04 06:23:50 matt Exp $     */
+
+/*-
+ * Copyright (c) 1992, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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 <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)floatunsdidf.c     8.1 (Berkeley) 6/4/93";
+#else
+__RCSID("$NetBSD: floatundidf.c,v 1.1 2011/07/04 06:23:50 matt Exp $");
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+#include "quad.h"
+
+/*
+ * Convert (unsigned) quad to double.
+ * This is exactly like floatdidf.c except that negatives never occur.
+ */
+double
+__floatundidf(u_quad_t x)
+{
+       double d;
+       union uu u;
+
+       u.uq = x;
+       d = (double)u.ul[H] * (((int)1 << (INT_BITS - 2)) * 4.0);
+       d += u.ul[L];
+       return (d);
+}
diff -r a394f65e4136 -r d586c55ec397 lib/libc/quad/floatunsdidf.c
--- a/lib/libc/quad/floatunsdidf.c      Mon Jul 04 05:10:23 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*     $NetBSD: floatunsdidf.c,v 1.6 2003/08/07 16:43:16 agc Exp $     */
-
-/*-
- * Copyright (c) 1992, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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 <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)floatunsdidf.c     8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: floatunsdidf.c,v 1.6 2003/08/07 16:43:16 agc Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Convert (unsigned) quad to double.
- * This is exactly like floatdidf.c except that negatives never occur.
- */
-double
-__floatunsdidf(x)
-       u_quad_t x;
-{
-       double d;
-       union uu u;
-
-       u.uq = x;
-       d = (double)u.ul[H] * (((int)1 << (INT_BITS - 2)) * 4.0);
-       d += u.ul[L];
-       return (d);
-}



Home | Main Index | Thread Index | Old Index