NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
inittbf.c
Go to the documentation of this file.
1 
5 #include "bufrlib.h"
6 #define IN_INITTBF
7 #include "cfe.h"
8 
22 void inittbf( void )
23 {
24  char brtstr[50] = "BUFRLIB: INITTBF FAILED ALLOCATING CFE";
25 
26  /*
27  ** Has array space for the internal memory structure been
28  ** allocated yet?
29  */
30  if ( cfe == NULL ) {
31 
32  mxmtbf = igetprm( "MXMTBF", 6 );
33 
34  if ( ( cfe = malloc( mxmtbf * sizeof(struct code_flag_entry) ) )
35  == NULL ) {
36  bort( brtstr, ( f77int ) strlen( brtstr ) );
37  }
38  }
39 
40  nmtf = 0;
41 }
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...
void inittbf(void)
This subroutine initializes the internal memory structure for storage of master Code/Flag table entri...
Definition: inittbf.c:22
INTEGER function igetprm(CPRMNM)
This function returns the current value of a parameter used for allocating one or more internal array...
Definition: igetprm.f:83
f77int nmtf
Number of stored master Code/Flag table entries in cfe, up to a maximum of MXMTBF.
This structure contains array and variable declarations used to store a master Code/Flag table entry...
Definition: cfe.h:33
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...