NCEPLIBS-bufr  11.6.0
 All Data Structures Files Functions Variables Pages
crbmg.c File Reference

Read the next message from a BUFR file that was previously opened for reading via a C language interface. More...

#include "bufrlib.h"
#include "cobfl.h"

Go to the source code of this file.

Functions

void crbmg (char *bmg, f77int *mxmb, f77int *nmb, f77int *iret)
 This subroutine reads the next BUFR message from the system file that was opened via the most recent call to subroutine cobfl() with io = 'r'. More...
 

Detailed Description

Read the next message from a BUFR file that was previously opened for reading via a C language interface.

Definition in file crbmg.c.

Function Documentation

void crbmg ( char *  bmg,
f77int *  mxmb,
f77int *  nmb,
f77int *  iret 
)

This subroutine reads the next BUFR message from the system file that was opened via the most recent call to subroutine cobfl() with io = 'r'.

Author
J. Ator
Date
2005-11-29
Parameters
[in]mxmb– f77int*: Dimensioned size (in bytes) of bmg; used by the subroutine to ensure that it doesn't overflow the bmg array
[out]bmg– char*: BUFR message
[out]nmb– f77int*: Size (in bytes) of BUFR message in bmg
[out]iret– f77int*: return code
  • 0 = normal return
  • 1 = overflow of bmg array
  • 2 = "7777" indicator not found in expected location
  • -1 = end-of-file encountered while reading
  • -2 = I/O error encountered while reading

This subroutine is designed to be easily callable from application program written in either C or Fortran.

The file from which messages are to be read must have already been opened for reading via a previous call to subroutine cobfl() with io = 'r'.

Any messages read that were encoded according to BUFR edition 0 or BUFR edition 1 are automatically converted to BUFR edition 2 before being returned by this subroutine.

Program history log:

Date Programmer Comments
2005-11-29 J. Ator Original author

Definition at line 48 of file crbmg.c.

References bort(), gets1loc(), ichkstr(), ipkm(), iupbs01(), iupm(), pbf, and rbytes().

Referenced by fdebufr().