NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
cmpstia1.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 cmpstia1 (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 cmpstia1.c.

Function Documentation

int cmpstia1 ( 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 functions qsort and bsearch, and it differs from the the comparison in function cmpstia2() because it compares all of the iffxyn, ifval, iffxynd and ifvald components of the structure, whereas cmpstia2() only compares the iffxyn and ifval components.

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
cmpstia1 - 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 cmpstia1.c.

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

Referenced by sorttbf(), and srchtbf().