NCEPLIBS-bufr  12.0.0
wrdesc.c
Go to the documentation of this file.
1 
6 #include "bufrlib.h"
7 
26 void
27 wrdesc(int desc, int *descary, int *ndescary)
28 {
29  char errstr[129];
30 
31 /*
32 ** Is there room in descary for desc?
33 */
34  if ( ( *ndescary + 1 ) < MAXNC ) {
35  descary[(*ndescary)++] = desc;
36  }
37  else {
38  sprintf(errstr, "BUFRLIB: WRDESC - EXPANDED SECTION 3 CONTAINS"
39  " MORE THAN %d DESCRIPTORS", MAXNC);
40  bort_f(errstr);
41  }
42 
43  return;
44 }
Enable a number of NCEPLIBS-bufr subprograms to be called from within the C part of the library.
void bort_f(char *errstr)
Log one error message and abort application program.
#define MAXNC
Maximum number of descriptors within Section 3 of a BUFR message.
Definition: bufrlib.h:47
void wrdesc(int desc, int *descary, int *ndescary)
Maintain an array of descriptors.
Definition: wrdesc.c:27