NCEPLIBS-bufr  12.2.0
borts.c File Reference

C language interface for returning to an application program in the event of a bort error. More...

#include "bufrlib.h"
#include <setjmp.h>

Go to the source code of this file.

Functions

void bort_goto_target (void)
 Return to the previously-set target location after a bort error. More...
 
void catch_bort_closbf (int lunit)
 Catch any bort error inside of subroutine closbf(). More...
 
void catch_bort_openbf (int lunit, char *cio, int lundx, int cio_str_len)
 Catch any bort error inside of subroutine openbf(). More...
 
void catch_bort_readmg (int lunxx, char *subset, int *jdate, int subset_str_len, int *iret)
 Catch any bort error inside of subroutine readmg(). More...
 
void catch_bort_readns (int lunit, char *subset, int *jdate, int subset_str_len, int *iret)
 Catch any bort error inside of subroutine readns(). More...
 
void catch_bort_readsb (int lunit, int *iret)
 Catch any bort error inside of subroutine readsb(). More...
 
void catch_bort_ufbint (int lunin, double *usr, int i1, int i2, int *iret, char *cstr, int cstr_len)
 Catch any bort error inside of subroutine ufbint(). More...
 

Variables

jmp_buf context
 Context information for returning to an application program. More...
 

Detailed Description

C language interface for returning to an application program in the event of a bort error.

Authors
J. Ator, D. O'Connor
Date
2025-08-20

Definition in file borts.c.

Function Documentation

◆ bort_goto_target()

void bort_goto_target ( void  )

Return to the previously-set target location after a bort error.

Author
J. Ator
Date
2025-08-20

Definition at line 21 of file borts.c.

References context.

◆ catch_bort_closbf()

void catch_bort_closbf ( int  lunit)

Catch any bort error inside of subroutine closbf().

Parameters
lunit- Fortran logical unit number for BUFR file
Author
J. Ator
Date
2025-09-05

Definition at line 57 of file borts.c.

References closbf_f(), and context.

◆ catch_bort_openbf()

void catch_bort_openbf ( int  lunit,
char *  cio,
int  lundx,
int  cio_str_len 
)

Catch any bort error inside of subroutine openbf().

Parameters
lunit- Fortran logical unit number for BUFR file
cio- Flag indicating how lunit is to be used by the software
lundx- Fortran logical unit number containing DX BUFR table information
cio_str_len- Length of cio
Author
J. Ator
Date
2025-09-05

Definition at line 37 of file borts.c.

References context, and openbf_f().

◆ catch_bort_readmg()

void catch_bort_readmg ( int  lunxx,
char *  subset,
int *  jdate,
int  subset_str_len,
int *  iret 
)

Catch any bort error inside of subroutine readmg().

Parameters
lunxx- Absolute value is Fortran logical unit number for BUFR file
subset- Table A mnemonic for type of BUFR message that was read
jdate- Date-time stored within Section 1 of BUFR message that was read
subset_str_len- Allocated length of subset string
iret- return code:
  • 0 = new BUFR message was successfully read into internal arrays
  • -1 = there are no more messages in the BUFR file
Author
J. Ator
Date
2025-08-20

Definition at line 80 of file borts.c.

References context, and readmg_f().

◆ catch_bort_readns()

void catch_bort_readns ( int  lunit,
char *  subset,
int *  jdate,
int  subset_str_len,
int *  iret 
)

Catch any bort error inside of subroutine readns().

Parameters
lunit- Fortran logical unit number for BUFR file
subset- Table A mnemonic for type of BUFR message that was read
jdate- Date-time stored within Section 1 of BUFR message that was read
subset_str_len- Allocated length of subset string
iret- return code:
  • 0 = new BUFR data subset was successfully read into internal arrays
  • -1 = there are no more data subsets in the BUFR file
Author
J. Ator
Date
2025-09-05

Definition at line 103 of file borts.c.

References context, and readns_f().

◆ catch_bort_readsb()

void catch_bort_readsb ( int  lunit,
int *  iret 
)

Catch any bort error inside of subroutine readsb().

Parameters
lunit- Fortran logical unit number for BUFR file
iret- return code:
  • 0 = new BUFR data subset was successfully read into internal arrays
  • -1 = there are no more data subsets in the BUFR file
Author
J. Ator
Date
2025-09-05

Definition at line 123 of file borts.c.

References context, and readsb_f().

◆ catch_bort_ufbint()

void catch_bort_ufbint ( int  lunin,
double *  usr,
int  i1,
int  i2,
int *  iret,
char *  cstr,
int  cstr_len 
)

Catch any bort error inside of subroutine ufbint().

Parameters
lunin- Absolute value is Fortran logical unit number for BUFR file
usr- Data values
i1- First dimension of usr
i2- Second dimension of usr
iret- Number of replications of cstr that were read/written from/to the data subset
cstr- String of mnemonics to read/write from/to the data subset
cstr_len- Length of cstr
Author
J. Ator
Date
2025-09-22

Definition at line 146 of file borts.c.

References context, moda_comprx::cstr, and ufbint_f().

Variable Documentation

◆ context

jmp_buf context

Context information for returning to an application program.

Definition at line 13 of file borts.c.

Referenced by bort_goto_target(), catch_bort_closbf(), catch_bort_openbf(), catch_bort_readmg(), catch_bort_readns(), catch_bort_readsb(), and catch_bort_ufbint().