head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.22 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.20 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.18 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.16 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.14 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.12 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.10 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.8 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.6 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.4 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.2 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.1.0.16 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.14 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.12 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.10 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.8 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.6 pkgsrc-2006Q2-base:1.1 pkgsrc-2006Q1:1.1.0.4 pkgsrc-2006Q1-base:1.1 pkgsrc-2005Q4:1.1.0.2 pkgsrc-2005Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2007.12.06.21.43.24; author cjep; state dead; branches; next 1.1; 1.1 date 2005.12.08.17.24.32; author joerg; state Exp; branches; next ; desc @@ 1.2 log @Update to 20071201. * Sync with src/usr.bin/grep @ text @$NetBSD: patch-ag,v 1.1 2005/12/08 17:24:32 joerg Exp $ --- grep.h.orig 2004-05-05 15:06:33.000000000 +0000 +++ grep.h @@@@ -52,7 +52,7 @@@@ typedef struct { size_t len; int line_no; int off; - char *file; + const char *file; char *dat; } str_t; @@@@ -77,7 +77,7 @@@@ extern int zgrep; extern int binbehave, dirbehave, devbehave; /* extern int linkbehave; */ -extern char *stdin_label; +extern const char *stdin_label; extern int first, matchall, patterns, tail; extern char **pattern; @@@@ -91,7 +91,7 @@@@ extern regex_t *r_pattern; extern char re_error[RE_ERROR_BUF + 1]; /* util.c */ -int procfile(char *fn); +int procfile(const char *fn); int grep_tree(char **argv); void *grep_malloc(size_t size); @@@@ -111,7 +111,7 @@@@ typedef struct mmfile { char *base, *end, *ptr; } mmf_t; -mmf_t *mmopen(char *fn, char *mode); +mmf_t *mmopen(const char *fn, const char *mode); void mmclose(mmf_t *mmf); char *mmfgetln(mmf_t *mmf, size_t *l); void mmrewind(mmf_t *mmf); @@@@ -120,8 +120,8 @@@@ void mmrewind(mmf_t *mmf); struct file; typedef struct file file_t; -file_t *grep_fdopen(int fd, char *mode); -file_t *grep_open(char *path, char *mode); +file_t *grep_fdopen(int fd, const char *mode); +file_t *grep_open(const char *path, const char *mode); int grep_bin_file(file_t *f); char *grep_fgetln(file_t *f, size_t *l); @ 1.1 log @Since this is compiled with -Werror and GCC 3.4 doesn't like the string const cast-away, pass down the constness. @ text @d1 1 a1 1 $NetBSD$ @