NAME

count_strings_in_word_list - A Word_list can contain both strings and empty entries.

SYNOPSIS

#include "l/l_word_list.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int count_strings_in_word_list(const Word_list *word_list_ptr);

DESCRIPTION

The number of strings plus the number of empty entries is stored in the field word_list_ptr->num_words. This function counts only the number of strings, i.e., the non-empty entries. (Note also than an empty entry differs from an empty string! An empty entry corresponds to a char* equal to NULL somewhere in the array, whereas an empty string corresponds to a char* containing the address of a byte storing a '\0' character. We count the latter but not the former.)

RETURNS

The number of strings in the list, or zero if the pointer equals NULL.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

get_target_word_list , ra_get_target_word_list , free_word_list , append_word_list , select_from_word_list , copy_word_list , sort_word_list , search_word_list , search_sorted_word_list , concat_word_lists , read_word_list , fp_read_word_list , sget_word_list , write_word_list , fp_write_word_list , trim_word_list_empty_entries_at_tail