156160Sru/* files.h -- declarations for files.c. 2146515Sru $Id: files.h,v 1.4 2004/07/27 00:06:31 karl Exp $ 356160Sru 4146515Sru Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc. 556160Sru 656160Sru This program is free software; you can redistribute it and/or modify 756160Sru it under the terms of the GNU General Public License as published by 856160Sru the Free Software Foundation; either version 2, or (at your option) 956160Sru any later version. 1056160Sru 1156160Sru This program is distributed in the hope that it will be useful, 1256160Sru but WITHOUT ANY WARRANTY; without even the implied warranty of 1356160Sru MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1456160Sru GNU General Public License for more details. 1556160Sru 1656160Sru You should have received a copy of the GNU General Public License 1756160Sru along with this program; if not, write to the Free Software 1856160Sru Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1956160Sru */ 2056160Sru 2156160Sru#ifndef FILES_H 2256160Sru#define FILES_H 2356160Sru 2456160Sru/* A stack of file information records. If a new file is read in with 2556160Sru "@input", we remember the old input file state on this stack. */ 2656160Srutypedef struct fstack 2756160Sru{ 2856160Sru struct fstack *next; 2956160Sru char *filename; 3056160Sru char *text; 3156160Sru int size; 3256160Sru int offset; 3356160Sru int line_number; 3456160Sru} FSTACK; 3556160Sruextern FSTACK *filestack; 3656160Sru 37146515Sruextern void pushfile (void); 38146515Sruextern void popfile (void); 39146515Sruextern void flush_file_stack (void); 40146515Sruextern char *get_file_info_in_path (char *filename, char *path, 41146515Sru struct stat *finfo); 42146515Sruextern char *find_and_load (char *filename, int use_path); 43146515Sruextern char *output_name_from_input_name (char *name); 44146515Sruextern char *expand_filename (char *filename, char *input_name); 45146515Sruextern char *filename_part (char *filename); 46146515Sruextern char *pathname_part (char *filename); 47146515Sruextern char *normalize_filename (char *fname); 48146515Sruextern void append_to_include_path (char *path); 49146515Sruextern void prepend_to_include_path (char *path); 50146515Sruextern void pop_path_from_include_path (void); 51146515Sruextern void register_delayed_write (char *delayed_command); 52146515Sruextern void handle_delayed_writes (void); 5356160Sru 54146515Srutypedef struct delayed_write 55146515Sru{ 56146515Sru struct delayed_write *next; 57146515Sru char *command; 58146515Sru char *filename; 59146515Sru char *input_filename; 60146515Sru char *node; 61146515Sru int position; 62146515Sru int calling_line; 63146515Sru 64146515Sru int node_order; 65146515Sru int index_order; 66146515Sru} DELAYED_WRITE; 67146515Sru 68146515Sruextern int handling_delayed_writes; 69146515Sru 7056160Sru#endif /* !FILES_H */ 71