From unknown Sun Jun 22 22:41:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#72472 <72472@debbugs.gnu.org> To: bug#72472 <72472@debbugs.gnu.org> Subject: Status: gzip: simplify printing of offsets using -l and -v Reply-To: bug#72472 <72472@debbugs.gnu.org> Date: Mon, 23 Jun 2025 05:41:38 +0000 retitle 72472 gzip: simplify printing of offsets using -l and -v reassign 72472 gzip submitter 72472 Collin Funk severity 72472 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 20:10:40 2024 Received: (at submit) by debbugs.gnu.org; 5 Aug 2024 00:10:40 +0000 Received: from localhost ([127.0.0.1]:57612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1salJA-0003Ns-5U for submit@debbugs.gnu.org; Sun, 04 Aug 2024 20:10:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:44396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1salJ7-0003Ne-8T for submit@debbugs.gnu.org; Sun, 04 Aug 2024 20:10:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1salIl-0005Lh-7u for bug-gzip@gnu.org; Sun, 04 Aug 2024 20:10:15 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1salIf-0007OU-Dx for bug-gzip@gnu.org; Sun, 04 Aug 2024 20:10:13 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1fd69e44596so35691165ad.1 for ; Sun, 04 Aug 2024 17:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722816605; x=1723421405; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=SgGFLDLwDK4FT3EFsyzmL4tipetppyiXQFhcKqh+xzE=; b=NBnvH78A6dKqqRVgwP7RlTeaIb2IBjNVjS3ENVJb48ORbGcdEIggOBzvFlSjF9Nu+d FSPjnDMnAcmJPKqpFahUHZe3kPMplpwh3Cfb4xRli8KdjyTwUGiU3hxVbEdwdAmZHC0K FT/hgX6aa8x2j6IXQjqYNv9VW5fBLQB/gayQzF668thQwKDy+8r1VhtS7kfoUlsFJobK SotKMYwZoSbMKpp+P5fRJqC58t1LU9ITey5hLSnlYDA84/3AxXhtZhvHHPnes0uvfZl0 t4naWHEqmjUT0WaAme2RZIQzItrbiaaXd8+mBxdHi6MTKs/3f5/CakEpXCYE9xvCVAUz E71w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722816605; x=1723421405; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SgGFLDLwDK4FT3EFsyzmL4tipetppyiXQFhcKqh+xzE=; b=Wnq1EOyJwWb/7uI0Tj6Cquu88sWQJDOcHKawSByh3KbbxvlGf6aKHS3K186xWU2w8q 4FgLM/9SiFBlQnt505GpJtXlGJriiAkRyEKFb8rikf69fkPP97kLIyHPXVVDHPNXAUvO EsM8iE/Xl178nkP+YOg7I6+vONKaKcVNk9lqKfRwjqprERPYgrNn07Os4TQ8p4w/lJ/e CUQ5vFoQu/95/VN0UxDyQUUkVHncmDMmNHqdoMcWh06L1bkRaT0d3rOb87pqQ5J7tkJE AJIv6VLgjIQaMMWgJQInUPelf1g/IuVnf2jsW6X7I7itRavTPhgxjsGqFwpzT0Xa4FYD lJDw== X-Gm-Message-State: AOJu0YyIdVQStgXTYygzpI9BwGy2rUkJBIEzbE7B7wiUpHjowjEqXMji WfYkIFDtdJarpQEMCpMig1wHLgZPX5l9EZREO92qjA5JuXnWypYTZpBrEA== X-Google-Smtp-Source: AGHT+IGBqCBqvcDvhWzJ+H7SQn8sQqTDS/cm0sFXTAB2yNSUW7W2RVMeqv0N6/TTSk9fXGY2j10EJw== X-Received: by 2002:a17:902:e5cd:b0:1ff:5135:131f with SMTP id d9443c01a7336-1ff57ea4b92mr164657695ad.25.1722816605036; Sun, 04 Aug 2024 17:10:05 -0700 (PDT) Received: from fedora (c-73-93-224-2.hsd1.ca.comcast.net. [73.93.224.2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff58f53435sm55040655ad.64.2024.08.04.17.10.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 17:10:04 -0700 (PDT) From: Collin Funk To: bug-gzip@gnu.org Subject: gzip: simplify printing of offsets using -l and -v Date: Sun, 04 Aug 2024 17:10:01 -0700 Message-ID: <87ttfzsucm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=collin.funk1@gmail.com; helo=mail-pl1-x630.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain Since gzip uses 'printf-posix' can't offsets be printed using that instead of fprint_off? Patch attached + 1 more removing #ifndef CHAR_BIT cruft. Also, now that POSIX-1.2024 requires strcpy to be async-signal-safe can 'volatile_strcpy' be removed? Or is there something more to that. Signals hurt my brain a bit, sorry... Collin --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gzip-simplify-printing-of-offsets-using-l-and-v.patch >From 411035e0ed3dc024f26dd18b842f4bf10e2fa7bb Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 4 Aug 2024 16:44:43 -0700 Subject: [PATCH 1/2] gzip: simplify printing of offsets using -l and -v * bootstrap.conf (gnulib_modules): Add inttypes. * gzip.c: Include inttypes.h. (do_list): Use printf instead of fprint_off. * gzip.h (fprint_off): Remove deceleration. * util.c (fprint_off): Remove function. --- bootstrap.conf | 1 + gzip.c | 16 ++++++---------- gzip.h | 1 - util.c | 31 ------------------------------- 4 files changed, 7 insertions(+), 42 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index f9d29fc..c373ee6 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -40,6 +40,7 @@ gnumakefile gnupload ignore-value intprops +inttypes largefile lib-ignore lstat diff --git a/gzip.c b/gzip.c index 866028a..3e0a642 100644 --- a/gzip.c +++ b/gzip.c @@ -82,6 +82,7 @@ static char const *const license_msg[] = { /* configuration */ #include +#include #include #include @@ -1747,12 +1748,9 @@ do_list (int method) if (verbose) { printf(" "); } - if (verbose || !quiet) { - fprint_off(stdout, total_in, positive_off_t_width); - printf(" "); - fprint_off(stdout, total_out, positive_off_t_width); - printf(" "); - } + if (verbose || !quiet) + printf ("%*jd %*jd ", positive_off_t_width, (intmax_t) total_in, + positive_off_t_width, (intmax_t) total_out); display_ratio(total_out-(total_in-header_bytes), total_out, stdout); /* header_bytes is not meaningful but used to ensure the same * ratio if there is a single file. @@ -1779,10 +1777,8 @@ do_list (int method) else printf ("??? ?? ??:?? "); } - fprint_off(stdout, bytes_in, positive_off_t_width); - printf(" "); - fprint_off(stdout, bytes_out, positive_off_t_width); - printf(" "); + printf ("%*jd %*jd ", positive_off_t_width, (intmax_t) bytes_in, + positive_off_t_width, (intmax_t) bytes_out); if (bytes_in == -1L) { total_in = -1L; bytes_in = bytes_out = header_bytes = 0; diff --git a/gzip.h b/gzip.h index c19045a..b6a4e7c 100644 --- a/gzip.h +++ b/gzip.h @@ -322,7 +322,6 @@ extern void warning (char const *m); _Noreturn extern void read_error (void); _Noreturn extern void write_error (void); extern void display_ratio (off_t num, off_t den, FILE *file); -extern void fprint_off (FILE *, off_t, int); /* in inflate.c */ extern int inflate (void); diff --git a/util.c b/util.c index cc0b124..8835d2f 100644 --- a/util.c +++ b/util.c @@ -470,34 +470,3 @@ display_ratio (off_t num, off_t den, FILE *file) { fprintf(file, "%5.1f%%", den == 0 ? 0 : 100.0 * num / den); } - -/* ======================================================================== - * Print an off_t. There's no completely portable way to use printf, - * so we do it ourselves. - */ -void -fprint_off (FILE *file, off_t offset, int width) -{ - char buf[CHAR_BIT * sizeof (off_t)]; - char *p = buf + sizeof buf; - - /* Don't negate offset here; it might overflow. */ - if (offset < 0) { - do - *--p = '0' - offset % 10; - while ((offset /= 10) != 0); - - *--p = '-'; - } else { - do - *--p = '0' + offset % 10; - while ((offset /= 10) != 0); - } - - width -= buf + sizeof buf - p; - while (0 < width--) { - putc (' ', file); - } - for (; p < buf + sizeof buf; p++) - putc (*p, file); -} -- 2.45.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-maint-depend-on-Gnulib-s-limits-h.patch >From 5c929794ae9eabe1beafbd4bdea303eeef6aebe0 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 4 Aug 2024 16:52:29 -0700 Subject: [PATCH 2/2] maint: depend on Gnulib's limits-h * bootstrap.conf (gnulib_modules): Add limits-h. * gzip.c (CHAR_BIT): Remove definition. * unlzh.c: Include limits.h. (CHAR_BIT, UCHAR_MAX): Remove definitions. * util.c (CHAR_BIT): Remove definition. --- bootstrap.conf | 1 + gzip.c | 4 ---- unlzh.c | 9 +-------- util.c | 4 ---- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index c373ee6..2654b04 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -43,6 +43,7 @@ intprops inttypes largefile lib-ignore +limits-h lstat maintainer-makefile malloc-gnu diff --git a/gzip.c b/gzip.c index 3e0a642..5cd1586 100644 --- a/gzip.c +++ b/gzip.c @@ -106,10 +106,6 @@ static char const *const license_msg[] = { # define SEEK_END 2 #endif -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - #ifdef off_t off_t lseek (int fd, off_t offset, int whence); #endif diff --git a/unlzh.c b/unlzh.c index 25c05e3..3320196 100644 --- a/unlzh.c +++ b/unlzh.c @@ -4,6 +4,7 @@ */ #include +#include #include #include "tailor.h" @@ -35,14 +36,6 @@ static void make_table (int nchar, uch bitlen[], int tablebits, ush table[]); #define DICBIT 13 /* 12(-lh4-) or 13(-lh5-) */ #define DICSIZ ((unsigned) 1 << DICBIT) -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - -#ifndef UCHAR_MAX -# define UCHAR_MAX 255 -#endif - #define BITBUFSIZ (CHAR_BIT * 2 * sizeof(char)) /* Do not use CHAR_BIT * sizeof(bitbuf), does not work on machines * for which short is not on 16 bits (Cray). diff --git a/util.c b/util.c index 8835d2f..ee94337 100644 --- a/util.c +++ b/util.c @@ -32,10 +32,6 @@ #include #include -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - #ifndef EPIPE # define EPIPE 0 #endif -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 13 11:10:58 2024 Received: (at 72472-done) by debbugs.gnu.org; 13 Aug 2024 15:10:58 +0000 Received: from localhost ([127.0.0.1]:45376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdtAn-0003F0-M6 for submit@debbugs.gnu.org; Tue, 13 Aug 2024 11:10:57 -0400 Received: from mail-pj1-f45.google.com ([209.85.216.45]:57766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdtAl-0003Ei-5Y for 72472-done@debbugs.gnu.org; Tue, 13 Aug 2024 11:10:55 -0400 Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2cd5e3c27c5so3687140a91.3 for <72472-done@debbugs.gnu.org>; Tue, 13 Aug 2024 08:10:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723561815; x=1724166615; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZsHNxA768hlANG8u71P+iApCssOUgA4dFD4nE8wmBMY=; b=afZGtJNeR53UPRujX1LmzWvef54D7guj1SR2Ay47siiV48SjvjwGYMA1Q5liM+D3kQ YMLa9HD88YJmXBl+zHr15GS1CCiRopBS6zba6GGPXEjVh8r0iUmVLPMg4jMxuTM6nbBY xcwt6NScaGs8FXgEdqKE9qD7SWRcf5+vo5DHGo/cNUZ3+U7emRc+Af9QqAl99fLRuuYV utusvbyitROu18nFIz1ii+u+SKaOh/uyCcPrcju/+wq3rsiY13dQzK+RqpiuSlPQjh9w ce/vfUh/qRqCJSoXwVtx/KkC7oFuMqfXBwLpXhFblfxYjOqVaFkKqm3JDXHoZCcExM5Y hxmQ== X-Gm-Message-State: AOJu0YyKrF9P14MxCx/X5Hj2xnECze+WTVgbFSBFUvQeNVSq01aSQEr0 qCoaFvLXEkfMdZpSD8uu5D+7BlkUhqMr8l2xlVVd9Gj/K80sUqppbX+XDGNB/yEZBNvVkL5cW0d 0wHtmBxfizR4+iUdYeJhhUyF1AJ4= X-Google-Smtp-Source: AGHT+IG+qroK1GO0AxcgE+d7/2g71Ks3sPOLM3NNvIghy3smlAjfyl1fJtShcOE1df1X1B7uLVfeho/qwM4m6eDaYaA= X-Received: by 2002:a17:90b:4395:b0:2c9:7803:1cf6 with SMTP id 98e67ed59e1d1-2d39255469dmr3873782a91.20.1723561815101; Tue, 13 Aug 2024 08:10:15 -0700 (PDT) MIME-Version: 1.0 References: <87ttfzsucm.fsf@gmail.com> In-Reply-To: <87ttfzsucm.fsf@gmail.com> From: Jim Meyering Date: Tue, 13 Aug 2024 08:10:02 -0700 Message-ID: Subject: Re: bug#72472: gzip: simplify printing of offsets using -l and -v To: Collin Funk Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72472-done Cc: 72472-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks! Applied From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 13 12:21:35 2024 Received: (at 72472) by debbugs.gnu.org; 13 Aug 2024 16:21:35 +0000 Received: from localhost ([127.0.0.1]:45438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sduH9-0005is-8h for submit@debbugs.gnu.org; Tue, 13 Aug 2024 12:21:35 -0400 Received: from mail-pf1-f180.google.com ([209.85.210.180]:61624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sduH7-0005id-52 for 72472@debbugs.gnu.org; Tue, 13 Aug 2024 12:21:33 -0400 Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-710ece280b6so2295816b3a.2 for <72472@debbugs.gnu.org>; Tue, 13 Aug 2024 09:20:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723566053; x=1724170853; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OH0zxfxOZcar4y/7qksUithN02+/AV0oPI7sTti7c9s=; b=w5XLL3e0PGD7BNcazfDt31bC5Fjq/4meqJ3nYA4HoaO1Ik7nVvOA/l5gOef9RBYb6a Mr9MBGRGuznmIYPy8N1JRHOtkcVrK7L/MFqkaivnIZigpm6XZ5ge/O4+SqDUdUv46ynb v04+Dbfzb3LeYgkHBWnNqPzBNhIf5K5W0eEOhlHYltOhlbEfy/0MFl8DDWuSyAZQMnDN q5t2Np0Fhx4MbNj3kOoF0Me7FT2kEgm8GHvLfRSF1TUTRRbVo9PqtZb2lhWxSd2IgNg1 1nS4ersjHN3LcuYPFknRN3TlKwVXXYL7mi66lv55nFJgOc3OAx/2myQ244COS6Iruc+B CAAg== X-Gm-Message-State: AOJu0Yx5e7eGbKpxhMFiOdjff9eeWHUAhbrJUvFXvoT12dT4Hfqqrx0Q HyZ2Nh6hPOOmiY4gIIPS9w7lSpRRe7eWiLrJ4I9Tt9vixyplW1/f2w8TiGpsk3Dfht3MAIQT/gx D3jDoQQQ8A6HK7xl26jNDHgEMyBY= X-Google-Smtp-Source: AGHT+IGSUhFTVeR02QWpq1dVyya47N4nGp+g55UhJOSw74Zsd1uBsj2+NkncUqLYZ6+HIaQrqpMJQwu0ukTx6xTyJzk= X-Received: by 2002:a05:6a20:c703:b0:1c2:8cc4:908f with SMTP id adf61e73a8af0-1c8eaf965fdmr210443637.48.1723566053405; Tue, 13 Aug 2024 09:20:53 -0700 (PDT) MIME-Version: 1.0 References: <87ttfzsucm.fsf@gmail.com> In-Reply-To: <87ttfzsucm.fsf@gmail.com> From: Jim Meyering Date: Tue, 13 Aug 2024 09:20:41 -0700 Message-ID: Subject: Re: bug#72472: gzip: simplify printing of offsets using -l and -v To: Collin Funk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72472 Cc: 72472@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, Aug 4, 2024 at 5:10=E2=80=AFPM Collin Funk = wrote: > Also, now that POSIX-1.2024 requires strcpy to be async-signal-safe can > 'volatile_strcpy' be removed? Or is there something more to > that. Signals hurt my brain a bit, sorry... While somewhat related, I don't see how an async-safe strcpy would let us remove that function. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 13 15:22:53 2024 Received: (at 72472) by debbugs.gnu.org; 13 Aug 2024 19:22:53 +0000 Received: from localhost ([127.0.0.1]:45505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdx6b-0003Nn-8R for submit@debbugs.gnu.org; Tue, 13 Aug 2024 15:22:53 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:45726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdx6Y-0003NQ-5Y for 72472@debbugs.gnu.org; Tue, 13 Aug 2024 15:22:51 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 012803C00D400; Tue, 13 Aug 2024 12:22:10 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id lQhSHVeoInKI; Tue, 13 Aug 2024 12:22:09 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B84F13C00D403; Tue, 13 Aug 2024 12:22:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu B84F13C00D403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1723576929; bh=F+AR2/JRdlQVKkiQNVmyZPt6fDFX9xiI4zibKkg5fFU=; h=Message-ID:Date:MIME-Version:To:From; b=lIjzahDHIDEpNJM35jZMEngrhYimLdGqqaX+5IZKsRDRJH109tCIuzbk8dcv6ARlr tBEPiSO1eRLGq1zdRJaK1WKShaKJawEAHhwa7WMoCGL3b8o5n68MPZm+awqm8pKlJh lzpsJbLwFiRbMdiiU3NHvO9ETip3zmcykA5FYL/rXIm+bq/9iNxWs5sINMO9/QF/HO 3irQzzcbw3kBiLu1LZnjFiL6zqRoVcg/xp3R+7AAbH1OKw/LUsxzoR0//VWKjPoxlY PDH+jOMmLKwic7KDKMCVUkbuyY5hI9N6ynxuEY+2qH8FXrroZyQhGAXZ6JRwltkNEf QqAvYQvNn0kcA== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id HSFXYfTUqn7x; Tue, 13 Aug 2024 12:22:09 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 976ED3C00D400; Tue, 13 Aug 2024 12:22:09 -0700 (PDT) Message-ID: Date: Tue, 13 Aug 2024 12:22:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72472: gzip: simplify printing of offsets using -l and -v To: Jim Meyering , Collin Funk References: <87ttfzsucm.fsf@gmail.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72472 Cc: 72472@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2024-08-13 09:20, Jim Meyering wrote: > While somewhat related, I don't see how an async-safe strcpy would let > us remove that function. Agreed. You can't even use strcpy on 'char volatile *'; C prohibits that. Async safety is about something else (admittedly brain-hurting :-). From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 13 16:29:38 2024 Received: (at 72472) by debbugs.gnu.org; 13 Aug 2024 20:29:39 +0000 Received: from localhost ([127.0.0.1]:45573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdy98-0006Il-70 for submit@debbugs.gnu.org; Tue, 13 Aug 2024 16:29:37 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:59636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdy90-0006GM-HS for 72472@debbugs.gnu.org; Tue, 13 Aug 2024 16:29:30 -0400 Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2cb7cd6f5f2so4599582a91.2 for <72472@debbugs.gnu.org>; Tue, 13 Aug 2024 13:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723580866; x=1724185666; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=KkDc9JPxGS6UIeyAGkbYrR9/VimEOPjnJJyLv04/fFM=; b=EcWYh4GA3rTJLi/wR+0B3UI47nKBUpdsA6bIMaumnT6XFEKWmvra1vu2VZQgF0jHyd reQXgFVsY5OhKTW+kyG4c+TnMHraeg8pRRXoGxEsYNkGTWyGme4//eFdlLNvwWn3+hOG L+MsoHLb3ycGCBNItYZlmEyXU9MEp8rM5PGYEIxyYdGkRGf1/rtieLEMNfxc15GUWgku NRXKx/OaIkiHj86ATGpHcDkqWwvAdP8NnT9XR6sZ9SYfPfB5bdR8nquB7XS49bgb8xb/ jKj30c1yHMOfBdQcGVkDaInbCf1Cdt6MkEtTFybJj5AaFnqri5N7tiNqt1X/LI1NViXv a4iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723580866; x=1724185666; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KkDc9JPxGS6UIeyAGkbYrR9/VimEOPjnJJyLv04/fFM=; b=c2B/D9T9Es6Xt1MvoQ0vUH3tTfjx+Cko+zhCPgeoXDKsY9+DTVv7WOgfN7DZocQaNM 8eJgowtGnnvsNddocpcWFvyBc0HYeIAlVX8C7CFmKgA9exR7NghbZBHhHT1wbMVda+QZ wYFQ6AYG4brwbqt+YMee/IrsKQq81xfjEU0s/kV998UqpVuQwQHm/RJMMRscnFfCb0XE cwe/UbEvZk3iG83WkZ/Q4Tdc8TNiVkevoPJk2BVpF1OBSHdzpcnYmx4rNC7bCV8Dtksa 8WjgM7Du2GHsJ/TYKF7+BsVmgQXZkd+gJY/PzwJ1u/HR6zIGyvnz3YCyzDPZO4vBIpxj tVBA== X-Forwarded-Encrypted: i=1; AJvYcCW0HMhZ/xsgzGXG7ajGh57+SB1/GPc9uNgVXT0mGSukzevcdgUTWo4SAUUqab0T+njkplxyPXbdgRZ3HE4LCd0/t+S3F8E= X-Gm-Message-State: AOJu0Yy5Jxg8XXLXqLKD+BLppScoLifxIjoi4/CM2cVBN9C9961XIOn5 jDo51tDCdK88U9dPnE2NyJkyDpI/qb/RsgcRMELtH4x/YWZQ2JTZ9bbaitsD X-Google-Smtp-Source: AGHT+IGJDgsHyRPL5EZNgGBMPPdxr3fV1+mZs8k6aemptZ42P4A+Roar4sMdIgaE9aWkKCPPrh57xQ== X-Received: by 2002:a17:90b:4b03:b0:2cd:40ef:4764 with SMTP id 98e67ed59e1d1-2d3aaa99492mr850824a91.17.1723580866089; Tue, 13 Aug 2024 13:27:46 -0700 (PDT) Received: from fedora (c-73-93-224-2.hsd1.ca.comcast.net. [73.93.224.2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d1fce9c9f4sm7931616a91.14.2024.08.13.13.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 13:27:45 -0700 (PDT) From: Collin Funk To: Paul Eggert Subject: Re: bug#72472: gzip: simplify printing of offsets using -l and -v In-Reply-To: (Paul Eggert's message of "Tue, 13 Aug 2024 12:22:09 -0700") References: <87ttfzsucm.fsf@gmail.com> Date: Tue, 13 Aug 2024 13:27:44 -0700 Message-ID: <87zfpgnp6n.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 72472 Cc: 72472@debbugs.gnu.org, Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Jim, Paul, Paul Eggert writes: > On 2024-08-13 09:20, Jim Meyering wrote: >> While somewhat related, I don't see how an async-safe strcpy would let >> us remove that function. > > Agreed. You can't even use strcpy on 'char volatile *'; C prohibits > that. Async safety is about something else (admittedly brain-hurting > :-). Thanks, I found the original thread prompting the addition of volatile_strcpy and think I understand now [1]. Apologies for the extra noise. :) Collin [1] https://lists.gnu.org/archive/html/bug-gzip/2018-08/msg00013.html From unknown Sun Jun 22 22:41:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 11 Sep 2024 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator