1/* $OpenBSD: grep.h,v 1.15 2010/04/05 03:03:55 tedu Exp $ */
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 {
80 int fd;
81 bool binary;
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);
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 *);
155int grep_search(fastgrep_t *, const unsigned char *, size_t, regmatch_t *);
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 {
80 int fd;
81 bool binary;
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);
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 *);
155int grep_search(fastgrep_t *, const unsigned char *, size_t, regmatch_t *);