Merge from vendor branch OPENSSL:
[dragonfly.git] / contrib / texinfo / info / filesys.h
1 /* filesys.h -- external declarations for filesys.c.
2    $Id: filesys.h,v 1.5 1998/07/21 22:25:44 karl Exp $
3
4    Copyright (C) 1993, 97, 98 Free Software Foundation, Inc.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20    Written by Brian Fox (bfox@ai.mit.edu). */
21
22 #ifndef INFO_FILESYS_H
23 #define INFO_FILESYS_H
24
25 /* The path on which we look for info files.  You can initialize this
26    from the environment variable INFOPATH if there is one, or you can
27    call info_add_path () to add paths to the beginning or end of it. */
28 extern char *infopath;
29
30 /* Make INFOPATH have absolutely nothing in it. */
31 extern void zap_infopath ();
32
33 /* Add PATH to the list of paths found in INFOPATH.  2nd argument says
34    whether to put PATH at the front or end of INFOPATH. */
35 extern void info_add_path ();
36
37 /* Defines that are passed along with the pathname to info_add_path (). */
38 #define INFOPATH_PREPEND 0
39 #define INFOPATH_APPEND  1
40
41 /* Expand the filename in PARTIAL to make a real name for this operating
42    system.  This looks in INFO_PATHS in order to find the correct file.
43    If it can't find the file, it returns NULL. */
44 extern char *info_find_fullpath ();
45
46 /* Given a chunk of text and its length, convert all CRLF pairs at the
47    EOLs into a single Newline character.  Return the length of produced
48    text.  */
49 long convert_eols ();
50
51 /* Read the contents of PATHNAME, returning a buffer with the contents of
52    that file in it, and returning the size of that buffer in FILESIZE.
53    FINFO is a stat struct which has already been filled in by the caller.
54    If the file cannot be read, return a NULL pointer. */
55 extern char *filesys_read_info_file ();
56 extern char *filesys_read_compressed ();
57
58 /* Return the command string that would be used to decompress FILENAME. */
59 extern char *filesys_decompressor_for_file ();
60 extern int compressed_filename_p ();
61
62 /* A function which returns a pointer to a static buffer containing
63    an error message for FILENAME and ERROR_NUM. */
64 extern char *filesys_error_string ();
65
66 /* The number of the most recent file system error. */
67 extern int filesys_error_number;
68
69 /* Given a string containing units of information separated by colons,
70    return the next one pointed to by IDX, or NULL if there are no more.
71    Advance IDX to the character after the colon. */
72 extern char *extract_colon_unit ();
73
74 /* Return true if FILENAME is `dir', with a possible compression suffix.  */
75 extern int is_dir_name ();
76
77 /* The default value of INFOPATH. */
78 #if !defined (DEFAULT_INFOPATH)
79 #  define DEFAULT_INFOPATH "/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/local/gnu/info:/usr/local/gnu/lib/info:/usr/gnu/info:/usr/gnu/lib/info:/opt/gnu/info:/usr/share/info:/usr/share/lib/info:/usr/local/share/info:/usr/local/share/lib/info:/usr/gnu/lib/emacs/info:/usr/local/gnu/lib/emacs/info:/usr/local/lib/emacs/info:/usr/local/emacs/info:."
80 #endif /* !DEFAULT_INFOPATH */
81
82 #if !defined (S_ISREG) && defined (S_IFREG)
83 #  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
84 #endif /* !S_ISREG && S_IFREG */
85
86 #if !defined (S_ISDIR) && defined (S_IFDIR)
87 #  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
88 #endif /* !S_ISDIR && S_IFDIR */
89
90 #endif /* not INFO_FILESYS_H */