Module Name:    src
Committed By:   matt
Date:           Mon Mar 19 22:23:11 UTC 2012

Modified Files:
        src/lib/libc/arch/mips/gen: fpgetmask.c fpgetround.c fpgetsticky.c
            fpsetmask.c fpsetround.c fpsetsticky.c

Log Message:
Convert to C89 definitions.
Cleanup up type usage.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/fpgetmask.c \
    src/lib/libc/arch/mips/gen/fpgetround.c \
    src/lib/libc/arch/mips/gen/fpgetsticky.c \
    src/lib/libc/arch/mips/gen/fpsetmask.c \
    src/lib/libc/arch/mips/gen/fpsetround.c \
    src/lib/libc/arch/mips/gen/fpsetsticky.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/gen/fpgetmask.c
diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.5 src/lib/libc/arch/mips/gen/fpgetmask.c:1.6
--- src/lib/libc/arch/mips/gen/fpgetmask.c:1.5	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/mips/gen/fpgetmask.c	Mon Mar 19 22:23:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -19,9 +19,9 @@ __weak_alias(fpgetmask,_fpgetmask)
 #endif
 
 fp_except
-fpgetmask()
+fpgetmask(void)
 {
-	int x;
+	fp_except x;
 
 	__asm("cfc1 %0,$31" : "=r" (x));
 	return (x >> 7) & 0x1f;
Index: src/lib/libc/arch/mips/gen/fpgetround.c
diff -u src/lib/libc/arch/mips/gen/fpgetround.c:1.5 src/lib/libc/arch/mips/gen/fpgetround.c:1.6
--- src/lib/libc/arch/mips/gen/fpgetround.c:1.5	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/mips/gen/fpgetround.c	Mon Mar 19 22:23:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -19,9 +19,9 @@ __weak_alias(fpgetround,_fpgetround)
 #endif
 
 fp_rnd
-fpgetround()
+fpgetround(void)
 {
-	int x;
+	fp_rnd x;
 
 	__asm("cfc1 %0,$31" : "=r" (x));
 	return x & 0x03;
Index: src/lib/libc/arch/mips/gen/fpgetsticky.c
diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.5 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.6
--- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.5	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/mips/gen/fpgetsticky.c	Mon Mar 19 22:23:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -19,9 +19,9 @@ __weak_alias(fpgetsticky,_fpgetsticky)
 #endif
 
 fp_except
-fpgetsticky()
+fpgetsticky(void)
 {
-	int x;
+	fp_except x;
 
 	__asm("cfc1 %0,$31" : "=r" (x));
 	return (x >> 2) & 0x1f;
Index: src/lib/libc/arch/mips/gen/fpsetmask.c
diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.5 src/lib/libc/arch/mips/gen/fpsetmask.c:1.6
--- src/lib/libc/arch/mips/gen/fpsetmask.c:1.5	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/mips/gen/fpsetmask.c	Mon Mar 19 22:23:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -19,16 +19,14 @@ __weak_alias(fpsetmask,_fpsetmask)
 #endif
 
 fp_except
-fpsetmask(mask)
-	fp_except mask;
+fpsetmask(fp_except mask)
 {
 	fp_except old;
 	fp_except new;
 
 	__asm("cfc1 %0,$31" : "=r" (old));
 
-	new = old;
-	new &= ~(0x1f << 7); 
+	new = old & ~(0x1f << 7); 
 	new |= ((mask & 0x1f) << 7);
 
 	__asm("ctc1 %0,$31" : : "r" (new));
Index: src/lib/libc/arch/mips/gen/fpsetround.c
diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.5 src/lib/libc/arch/mips/gen/fpsetround.c:1.6
--- src/lib/libc/arch/mips/gen/fpsetround.c:1.5	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/mips/gen/fpsetround.c	Mon Mar 19 22:23:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpsetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -19,17 +19,15 @@ __weak_alias(fpsetround,_fpsetround)
 #endif
 
 fp_rnd
-fpsetround(rnd_dir)
-	fp_rnd rnd_dir;
+fpsetround(fp_rnd rnd_dir)
 {
 	fp_rnd old;
 	fp_rnd new;
 
 	__asm("cfc1 %0,$31" : "=r" (old));
 
-	new = old;
-	new &= ~0x03;
-	new |= (rnd_dir & 0x03);
+	new = old & ~0x03;
+	new |= rnd_dir & 0x03;
 
 	__asm("ctc1 %0,$31" : : "r" (new));
 
Index: src/lib/libc/arch/mips/gen/fpsetsticky.c
diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.5 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.6
--- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.5	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/mips/gen/fpsetsticky.c	Mon Mar 19 22:23:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpsetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -19,17 +19,15 @@ __weak_alias(fpsetsticky,_fpsetsticky)
 #endif
 
 fp_except
-fpsetsticky(sticky)
-	fp_except sticky;
+fpsetsticky(fp_except sticky)
 {
 	fp_except old;
 	fp_except new;
 
 	__asm("cfc1 %0,$31" : "=r" (old));
 
-	new = old;
-	new &= ~(0x1f << 2); 
-	new |= ((sticky & 0x1f) << 2);
+	new = old & ~(0x1f << 2); 
+	new |= (sticky & 0x1f) << 2;
 
 	__asm("ctc1 %0,$31" : : "r" (new));
 

Reply via email to