enh: Refactored Bazel BUILD rules
[platform/upstream/gflags.git] / src / gflags_completions.cc
index 17439dd..f772486 100644 (file)
@@ -46,8 +46,6 @@
 //     5a) Force bash to place most-relevent groups at the top of the list
 //     5b) Trim most flag's descriptions to fit on a single terminal line
 
-
-#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>   // for strlen
 #include <utility>
 #include <vector>
 
-#include <gflags/gflags.h>
+#include "config.h"
+#include "gflags/gflags.h"
+#include "gflags/gflags_completions.h"
 #include "util.h"
 
 using std::set;
 using std::string;
 using std::vector;
 
-#ifndef PATH_SEPARATOR
-#define PATH_SEPARATOR  '/'
-#endif
 
 DEFINE_string(tab_completion_word, "",
               "If non-empty, HandleCommandLineCompletions() will hijack the "
@@ -75,7 +72,9 @@ DEFINE_string(tab_completion_word, "",
 DEFINE_int32(tab_completion_columns, 80,
              "Number of columns to use in output for tab completion");
 
-_START_GOOGLE_NAMESPACE_
+
+namespace GFLAGS_NAMESPACE {
+
 
 namespace {
 // Function prototypes and Type forward declarations.  Code may be
@@ -120,7 +119,7 @@ static void CategorizeAllMatchingFlags(
     NotableFlags *notable_flags);
 
 static void TryFindModuleAndPackageDir(
-    const vector<CommandLineFlagInfo> all_flags,
+    const vector<CommandLineFlagInfo> &all_flags,
     string *module,
     string *package_dir);
 
@@ -470,7 +469,7 @@ static void PushNameWithSuffix(vector<string>* suffixes, const char* suffix) {
 }
 
 static void TryFindModuleAndPackageDir(
-    const vector<CommandLineFlagInfo> all_flags,
+    const vector<CommandLineFlagInfo> &all_flags,
     string *module,
     string *package_dir) {
   module->clear();
@@ -765,4 +764,5 @@ void HandleCommandLineCompletions(void) {
   gflags_exitfunc(0);
 }
 
-_END_GOOGLE_NAMESPACE_
+
+} // namespace GFLAGS_NAMESPACE