[cig-commits] [commit] master: Use C99 standard prototypes. (90ce0b4)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed May 28 16:39:24 PDT 2014
Repository : https://github.com/geodynamics/mineos
On branch : master
Link : https://github.com/geodynamics/mineos/compare/c6341bf3dc36459c07734e59a714f753e7bcf0f1...2e05ec42f5c0138df76d1dd962184215a5d3681a
>---------------------------------------------------------------
commit 90ce0b44025581f5ab4685973768f8427e7d4b7d
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date: Wed May 28 19:38:12 2014 -0400
Use C99 standard prototypes.
This probably fixes a build error on Macs that someone mentioned on the
seismo list.
>---------------------------------------------------------------
90ce0b44025581f5ab4685973768f8427e7d4b7d
fdb/swapn.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/fdb/swapn.c b/fdb/swapn.c
index 68796eb..02d4771 100644
--- a/fdb/swapn.c
+++ b/fdb/swapn.c
@@ -29,35 +29,28 @@
#include "config.h"
#define SWAP2(a, b) { (a) ^= (b); (b) ^= (a); (a) ^= (b); }
-F77_FUNC(swap,SWAP)(c, b, N, n)
- char *c;
- char *b;
- int *N;
- int *n;
+void
+F77_FUNC(swap,SWAP)(char *c, char *b, int *N, int *n)
{
int i, j;
memcpy((void *)b, (void *)c,(*n)*(*N));
for (i = 0; i < (*n)*(*N); i += *N)
for (j = 0; j < *N/2; j ++)
SWAP2(b[i + j], b[i + *N - j - 1]);
- return;
}
+
/*
- *
* Byte swap in place an array b of n of elements each one N bytes long.
* A good compiler should unroll the inner loops. Letting the compiler do it
* gives us portability. Note that we might want to isolate the
* cases N = 2, 4, 8 (and 16 for long double and perhaps long long)
*
*/
-F77_FUNC(swap1,SWAP1)(b, N, n)
- unsigned char *b;
- int *N;
- int *n;
+void
+F77_FUNC(swap1,SWAP1)(unsigned char *b, int *N, int *n)
{
int i, j;
for (i = 0; i < (*n)*(*N); i += *N)
for (j = 0; j < *N/2; j ++)
SWAP2(b[i + j], b[i + *N - j - 1]);
- return;
}
More information about the CIG-COMMITS
mailing list