NCEPLIBS-bufr 11.7.1
rbytes.c File Reference

Read a specified number of bytes 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

f77int rbytes (char *bmg, f77int *mxmb, f77int isloc, f77int newbytes)
 This function reads a specified number of bytes from the system file that was opened via the most recent call to subroutine cobfl() with io = 'r'. More...
 

Detailed Description

Read a specified number of bytes from a BUFR file that was previously opened for reading via a C language interface.

Definition in file rbytes.c.

Function Documentation

◆ rbytes()

f77int rbytes ( char *  bmg,
f77int *  mxmb,
f77int  isloc,
f77int  newbytes 
)

This function reads a specified number of bytes 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 function to ensure that it doesn't overflow the bmg array
[in]isloc– f77int: Starting byte within bmg into which to read the next newbytes bytes
[in]newbytes– f77int: Number of bytes to read from system file most recently opened for input/reading via subroutine cobfl()
[out]bmg– char*: Array containing the newbytes bytes that were read, beginning at byte number isloc
Returns
rbytes – f77int: return code
  • 0 = normal return
  • 1 = overflow of bmg array
  • -1 = end-of-file encountered while reading
  • -2 = I/O error encountered while reading

Program history log:

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

Definition at line 40 of file rbytes.c.

References pbf.

Referenced by crbmg().