From 725cc94210a7e8c5c0b52daaa4f66f12416cb5a4 Mon Sep 17 00:00:00 2001 From: Alexander Stillich Date: Mon, 9 Jul 2018 16:20:49 +0200 Subject: [PATCH] Renamed cc_install to something less cryptic (crashCatcherInstall) --- apps/opencs/editor.cpp | 2 +- apps/openmw/main.cpp | 2 +- components/crashcatcher/crashcatcher.cpp | 6 +++--- components/crashcatcher/crashcatcher.hpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/opencs/editor.cpp b/apps/opencs/editor.cpp index 2be3dc24c..6ca10e0f6 100644 --- a/apps/opencs/editor.cpp +++ b/apps/opencs/editor.cpp @@ -29,7 +29,7 @@ CS::Editor::Editor (int argc, char **argv) { // install the crash handler as soon as possible. note that the log path // does not depend on config being read. - cc_install(argc, argv, (mCfgMgr.getLogPath() / "openmw-cs-crash.log").string()); + crashCatcherInstall(argc, argv, (mCfgMgr.getLogPath() / "openmw-cs-crash.log").string()); std::pair > config = readConfig(); diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index db095c73d..d13a73127 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -328,7 +328,7 @@ int main(int argc, char**argv) std::cerr.rdbuf (&cerrsb); #endif - cc_install(argc, argv, (cfgMgr.getLogPath() / "crash.log").string()); + crashCatcherInstall(argc, argv, (cfgMgr.getLogPath() / "crash.log").string()); #ifdef __APPLE__ boost::filesystem::path binary_path = boost::filesystem::system_complete(boost::filesystem::path(argv[0])); diff --git a/components/crashcatcher/crashcatcher.cpp b/components/crashcatcher/crashcatcher.cpp index 6aeed114c..af42eb695 100644 --- a/components/crashcatcher/crashcatcher.cpp +++ b/components/crashcatcher/crashcatcher.cpp @@ -406,7 +406,7 @@ static void crash_handler(const char *logfile) exit(0); } -int cc_install_handlers(int argc, char **argv, int num_signals, int *signals, const char *logfile, int (*user_info)(char*, char*)) +int crashCatcherInstallHandlers(int argc, char **argv, int num_signals, int *signals, const char *logfile, int (*user_info)(char*, char*)) { struct sigaction sa; stack_t altss; @@ -474,12 +474,12 @@ static bool is_debugger_present() return false; } -void cc_install(int argc, char **argv, const std::string &crashLogPath) +void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath) { if ((argc == 2 && strcmp(argv[1], "--cc-handle-crash") == 0) || !is_debugger_present()) { int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT }; - if (cc_install_handlers(argc, argv, 5, s, crashLogPath.c_str(), NULL) == -1) + if (crashCatcherInstallHandlers(argc, argv, 5, s, crashLogPath.c_str(), NULL) == -1) { std::cerr << "Installing crash handler failed" << std::endl; } else diff --git a/components/crashcatcher/crashcatcher.hpp b/components/crashcatcher/crashcatcher.hpp index 3d5d61a9f..e2390df9c 100644 --- a/components/crashcatcher/crashcatcher.hpp +++ b/components/crashcatcher/crashcatcher.hpp @@ -10,9 +10,9 @@ #endif #if USE_CRASH_CATCHER -extern void cc_install(int argc, char **argv, const std::string &crashLogPath); +extern void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath); #else -inline void cc_install(int, char **) { return 0; } +inline void crashCatcherInstall(int, char **, const std::string &crashLogPath) { return 0; } #endif #endif