NAME

append_word_list - Adds a word to the end of a word list

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 append_word_list
(
	Word_list **word_list_ptr_ptr,
	const char *word
);

DESCRIPTION

The routine adds a word to the end of a word list, as defined by the first NULL pointer encountered. If the word list pointed to by the first argument has no NULLs, then its size is increased without changing its contents, at which point the append will succeed. The word list pointed to by the first argument can be NULL. The word pointer must not equal NULL. Note that if num_words increases, it might increase by more than one; the list can have an unspecified number of empty entries added to the end. This will make future calls to append_word_list() faster (compared to the time required to realloc() and to copy the entries). At exit, the num_words field stores the total number of entries (empty and nonempty). If you do not want empty entries at the tail end of the list, consider also calling trim_word_list_empty_entries_at_tail().

RETURNS

NO_ERROR on success, and ERROR on failure, with an appropriate error message being set.

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 , 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 , count_strings_in_word_list , trim_word_list_empty_entries_at_tail