summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2009-09-11 21:50:47 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2009-09-11 21:50:47 (GMT)
commitdd68ba15ea6b483b307ccce4e34a08e108cd93a6 (patch)
tree1cb201979e49708ef0928aee51089bb7ae10fb32
parent5f3a7254c11733038f595f4af4b0ecbbdac2ab2b (diff)
downloadhdf5-dd68ba15ea6b483b307ccce4e34a08e108cd93a6.zip
hdf5-dd68ba15ea6b483b307ccce4e34a08e108cd93a6.tar.gz
hdf5-dd68ba15ea6b483b307ccce4e34a08e108cd93a6.tar.bz2
[svn-r17470] Bug fix:
Bug 1653 - H5_LINK_* values defined in H5f90global.f90 are incorrect The Fortran EQUIVALENCE constant variables did not match those from the C definitions, fixed. Missed because there is not a Fortran test function that uses these constants. Tested: smirom (ifort, g95)
-rw-r--r--fortran/src/H5f90global.f909
1 files changed, 4 insertions, 5 deletions
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index e037d12..49d9398 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -473,7 +473,6 @@ MODULE H5GLOBAL
INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6
INTEGER :: H5L_flags(H5L_FLAGS_LEN)
- INTEGER :: H5L_LINK_F
INTEGER :: H5L_LINK_ERROR_F
INTEGER :: H5L_LINK_HARD_F
INTEGER :: H5L_LINK_SOFT_F
@@ -485,10 +484,10 @@ MODULE H5GLOBAL
!DEC$endif
COMMON /H5L_FLAGS/ H5L_flags
- EQUIVALENCE(H5L_flags(1), H5L_LINK_F)
- EQUIVALENCE(H5L_flags(2), H5L_LINK_ERROR_F)
- EQUIVALENCE(H5L_flags(3), H5L_LINK_HARD_F)
- EQUIVALENCE(H5L_flags(4), H5L_LINK_SOFT_F)
+ EQUIVALENCE(H5L_flags(1), H5L_LINK_ERROR_F)
+ EQUIVALENCE(H5L_flags(2), H5L_LINK_HARD_F)
+ EQUIVALENCE(H5L_flags(3), H5L_LINK_SOFT_F)
+ EQUIVALENCE(H5L_flags(4), H5L_LINK_EXTERNAL_F)
EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F)
EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F)
!
_8_3_1_io_rewrite Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_get_int.c
blob: 762cb234b0f00ce72217ad69c9188a54d377ff19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <tommath.h>
#ifdef BN_MP_GET_INT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
 */

/* get the lower 32-bits of an mp_int */
unsigned long mp_get_int(mp_int * a) 
{
  int i;
  unsigned long res;

  if (a->used == 0) {
     return 0;
  }

  /* get number of digits of the lsb we have to read */
  i = MIN(a->used,(int)((sizeof(unsigned long)*CHAR_BIT+DIGIT_BIT-1)/DIGIT_BIT))-1;

  /* get most significant digit of result */
  res = DIGIT(a,i);
   
  while (--i >= 0) {
    res = (res << DIGIT_BIT) | DIGIT(a,i);
  }

  /* force result to 32-bits always so it is consistent on non 32-bit platforms */
  return res & 0xFFFFFFFFUL;
}
#endif