summaryrefslogtreecommitdiff
path: root/info/filesys.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-09-26 23:06:02 +0000
committer <>2015-02-03 11:56:22 +0000
commite0b511b834f3529395df67126a7314097c2cf97e (patch)
tree89945ae53183ab2acdc61659c8b0b3e57e4a1f3a /info/filesys.h
parent2d8ae7b161658c4a589172db0072fc99f76fa979 (diff)
downloadtexinfo-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_texinfo-tarball/texinfo-5.2.tar.xz.HEADtexinfo-5.2master
Diffstat (limited to 'info/filesys.h')
-rw-r--r--info/filesys.h40
1 files changed, 29 insertions, 11 deletions
diff --git a/info/filesys.h b/info/filesys.h
index 611a709..fc1ac67 100644
--- a/info/filesys.h
+++ b/info/filesys.h
@@ -1,8 +1,8 @@
/* filesys.h -- external declarations for filesys.c.
- $Id: filesys.h,v 1.7 2007/07/01 21:20:29 karl Exp $
+ $Id: filesys.h 5337 2013-08-22 17:54:06Z karl $
- Copyright (C) 1993, 1997, 1998, 2002, 2004, 2005, 2007 Free Software
- Foundation, Inc.
+ Copyright 1993, 1997, 1998, 2002, 2004, 2005, 2007, 2009, 2012, 2013
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox. */
#ifndef INFO_FILESYS_H
#define INFO_FILESYS_H
@@ -25,24 +25,36 @@
/* The path on which we look for info files. You can initialize this
from the environment variable INFOPATH if there is one, or you can
call info_add_path () to add paths to the beginning or end of it. */
-extern char *infopath;
+
+extern char *infopath ();
+
+/* Initialize INFOPATH */
+void infopath_init (void);
/* Make INFOPATH have absolutely nothing in it. */
-extern void zap_infopath (void);
+extern void infopath_clear (void);
/* Add PATH to the list of paths found in INFOPATH. 2nd argument says
whether to put PATH at the front or end of INFOPATH. */
-extern void info_add_path (char *path, int where);
+extern void infopath_add (char *path, int where);
+
+/* Iterate over INFOPATH */
+char *infopath_first (int *idx);
+char *infopath_next (int *idx);
-/* Defines that are passed along with the pathname to info_add_path (). */
+/* Defines that are passed along with the pathname to infopath_add (). */
#define INFOPATH_PREPEND 0
#define INFOPATH_APPEND 1
+#define INFOPATH_INIT 2
/* Expand the filename in PARTIAL to make a real name for this operating
system. This looks in INFO_PATHS in order to find the correct file.
If it can't find the file, it returns NULL. */
extern char *info_find_fullpath (char *partial);
+/* Forget all cached file names */
+extern void forget_file_names (void);
+
/* Given a chunk of text and its length, convert all CRLF pairs at the
EOLs into a single Newline character. Return the length of produced
text. */
@@ -52,10 +64,10 @@ long convert_eols (char *text, long textlen);
that file in it, and returning the size of that buffer in FILESIZE.
FINFO is a stat struct which has already been filled in by the caller.
If the file cannot be read, return a NULL pointer. */
-extern char *filesys_read_info_file (char *pathname, long int *filesize,
+extern char *filesys_read_info_file (char *pathname, size_t *filesize,
struct stat *finfo, int *is_compressed);
-extern char *filesys_read_compressed (char *pathname, long int *filesize);
+extern char *filesys_read_compressed (char *pathname, size_t *filesize);
/* Return the command string that would be used to decompress FILENAME. */
extern char *filesys_decompressor_for_file (char *filename);
@@ -76,9 +88,15 @@ extern char *extract_colon_unit (char *string, int *idx);
/* Return true if FILENAME is `dir', with a possible compression suffix. */
extern int is_dir_name (char *filename);
+/* Scan the list of directories in PATH looking for FILENAME. If we find
+ one that is a regular file, return it as a new string. Otherwise, return
+ a NULL pointer. */
+extern char *info_file_find_next_in_path (char *filename, char *path,
+ int *diridx);
+
/* The default value of INFOPATH. */
#if !defined (DEFAULT_INFOPATH)
-# 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"
+# define DEFAULT_INFOPATH ".:PATH:/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"
#endif /* !DEFAULT_INFOPATH */
#if !defined (S_ISREG) && defined (S_IFREG)