diff options
Diffstat (limited to 'libcpp')
| -rw-r--r-- | libcpp/files.cc | 28 | ||||
| -rw-r--r-- | libcpp/include/cpplib.h | 6 | ||||
| -rw-r--r-- | libcpp/internal.h | 3 |
3 files changed, 14 insertions, 23 deletions
diff --git a/libcpp/files.cc b/libcpp/files.cc index d80c4bf..f8b3312 100644 --- a/libcpp/files.cc +++ b/libcpp/files.cc @@ -2335,6 +2335,16 @@ _cpp_get_file_name (_cpp_file *file) return file->name; } +/* Get the path associated with the _cpp_file F. The path includes + the base name from the include directive and the directory it was + found in via the search path. */ + +const char * +_cpp_get_file_path (_cpp_file *f) +{ + return f->path; +} + /* Inteface to file statistics record in _cpp_file structure. */ struct stat * _cpp_get_file_stat (_cpp_file *file) @@ -2574,24 +2584,6 @@ validate_pch (cpp_reader *pfile, _cpp_file *file, const char *pchname) return valid; } -/* Get the path associated with the _cpp_file F. The path includes - the base name from the include directive and the directory it was - found in via the search path. */ - -const char * -cpp_get_path (struct _cpp_file *f) -{ - return f->path; -} - -/* Get the directory associated with the _cpp_file F. */ - -cpp_dir * -cpp_get_dir (struct _cpp_file *f) -{ - return f->dir; -} - /* Get the cpp_buffer currently associated with the cpp_reader PFILE. */ diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 5190ff7..16f030c 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -1563,8 +1563,10 @@ extern void cpp_make_system_header (cpp_reader *, int, int); extern bool cpp_push_include (cpp_reader *, const char *); extern bool cpp_push_default_include (cpp_reader *, const char *); extern void cpp_change_file (cpp_reader *, enum lc_reason, const char *); -extern const char *cpp_get_path (struct _cpp_file *); -extern cpp_dir *cpp_get_dir (struct _cpp_file *); +extern const char *_cpp_get_file_path (_cpp_file *); +extern const char *_cpp_get_file_name (_cpp_file *); +extern struct stat *_cpp_get_file_stat (_cpp_file *); +extern struct cpp_dir *_cpp_get_file_dir (_cpp_file *); extern cpp_buffer *cpp_get_buffer (cpp_reader *); extern struct _cpp_file *cpp_get_file (cpp_buffer *); extern cpp_buffer *cpp_get_prev (cpp_buffer *); diff --git a/libcpp/internal.h b/libcpp/internal.h index bcf5559..ae98524 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -788,9 +788,6 @@ extern void _cpp_pop_file_buffer (cpp_reader *, struct _cpp_file *, const unsigned char *); extern bool _cpp_save_file_entries (cpp_reader *pfile, FILE *f); extern bool _cpp_read_file_entries (cpp_reader *, FILE *); -extern const char *_cpp_get_file_name (_cpp_file *); -extern struct stat *_cpp_get_file_stat (_cpp_file *); -extern struct cpp_dir *_cpp_get_file_dir (_cpp_file *); extern bool _cpp_has_header (cpp_reader *, const char *, int, enum include_type); |
