aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--main.cpp12
2 files changed, 11 insertions, 5 deletions
diff --git a/README.md b/README.md
index a1df2ec..0352f83 100644
--- a/README.md
+++ b/README.md
@@ -48,11 +48,11 @@ SciTECO has the following build and runtime dependencies:
1. Build Scintilla as described in its README. If you want to build the ncurses version,
install Scinterm from a subdirectory of Scintilla called "scinterm".
-2. Untar/unzip SciTECO into a subdirectory of Scintilla.
+2. Untar/unzip/check-out SciTECO into a subdirectory of Scintilla.
3. Build with `make INTERFACE=GTK` or `make INTERFACE=NCURSES` respectively.
3. Install with `make install`.
4. You are recommended to use the included "teco.ini" as a starting point for your profile,
- so copy it to "~/.config/.teco_ini". The default teco.ini opens files specified on the
+ so copy it to "~/.teco_ini". The default "teco.ini" opens files specified on the
commandline for you, uses a file open hook to configure syntax highlighting (only
C/C++ and Makefiles for now) and enables line numbers.
diff --git a/main.cpp b/main.cpp
index 05324d3..c70dd79 100644
--- a/main.cpp
+++ b/main.cpp
@@ -83,13 +83,19 @@ process_options(int &argc, char **&argv)
if (mung_file) {
if (!g_file_test(mung_file, G_FILE_TEST_IS_REGULAR)) {
- g_printf("Cannot mung %s. File does not exist!\n",
+ g_printf("Cannot mung \"%s\". File does not exist!\n",
mung_file);
exit(EXIT_FAILURE);
}
} else {
- mung_file = g_build_filename(g_get_user_config_dir(),
- INI_FILE, NULL);
+ const gchar *home;
+
+#ifdef G_OS_UNIX
+ home = g_get_home_dir();
+#else
+ home = g_get_user_config_dir();
+#endif
+ mung_file = g_build_filename(home, INI_FILE, NULL);
}
interface.parse_args(argc, argv);