[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-317-g3f607ec)
The branch, master has been updated
via 3f607ec3eefd9477d277747be089ac94e5afbd57 (commit)
from 48e8b4e068706acbfb254cc4a9dab5d3b03eef41 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/src/g_rc.c | 2 ++
libgeda/src/g_rc.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 3f607ec3eefd9477d277747be089ac94e5afbd57
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Mon Nov 24 01:35:02 2008 +0000
Use g_get_home_dir() if we can't find the HOME environment variable.
NB: We can't just use g_get_home_dir() on its own without changing
semantics. g_get_home_dir() prefers the home directory specified
in the passwd file, over $HOME, so we try looking for the HOME env.
variable first.
BUT: some places in gEDA do just call g_get_home_dir() directly.
Ideally we should tidy these up to be consistent at some point.
:100644 100644 e204abf... d2642a1... M gschem/src/g_rc.c
:100644 100644 3aa358b... 965b817... M libgeda/src/g_rc.c
=========
Changes
=========
commit 3f607ec3eefd9477d277747be089ac94e5afbd57
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Mon Nov 24 01:35:02 2008 +0000
Use g_get_home_dir() if we can't find the HOME environment variable.
NB: We can't just use g_get_home_dir() on its own without changing
semantics. g_get_home_dir() prefers the home directory specified
in the passwd file, over $HOME, so we try looking for the HOME env.
variable first.
BUT: some places in gEDA do just call g_get_home_dir() directly.
Ideally we should tidy these up to be consistent at some point.
diff --git a/gschem/src/g_rc.c b/gschem/src/g_rc.c
index e204abf..d2642a1 100644
--- a/gschem/src/g_rc.c
+++ b/gschem/src/g_rc.c
@@ -59,6 +59,8 @@ void g_rc_parse_gtkrc()
g_free (filename);
home = g_getenv ("HOME");
+ if (home == NULL)
+ home = g_get_home_dir ();
if (home != NULL) {
filename = g_build_filename (home, ".gschem-gtkrc", NULL);
gtk_rc_parse (filename);
diff --git a/libgeda/src/g_rc.c b/libgeda/src/g_rc.c
index 3aa358b..965b817 100644
--- a/libgeda/src/g_rc.c
+++ b/libgeda/src/g_rc.c
@@ -232,12 +232,16 @@ gint g_rc_parse_system_rc(TOPLEVEL *toplevel, const gchar *rcname)
*/
gint g_rc_parse_home_rc(TOPLEVEL *toplevel, const gchar *rcname)
{
- const gchar *home = g_getenv ("HOME");
+ const gchar *home;
gint found_rc;
gchar *tmp;
char *filename;
gchar *ok_msg, *err_msg;
+ home = g_getenv ("HOME");
+ if (home == NULL)
+ home = g_get_home_dir ();
+
if (home == NULL) {
return 0;
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs