updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / bufr / cmpia.c
blobcec2a25ff95168a8dfb29f6714fe6b8044aa4754
1 /*$$$ SUBPROGRAM DOCUMENTATION BLOCK
3 C SUBPROGRAM: CMPIA
4 C PRGMMR: ATOR ORG: NP12 DATE: 2009-03-23
6 C ABSTRACT: THIS ROUTINE DEFINES A COMPARISON BETWEEN TWO INTEGERS
7 C FOR USE BY THE BINARY SEARCH FUNCTION BSEARCH.
9 C PROGRAM HISTORY LOG:
10 C 2009-03-23 J. ATOR -- ORIGINAL AUTHOR
12 C USAGE: CALL CMPIA( PF1, PF2 )
13 C INPUT ARGUMENT LIST:
14 C PF1 - INTEGER: FIRST INTEGER TO BE COMPARED
15 C PF2 - INTEGER: SECOND INTEGER TO BE COMPARED
17 C OUTPUT ARGUMENT LIST:
18 C CMPIA - INTEGER: RESULT OF COMPARISON:
19 C -1 = PF1 is less than PF2
20 C 0 = PF1 is equal to PF2
21 C 1 = PF1 is greater than PF2
23 C REMARKS:
24 C THIS ROUTINE CALLS: None
25 C THIS ROUTINE IS CALLED BY: NUMMTB
26 C Normally not called by any application
27 C programs.
29 C ATTRIBUTES:
30 C LANGUAGE: C
31 C MACHINE: PORTABLE TO ALL PLATFORMS
33 C$$$*/
35 #include "bufrlib.h"
37 int cmpia( const f77int *pf1, const f77int *pf2 )
39 if ( *pf1 == *pf2 ) return 0;
41 return ( *pf1 < *pf2 ? -1 : 1 );