82 void cobfl(
char *bfl,
char *io )
87 char errstr[MXFNLEN+50];
89 char foparg[3] =
" b";
99 for ( i = 0; ( ! isspace( bfl[i] ) && ! iscntrl( bfl[i] ) ); i++ ) {
100 if ( i == MXFNLEN ) {
101 sprintf( errstr,
"BUFRLIB: COBFL - INPUT FILENAME CONTAINS"
102 " MORE THAN %hu CHARACTERS",
103 (
unsigned short ) MXFNLEN );
104 bort( errstr, ( f77int ) strlen( errstr ) );
111 if ( ( foparg[0] = (
char) tolower( lio ) ) ==
'r' ) {
114 else if ( foparg[0] ==
'w' ) {
118 sprintf( errstr,
"BUFRLIB: COBFL - SECOND ARGUMENT WAS (%c),"
119 " WHICH IS AN ILLEGAL VALUE", lio );
120 bort( errstr, ( f77int ) strlen( errstr ) );
127 if (
pbf[j] != NULL ) fclose(
pbf[j] );
132 if ( (
pbf[j] = fopen( lbf, foparg ) ) == NULL ) {
133 sprintf( errstr,
"BUFRLIB: COBFL - COULD NOT OPEN FILE %s", lbf );
134 bort( errstr, ( f77int ) strlen( errstr ) );
Define signatures to enable a number of BUFRLIB subprograms to be called directly from C application ...
FILE * pbf[2]
File pointers.
Define signatures and declare variables for reading or writing BUFR messages via a C language interfa...
subroutine wrdlen
This subroutine figures out some important information about the local machine on which the BUFRLIB s...
void cobfl(char *bfl, char *io)
This subroutine opens a new file for reading or writing BUFR messages via a C language interface...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...