From 5e1419c0b5cf717e57959bc27eeab1cfa4bea5dc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 25 Apr 2007 02:21:12 -0400 Subject: Merge single-function header files on pacman side Having a seperate header file for add, remove, query, etc. seemed overkill. Merge them all into a common pacman.h and fix the necessary #includes. Signed-off-by: Dan McGee --- src/pacman/Makefile.am | 14 +++++++------- src/pacman/add.c | 2 +- src/pacman/add.h | 30 ------------------------------ src/pacman/conf.c | 2 +- src/pacman/deptest.c | 3 +-- src/pacman/deptest.h | 30 ------------------------------ src/pacman/pacman.c | 10 +++------- src/pacman/pacman.h | 42 ++++++++++++++++++++++++++++++++++++++++++ src/pacman/query.c | 3 +-- src/pacman/query.h | 30 ------------------------------ src/pacman/remove.c | 2 +- src/pacman/remove.h | 30 ------------------------------ src/pacman/sync.c | 2 +- src/pacman/sync.h | 30 ------------------------------ src/pacman/upgrade.c | 3 +-- src/pacman/upgrade.h | 30 ------------------------------ 16 files changed, 59 insertions(+), 204 deletions(-) delete mode 100644 src/pacman/add.h delete mode 100644 src/pacman/deptest.h create mode 100644 src/pacman/pacman.h delete mode 100644 src/pacman/query.h delete mode 100644 src/pacman/remove.h delete mode 100644 src/pacman/sync.h delete mode 100644 src/pacman/upgrade.h diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am index 82ec4d6b..91912991 100644 --- a/src/pacman/Makefile.am +++ b/src/pacman/Makefile.am @@ -13,18 +13,18 @@ INCLUDES = -I$(top_srcdir)/lib/libalpm AM_CFLAGS = -D_GNU_SOURCE pacman_SOURCES = \ - add.h add.c \ + add.c \ conf.h conf.c \ - deptest.h deptest.c \ + deptest.c \ downloadprog.h downloadprog.c \ log.h log.c \ package.h package.c \ - pacman.c \ - query.h query.c \ - remove.h remove.c \ - sync.h sync.c \ + pacman.h pacman.c \ + query.c \ + remove.c \ + sync.c \ trans.h trans.c \ - upgrade.h upgrade.c \ + upgrade.c \ util.h util.c pacman_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la \ diff --git a/src/pacman/add.c b/src/pacman/add.c index 2adf8681..632366c6 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -30,7 +30,7 @@ #include /* pacman */ -#include "add.h" +#include "pacman.h" #include "log.h" #include "downloadprog.h" #include "trans.h" diff --git a/src/pacman/add.h b/src/pacman/add.h deleted file mode 100644 index 61a956c5..00000000 --- a/src/pacman/add.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * add.h - * - * Copyright (c) 2002-2006 by Judd Vinet - * - * 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 _PM_ADD_H -#define _PM_ADD_H - -#include - -int pacman_add(alpm_list_t *targets); - -#endif /* _PM_ADD_H */ - -/* vim: set ts=2 sw=2 noet: */ diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 045bdcf6..18146ca1 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -31,9 +31,9 @@ /* pacman */ #include "conf.h" +#include "pacman.h" #include "util.h" #include "log.h" -#include "sync.h" #include "downloadprog.h" config_t *config_new(void) diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c index 1ae7ceb5..bce5641d 100644 --- a/src/pacman/deptest.c +++ b/src/pacman/deptest.c @@ -30,11 +30,10 @@ #include /* pacman */ -#include "deptest.h" +#include "pacman.h" #include "util.h" #include "conf.h" #include "log.h" -#include "sync.h" extern config_t *config; diff --git a/src/pacman/deptest.h b/src/pacman/deptest.h deleted file mode 100644 index ee30e437..00000000 --- a/src/pacman/deptest.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * deptest.h - * - * Copyright (c) 2002-2006 by Judd Vinet - * - * 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 _PM_DEPTEST_H -#define _PM_DEPTEST_H - -#include - -int pacman_deptest(alpm_list_t *targets); - -#endif /* _PM_DEPTEST_H */ - -/* vim: set ts=2 sw=2 noet: */ diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 483a7bbf..5fd32ba7 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -28,9 +28,9 @@ #include #include #include +#include #include #include -#include #include #include #if defined(__APPLE__) @@ -44,21 +44,17 @@ #endif #include +/* alpm */ #include #include /* pacman */ +#include "pacman.h" #include "util.h" #include "log.h" #include "downloadprog.h" #include "conf.h" #include "package.h" -#include "add.h" -#include "remove.h" -#include "upgrade.h" -#include "query.h" -#include "sync.h" -#include "deptest.h" #if defined(__OpenBSD__) || defined(__APPLE__) #define BSD diff --git a/src/pacman/pacman.h b/src/pacman/pacman.h new file mode 100644 index 00000000..38c89fb3 --- /dev/null +++ b/src/pacman/pacman.h @@ -0,0 +1,42 @@ +/* + * pacman.h + * + * Copyright (c) 2002-2007 by Judd Vinet + * + * 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 _PM_PACMAN_H +#define _PM_PACMAN_H + +#include + +/* add.c, this should merge with upgrade.c */ +int pacman_add(alpm_list_t *targets); +/* sync.c */ +int pacman_sync(alpm_list_t *targets); +/* query.c */ +int pacman_query(alpm_list_t *targets); +/* remove.c */ +int pacman_remove(alpm_list_t *targets); +/* upgrade.c */ +int pacman_upgrade(alpm_list_t *targets); + +/* deptest.c */ +int pacman_deptest(alpm_list_t *targets); + +#endif /* _PM_PACMAN_H */ + +/* vim: set ts=2 sw=2 noet: */ diff --git a/src/pacman/query.c b/src/pacman/query.c index a6ebddb0..6997a7a7 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -34,11 +34,10 @@ #include /* pacman */ -#include "query.h" +#include "pacman.h" #include "package.h" #include "log.h" #include "conf.h" -#include "sync.h" #include "util.h" extern config_t *config; diff --git a/src/pacman/query.h b/src/pacman/query.h deleted file mode 100644 index fa55c732..00000000 --- a/src/pacman/query.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * query.h - * - * Copyright (c) 2002-2006 by Judd Vinet - * - * 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 _PM_QUERY_H -#define _PM_QUERY_H - -#include - -int pacman_query(alpm_list_t *targets); - -#endif /* _PM_QUERY_H */ - -/* vim: set ts=2 sw=2 noet: */ diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 9989f8e5..cf9b6293 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -30,7 +30,7 @@ #include /* pacman */ -#include "remove.h" +#include "pacman.h" #include "util.h" #include "log.h" #include "trans.h" diff --git a/src/pacman/remove.h b/src/pacman/remove.h deleted file mode 100644 index 33a2d20d..00000000 --- a/src/pacman/remove.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * remove.h - * - * Copyright (c) 2002-2006 by Judd Vinet - * - * 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 _PM_REMOVE_H -#define _PM_REMOVE_H - -#include - -int pacman_remove(alpm_list_t *targets); - -#endif /* _PM_REMOVE_H */ - -/* vim: set ts=2 sw=2 noet: */ diff --git a/src/pacman/sync.c b/src/pacman/sync.c index ca95fe63..9bf970f6 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -42,7 +42,7 @@ * remove it from Makefile.am on the pacman side */ /* pacman */ -#include "sync.h" +#include "pacman.h" #include "util.h" #include "log.h" #include "downloadprog.h" diff --git a/src/pacman/sync.h b/src/pacman/sync.h deleted file mode 100644 index 7175577f..00000000 --- a/src/pacman/sync.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * sync.h - * - * Copyright (c) 2002-2006 by Judd Vinet - * - * 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 _PM_SYNC_H -#define _PM_SYNC_H - -#include - -int pacman_sync(alpm_list_t *targets); - -#endif /* _PM_SYNC_H */ - -/* vim: set ts=2 sw=2 noet: */ diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index a4c94bb7..177484f5 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -27,8 +27,7 @@ #include /* pacman */ -#include "upgrade.h" -#include "add.h" +#include "pacman.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/upgrade.h b/src/pacman/upgrade.h deleted file mode 100644 index d26930f0..00000000 --- a/src/pacman/upgrade.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * upgrade.h - * - * Copyright (c) 2002-2006 by Judd Vinet - * - * 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 _PM_UPGRADE_H -#define _PM_UPGRADE_H - -#include - -int pacman_upgrade(alpm_list_t *targets); - -#endif /* _PM_UPGRADE_H */ - -/* vim: set ts=2 sw=2 noet: */ -- cgit v1.2.3-70-g09d2