From 2322909703eb2f30ac0ef7273420f13c5f61410b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 16 Nov 2007 20:18:45 -0600 Subject: War on whitespace Run the kernel's cleanfile script on all of our source files. Signed-off-by: Dan McGee --- src/pacman/add.c | 8 ++++---- src/pacman/callback.c | 10 +++++----- src/pacman/conf.c | 6 +++--- src/pacman/conf.h | 6 +++--- src/pacman/deptest.c | 8 ++++---- src/pacman/package.c | 14 +++++++------- src/pacman/package.h | 6 +++--- src/pacman/remove.c | 8 ++++---- src/pacman/util.c | 14 +++++++------- src/util/testdb.c | 6 +++--- src/util/testpkg.c | 6 +++--- src/util/vercmp.c | 8 ++++---- 12 files changed, 50 insertions(+), 50 deletions(-) (limited to 'src') diff --git a/src/pacman/add.c b/src/pacman/add.c index 987e62cb..c2236438 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -1,8 +1,8 @@ /* * add.c - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -136,7 +136,7 @@ int pacman_add(alpm_list_t *targets) pmdepmissing_t *miss = alpm_list_getdata(i); pmdepend_t *dep = alpm_miss_get_dep(miss); char *depstring = alpm_dep_get_string(dep); - + /* TODO indicate if the error was a virtual package or not: * :: %s: requires %s, provided by %s */ diff --git a/src/pacman/callback.c b/src/pacman/callback.c index d50eaa75..232ca4cd 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -441,7 +441,7 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total, int list_xfered, int list_total) { const int infolen = 50; - char *fname, *p; + char *fname, *p; float rate = 0.0, timediff = 0.0, f_xfered = 0.0; unsigned int eta_h = 0, eta_m = 0, eta_s = 0; @@ -485,7 +485,7 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total, /* compute final values */ struct timeval current_time; float diff_sec, diff_usec; - + gettimeofday(¤t_time, NULL); diff_sec = current_time.tv_sec - initial_time.tv_sec; diff_usec = current_time.tv_usec - initial_time.tv_usec; @@ -548,15 +548,15 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total, xfered_size = 'G'; /* I should seriously hope that archlinux packages never break * the 9999.9GB mark... we'd have more serious problems than the progress - * bar in pacman */ + * bar in pacman */ } } - printf(" %-*s %6.1f%c %#6.1f%c/s %02u:%02u:%02u", FILENAME_TRIM_LEN, fname, + printf(" %-*s %6.1f%c %#6.1f%c/s %02u:%02u:%02u", FILENAME_TRIM_LEN, fname, f_xfered, xfered_size, rate, rate_size, eta_h, eta_m, eta_s); free(fname); - + /* The progress bar is based on the file percent regardless of the * TotalDownload option. */ graph_percent = (int)((float)file_xfered) / ((float)file_total) * 100; diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 9b5850d7..9940a133 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -1,8 +1,8 @@ /* * conf.c - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ diff --git a/src/pacman/conf.h b/src/pacman/conf.h index b7844d7d..ee55e1d9 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -1,8 +1,8 @@ /* * conf.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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef _PM_CONF_H diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c index 301558e9..6b104bad 100644 --- a/src/pacman/deptest.c +++ b/src/pacman/deptest.c @@ -1,8 +1,8 @@ /* * deptest.c - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -42,7 +42,7 @@ int pacman_deptest(alpm_list_t *targets) if(targets == NULL) { return(0); } - + for(i = targets; i; i = alpm_list_next(i)) { int found = 0; pmpkg_t *pkg; diff --git a/src/pacman/package.c b/src/pacman/package.c index 5c2abcf4..b62a1376 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -1,8 +1,8 @@ /* * package.c - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -144,7 +144,7 @@ void dump_pkg_sync(pmpkg_t *pkg, const char *treename) descheader = _("Description : "); md5sum = alpm_pkg_get_md5sum(pkg); - + printf(_("Repository : %s\n"), treename); printf(_("Name : %s\n"), (char *)alpm_pkg_get_name(pkg)); printf(_("Version : %s\n"), (char *)alpm_pkg_get_version(pkg)); @@ -155,12 +155,12 @@ void dump_pkg_sync(pmpkg_t *pkg, const char *treename) list_display(_("Replaces :"), alpm_pkg_get_replaces(pkg)); printf(_("Download Size : %6.2f K\n"), (float)alpm_pkg_get_size(pkg) / 1024.0); printf(_("Installed Size : %6.2f K\n"), (float)alpm_pkg_get_isize(pkg) / 1024.0); - + /* printed using a variable to make i18n safe */ printf("%s", descheader); indentprint(alpm_pkg_get_desc(pkg), mbstowcs(NULL, descheader, 0)); printf("\n"); - + if (md5sum != NULL && md5sum[0] != '\0') { printf(_("MD5 Sum : %s"), md5sum); } @@ -218,7 +218,7 @@ void dump_pkg_backups(pmpkg_t *pkg) printf(_("(none)\n")); } } - + /* List all files contained in a package */ void dump_pkg_files(pmpkg_t *pkg) diff --git a/src/pacman/package.h b/src/pacman/package.h index be5368b4..0e4bb0fa 100644 --- a/src/pacman/package.h +++ b/src/pacman/package.h @@ -1,8 +1,8 @@ /* * package.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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef _PM_PACKAGE_H diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 7ab42bae..e1e4f04a 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -1,8 +1,8 @@ /* * remove.c - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -66,7 +66,7 @@ int pacman_remove(alpm_list_t *targets) return(1); } - /* If the target is a group, ask if its packages should be removed + /* If the target is a group, ask if its packages should be removed * (the library can't remove groups for now) */ for(i = targets; i; i = alpm_list_next(i)) { diff --git a/src/pacman/util.c b/src/pacman/util.c index a0402ab0..77773bf5 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1,8 +1,8 @@ /* * util.c - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -234,7 +234,7 @@ char *strtrim(char *str) if(pch != str) { memmove(str, pch, (strlen(pch) + 1)); } - + /* check if there wasn't anything but whitespace in the string. */ if(*str == '\0') { return(str); @@ -380,7 +380,7 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local) * installed. */ if(alpm_sync_get_type(sync) == PM_SYNC_TYPE_REPLACE) { alpm_list_t *to_replace = alpm_sync_get_data(sync); - + for(j = to_replace; j; j = alpm_list_next(j)) { pmpkg_t *rp = alpm_list_getdata(j); const char *name = alpm_pkg_get_name(rp); @@ -422,7 +422,7 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local) list_display(_("Remove:"), to_remove); printf("\n"); FREELIST(to_remove); - + printf(_("Total Removed Size: %.2f MB\n"), mbrsize); printf("\n"); } @@ -431,7 +431,7 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local) printf("\n"); printf(_("Total Download Size: %.2f MB\n"), mbdlsize); - + /* TODO because all pkgs don't include isize, this is a crude hack */ if(mbisize > mbdlsize) { printf(_("Total Installed Size: %.2f MB\n"), mbisize); diff --git a/src/util/testdb.c b/src/util/testdb.c index d559bd7b..ca10dd9f 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -2,7 +2,7 @@ * testdb.c : Test a pacman local database for validity * * Copyright (c) 2007 by Aaron Griffin - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -68,7 +68,7 @@ static int db_test(char *dbpath) int ret = 0; DIR *dir; - + if(!(dir = opendir(dbpath))) { fprintf(stderr, "error : %s : %s\n", dbpath, strerror(errno)); return(1); diff --git a/src/util/testpkg.c b/src/util/testpkg.c index d2679e58..d724bb8a 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -2,7 +2,7 @@ * testpkg.c : Test a pacman package for validity * * Copyright (c) 2007 by Aaron Griffin - * + * * 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -65,7 +65,7 @@ int main(int argc, char **argv) alpm_pkg_free(pkg); retval = 0; } - + if(alpm_release() == -1) { fprintf(stderr, "error releasing alpm: %s\n", alpm_strerrorlast()); } diff --git a/src/util/vercmp.c b/src/util/vercmp.c index f1efd85a..29ab121d 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -1,8 +1,8 @@ /* * vercmp.c - * + * * Copyright (c) 2002-2005 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 @@ -15,7 +15,7 @@ * * 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, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) printf("0\n"); return(0); } - + ret = alpm_pkg_vercmp(s1, s2); printf("%d\n", ret); return(ret); -- cgit v1.2.3-24-g4f1b