--- psiconv/trunk/lib/psiconv/list.h 2000/12/27 02:12:23 80 +++ psiconv/trunk/lib/psiconv/list.h 2014/10/22 19:53:40 351 @@ -1,6 +1,6 @@ /* list.h - Part of psiconv, a PSION 5 file formats converter - Copyright (c) 1999, 2000 Frodo Looijaard + Copyright (c) 1999-2014 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,10 +23,11 @@ #ifndef PSICONV_LIST_H #define PSICONV_LIST_H -#include #include #include +#include + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -75,6 +76,13 @@ succeeds, 0 is returned. */ extern int psiconv_list_add(psiconv_list l, const void *el); +/* Remove the last element from the list, and copy it to el. Note that + this will not reduce the amount of space reserved for the list. + An error code is returned, which will be 0 zero if everything + succeeded. It is your own responsibility to make sure enough + space is allocated to el. */ +extern int psiconv_list_pop(psiconv_list l, void *el); + /* Replace an element within the list. The element is copied from the supplied element. Fails if you try to write at or after the end of the list. */