From c7f23494c1103f87bcf1ef7cbfcd626e73edb337 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 6 Jul 2011 11:45:13 -0400 Subject: Add \ir command to psql. \ir is short for "include relative"; when used from a script, the supplied pathname will be interpreted relative to the input file, rather than to the current working directory. Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further cleanup by me. --- src/port/path.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/port/path.c') diff --git a/src/port/path.c b/src/port/path.c index 6991bc7247b..13ca4f3f1c1 100644 --- a/src/port/path.c +++ b/src/port/path.c @@ -74,6 +74,17 @@ skip_drive(const char *path) #define skip_drive(path) (path) #endif +/* + * has_drive_prefix + * + * Return true if the given pathname has a drive prefix. + */ +bool +has_drive_prefix(const char *path) +{ + return skip_drive(path) != path; +} + /* * first_dir_separator * -- cgit v1.2.3