NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
strtbfe.c
Go to the documentation of this file.
1 
4 #include "bufrlib.h"
5 #include "cfe.h"
6 
31 void strtbfe( f77int *ifxyn, f77int *ival, char *meaning, f77int *lmeaning,
32  f77int *idfxy, f77int *idval )
33 {
34  unsigned int mnlen;
35 
36  static char brtstr[50] = "BUFRLIB: STRTBFE - MXMTBF OVERFLOW";
37 
38  /*
39  ** Confirm that there's room for another entry in the structure.
40  */
41  if ( nmtf >= mxmtbf ) bort( brtstr, ( f77int ) strlen( brtstr ) );
42 
43  /*
44  ** Store the new entry.
45  */
46  cfe[nmtf].iffxyn = *ifxyn;
47  cfe[nmtf].ifval = *ival;
48  mnlen = ( *lmeaning > MAX_MEANING_LEN ? MAX_MEANING_LEN : *lmeaning );
49  strncpy( &cfe[nmtf].ifmeaning[0], meaning, mnlen );
50  cfe[nmtf].ifmeaning[mnlen] = '\0';
51  cfe[nmtf].iffxynd = *idfxy;
52  cfe[nmtf].ifvald = *idval;
53  nmtf++;
54 }
Define signatures to enable a number of BUFRLIB subprograms to be called directly from C application ...
f77int mxmtbf
Maximum number of master Code/Flag table entries, counting across all individual Code/Flag tables...
f77int ifval
Code figure or bit number.
Definition: cfe.h:52
f77int iffxynd
Bitwise representation of FXY number upon which this entry is dependent, if any.
Definition: cfe.h:54
char ifmeaning[MAX_MEANING_LEN+1]
Meaning corresponding to ifval.
Definition: cfe.h:53
void strtbfe(f77int *, f77int *, char *, f77int *, f77int *, f77int *)
This subroutine adds a new entry to the internal memory structure for storage of master Code/Flag tab...
Definition: strtbfe.c:31
f77int nmtf
Number of stored master Code/Flag table entries in cfe, up to a maximum of MXMTBF.
f77int ifvald
Code figure or bit number upon which this entry is dependent, if any.
Definition: cfe.h:55
f77int iffxyn
Bitwise representation of FXY number to which this entry belongs.
Definition: cfe.h:51
struct code_flag_entry * cfe
Master Code/Flag table entries.
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
Define signatures and declare variables for internal storage of master Code/Flag table entries...