NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
mstabs.h File Reference

Define signatures and declare variables for internal storage of master Table B and Table D entries. More...

Go to the source code of this file.

Macros

#define MSTABS_BASE(var)   mstabs_newCarr_ ## var
 

Functions

void cpmstabs (f77int *, f77int *, char(*)[4], char(*)[12], char(*)[4], char(*)[14], char(*)[8], char(*)[120], f77int *, f77int *, char(*)[120], char(*)[8], f77int *, f77int *, f77int *)
 This subroutine copies relevant information from the Fortran module MODA_MSTABS arrays to new arrays within C, for use whenever arrays are dynamically allocated at run time and in which case we can't directly access the Fortran module MODA_MSTABS arrays from within C. More...
 
f77int MSTABS_BASE (nmtb)
 
f77int * MSTABS_BASE (ibfxyn)
 
char(* MSTABS_BASE (cbscl))[4]
 
char(* MSTABS_BASE (cbsref))[12]
 
char(* MSTABS_BASE (cbbw))[4]
 
char(* MSTABS_BASE (cbunit))[14]
 
char(* MSTABS_BASE (cbmnem))[8]
 
char(* MSTABS_BASE (cbelem))[120]
 
f77int MSTABS_BASE (nmtd)
 
f77int * MSTABS_BASE (idfxyn)
 
char(* MSTABS_BASE (cdseq))[120]
 
char(* MSTABS_BASE (cdmnem))[8]
 
f77int * MSTABS_BASE (ndelem)
 
f77int * MSTABS_BASE (idefxy)
 

Detailed Description

Define signatures and declare variables for internal storage of master Table B and Table D entries.

If arrays are statically allocated, then we can directly access the arrays in Fortran module MODA_MSTABS from within C. However, if arrays are dynamically allocated, meaning that their size isn't known at compile time, then we can't directly access these arrays from within C. Instead, we need to allocate separate array space in C and then use subroutine cpmstabs() to copy the relevant information from the Fortran module MODA_MSTABS arrays to these C arrays at run time, in order to be able to access this information from within C.

Author
J. Ator
Date
2014-12-04

Definition in file mstabs.h.

Function Documentation

void cpmstabs ( f77int *  pnmtb,
f77int *  pibfxyn,
char(*)  pcbscl[4],
char(*)  pcbsref[12],
char(*)  pcbbw[4],
char(*)  pcbunit[14],
char(*)  pcbmnem[8],
char(*)  pcbelem[120],
f77int *  pnmtd,
f77int *  pidfxyn,
char(*)  pcdseq[120],
char(*)  pcdmnem[8],
f77int *  pndelem,
f77int *  pidefxy,
f77int *  maxcd 
)

This subroutine copies relevant information from the Fortran module MODA_MSTABS arrays to new arrays within C, for use whenever arrays are dynamically allocated at run time and in which case we can't directly access the Fortran module MODA_MSTABS arrays from within C.

Author
J. Ator
Date
2014-12-04
Parameters
[in]pnmtb- f77int*: Number of master Table B entries
[in]pibfxyn- f77int*: Bitwise representations of master Table B FXY numbers
[in]pcbscl- char(*)[4]: Master Table B scale factors
[in]pcbsref- char(*)[12]: Master Table B reference values
[in]pcbbw- char(*)[4]: Master Table B bit widths
[in]pcbunit- char(*)[14]: Master Table B units
[in]pcbmnem- char(*)[8]: Master Table B mnemonics
[in]pcbelem- char(*)[120]: Master Table B element names
[in]pnmtd- f77int*: Number of master Table D entries
[in]pidfxyn- f77int*: Bitwise representations of master Table D FXY numbers
[in]pcdseq- char(*)[120]: Master Table D sequence names
[in]pcdmnem- char(*)[8]: Master Table D mnemonics
[in]pndelem- f77int*: Number of child descriptors for master Table D sequence
[in]pidefxy- f77int*: Bitwise representations of child descriptors for master Table D sequence
[in]maxcd- f77int*: Maximum number of child descriptors for a master Table D sequence

Program history log:

  • 2014-12-04 J. Ator – Original author

Definition at line 44 of file cpmstabs.c.

References icvidx().

Referenced by ireadmt().