desc.c File Reference

Functions for reading the descriptor tables. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include "desc.h"

Go to the source code of this file.

Functions

int read_tables (char *dir, int vmtab, int vltab, int subcent, int gencent)
 Reads bufr tables from csv-files.
void show_desc (int f, int x, int y)
 Prints the specified descriptor or all if f = 999.
int get_index (int typ, dd *descr)
 Returns the index for the given descriptor and typ.
int read_tab_d (char *fname)
 Reads bufr table d from a csv-files.
int read_tab_b (char *fname)
 Reads bufr table b from a csv-files.
void free_descs (void)
 Frees all memory that has been allocated for data descriptors.
int desc_is_flagtable (int ind)
int desc_is_codetable (int ind)
void trim (char *buf)
 Deletes all terminating blanks in a string.
char * get_unit (dd *d)
 Returns the unit for a given data descriptor.


Detailed Description

This file contains all functions used for reading the decriptor tables and utilites for managing the data descriptors.

Definition in file desc.c.


Function Documentation

int desc_is_flagtable ( int  ind  ) 

Checks if a descriptor is a flag-table.

Parameters:
[in] ind Index to the global array des[] holding the description of known data-descriptors.
Returns:
1 if descriptor is a flag-table, 0 if not.
See also:
desc_is_codetable

Definition at line 800 of file desc.c.

int desc_is_codetable ( int  ind  ) 

Checks if a descriptor is a code-table.

Parameters:
[in] ind Index to the global array des[] holding the description of known data-descriptors.
Returns:
1 if descriptor is a code-table, 0 if not.
See also:
desc_is_flagtable

Definition at line 824 of file desc.c.

void trim ( char *  buf  ) 

This functions deletes all terminating blanks in a string.

Parameters:
[in,out] buf Our string.

Definition at line 879 of file desc.c.


Generated on Tue Dec 18 16:52:45 2007 for OPERA BUFR software by  doxygen 1.5.4