NCEPLIBS-bufr  12.2.0
All Data Structures Namespaces Files Functions Variables Macros Pages
stseq.c
Go to the documentation of this file.
1 
7 #include "bufrlib.h"
8 #include "mstabs.h"
9 #include "rpseqs.h"
10 
27 int
28 cmpia(const void *pf1, const void *pf2)
29 {
30  int *mypf1 = ( int * ) pf1;
31  int *mypf2 = ( int * ) pf2;
32 
33  if ( *mypf1 == *mypf2 ) return 0;
34 
35  return ( *mypf1 < *mypf2 ? -1 : 1 );
36 }
37 
53 void
54 nummtb(int *idn, char *tab, int *ipt)
55 {
56  int *pifxyn, *pbs, nmt;
57 
58  char adn[FXY_STR_LEN+1], errstr[129];
59 
60  if ( *idn >= ifxy_f(FXY_MINTD) ) {
61  *tab = 'D';
62  pifxyn = &idfxyn_c[0];
63  nmt = nmtd_c;
64  }
65  else {
66  *tab = 'B';
67  pifxyn = &ibfxyn_c[0];
68  nmt = nmtb_c;
69  }
70 
71  pbs = bsearch(idn, pifxyn, (size_t) nmt, sizeof(int),
72  (int (*) (const void *, const void *)) cmpia);
73  if ( pbs == NULL ) {
74  cadn30_f(*idn, adn, FXY_STR_LEN+1);
75  sprintf(errstr, "BUFRLIB: NUMMTB - COULD NOT FIND DESCRIPTOR "
76  "%s IN MASTER TABLE %c", adn, *tab);
77  bort_f(errstr);
78  }
79  *ipt = pbs - pifxyn;
80 
81  return;
82 }
83 
97 void
98 strrpsq(int rpidn, int maxnf, int naf, int *iafpk, int maxcd, int ncdesc, int *cdesc)
99 {
100  int j;
101 
102  if ( nrpsq < MAX_RPSQ ) {
103  rpidns[nrpsq] = rpidn;
104  nafs[nrpsq] = naf;
105  for ( j = 0; j < naf; j++ ) {
106  iafpks[icvidx(nrpsq,j,maxnf)] = iafpk[j];
107  }
108  ncdescs[nrpsq] = ncdesc;
109  for ( j = 0; j < ncdesc; j++ ) {
110  cdescs[icvidx(nrpsq,j,maxcd)] = cdesc[j];
111  }
112  nrpsq++;
113  }
114 }
115 
136 int
137 srchrpsq(int maxnf, int naf, int *iafpk, int maxcd, int ncdesc, int *cdesc)
138 {
139  int i, j, rpidn;
140 
141  rpidn = -1;
142 
143  for ( i = 0; i < nrpsq; i++ ) {
144  if ( ncdesc == ncdescs[i] && naf == nafs[i] ) {
145  /* Check whether all of the associated fields match */
146  for ( j = 0; j < naf; j++ ) {
147  if ( iafpk[j] != iafpks[icvidx(i,j,maxnf)] ) break;
148  }
149  if ( j == naf ) {
150  /* Check whether all of the child descriptors match */
151  for ( j = 0; j < ncdesc; j++ ) {
152  if ( cdesc[j] != cdescs[icvidx(i,j,maxcd)] ) break;
153  }
154  if ( j == ncdesc ) {
155  /* We've found a matching sequence in the cache! */
156  rpidn = rpidns[i];
157  break;
158  }
159  }
160  }
161  }
162 
163  return rpidn;
164 }
165 
188 void
189 stseq(int lun, int *irepct, int idn, char *nemo, char *cseq, int *cdesc, int ncdesc)
190 {
191  int i, j, nb, nd, ix, iy, iret, nbits;
192  int rpidn, pkint, ilen, ipt, *rpdesc;
193 
194  char tab, adn[FXY_STR_LEN+1], adn2[FXY_STR_LEN+1], units[10], errstr[129];
195  char nemo2[NEMO_STR_LEN+1], rpseq[56], card[80], ctmp[4], cblk = ' ', czero = '0';
196 
197  /*
198  ** The following variable is declared as static so that it automatically initializes
199  ** to zero and remains unchanged between recursive calls to this function.
200  */
201  static int naf;
202 
203  /*
204  ** The following variables are declared as static so that function igetprm_f() doesn't
205  ** need to be called during every call to this function.
206  */
207  static int imxcd, imxnf;
208 
209  /*
210  ** Is idn already listed as an entry in the internal Table D?
211  ** If so, then there's no need to proceed any further.
212  */
213  numtbd_f(lun, idn, nemo2, NEMO_STR_LEN+1, &tab, &iret);
214  if ( ( iret > 0 ) && ( tab == 'D' ) ) return;
215 
216  if ( *irepct == 0 ) {
217  /*
218  ** Initialize or reset some variables.
219  */
220  imxcd = igetprm_f("MAXCD");
221  imxnf = igetprm_f("MXNAF");
222  nrpsq = 0;
223  }
224 
225  /*
226  ** Start a new Table D entry for idn.
227  */
228  tab = 'D';
229  nd = igetntbi_f(lun, &tab);
230  cadn30_f(idn, adn, FXY_STR_LEN+1);
231  stntbi_f(nd, lun, adn, nemo, cseq);
232 
233  /*
234  ** Now, go through the list of child descriptors corresponding to idn.
235  */
236  for ( i = 0; i < ncdesc; i++ ) {
237  cadn30_f(cdesc[i], adn, FXY_STR_LEN+1); adn[6] = '\0';
238  strncpy(ctmp, &adn[1], 2); ctmp[2] = '\0';
239  strnum_f(ctmp, &ix, &iret);
240  strncpy(ctmp, &adn[3], 4); /* trailing null will be included in this copy */
241  strnum_f(ctmp, &iy, &iret);
242  if ( adn[0] == '3' ) {
243  /*
244  ** cdesc[i] is itself a Table D descriptor, so locate it within the
245  ** master table D and then store the contents within the internal
246  ** Table D via a recursive call to this same routine.
247  */
248  nummtb(&cdesc[i], &tab, &ipt);
249  if ( naf > 0 ) {
250  /*
251  ** There are associated fields in effect which will modify this
252  ** descriptor when storing it within the internal Table D. So we can't
253  ** just store it as is, but it may already exist in the internal
254  ** replication sequences cache with the same associated fields.
255  */
256  if ( ( rpidn = srchrpsq(imxnf, naf, iafpk, imxcd, ndelem_c[ipt],
257  &idefxy_c[icvidx(ipt,0,imxcd)] ) ) == -1 ) {
258  /*
259  ** We haven't seen this sequence with the same associated fields before, so
260  ** we'll have to store it using a new FXY value, mnemonic and description.
261  */
262  rpidn = igettdi_f(lun);
263  strrpsq(rpidn, imxnf, naf, iafpk, imxcd, ndelem_c[ipt],
264  &idefxy_c[icvidx(ipt,0,imxcd)]);
265 
266  sprintf(rpseq, "REPLICATION SEQUENCE %.3d", ++(*irepct));
267  memset(&rpseq[24], (int) cblk, 31);
268  sprintf(nemo2, "RPSEQ%.3d", *irepct);
269 
270  stseq(lun, irepct, rpidn, nemo2, rpseq,
271  &idefxy_c[icvidx(ipt,0,imxcd)],
272  ndelem_c[ipt]);
273  }
274  pkint = rpidn;
275  }
276  else {
277  /*
278  ** Store cdesc[i] as is directly within the internal Table D.
279  */
280  stseq(lun, irepct, cdesc[i], &cdmnem_c[ipt][0],
281  &cdseq_c[ipt][0],
282  &idefxy_c[icvidx(ipt,0,imxcd)],
283  ndelem_c[ipt]);
284  pkint = cdesc[i];
285  }
286  }
287  else if ( adn[0] == '2' ) {
288  /*
289  ** cdesc[i] is an operator descriptor.
290  */
291  if ( ( ( ix >= 4 ) && ( ix <= 6 ) ) || ( imrkopr_f(adn) ) ) {
292  /*
293  ** This is a 204YYY, 205YYY, 206YYY operator, or else a 223255,
294  ** 224255, 225255 or 232255 marker operator. In any case,
295  ** generate a Table B mnemonic to hold the corresponding data.
296  */
297  strncpy(nemo2, adn, 6);
298  memset(&nemo2[6], (int) cblk, 2);
299  nemo2[8] = '\0';
300 
301  if ( ( ix == 4 ) && ( iy == 0 ) ) {
302  /*
303  ** Cancel the most-recently added associated field.
304  */
305  if ( naf-- <= 0 ) {
306  sprintf(errstr, "BUFRLIB: STSEQ - TOO MANY ASSOCIATED"
307  " FIELD CANCELLATION OPERATORS");
308  bort_f(errstr);
309  }
310  }
311  else {
312  /*
313  ** Is nemo2 already listed as an entry within the internal
314  ** Table B?
315  */
316  nemtab_f(lun, nemo2, &pkint, &tab, &iret);
317  if ( ( iret == 0 ) || ( tab != 'B' ) ) {
318  /*
319  ** No, so create and store a new Table B entry for nemo2.
320  */
321  tab = 'B';
322  nb = igetntbi_f(lun, &tab);
323 
324  if ( ix == 4 ) {
325  sprintf(rpseq, "Associated field of %3d bits", iy);
326  nbits = iy;
327  strcpy(units, "NUMERIC");
328  }
329  else if ( ix == 5 ) {
330  sprintf(rpseq, "Text string of %3d bytes", iy);
331  nbits = iy*8;
332  strcpy(units, "CCITT IA5");
333  }
334  else if ( ix == 6 ) {
335  sprintf(rpseq, "Local descriptor of %3d bits", iy);
336  nbits = iy;
337  if ( nbits > 32 ) {
338  strcpy(units, "CCITT IA5");
339  }
340  else {
341  strcpy(units, "NUMERIC");
342  }
343  }
344  else { // 2-XX-255 marker operator
345  if ( ix == 23 ) {
346  sprintf(rpseq, "Substituted value");
347  }
348  else if ( ix == 24 ) {
349  sprintf(rpseq, "First-order statistical value");
350  }
351  else if ( ix == 25 ) {
352  sprintf(rpseq, "Difference statistical value");
353  }
354  else if ( ix == 32 ) {
355  sprintf(rpseq, "Replaced/retained value");
356  }
357  /* For now, set a default bit width and units. */
358  nbits = 8;
359  strcpy(units, "NUMERIC");
360  }
361  ilen = ( int ) strlen(rpseq);
362  memset(&rpseq[ilen], (int) cblk, 55 - ilen);
363  /*
364  ** Note that 49152 = 3*(2**14), so subtracting 49152 in the
365  ** following statement changes a WMO Table D bit-wise FXY value into
366  ** a WMO Table B bit-wise FXY value.
367  */
368  pkint = (igettdi_f(lun) - 49152);
369  cadn30_f(pkint, adn2, FXY_STR_LEN+1);
370 
371  stntbi_f(nb, lun, adn2, nemo2, rpseq);
372 
373  /* Initialize card to all blanks. */
374  memset(card, (int) cblk, sizeof( card ));
375 
376  strncpy(&card[2], nemo2, 8);
377  memcpy(&card[16], &czero, 1);
378  memcpy(&card[30], &czero, 1);
379  sprintf(&card[33], "%4d", nbits);
380  strcpy(&card[40], units);
381  card[40+strlen(units)] = cblk; /* overwrite trailing null */
382  elemdx_f(card, lun);
383  }
384  if ( ix == 4 ) {
385  /*
386  ** Add an associated field.
387  */
388  if ( naf >= imxnf ) {
389  sprintf(errstr, "BUFRLIB: STSEQ - TOO MANY ASSOCIATED"
390  " FIELDS ARE IN EFFECT AT THE SAME TIME");
391  bort_f(errstr);
392  }
393  iafpk[naf++] = pkint;
394  }
395  }
396  if ( ix == 6 ) {
397  /*
398  ** Skip over the local descriptor placeholder.
399  */
400  if ( ++i >= ncdesc ) {
401  sprintf(errstr, "BUFRLIB: STSEQ - COULD NOT FIND LOCAL"
402  " DESCRIPTOR PLACEHOLDER FOR %s", adn);
403  bort_f(errstr);
404  }
405  }
406  }
407  else {
408  pkint = cdesc[i];
409  }
410  }
411  else if ( adn[0] == '1' ) {
412  /*
413  ** cdesc[i] is a replication descriptor, so create a sequence
414  ** consisting of the set of replicated descriptors and then immediately
415  ** store that sequence within the internal Table D via a recursive call
416  ** to this same routine.
417  **
418  ** See module @ref modv_vars for the source of the FXY values referenced
419  ** in the following block. Note we are guaranteed that 0 <= iy <= 255,
420  ** since adn was generated using subroutine cadn30_f().
421  */
422  if ( iy == 0 ) { /* delayed replication */
423  if ( ( i+1 ) >= ncdesc ) {
424  sprintf(errstr, "BUFRLIB: STSEQ - COULD NOT FIND DELAYED "
425  "DESCRIPTOR REPLICATION FACTOR FOR %s", adn);
426  bort_f(errstr);
427  }
428  else if ( cdesc[i+1] == ifxy_f(FXY_DRF16) ) {
429  pkint = ifxy_f(FXY_DRP16);
430  }
431  else if ( cdesc[i+1] == ifxy_f(FXY_DRF8) ) {
432  pkint = ifxy_f(FXY_DRP8);
433  }
434  else if ( cdesc[i+1] == ifxy_f(FXY_DRF1) ) {
435  pkint = ifxy_f(FXY_DRP1);
436  }
437  else {
438  sprintf(errstr, "BUFRLIB: STSEQ - UNKNOWN DELAYED "
439  "DESCRIPTOR REPLICATION FACTOR FOR %s", adn);
440  bort_f(errstr);
441  }
442  i += 2;
443  }
444  else { /* regular replication */
445  pkint = ifxy_f(FXY_MINR) + iy;
446  i++;
447  }
448  /*
449  ** Store this replication descriptor within the table D entry for
450  ** this parent.
451  */
452  pktdd_f(nd, lun, pkint, &iret);
453  if ( iret < 0 ) {
454  strncpy(nemo2, nemo, 8);
455  nemo2[8] = '\0';
456  sprintf(errstr, "BUFRLIB: STSEQ - BAD RETURN FROM PKTDD WHEN "
457  "STORING REPLICATOR FOR PARENT MNEMONIC %s", nemo2);
458  bort_f(errstr);
459  }
460  /*
461  ** Note we are guaranteed that 0 < ix <= 63 since adn was generated
462  ** using subroutine cadn30_f().
463  */
464  if ( ix > ( ncdesc - i ) ) {
465  sprintf(errstr, "BUFRLIB: STSEQ - NOT ENOUGH REMAINING CHILD "
466  "DESCRIPTORS TO COMPLETE REPLICATION FOR %s", adn);
467  bort_f(errstr);
468  }
469  else if ( ( ix == 1 ) && ( cdesc[i] >= ifxy_f(FXY_MINTD) ) ) {
470  /*
471  ** The only thing being replicated is a single Table D descriptor,
472  ** so there's no need to invent a new sequence for this replication
473  ** (this is a special case!)
474  */
475  nummtb(&cdesc[i], &tab, &ipt);
476  stseq(lun, irepct, cdesc[i], &cdmnem_c[ipt][0],
477  &cdseq_c[ipt][0],
478  &idefxy_c[icvidx(ipt,0,imxcd)],
479  ndelem_c[ipt]);
480  pkint = cdesc[i];
481  }
482  else {
483  /*
484  ** Store the ix descriptors to be replicated in a local list.
485  */
486  if ( ( rpdesc = malloc( imxcd * sizeof(int) ) ) == NULL ) {
487  sprintf(errstr, "BUFRLIB: STSEQ - UNABLE TO ALLOCATE SPACE"
488  " FOR RPDESC");
489  bort_f(errstr);
490  }
491  for ( j = 0; j < ix; j++ ) {
492  rpdesc[j] = cdesc[i+j];
493  }
494 
495  /*
496  ** Is this list already stored in the internal replication sequences cache?
497  */
498  if ( ( rpidn = srchrpsq(imxnf, naf, iafpk, imxcd, ix, rpdesc) ) == -1 ) {
499  /*
500  ** No, so get an FXY value to use with this list and generate a unique
501  ** new mnemonic and description as well.
502  */
503  rpidn = igettdi_f(lun);
504  strrpsq(rpidn, imxnf, naf, iafpk, imxcd, ix, rpdesc);
505 
506  sprintf(rpseq, "REPLICATION SEQUENCE %.3d", ++(*irepct));
507  memset(&rpseq[24], (int) cblk, 31);
508  sprintf(nemo2, "RPSEQ%.3d", *irepct);
509 
510  stseq(lun, irepct, rpidn, nemo2, rpseq, rpdesc, ix);
511  }
512 
513  free(rpdesc);
514 
515  pkint = rpidn;
516  i += ix - 1;
517  }
518  }
519  else {
520  /*
521  ** cdesc[i] is a Table B descriptor.
522  **
523  ** Is cdesc[i] already listed as an entry in the internal Table B?
524  */
525  numtbd_f(lun, cdesc[i], nemo2, NEMO_STR_LEN+1, &tab, &iret);
526  if ( ( iret == 0 ) || ( tab != 'B' ) ) {
527  /*
528  ** No, so search for it within the master table B.
529  */
530  nummtb(&cdesc[i], &tab, &ipt);
531  /*
532  ** Start a new Table B entry for cdesc[i].
533  */
534  nb = igetntbi_f(lun, &tab);
535  cadn30_f(cdesc[i], adn2, FXY_STR_LEN+1);
536  stntbi_f(nb, lun, adn2, &cbmnem_c[ipt][0], &cbelem_c[ipt][0]);
537 
538  /* Initialize card to all blanks. */
539  memset(card, (int) cblk, sizeof( card ));
540 
541  strncpy(&card[2], &cbmnem_c[ipt][0], 8);
542  strncpy(&card[13], &cbscl_c[ipt][0], 4);
543  strncpy(&card[19], &cbsref_c[ipt][0], 12);
544  strncpy(&card[33], &cbbw_c[ipt][0], 4);
545  strncpy(&card[40], &cbunit_c[ipt][0], 24);
546  elemdx_f(card, lun);
547  }
548  pkint = cdesc[i];
549  }
550  if ( strncmp( adn, "204", 3 ) != 0 ) {
551  /*
552  ** Store this child descriptor within the table D entry for this
553  ** parent, preceding it with any associated fields that are currently
554  ** in effect.
555  **
556  ** Note that associated fields are only applied to Table B descriptors,
557  ** except for those in Class 31.
558  */
559  if ( ( naf > 0 ) && ( pkint <= ifxy_f(FXY_MAXTB) ) &&
560  ( ( pkint < ifxy_f(FXY_DRF1) ) ||
561  ( pkint > ifxy_f("031255") ) ) ) {
562  for ( j = 0; j < naf; j++ ) {
563  pktdd_f(nd, lun, iafpk[j], &iret);
564  if ( iret < 0 ) {
565  sprintf(errstr, "BUFRLIB: STSEQ - BAD RETURN FROM PKTDD "
566  "WHEN STORING ASSOCIATED FIELDS");
567  bort_f(errstr);
568  }
569  }
570  }
571  /*
572  ** Store the child descriptor.
573  */
574  pktdd_f(nd, lun, pkint, &iret);
575  if ( iret < 0 ) {
576  strncpy(nemo2, nemo, 8);
577  nemo2[8] = '\0';
578  sprintf(errstr, "BUFRLIB: STSEQ - BAD RETURN FROM PKTDD WHEN "
579  "STORING CHILD FOR PARENT MNEMONIC %s", nemo2);
580  bort_f(errstr);
581  }
582  }
583  }
584 }
int igetprm_f(char *cprmnm)
Get the current value of a parameter.
void nemtab_f(int lun, const char *mnemonic, int *descriptor, char *table_type, int *table_idx)
Get information about a descriptor.
Enable a number of NCEPLIBS-bufr subprograms to be called from within the C part of the library.
int igettdi_f(int iflag)
Get the next usable Table D index for the current master table, or reset the index.
void cadn30_f(int idn, char *adn, int adn_str_len)
Convert an FXY value from its WMO bit-wise representation to its six-character representation.
#define FXY_DRF8
Character string containing FXY value for medium (8-bit) delayed replication factor.
Definition: bufrlib.h:58
#define FXY_DRF1
Character string containing FXY value for short (1-bit) delayed replication factor.
Definition: bufrlib.h:61
#define FXY_STR_LEN
Size of a character string needed to store an FXY value.
Definition: bufrlib.h:34
void elemdx_f(char *card, int lun)
Decode the scale factor, reference value, bit width, and units from a Table B mnemonic definition.
int imrkopr_f(char *nemo)
Check whether a specified mnemonic is a Table C marker operator.
void numtbd_f(int lun, int idn, char *nemo, int nemo_str_len, char *tab, int *iret)
Search for a Table B or Table D descriptor within the internal DX BUFR tables.
void bort_f(char *errstr)
Log one error message and abort application program.
#define FXY_MINR
Character string containing minimum FXY value for a replication descriptor.
Definition: bufrlib.h:37
void stntbi_f(int n, int lun, char *numb, char *nemo, char *celsq)
Store a new entry within the internal BUFR Table B or D.
#define FXY_DRP1
Character string containing FXY value for NCEP Table D local descriptor denoting 1-bit delayed replic...
Definition: bufrlib.h:52
int ifxy_f(char *cfxy)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
#define FXY_DRP8
Character string containing FXY value for NCEP Table D local descriptor denoting 8-bit delayed replic...
Definition: bufrlib.h:49
void strnum_f(char *str, int *num, int *iret)
Decode an integer from a character string.
#define NEMO_STR_LEN
Size of a character string needed to store a mnemonic.
Definition: bufrlib.h:64
void pktdd_f(int id, int lun, int idn, int *iret)
Store information about a child mnemonic within the internal arrays.
#define FXY_DRP16
Character string containing FXY value for NCEP Table D local descriptor denoting 16-bit delayed repli...
Definition: bufrlib.h:46
int igetntbi_f(int lun, char *table_type)
Get the next index for storing an entry within an internal DX BUFR table.
#define FXY_DRF16
Character string containing FXY value for long (16-bit) delayed replication factor.
Definition: bufrlib.h:55
#define FXY_MAXTB
Character string containing maximum FXY value for a Table B descriptor.
Definition: bufrlib.h:43
#define FXY_MINTD
Character string containing minimum FXY value for a Table D descriptor.
Definition: bufrlib.h:40
int icvidx(int ii, int jj, int numjj)
Computes a unique 1-dimensional array index from 2-dimensional indices.
Definition: icvidx.c:22
Declare variables for internal storage of master Table B and Table D entries.
int * idefxy_c
WMO bit-wise representations of child descriptors for master Table D sequences; copied from Fortran i...
char(* cbsref_c)[12]
Master Table B reference values; copied from Fortran cbsref array.
char(* cbelem_c)[120]
Master Table B element names; copied from Fortran cbelem array.
int * idfxyn_c
WMO bit-wise representations of master Table D FXY numbers; copied from Fortran idfxyn array.
char(* cdmnem_c)[8]
Master Table D mnemonics; copied from Fortran cdmnem array.
char(* cdseq_c)[120]
Master Table D sequence names; copied from Fortran cdseq array.
char(* cbscl_c)[4]
Master Table B scale factors; copied from Fortran cbscl array.
char(* cbunit_c)[24]
Master Table B units; copied from Fortran cbunit array.
char(* cbmnem_c)[8]
Master Table B mnemonics; copied from Fortran cbmnem array.
char(* cbbw_c)[4]
Master Table B bit widths; copied from Fortran cbbw array.
int nmtd_c
Number of master Table D entries; copied from Fortran nmtd variable.
int * iafpk
WMO bit-wise representations of associated fields within master Table D sequences.
int * ibfxyn_c
WMO bit-wise representations of master Table B FXY numbers; copied from Fortran ibfxyn array.
int nmtb_c
Number of master Table B entries; copied from Fortran nmtb variable.
int * ndelem_c
Number of child descriptors for master Table D sequences; copied from Fortran ndelem array.
Declare variables for internal storage of replication sequences.
int nrpsq
Number of entries in internal replication sequences cache.
int * cdescs
Child descriptors for each entry.
int ncdescs[MAX_RPSQ]
Number of child descriptors for each entry.
#define MAX_RPSQ
Maximum number of entries in internal replication sequences cache.
Definition: rpseqs.h:15
int * iafpks
Associated fields in effect for each entry.
int rpidns[MAX_RPSQ]
WMO bit-wise representation of FXY number for each entry.
int nafs[MAX_RPSQ]
Number of associated fields in effect for each entry.
void strrpsq(int rpidn, int maxnf, int naf, int *iafpk, int maxcd, int ncdesc, int *cdesc)
Store a new entry in the internal replication sequences cache.
Definition: stseq.c:98
int srchrpsq(int maxnf, int naf, int *iafpk, int maxcd, int ncdesc, int *cdesc)
Check whether a replication sequence already exists within the internal cache.
Definition: stseq.c:137
void nummtb(int *idn, char *tab, int *ipt)
Search for an entry in the BUFR master table.
Definition: stseq.c:54
void stseq(int lun, int *irepct, int idn, char *nemo, char *cseq, int *cdesc, int ncdesc)
Store information about a Table D descriptor within internal DX BUFR tables.
Definition: stseq.c:189
int cmpia(const void *pf1, const void *pf2)
Define a comparison between two integers.
Definition: stseq.c:28