source: trunk/WRF.COMMON/WRFV3/external/io_grib2/g2lib/mova2i.c @ 2759

Last change on this file since 2759 was 2759, checked in by aslmd, 2 years ago

adding unmodified code from WRFV3.0.1.1, expurged from useless data +1M size

File size: 1.1 KB
Line 
1/*$$$  SUBPROGRAM DOCUMENTATION BLOCK
2C                .      .    .                                       .
3C SUBPROGRAM:    mova2i      Moves a bit string from a char*1 to int
4C   PRGMMR: Gilbert          ORG: W/NP11     DATE: 02-08-15
5C
6C ABSTRACT: This Function copies a bit string from a Character*1 variable
7C   to an integer variable.  It is intended to replace the Fortran Intrinsic
8C   Function ICHAR, which only supports 0 <= ICHAR(a) <= 127 on the
9C   IBM SP.  If "a" is greater than 127 in the collating sequence,
10C   ICHAR(a) does not return the expected bit value.
11C   This function can be used for all values 0 <= ICHAR(a) <= 255.
12C
13C PROGRAM HISTORY LOG:
14C   98-12-15  Gilbert
15C
16C USAGE:     I = mova2i(a)
17C
18C   INPUT ARGUMENT :
19C
20C          a - Character*1 variable that holds the bitstring to extract
21C
22C   RETURN ARGUMENT :
23C
24C          mova2i - Integer value of the bitstring in character a
25C
26C REMARKS:
27C
28C      None
29C
30C ATTRIBUTES:
31C   LANGUAGE: C
32C   MACHINE:  IBM SP
33
34C
35C$$$i*/
36
37#include "proto.h"
38
39int MOVA2I(unsigned char *a)
40{
41    return (int)(*a);
42}
Note: See TracBrowser for help on using the repository browser.