diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-16 16:06:07 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-16 16:06:07 -0600 |
commit | be0ca741fd12897337408d1d7a7d8f5f18e1fac9 (patch) | |
tree | b9fa3458193a17180d8773a0204ee05ae206cd99 /libkdenetwork/libgpgme-copy/gpgme/progress.c | |
parent | bbb7afdb6da2969535e7f05715e2cb95cfdc917c (diff) | |
download | tdepim-be0ca741fd12897337408d1d7a7d8f5f18e1fac9.tar.gz tdepim-be0ca741fd12897337408d1d7a7d8f5f18e1fac9.zip |
Finish rename from prior commit
Diffstat (limited to 'libkdenetwork/libgpgme-copy/gpgme/progress.c')
-rw-r--r-- | libkdenetwork/libgpgme-copy/gpgme/progress.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/libkdenetwork/libgpgme-copy/gpgme/progress.c b/libkdenetwork/libgpgme-copy/gpgme/progress.c deleted file mode 100644 index cdc87eb8..00000000 --- a/libkdenetwork/libgpgme-copy/gpgme/progress.c +++ /dev/null @@ -1,81 +0,0 @@ -/* progress.c - status handler for progress status - Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH - - This file is part of GPGME. - - GPGME is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - GPGME 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdlib.h> -#include <string.h> -#include <errno.h> - -#include "util.h" -#include "context.h" - - -gpgme_error_t -_gpgme_progress_status_handler (void *priv, gpgme_status_code_t code, - char *args) -{ - gpgme_ctx_t ctx = (gpgme_ctx_t) priv; - char *p; - char *args_cpy; - int type = 0; - int current = 0; - int total = 0; - - if (code != GPGME_STATUS_PROGRESS || !*args || !ctx->progress_cb) - return 0; - - args_cpy = strdup (args); - if (!args_cpy) - return gpg_error_from_errno (errno); - - p = strchr (args_cpy, ' '); - if (p) - { - *p++ = 0; - if (*p) - { - type = *(unsigned char *)p; - p = strchr (p+1, ' '); - if (p) - { - *p++ = 0; - if (*p) - { - current = atoi (p); - p = strchr (p+1, ' '); - if (p) - { - *p++ = 0; - total = atoi (p); - } - } - } - } - } - - if (type != 'X') - ctx->progress_cb (ctx->progress_cb_value, args_cpy, type, current, total); - - free (args_cpy); - return 0; -} |