Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=512cc24d8261d7d20d92ac1a822cc8d6ca4c42bc
commit 512cc24d8261d7d20d92ac1a822cc8d6ca4c42bc Author: Michel Hermier <[email protected]> Date: Sat Aug 9 08:55:48 2014 +0200 libpacman: Move list struct definition to private header. diff --git a/lib/libpacman/CMakeLists.txt b/lib/libpacman/CMakeLists.txt index 76caf4d..529229d 100644 --- a/lib/libpacman/CMakeLists.txt +++ b/lib/libpacman/CMakeLists.txt @@ -25,6 +25,7 @@ set(FLIB_SOURCES util/fdispatchlogger.h util/flist.c util/flist.h + util/flist_p.h util/ffilelogger.c util/ffilelogger.h util/ffunctional.h @@ -34,6 +35,7 @@ set(FLIB_SOURCES util/flogger.h util/fptrlist.c util/fptrlist.h + util/fptrlist_p.h util/fsyslogger.c util/fsyslogger.h util/list.c diff --git a/lib/libpacman/util/flist.h b/lib/libpacman/util/flist.h index e91fd9b..f6c71b8 100644 --- a/lib/libpacman/util/flist.h +++ b/lib/libpacman/util/flist.h @@ -2,7 +2,7 @@ * flist.h * * Copyright (c) 2002-2006 by Judd Vinet <[email protected]> - * Copyright (c) 2013 by Michel Hermier <[email protected]> + * Copyright (c) 2013-2014 by Michel Hermier <[email protected]> * * 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 @@ -29,28 +29,13 @@ #ifdef __cplusplus extern "C" { #endif + #ifndef F_NOCOMPAT typedef struct __pmlist_t FList; typedef struct __pmlist_t FListItem; - -/* Chained list struct */ -struct __pmlist_t { - struct __pmlist_t *prev; - struct __pmlist_t *next; - void *data; -}; #else typedef struct FList FList; typedef struct FListItem FListItem; - -struct FListItem { - FListItem *next; - FListItem *previous; -}; - -struct FList { - FListItem as_FListItem; -}; #endif typedef int (*FListItemComparatorFunc)(const FListItem *item, const void *comparator_data); @@ -87,9 +72,12 @@ const FListItem *f_list_last_const(const FList *self); FListItem *f_list_rend(FList *self); const FListItem *f_list_rend_const(const FList *self); +#include "util/flist_p.h" + #ifdef __cplusplus } #endif + #endif /* F_LIST_H */ /* vim: set ts=2 sw=2 noet: */ diff --git a/lib/libpacman/util/flist_p.h b/lib/libpacman/util/flist_p.h new file mode 100644 index 0000000..4961dbf --- /dev/null +++ b/lib/libpacman/util/flist_p.h @@ -0,0 +1,55 @@ +/* + * flist_p.h + * + * Copyright (c) 2002-2006 by Judd Vinet <[email protected]> + * Copyright (c) 2013-2014 by Michel Hermier <[email protected]> + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +#ifndef F_LIST_P_H +#define F_LIST_P_H + +#include "util/flist.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef F_NOCOMPAT +/* Chained list struct */ +struct __pmlist_t { + struct __pmlist_t *prev; + struct __pmlist_t *next; + void *data; +}; +#else +struct FListItem { + FListItem *next; + FListItem *previous; +}; + +struct FList { + FListItem as_FListItem; +}; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* F_LIST_P_H */ + +/* vim: set ts=2 sw=2 noet: */ diff --git a/lib/libpacman/util/fptrlist.h b/lib/libpacman/util/fptrlist.h index f75d7db..f5fdfee 100644 --- a/lib/libpacman/util/fptrlist.h +++ b/lib/libpacman/util/fptrlist.h @@ -2,7 +2,7 @@ * fptrlist.h * * Copyright (c) 2002-2006 by Judd Vinet <[email protected]> - * Copyright (c) 2013 by Michel Hermier <[email protected]> + * Copyright (c) 2013-2014 by Michel Hermier <[email protected]> * * 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 @@ -36,15 +36,6 @@ typedef struct __pmlist_t FPtrListItem; #else typedef struct FPtrList FPtrList; typedef struct FPtrListItem FPtrListItem; - -struct FPtrList { - FList as_FList; -}; - -struct FPtrListItem { - FListItem as_FListItem; - void *data; -}; #endif FPtrListItem *f_ptrlistitem_new(void *data); diff --git a/lib/libpacman/util/fptrlist_p.h b/lib/libpacman/util/fptrlist_p.h new file mode 100644 index 0000000..ca1ea00 --- /dev/null +++ b/lib/libpacman/util/fptrlist_p.h @@ -0,0 +1,48 @@ +/* + * fptrlist_p.h + * + * Copyright (c) 2002-2006 by Judd Vinet <[email protected]> + * Copyright (c) 2013-2014 by Michel Hermier <[email protected]> + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +#ifndef F_PTRLIST_P_H +#define F_PTRLIST_P_H + +#include "util/fptrlist.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef F_NOCOMPAT +struct FPtrList { + FList as_FList; +}; + +struct FPtrListItem { + FListItem as_FListItem; + void *data; +}; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* F_PTRLIST_P_H */ + +/* vim: set ts=2 sw=2 noet: */ _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
