Home | History | Annotate | Line # | Download | only in makeinfo
      1 /*	$NetBSD: files.h,v 1.2 2016/01/14 00:34:53 christos Exp $	*/
      2 
      3 /* files.h -- declarations for files.c.
      4    Id: files.h,v 1.4 2004/07/27 00:06:31 karl Exp
      5 
      6    Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc.
      7 
      8    This program is free software; you can redistribute it and/or modify
      9    it under the terms of the GNU General Public License as published by
     10    the Free Software Foundation; either version 2, or (at your option)
     11    any later version.
     12 
     13    This program is distributed in the hope that it will be useful,
     14    but WITHOUT ANY WARRANTY; without even the implied warranty of
     15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16    GNU General Public License for more details.
     17 
     18    You should have received a copy of the GNU General Public License
     19    along with this program; if not, write to the Free Software
     20    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     21    */
     22 
     23 #ifndef FILES_H
     24 #define FILES_H
     25 
     26 /* A stack of file information records.  If a new file is read in with
     27    "@input", we remember the old input file state on this stack. */
     28 typedef struct fstack
     29 {
     30   struct fstack *next;
     31   char *filename;
     32   char *text;
     33   int size;
     34   int offset;
     35   int line_number;
     36 } FSTACK;
     37 extern FSTACK *filestack;
     38 
     39 extern void pushfile (void);
     40 extern void popfile (void);
     41 extern void flush_file_stack (void);
     42 extern char *get_file_info_in_path (char *filename, char *path,
     43     struct stat *finfo);
     44 extern char *find_and_load (char *filename, int use_path);
     45 extern char *output_name_from_input_name (char *name);
     46 extern char *expand_filename (char *filename, char *input_name);
     47 extern char *filename_part (char *filename);
     48 extern char *pathname_part (char *filename);
     49 extern char *normalize_filename (char *fname);
     50 extern void append_to_include_path (char *path);
     51 extern void prepend_to_include_path (char *path);
     52 extern void pop_path_from_include_path (void);
     53 extern void register_delayed_write (char *delayed_command);
     54 extern void handle_delayed_writes (void);
     55 
     56 typedef struct delayed_write
     57 {
     58   struct delayed_write *next;
     59   char *command;
     60   char *filename;
     61   char *input_filename;
     62   char *node;
     63   int position;
     64   int calling_line;
     65 
     66   int node_order;
     67   int index_order;
     68 } DELAYED_WRITE;
     69 
     70 extern int handling_delayed_writes;
     71 
     72 #endif /* !FILES_H */
     73