The compress(3) family of utility functions return and operate on
gzFile, a typedef for void*.  The extra pointer to this gzFile in
grep(1) can be removed.  Other uses of these compress(3) functions in
tree (spamd, mandoc, smtpd) do not use the extra pointer.

diff 5fb603068396a80293d0f411297e6119a4473d62 /usr/src
blob - 1a22a6b2e71e053a96ba67d30841a6c390f7fea4
file + usr.bin/grep/binary.c
--- usr.bin/grep/binary.c
+++ usr.bin/grep/binary.c
@@ -62,7 +62,7 @@ bin_file(FILE *f)
 
 #ifndef NOZ
 int
-gzbin_file(gzFile *f)
+gzbin_file(gzFile f)
 {
        char            buf[BUFSIZ];
        int             m;
blob - 0cfeaa808ed22cf988e279128ccc9d47abdfe0e7
file + usr.bin/grep/file.c
--- usr.bin/grep/file.c
+++ usr.bin/grep/file.c
@@ -49,12 +49,12 @@ struct file {
        int      noseek;
        FILE    *f;
        mmf_t   *mmf;
-       gzFile  *gzf;
+       gzFile   gzf;
 };
 
 #ifndef NOZ
 static char *
-gzfgetln(gzFile *f, size_t *len)
+gzfgetln(gzFile f, size_t *len)
 {
        size_t          n;
        int             c;
blob - b3d24ae662beb72c5632190c5c819bcc92f0389a
file + usr.bin/grep/grep.h
--- usr.bin/grep/grep.h
+++ usr.bin/grep/grep.h
@@ -124,6 +124,6 @@ void                 grep_close(file_t *f);
 
 /* binary.c */
 int             bin_file(FILE * f);
-int             gzbin_file(gzFile * f);
+int             gzbin_file(gzFile f);
 int             mmbin_file(mmf_t *f);
 

Reply via email to