NCEPLIBS-bufr  11.7.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 
33 void strtbfe( f77int *ifxyn, f77int *ival, char *meaning, f77int *lmeaning,
34  f77int *idfxy, f77int *idval )
35 {
36  unsigned int mnlen;
37 
38  static char brtstr[50] = "BUFRLIB: STRTBFE - MXMTBF OVERFLOW";
39 
40  /*
41  ** Confirm that there's room for another entry in the structure.
42  */
43  if ( nmtf >= mxmtbf ) bort( brtstr, ( f77int ) strlen( brtstr ) );
44 
45  /*
46  ** Store the new entry.
47  */
48  cfe[nmtf].iffxyn = *ifxyn;
49  cfe[nmtf].ifval = *ival;
50  mnlen = ( *lmeaning > MAX_MEANING_LEN ? MAX_MEANING_LEN : *lmeaning );
51  strncpy( &cfe[nmtf].ifmeaning[0], meaning, mnlen );
52  cfe[nmtf].ifmeaning[mnlen] = '\0';
53  cfe[nmtf].iffxynd = *idfxy;
54  cfe[nmtf].ifvald = *idval;
55  nmtf++;
56 }
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
Bit-wise 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:33
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
Bit-wise 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:22
Define signatures and declare variables for internal storage of master Code/Flag table entries...