1 /*$$$ SUBPROGRAM DOCUMENTATION BLOCK
3 C SUBPROGRAM: mova2i Moves a bit string from a char*1 to int
4 C PRGMMR: Gilbert ORG: W/NP11 DATE: 02-08-15
6 C ABSTRACT: This Function copies a bit string from a Character*1 variable
7 C to an integer variable. It is intended to replace the Fortran Intrinsic
8 C Function ICHAR, which only supports 0 <= ICHAR(a) <= 127 on the
9 C IBM SP. If "a" is greater than 127 in the collating sequence,
10 C ICHAR(a) does not return the expected bit value.
11 C This function can be used for all values 0 <= ICHAR(a) <= 255.
13 C PROGRAM HISTORY LOG:
16 C USAGE: I = mova2i(a)
20 C a - Character*1 variable that holds the bitstring to extract
24 C mova2i - Integer value of the bitstring in character a
39 int MOVA2I(unsigned char *a
)