From 13d2b4f05931b68c9cefc646798ed2a316d371c2 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Thu, 17 Feb 2011 19:09:22 +0000 Subject: [PATCH] Describe all operations of AddBackslash() --- goldlib/gall/gfilutil.h | 3 +++ goldlib/gall/gfilutl1.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/goldlib/gall/gfilutil.h b/goldlib/gall/gfilutil.h index b943066..4f5cf8f 100644 --- a/goldlib/gall/gfilutil.h +++ b/goldlib/gall/gfilutil.h @@ -120,6 +120,8 @@ #define GOLD_SHELL_ENV "SHELL" #endif +#define GOLD_ALL_SLASH_STR "/\\" // GOLD_SLASH_STR GOLD_WRONG_SLASH_STR + inline bool isslash(char c) { return (c == GOLD_SLASH_CHR) or (c == GOLD_WRONG_SLASH_CHR); } @@ -192,6 +194,7 @@ void MakePathname(char* pathname, const char* path, const char* name); void MakePathname(std::string& pathname, const std::string& path, const std::string& name); // Adds the directory-delimiter character into end of string ('\\' in DOS-based, '/' in unix-based OS) +// Replace wrong directory-delimiter character with good. char* AddBackslash(char* p); std::string& AddBackslash(std::string& p); diff --git a/goldlib/gall/gfilutl1.cpp b/goldlib/gall/gfilutl1.cpp index 10ff123..dc7dbc5 100644 --- a/goldlib/gall/gfilutl1.cpp +++ b/goldlib/gall/gfilutl1.cpp @@ -57,6 +57,7 @@ // ------------------------------------------------------------------ // Adds the directory-delimiter character into end of string ('\\' in DOS-based, '/' in unix-based OS) +// Replace wrong directory-delimiter character with good. char* AddBackslash(char* p) {