Liste(3) Liste(3) 12 Febuary 1990 NAME CreatList, AddElmList, AppendList, CopyList, DestElmList, DestList, ElmNumList, EmptyList, FirstElmList, InsertSortList, MapList, NextElmList, PrintList, SizeList , SortList - List handler SYNOPSIS #include ''Liste.h'' long AddElmList (s_idliste, el) long s_idliste ; long el ; Liste AppendList (s_idliste1, s_idliste2) long s_idliste1, s_idliste2 ; Liste CopyList (s_idliste) long s_idliste ; Liste CreatList () long DestElmList (s_idliste, el) long s_idliste ; long el ; long DestList (s_idliste) long *s_idliste ; long ElmNumList (s_idliste, j) long s_idliste ; long j ; int EmptyList (s_idliste) long s_idliste ; long FirstElmList (s_idliste) long s_idliste ; long InsertSortList (s_idliste, el, function) long s_idliste ; long el ; long (*function)() ; long MapList (s_idliste, function) long s_idliste ; long (*function)() ; long NextElmList (s_idliste) long s_idliste ; long PrintList (s_idliste, fptr) long s_idliste ; FILE * fptr ; long SizeList (s_idliste) long s_idliste ; long SortList (s_idliste, function) long s_idliste ; long (*function)() ; DESCRIPTION These routines provide an integer lists handler : CreatList Create a list of integers, and return a unique list identifier. AjoutElmList put the element el at the end of the existing list denoted by s_idliste. AppendList concatenate the 2 existing lists denoted by s_idliste1 and s_islidte2 in a third list and return a new unique list - 1 - Formatted: November 14, 2024 Liste(3) Liste(3) 12 Febuary 1990 identifier. CopyList copy an existing list denoted by s_idliste in a new one, and return a new unique list identifier. DestElmList Remove the element el from the list denoted by s_idliste. and return ERRVI if the el is not found. DestList remove the existing list denoted by s_id_liste. ElmNumList return the jth element of the existing list defined by s_idliste or return ERRVI if the el is not found. PrintList print the list denoted by s_idliste in the file described by fptr. InserSortList insert the element el in the existed sorted list dennoted by s_idliste. The sort is operated by testing the returned value of function (el, element_of_the_list). function (a, b) should return : an integer less than, equal to, or greater than zero, so must the a (first argument) to be considered be less than, equal to, or greater than b (the second argument). function (a, b) is called with the address of a and b i.e function's parameters must be pointers. EmptyList return true (1) if the list denoted by s_idliste is empty, and else return false (0). MapList apply the function function to all the elements of the list defined by s_idliste. FirstElmList return the first element of an existing list denoted by s_idliste or ERRVI if the list is empty. NextElmList return the next element of an existing list denoted by s_idliste. or ERRVI if there aren't so many elements. SizeList return the number of element from an existing list denoted by s_idliste. SortList sort the list denoted by s_idliste , by testing the result of function (one_element_of_the_list, next_element_of_the_list). function (a, b) is called with the address of a and b i.e function's parameters must be pointers. FILES ORT/Libs/libListe.a ORT/Incs/Liste.h ERRORS each function return : ERRVI (-98989898) if a routine which can't accept it is called with an empty list (ex : SuivElmList). ERRNU (- 7897889789) if an null list identifier is given to any routine. PASERR 0 is returned, if no error appened, by the functions which are not suppose to return a list identifier or an element. (Ex : MapList). AUTHOR Jean Paul Schmidt, Laboratoire de Genie Informatique, 38 Grenoble, France. DIAGNOSTICS Please report problems to A. Etemadi. - 2 - Formatted: November 14, 2024