[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_rc.nw
User: sdb
Date: 05/02/17 21:58:26
Modified: . g_rc.nw libgeda.nw
Log:
Revert to putenv after W. Hoch has problems with compiling
g_setenv. G_setenv requires glib-2.4.*.
Revision Changes Path
1.10 +5 -2 eda/geda/devel/libgeda/noweb/g_rc.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_rc.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/noweb/g_rc.nw,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- g_rc.nw 4 Feb 2005 04:39:28 -0000 1.9
+++ g_rc.nw 18 Feb 2005 02:58:26 -0000 1.10
@@ -367,12 +367,15 @@
{
gint found_rc = 0;
char *rc_path;
+ char *geda_rcdata;
/* set the GEDADATARC environment variable so that the rc files */
/* know where to look for others */
-
rc_path = f_normalize_filename (g_rc_parse_path ());
- g_setenv ("GEDADATARC", rc_path, TRUE);
+ /* Reversion to putenv inspired by W. Hoch, 2.17.2005 */
+ /* g_setenv ("GEDADATARC", rc_path, TRUE); */ /*requires glib 2.4.x*/
+ geda_rcdata = g_strdup_printf("GEDADATARC=%s", rc_path);
+ putenv(geda_rcdata);
free (rc_path);
/* visit rc files in order */
1.10 +12 -2 eda/geda/devel/libgeda/noweb/libgeda.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: libgeda.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/noweb/libgeda.nw,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- libgeda.nw 11 Feb 2005 18:18:42 -0000 1.9
+++ libgeda.nw 18 Feb 2005 02:58:26 -0000 1.10
@@ -80,8 +80,18 @@
<<libgeda.c : libgeda_init()>>=
void libgeda_init(void)
{
- /* set GEDADATA if not already set */
- g_setenv ("GEDADATA", GEDADATADIR, FALSE);
+ char *new_data=NULL;
+ char *geda_data = getenv("GEDADATA");
+
+ /* This stuff reverted on 2.17.2005 by SDB in response to W. Hoch. */
+ if (geda_data == NULL) {
+ new_data = g_strdup_printf("GEDADATA=%s", GEDADATADIR);
+ putenv(new_data);
+ /*free(new_data); putenv takes over the memory? */
+
+ /* We'll use this someday. . . . . */
+ /* g_setenv ("GEDADATA", GEDADATADIR, FALSE); */ /* requires glib-2.4.* */
+ }
s_toplevel_init ();
s_clib_init();