[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (8bcf1ed4d6a9dfcb196682b551f0ebb00cf93fc8)
The branch, master has been updated
via 8bcf1ed4d6a9dfcb196682b551f0ebb00cf93fc8 (commit)
from d8be4844b96e768c3a872f17d79b89bf6a5c84d8 (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
=========
src/main.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 8bcf1ed4d6a9dfcb196682b551f0ebb00cf93fc8
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Use strdup to copy environment strings into our settings structure.
getenv returns a const char * which is part of the environment and must
not be free'd.
:100644 100644 400aebc... bb79991... M src/main.c
=========
Changes
=========
commit 8bcf1ed4d6a9dfcb196682b551f0ebb00cf93fc8
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Use strdup to copy environment strings into our settings structure.
getenv returns a const char * which is part of the environment and must
not be free'd.
diff --git a/src/main.c b/src/main.c
index 400aebc..bb79991 100644
--- a/src/main.c
+++ b/src/main.c
@@ -563,6 +563,8 @@ REGISTER_ATTRIBUTES (main_attribute_list)
*/
static void settings_post_process ()
{
+ char *tmps;
+
if (Settings.LibraryCommand[0] != PCB_DIR_SEPARATOR_C && Settings.LibraryCommand[0] != '.')
{
Settings.LibraryCommand
@@ -602,14 +604,18 @@ REGISTER_ATTRIBUTES (main_attribute_list)
* to call
*/
if (Settings.MakeProgram == NULL) {
- Settings.MakeProgram = getenv ("PCB_MAKE_PROGRAM");
+ tmps = getenv ("PCB_MAKE_PROGRAM");
+ if (tmps != NULL)
+ Settings.MakeProgram = strdup (tmps);
}
if (Settings.MakeProgram == NULL) {
Settings.MakeProgram = strdup ("make");
}
if (Settings.GnetlistProgram == NULL) {
- Settings.GnetlistProgram = getenv ("PCB_GNETLIST");
+ tmps = getenv ("PCB_GNETLIST");
+ if (tmps != NULL)
+ Settings.GnetlistProgram = strdup (tmps);
}
if (Settings.GnetlistProgram == NULL) {
Settings.GnetlistProgram = strdup ("gnetlist");
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs