gd_alter_affixes 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_affixes(3)		    GETDATA		   gd_alter_affixes(3)

NAME
       gd_alter_affixes — modify the field affixes of a fragments in a dirfile

SYNOPSIS
       #include <getdata.h>

       int gd_alter_affixes(DIRFILE *dirfile, int fragment_index, const char
	      *prefix, const char *suffix);

DESCRIPTION
       The gd_alter_affixes() function sets the field  prefix  and  suffix  of
       fields  defined	in  the	 format	 specification fragment given by frag‐
       ment_index to prefix and suffix in the dirfile(5) database specified by
       dirfile.

       The  field  prefix  and suffix are appended to all field codes found in
       the specified fragment.	If the parent fragment to the  modified	 frag‐
       ment  contains field affixes themselves, they should be included in the
       affixes passed to gd_alter_affixes().  See EXAMPLES below  for  further
       details.	  If prefix or suffix is NULL, the corresponding affix will be
       unchanged.  To remove an affix, set it to the parent fragment's	corre‐
       sponding affix, which may be the empty string ("").

       It  is not possible to set affixes on the root format file (i.e.	 frag‐
       ment_index may not be zero).

       The dirfile argument must point to a valid  DIRFILE  object  previously
       created by a call to gd_open(3).

RETURN VALUE
       Upon successful completion, gd_alter_affixes() returns zero.  On error,
       it returns -1 and sets the dirfile error 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 supplied prefix or suffix contained invalid characters.

       GD_E_BAD_DIRFILE
	       The supplied dirfile was invalid.

       GD_E_BAD_INDEX
	       The supplied index was out of range.

       GD_E_DUPLICATE
	       The  supplied  affixes  would result in one or more field codes
	       duplicating an existing field code.

       GD_E_PROTECTED
	       The metadata of the given fragment's parent fragment  was  pro‐
	       tected from change.

       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).

EXAMPLES
       Dealing with affixes of parent fragments is relatively straightforward.
       Say, for instance, fragment #1 has a prefix "A" and a  suffix  "B"  and
       fragment	 #2 is included from fragment #1.  In this case any prefix for
       fragment #2 must end with "A" and any suffix for fragment #2 must begin
       with "B".

SEE ALSO
       gd_open(3),  gd_error(3),  gd_error_string(3),  gd_fragment_affixes(3),
       gd_include_affix(3), dirfile(5), dirfile-format(5)

Version 0.8.0			1 January 2012		   gd_alter_affixes(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