diff options
author | Colin Watson <cjwatson@debian.org> | 2022-01-16 12:54:04 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-01-16 12:54:04 +0000 |
commit | 24b6317bfc3543b93c85130e06bbc4d066910609 (patch) | |
tree | c2161d2ac423f30ec12b6b8ca0660a787cb697f8 /src/lexgrog.h | |
parent | 59f1bd7e16798d8d99d4d68aa5d591c7380f7b2c (diff) |
Move lexgrog-related bits out of manconfig.h
It's generally cleaner for things like this to be in a dedicated header
file.
* include/manconfig.h.in (struct lexgrog, find_name,
find_name_decompressed): Move to ...
* src/lexgrog.h: ... here (new file). Simplify declarations slightly.
* include/manconfig.h.in (lexgrog filter enum): Move to ...
* src/lexgrog.l: ... here.
* src/Makefile.am (lexgrog_SOURCES, mandb_SOURCES): Add lexgrog.h.
* src/check_mandirs.c, src/lexgrog.l, src/lexgrog_test.c,
src/straycats.c: Include lexgrog.h.
Diffstat (limited to 'src/lexgrog.h')
-rw-r--r-- | src/lexgrog.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/lexgrog.h b/src/lexgrog.h new file mode 100644 index 00000000..8ad44ddd --- /dev/null +++ b/src/lexgrog.h @@ -0,0 +1,33 @@ +/* + * lexgrog.h: interface to extracting whatis info + * + * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.) + * Copyright (C) 2001-2022 Colin Watson. + * + * This file is part of man-db. + * + * man-db is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * man-db is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with man-db; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +typedef struct lexgrog { + int type; + char *whatis; + char *filters; +} lexgrog; + +extern int find_name (const char *file, const char *filename, + lexgrog *p_lg, const char *encoding); +extern int find_name_decompressed (struct pipeline *p, const char *filename, + lexgrog *p_lg); |