NCEPLIBS-bufr  11.5.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 
20 void inittbf( void )
21 {
22  char brtstr[50] = "BUFRLIB: INITTBF FAILED ALLOCATING CFE";
23 
24  /*
25  ** Has array space for the internal memory structure been
26  ** allocated yet?
27  */
28  if ( cfe == NULL ) {
29 
30  mxmtbf = igetprm( "MXMTBF", 6 );
31 
32  if ( ( cfe = malloc( mxmtbf * sizeof(struct code_flag_entry) ) )
33  == NULL ) {
34  bort( brtstr, ( f77int ) strlen( brtstr ) );
35  }
36  }
37 
38  nmtf = 0;
39 }
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:20
INTEGER function igetprm(CPRMNM)
This function returns the current value of a parameter used for allocating one or more internal array...
Definition: igetprm.f:81
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:23
Define signatures and declare variables for internal storage of master Code/Flag table entries...