Deleted Added
full compact
grep.h (211364) grep.h (211463)
1/* $OpenBSD: grep.h,v 1.15 2010/04/05 03:03:55 tedu Exp $ */
1/* $OpenBSD: grep.h,v 1.15 2010/04/05 03:03:55 tedu Exp $ */
2/* $FreeBSD: head/usr.bin/grep/grep.h 211364 2010-08-15 22:15:04Z gabor $ */
2/* $FreeBSD: head/usr.bin/grep/grep.h 211463 2010-08-18 17:40:10Z gabor $ */
3
4/*-
5 * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav
6 * Copyright (c) 2008-2009 Gabor Kovesdan <gabor@FreeBSD.org>
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions

--- 61 unchanged lines hidden (view full) ---

72#define LINK_SKIP 2
73
74#define EXCL_PAT 0
75#define INCL_PAT 1
76
77#define MAX_LINE_MATCHES 32
78
79struct file {
3
4/*-
5 * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav
6 * Copyright (c) 2008-2009 Gabor Kovesdan <gabor@FreeBSD.org>
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions

--- 61 unchanged lines hidden (view full) ---

72#define LINK_SKIP 2
73
74#define EXCL_PAT 0
75#define INCL_PAT 1
76
77#define MAX_LINE_MATCHES 32
78
79struct file {
80 struct mmfile *mmf;
81 BZFILE *bzf;
82 FILE *f;
83 gzFile *gzf;
80 int fd;
84 bool binary;
81 bool binary;
85 bool stdin;
86};
87
88struct str {
89 off_t off;
90 size_t len;
91 char *dat;
92 char *file;
93 int line_no;

--- 51 unchanged lines hidden (view full) ---

145
146/* queue.c */
147void enqueue(struct str *x);
148void printqueue(void);
149void clearqueue(void);
150
151/* file.c */
152void grep_close(struct file *f);
82};
83
84struct str {
85 off_t off;
86 size_t len;
87 char *dat;
88 char *file;
89 int line_no;

--- 51 unchanged lines hidden (view full) ---

141
142/* queue.c */
143void enqueue(struct str *x);
144void printqueue(void);
145void clearqueue(void);
146
147/* file.c */
148void grep_close(struct file *f);
153struct file *grep_stdin_open(void);
154struct file *grep_open(const char *path);
155char *grep_fgetln(struct file *f, size_t *len);
156
157/* fastgrep.c */
158int fastcomp(fastgrep_t *, const char *);
159void fgrepcomp(fastgrep_t *, const char *);
149struct file *grep_open(const char *path);
150char *grep_fgetln(struct file *f, size_t *len);
151
152/* fastgrep.c */
153int fastcomp(fastgrep_t *, const char *);
154void fgrepcomp(fastgrep_t *, const char *);
160int grep_search(fastgrep_t *, unsigned char *, size_t, regmatch_t *);
155int grep_search(fastgrep_t *, const unsigned char *, size_t, regmatch_t *);