Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gd_nfields_by_type(3) [debian man page]

gd_nfields_by_type(3)						      GETDATA						     gd_nfields_by_type(3)

NAME
gd_nfields_by_type -- report the number of fields of a given type in a dirfile SYNOPSIS
#include <getdata.h> unsigned int gd_nfields_by_type(DIRFILE *dirfile, gd_entype_t type); DESCRIPTION
The gd_nfields_by_type() function queries a dirfile(5) database specified by dirfile and returns the number of fields of type type defined in the database. Notably, this count does not include /META fields. The dirfile argument must point to a valid DIRFILE object previously created by a call to gd_open(3). The type argument should be one of the following symbols indicating the type of field to count: GD_BIT_ENTRY, GD_CARRAY_ENTRY, GD_CONST_ENTRY, GD_DIVIDE_ENTRY, GD_INDEX_ENTRY, GD_LINCOM_ENTRY, GD_LINTERP_ENTRY, GD_MULTIPLY_ENTRY, GD_PHASE_ENTRY, GD_POLYNOM_ENTRY, GD_RAW_ENTRY, GD_RECIP_ENTRY, GD_SBIT_ENTRY, GD_STRING_ENTRY. RETURN VALUE
Upon successful completion, gd_nfields_by_type() returns the number of defined fields in the dirfile. On error, it returns zero and sets the dirfile error to a non-zero error value. Possible error values are: GD_E_BAD_DIRFILE The supplied dirfile was invalid. The dirfile error may be retrieved by calling gd_error(3). A descriptive error string for the last error encountered can be obtained from a call to gd_error_string(3). SEE ALSO
dirfile(5), gd_open(3), gd_error(3), gd_error_string(3), gd_field_list_by_type(3), gd_nfields(3), gd_nmfields_by_type(3) Version 0.7.0 3 November 2010 gd_nfields_by_type(3)

Check Out this Related Man Page

gd_field_list(3)						      GETDATA							  gd_field_list(3)

NAME
gd_field_list -- retrieve a list of fields in a dirfile SYNOPSIS
#include <getdata.h> const char **gd_field_list(DIRFILE *dirfile); DESCRIPTION
The gd_field_list() function queries a dirfile(5) database specified by dirfile and returns a read-only list of names of the all fields de- fined in the database. Notably, this list does not include /META subfields. The dirfile argument must point to a valid DIRFILE object previously created by a call to gd_open(3). The array returned will be de-allocated by a call to gd_close(3) and should not be de-allocated by the caller. The list returned should not be assumed to be in any particular order. The array is terminated by a NULL pointer. The number of strings in the array can be ob- tained from a call to gd_nfields(3). The caller may not modify any strings in the array, or the array itself. Doing so may cause database corruption. The pointer returned is guaranteed to be valid until gd_field_list() is called again on the same DIRFILE object, or until the array is de-allocated by a call to gd_close(3). RETURN VALUE
Upon successful completion, gd_field_list() returns a pointer to an array of strings containing the names of all the fields defined in the dirfile database. On error it returns NULL and sets the dirfile error to a non-zero error value. Possible error values are: GD_E_ALLOC The library was unable to allocate memory. GD_E_BAD_DIRFILE The supplied dirfile was invalid. The dirfile error may be retrieved by calling gd_error(3). A descriptive error string for the last error encountered can be obtained from a call to gd_error_string(3). SEE ALSO
dirfile(5), gd_cbopen(3), gd_error(3), gd_error_string(3), gd_field_list_by_type(3), gd_mfield_list(3), gd_nfields(3), gd_vector_list(3) Version 0.7.0 15 October 2010 gd_field_list(3)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to copy update without interactive

Dear, How to copy update without interactive confirmation? I am using #cp -Rfu dirfile dirfile But the interactive confirmation still exist. Thank you. (0 Replies)
Discussion started by: blesets
0 Replies

2. Shell Programming and Scripting

Get count on different fields along the raws in a file

Dear All, Please help me to do this. I have a file like this. 5|94662240807|94776109911|94776325901|94779007172|||||| 5|94112925421|94352240384|94352259199|94672229012|||||| 5|94714242745|94722952461|94777660793|94788914465|||||| 5|94242224624|94776145420|94776172499|94776531059|||||| ... (7 Replies)
Discussion started by: Nayanajith
7 Replies

3. UNIX for Dummies Questions & Answers

count number of fields not using SED or AWK

hi forums i need help with a little problem i am having. i need to count the number of fields that are in a saved variable so i can use that number to make a different function work properly. is there a way of doing this without using SED/AWK? anything would be greatly appreciated (4 Replies)
Discussion started by: strasner
4 Replies

4. UNIX for Dummies Questions & Answers

distinct values of all the fields

I am a beginner to scripting, please help me in this regard. How do I create a script that provides a count of distinct values of all the fields in the pipe delimited file ? I have 20 different files with multiple columns in each file. I needed to write a generic script where I give the number... (1 Reply)
Discussion started by: vukkusila
1 Replies