39 char brtstr[50] =
"BUFRLIB: ARALLOCC FAILED ALLOCATING ";
51 nfiles =
igetprm(
"NFILES", 6 );
53 if ( (
pb = malloc( (nfiles+1) *
sizeof(FILE *) ) ) == NULL ) {
54 strcat( brtstr,
"PB" );
55 bort( brtstr, ( f77int ) strlen( brtstr ) );
58 if ( (
lstpos = malloc( (nfiles+1) *
sizeof(fpos_t) ) ) == NULL ) {
59 strcat( brtstr,
"LSTPOS" );
60 bort( brtstr, ( f77int ) strlen( brtstr ) );
67 mxmtbb =
igetprm(
"MXMTBB", 6 );
68 mxmtbd =
igetprm(
"MXMTBD", 6 );
71 if ( ( MSTABS_BASE(ibfxyn) = malloc( mxmtbb *
sizeof(f77int) ) ) == NULL ) {
72 strcat( brtstr,
"IBFXYN" );
73 bort( brtstr, ( f77int ) strlen( brtstr ) );
76 if ( ( MSTABS_BASE(cbscl) = malloc( mxmtbb * 4 *
sizeof(
char) ) ) == NULL ) {
77 strcat( brtstr,
"CBSCL" );
78 bort( brtstr, ( f77int ) strlen( brtstr ) );
81 if ( ( MSTABS_BASE(cbsref) = malloc( mxmtbb * 12 *
sizeof(
char) ) ) == NULL ) {
82 strcat( brtstr,
"CBSREF" );
83 bort( brtstr, ( f77int ) strlen( brtstr ) );
86 if ( ( MSTABS_BASE(cbbw) = malloc( mxmtbb * 4 *
sizeof(
char) ) ) == NULL ) {
87 strcat( brtstr,
"CBBW" );
88 bort( brtstr, ( f77int ) strlen( brtstr ) );
91 if ( ( MSTABS_BASE(cbunit) = malloc( mxmtbb * 24 *
sizeof(
char) ) ) == NULL ) {
92 strcat( brtstr,
"CBUNIT" );
93 bort( brtstr, ( f77int ) strlen( brtstr ) );
96 if ( ( MSTABS_BASE(cbmnem) = malloc( mxmtbb * 8 *
sizeof(
char) ) ) == NULL ) {
97 strcat( brtstr,
"CBMNEM" );
98 bort( brtstr, ( f77int ) strlen( brtstr ) );
101 if ( ( MSTABS_BASE(cbelem) = malloc( mxmtbb * 120 *
sizeof(
char) ) ) == NULL ) {
102 strcat( brtstr,
"CBELEM" );
103 bort( brtstr, ( f77int ) strlen( brtstr ) );
106 if ( ( MSTABS_BASE(idfxyn) = malloc( mxmtbd *
sizeof(f77int) ) ) == NULL ) {
107 strcat( brtstr,
"IDFXYN" );
108 bort( brtstr, ( f77int ) strlen( brtstr ) );
111 if ( ( MSTABS_BASE(cdseq) = malloc( mxmtbd * 120 *
sizeof(
char) ) ) == NULL ) {
112 strcat( brtstr,
"CDSEQ" );
113 bort( brtstr, ( f77int ) strlen( brtstr ) );
116 if ( ( MSTABS_BASE(cdmnem) = malloc( mxmtbd * 8 *
sizeof(
char) ) ) == NULL ) {
117 strcat( brtstr,
"CDMNEM" );
118 bort( brtstr, ( f77int ) strlen( brtstr ) );
121 if ( ( MSTABS_BASE(ndelem) = malloc( mxmtbd *
sizeof(f77int) ) ) == NULL ) {
122 strcat( brtstr,
"NDELEM" );
123 bort( brtstr, ( f77int ) strlen( brtstr ) );
126 if ( ( MSTABS_BASE(idefxy) = malloc( mxmtbd * maxcd *
sizeof(f77int) ) ) == NULL ) {
127 strcat( brtstr,
"IDEFXY" );
128 bort( brtstr, ( f77int ) strlen( brtstr ) );
Define signatures to enable a number of BUFRLIB subprograms to be called directly from C application ...
void arallocc(void)
This subroutine is called internally during the first call to subroutine openbf() from an application...
INTEGER function igetprm(CPRMNM)
This function returns the current value of a parameter used for allocating one or more internal array...
fpos_t * lstpos
Byte positions of last successful reads from files corresponding to pb, for files that were opened fo...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Define signatures and declare variables for reading or writing BUFR messages via a C language interfa...
Define signatures and declare variables for internal storage of master Table B and Table D entries...