gd_alter_const man page on OpenSuSE

Man page or keyword search:  
man Server   25941 pages
apropos Keyword Search (all sections)
Output format
OpenSuSE logo
[printable version]

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
       dirfile

SYNOPSIS
       #include <getdata.h>

       int gd_alter_bit(DIRFILE *dirfile, const char *field_code, const char
	      *in_field, int bitnum, int 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_mplex(DIRFILE *dirfile, const char *field_name, const char
	      *in_field, const char *count_field, int count_val, int period);

       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, unsigned int 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, int bitnum, int numbits);

       int gd_alter_window(DIRFILE *dirfile, const char *field_code, const
	      char *in_field, const char *check_field, gd_windop_t windop,
	      gd_triplet_t threshold);

DESCRIPTION
       These  functions	 provide  alternatives	to using the gd_alter_entry(3)
       function to modify a field of the indicated type in the dirfile	speci‐
       fied by dirfile.

       In  all	of these calls, field_code indicates the the field to be modi‐
       fied, which may be a regular field, or a	 metafield  specified  by  its
       full (slashed) field code, but should not contain a representation suf‐
       fix.  The meaning and valid types of other arguments  may  be  obtained
       from   the   get_entry(3)  and  dirfile-format(5)  manual  pages.   The
       gd_shift_t type is a signed 64-bit integer type.	 The gd_triplet_t type
       is defined as:

	   typedef union {
	     gd_int64_t i;
	     gd_uint64_t u;
	     double r;
	   } gd_triplet_t;

       Which element of this gd_triplet_t union to set depends on the operator
       selected for the WINDOW field.  See gd_entry(3) for details.

       The gd_alter_clincom() and gd_alter_cpolynom() functions are  identical
       to  gd_alter_lincom()  and gd_alter_polynom(), except they take complex
       scalar parameters, instead of purely real values.   This	 only  matters
       for  the	 input	of  new	 parameters;  if the scalar parameters are not
       changed (by passing NULL instead of a list of scalars),	the  functions
       can  be	used  interchangeably, regardless of whether the altered field
       has complex scalar parameters or not.

       If the corresponding parameters are to be  changed,  the	 gd_alter_lin‐
       com() and gd_alter_clincom() functions take pointers to three arrays of
       length n_fields containing the input field names (in_fields), the  gain
       factors	(m  or cm), and the offset terms (b or cb).  Similarly, gd_al‐
       ter_polynom() and gd_alter_cpolynom() take an array of length  poly_ord
       + 1 containing the polynomial co-efficients (a or ca).

       Some  field  parameters	have  special  values which indicate no change
       should be made to the parameter.	 These special values are:

       NULL:  any of the string parameters, also m, b, a, cm, cb, or ca;

       0:     spf, n_fields, numbits, cdividend, or dividend;

       -1:    bitnum or period;

       GD_NULL:
	      data_type or const_type;

       GD_WINDOP_UNK:
	      windop.

       All field parameters introduced with this interface must contain liter‐
       al  parameters.	Field parameters which are scalar fields cannot be in‐
       troduced with these functions.	To  do	that,  use  gd_alter_entry(3),
       gd_alter_spec(3) or gd_malter_spec(3), as appropriate.

       If  rename_table	 is non-zero, the look-up table referenced by the LIN‐
       TERP field will be renamed to the path given by table.	If  recode  is
       non-zero,  the binary file associated with the RAW field will be re-en‐
       coded to reflect the new field parameters.

       See NOTES below for information	on  using  gd_alter_clincom(),	gd_al‐
       ter_crecip(), and gd_alter_cpolynom() in the C89 GetData API.

RETURN VALUE
       On  success, any of these functions returns zero.   On error, -1 is re‐
       turned and the dirfile error is set to a non-zero error value.	Possi‐
       ble 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, or a supplied
	       field code did not contain the appropriate prefix or suffix.

       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 protect‐
	       ed.

       GD_E_RAW_IO
	       An I/O error occurred while translating the binary file associ‐
	       ated  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 frag‐
	       ment is not known to the library.  As a result, the library was
	       unable to translate the binary file be associated with a	 modi‐
	       fied RAW field.

       GD_E_UNSUPPORTED
	       The encoding scheme of the indicated format specification frag‐
	       ment does not support translating the  binary  file  associated
	       with a modified RAW field.

       The  dirfile error may be retrieved by calling gd_error(3).  A descrip‐
       tive error string for the last error encountered can be obtained from a
       call to gd_error_string(3).

NOTES
       The  C89	 GetData  API provides different prototypes for gd_alter_clin‐
       com(), 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]);

       In this case, the array pointers passed as cm, cb  or  ca  should  have
       twice  as  many	(purely real) elements, consisting of alternating real
       and imaginary parts for the complex data.  For example, ca[0] should be
       the  real  part	of the first co-efficient, ca[1] the imaginary part of
       the first co-efficient, ca[2] the real part of the second co-efficient,
       ca[3]  the imaginary part of the second co-efficient, and so on.	 Simi‐
       larly, the cdividend parameter becomes  a  double  precision  array  of
       length two.

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)

Version 0.8.1			 26 July 2012		       gd_alter_bit(3)
[top]

List of man pages available for OpenSuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net