11cc83814Sespie /* files.h -- declarations for files.c. 2*a1acfa9bSespie $Id: files.h,v 1.1.1.3 2006/07/17 16:03:46 espie Exp $ 31cc83814Sespie 4*a1acfa9bSespie Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc. 51cc83814Sespie 61cc83814Sespie This program is free software; you can redistribute it and/or modify 71cc83814Sespie it under the terms of the GNU General Public License as published by 81cc83814Sespie the Free Software Foundation; either version 2, or (at your option) 91cc83814Sespie any later version. 101cc83814Sespie 111cc83814Sespie This program is distributed in the hope that it will be useful, 121cc83814Sespie but WITHOUT ANY WARRANTY; without even the implied warranty of 131cc83814Sespie MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 141cc83814Sespie GNU General Public License for more details. 151cc83814Sespie 161cc83814Sespie You should have received a copy of the GNU General Public License 171cc83814Sespie along with this program; if not, write to the Free Software 181cc83814Sespie Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 191cc83814Sespie */ 201cc83814Sespie 211cc83814Sespie #ifndef FILES_H 221cc83814Sespie #define FILES_H 231cc83814Sespie 241cc83814Sespie /* A stack of file information records. If a new file is read in with 251cc83814Sespie "@input", we remember the old input file state on this stack. */ 261cc83814Sespie typedef struct fstack 271cc83814Sespie { 281cc83814Sespie struct fstack *next; 291cc83814Sespie char *filename; 301cc83814Sespie char *text; 311cc83814Sespie int size; 321cc83814Sespie int offset; 331cc83814Sespie int line_number; 341cc83814Sespie } FSTACK; 351cc83814Sespie extern FSTACK *filestack; 361cc83814Sespie 37*a1acfa9bSespie extern void pushfile (void); 38*a1acfa9bSespie extern void popfile (void); 39*a1acfa9bSespie extern void flush_file_stack (void); 40*a1acfa9bSespie extern char *get_file_info_in_path (char *filename, char *path, 41*a1acfa9bSespie struct stat *finfo); 42*a1acfa9bSespie extern char *find_and_load (char *filename, int use_path); 43*a1acfa9bSespie extern char *output_name_from_input_name (char *name); 44*a1acfa9bSespie extern char *expand_filename (char *filename, char *input_name); 45*a1acfa9bSespie extern char *filename_part (char *filename); 46*a1acfa9bSespie extern char *pathname_part (char *filename); 47*a1acfa9bSespie extern char *normalize_filename (char *fname); 48*a1acfa9bSespie extern void append_to_include_path (char *path); 49*a1acfa9bSespie extern void prepend_to_include_path (char *path); 50*a1acfa9bSespie extern void pop_path_from_include_path (void); 51*a1acfa9bSespie extern void register_delayed_write (char *delayed_command); 52*a1acfa9bSespie extern void handle_delayed_writes (void); 53*a1acfa9bSespie 54*a1acfa9bSespie typedef struct delayed_write 55*a1acfa9bSespie { 56*a1acfa9bSespie struct delayed_write *next; 57*a1acfa9bSespie char *command; 58*a1acfa9bSespie char *filename; 59*a1acfa9bSespie char *input_filename; 60*a1acfa9bSespie char *node; 61*a1acfa9bSespie int position; 62*a1acfa9bSespie int calling_line; 63*a1acfa9bSespie 64*a1acfa9bSespie int node_order; 65*a1acfa9bSespie int index_order; 66*a1acfa9bSespie } DELAYED_WRITE; 67*a1acfa9bSespie 68*a1acfa9bSespie extern int handling_delayed_writes; 691cc83814Sespie 701cc83814Sespie #endif /* !FILES_H */ 71