From d10936034d659102044a9d02909f80573e2d53e0 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 31 Mar 2014 11:37:03 +2100 Subject: [PATCH] Re: [Patch v3] util: add gzreadline --- 46/6d99b42c04c9d77d4311b5367e15ddbe7c8059 | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 46/6d99b42c04c9d77d4311b5367e15ddbe7c8059 diff --git a/46/6d99b42c04c9d77d4311b5367e15ddbe7c8059 b/46/6d99b42c04c9d77d4311b5367e15ddbe7c8059 new file mode 100644 index 000000000..ff2c995f8 --- /dev/null +++ b/46/6d99b42c04c9d77d4311b5367e15ddbe7c8059 @@ -0,0 +1,73 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id D7D7E431FBC + for ; Sun, 30 Mar 2014 07:37:18 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Cc0U7mgkv81I for ; + Sun, 30 Mar 2014 07:37:13 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 67810431FB6 + for ; Sun, 30 Mar 2014 07:37:13 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WUGrD-0003YJ-GJ; Sun, 30 Mar 2014 11:37:07 -0300 +Received: (nullmailer pid 22462 invoked by uid 1000); Sun, 30 Mar 2014 + 14:37:03 -0000 +From: David Bremner +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [Patch v3] util: add gzreadline +In-Reply-To: +References: + <1396178602-7583-1-git-send-email-david@tethera.net> + +User-Agent: Notmuch/0.17+164~g31fc76b (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 30 Mar 2014 11:37:03 -0300 +Message-ID: <877g7beos0.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 30 Mar 2014 14:37:19 -0000 + +Tomi Ollila writes: + +> "On error, gzgets() shall return Z_NULL. +> +> In light of this I'd say no. can we set out-of-memory using some public +> api so it is available using gzerror() +> +> + +Since we already "broke" the API, what about + +1) start a "util_status_t" enum, later unify that with the hex_ return codes. + +2) + +util_status_t +gz_getline (void *ctx, char **buf, size_t *bufsize, ssize_t *bytes_read, + gzFile stream); + +d -- 2.26.2