NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
cmpstia2.c File Reference

Define a comparison between two master Code/Flag table entries. More...

#include "bufrlib.h"
#include "cfe.h"

Go to the source code of this file.

Functions

int cmpstia2 (const void *pe1, const void *pe2)
 This function defines a comparison between two entries within the internal memory structure for storage of master Code/Flag table entries. More...
 

Detailed Description

Define a comparison between two master Code/Flag table entries.

Definition in file cmpstia2.c.

Function Documentation

int cmpstia2 ( const void *  pe1,
const void *  pe2 
)

This function defines a comparison between two entries within the internal memory structure for storage of master Code/Flag table entries.

The comparison is used by the intrinsic C function bsearch, and it differs from the the comparison in function cmpstia1() because it only compares the iffxyn and ifval components of the structure, whereas cmpstia1() compares all of the iffxyn, ifval, iffxynd and ifvald components of the structure.

Author
J. Ator
Date
2017-11-13
Parameters
[in]pe1- struct code_flag_entry*: First master Code/Flag table entry
[in]pe2- struct code_flag_entry*: Second master Code/Flag table entry
Returns
cmpstia2 - integer:
  • -1 = pe1 is less than pe2
  • 0 = pe1 is equal to pe2
  • 1 = pe1 is greater than pe2

Program history log:

  • 2017-11-13 J. Ator – Original author

Definition at line 32 of file cmpstia2.c.

References code_flag_entry::iffxyn, and code_flag_entry::ifval.

Referenced by srchtbf().