table of contents
other versions
- wheezy 0.7.3-6
- jessie 0.7.3-6+b2
- testing 0.9.4-1
- unstable 0.9.4-1
- experimental 0.10.0-1
gd_alter_bit(3) | GETDATA | gd_alter_bit(3) |
NAME¶
gd_alter_bit, gd_alter_carray, gd_alter_clincom, gd_alter_const, gd_alter_cpolynom, gd_alter_crecip, gd_alter_divide, gd_alter_lincom, gd_alter_linterp, gd_alter_multiply, gd_alter_phase, gd_alter_polynom, gd_alter_raw, gd_alter_recip, gd_alter_sbit — modify a field in a dirfileSYNOPSIS¶
#include <getdata.h>int
gd_alter_bit(DIRFILE *dirfile, const char
*field_code, const char *in_field, gd_bit_t
bitnum, gd_bit_t numbits);
int
gd_alter_carray(DIRFILE *dirfile, const char
*field_code, gd_type_t const_type, size_t
array_len);
int
gd_alter_clincom(DIRFILE *dirfile, const char
*field_code, int n_fields, const char
**in_fields, const double complex *cm,
const double complex *cb);
int
gd_alter_const(DIRFILE *dirfile, const char
*field_code, gd_type_t
const_type);
int
gd_alter_cpolynom(DIRFILE *dirfile, const char
*field_code, int poly_ord, const char
*in_field, const double complex *ca);
int
gd_alter_crecip(DIRFILE *dirfile, const char
*field_code, const char *in_field, complex
double cdividend);
int
gd_alter_divide(DIRFILE *dirfile, const char
*field_code, const char *in_field1, const
char *in_field2);
int
gd_alter_lincom(DIRFILE *dirfile, const char
*field_code, int n_fields, const char
**in_fields, const double *m, const double
*b);
int
gd_alter_linterp(DIRFILE *dirfile, const char
*field_code, const char *in_field, const
char *table, int rename_table);
int
gd_alter_multiply(DIRFILE *dirfile, const char
*field_code, const char *in_field1, const
char *in_field2);
int
gd_alter_phase(DIRFILE *dirfile, const char
*field_code, const char *in_field,
gd_shift_t shift);
int
gd_alter_polynom(DIRFILE *dirfile, const char
*field_code, int poly_ord, const char
*in_field, const double *ca);
int
gd_alter_raw(DIRFILE *dirfile, const char
*field_code, gd_type_t data_type, gd_spf_t
spf, int recode);
int
gd_alter_recip(DIRFILE *dirfile, const char
*field_code, const char *in_field, double
dividend);
int
gd_alter_sbit(DIRFILE *dirfile, const char
*field_code, const char *in_field, gd_bit_t
bitnum, gd_bit_t numbits);
DESCRIPTION¶
These functions provide alternatives to using the gd_alter_entry(3) function to modify a field of the indicated type in the dirfile specified by dirfile. In all of these calls, field_code indicates the the field to be modified, which may be a regular field, or a metafield specified by its full (slashed) field code, but should not contain a representation suffix. The meaning and valid types of other arguments may be obtained from the get_entry(3) and dirfile-format(5) manual pages. The gd_bit_t type is a signed 16-bit integer type. The gd_shift_t type is a signed 64-bit integer type. The gd_spf_t type is an unsigned 16-bit integer type.RETURN VALUE¶
On success, any of these functions returns zero. On error, -1 is returned and the dirfile error is set to a non-zero error value. Possible error values are:- GD_E_ACCMODE
- The specified dirfile was opened read-only.
- GD_E_ALLOC
- The library was unable to allocate memory.
- GD_E_BAD_CODE
- The field specified by field_code was not found.
- GD_E_BAD_DIRFILE
- The supplied dirfile was invalid.
- GD_E_BAD_ENTRY
- One or more of the field parameters specified was invalid.
- GD_E_BAD_FIELD_TYPE
- The field specified by field_code was of the wrong type for the function called.
- GD_E_BAD_TYPE
- The data_type or const_type argument was invalid.
- GD_E_PROTECTED
- The metadata of the fragment was protected from change. Or, a request to translate the binary file associated with a RAW field was attempted, but the data of the fragment was protected.
- GD_E_RAW_IO
- An I/O error occurred while translating the binary file associated with a modified RAW field, or an I/O error occurred while attempting to rename a LINTERP table file.
- GD_E_UNKNOWN_ENCODING
- The encoding scheme of the indicated format specification fragment is not known to the library. As a result, the library was unable to translate the binary file be associated with a modified RAW field.
- GD_E_UNSUPPORTED
- The encoding scheme of the indicated format specification fragment does not support translating the binary file associated with a modified RAW field.
NOTES¶
The C89 GetData API provides different prototypes for gd_alter_clincom(), gd_alter_cpolynom(), and gd_alter_crecip():#define GD_C89_API #include <getdata.h>
int gd_alter_clincom(DIRFILE *dirfile, const char *field_code, int n_fields, const char **in_fields, const double *cm, const double *cb);
int gd_alter_cpolynom(DIRFILE *dirfile, const char *field_code, int poly_ord, const char *in_fields, const double *ca);
int gd_alter_crecip(DIRFILE *dirfile, const char *field_code, const char *in_field, double cdividend[2]);
SEE ALSO¶
gd_alter_entry(3), gd_alter_spec(3), gd_error(3), gd_error_string(3), gd_malter_spec(3), gd_metaflush(3), gd_open(3), dirfile-format(5)3 November 2010 | Version 0.7.0 |