diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-04-04 20:42:13 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-04-04 20:42:13 +0000 |
commit | d46e6438225d8741100dc400a4a63c87799f0945 (patch) | |
tree | c20b838ead99ca2558a188b84595115538c02dd2 /src/interfaces/ecpg/preproc/ecpg.c | |
parent | 9bad936f67cb7561d0d232ca365e23fe73219a1a (diff) |
Add Win32 path handling for / vs. \ and drive letters.
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.c')
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index d3b61525dd8..fa35b30e7f5 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.64 2003/03/27 14:29:17 meskes Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.65 2003/04/04 20:42:13 momjian Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */ @@ -105,10 +105,7 @@ main(int argc, char *const argv[]) struct _include_path *ip; char *progname; - if (!strrchr(argv[0], '/')) - progname = argv[0]; - else - progname = strrchr(argv[0], '/') + 1; + progname = get_progname(argv[0]); if (argc > 1) { @@ -213,7 +210,7 @@ main(int argc, char *const argv[]) strcpy(input_filename, argv[fnr]); /* take care of relative paths */ - ptr2ext = strrchr(input_filename, '/'); + ptr2ext = last_path_separator(input_filename); ptr2ext = (ptr2ext ? strrchr(ptr2ext, '.') : strrchr(input_filename, '.')); /* no extension? */ |