aboutsummaryrefslogtreecommitdiff
path: root/pd/src
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2009-09-01 18:22:23 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2009-09-01 18:22:23 +0000
commit22a829cb1907c79bfe68ad91314a1dddbf1beeb3 (patch)
tree510dcb1af070f5eac5b1192d9fffad2f3e431958 /pd/src
parent1cc6aed4bfdd84b06d418bc5198a0380479e639a (diff)
merge in HC's new tcl code and start taking patches
svn path=/trunk/; revision=12166
Diffstat (limited to 'pd/src')
-rw-r--r--pd/src/configure.in2
-rw-r--r--pd/src/g_editor.c6
-rw-r--r--pd/src/makefile.in8
-rw-r--r--pd/src/s_inter.c8
-rw-r--r--pd/src/s_main.c4
5 files changed, 19 insertions, 9 deletions
diff --git a/pd/src/configure.in b/pd/src/configure.in
index dfc1b862..e4f4edd7 100644
--- a/pd/src/configure.in
+++ b/pd/src/configure.in
@@ -247,7 +247,7 @@ dnl This should be fixed so Pd can use ALSA shared libraries where appropriate.
binarymode="-m4755"
fi
STRIPFLAG=-s
- GUINAME="pd-gui"
+ GUINAME=""
if test x$USE_DEBUG_CFLAGS = "xyes";
then
MORECFLAGS=$MORECFLAGS" -g"
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 7ef5266a..0890d465 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -2251,6 +2251,8 @@ restore:
static void canvas_cut(t_canvas *x)
{
+ if (!x->gl_editor) /* ignore if invisible */
+ return;
if (x->gl_editor && x->gl_editor->e_selectedline)
canvas_clearline(x);
else if (x->gl_editor->e_textedfor)
@@ -2343,6 +2345,8 @@ static void canvas_paste(t_canvas *x)
static void canvas_duplicate(t_canvas *x)
{
+ if (!x->gl_editor)
+ return;
if (x->gl_editor->e_onmotion == MA_NONE && x->gl_editor->e_selection)
{
t_selection *y;
@@ -2360,6 +2364,8 @@ static void canvas_duplicate(t_canvas *x)
static void canvas_selectall(t_canvas *x)
{
t_gobj *y;
+ if (!x->gl_editor)
+ return;
if (!x->gl_edit)
canvas_editmode(x, 1);
/* if everyone is already selected deselect everyone */
diff --git a/pd/src/makefile.in b/pd/src/makefile.in
index 7713be99..ed0f5b7c 100644
--- a/pd/src/makefile.in
+++ b/pd/src/makefile.in
@@ -1,3 +1,8 @@
+# On Mac OS X, this needs to be defined to enable dlopen and weak linking
+# support. Its safe on other platforms since gcc only checks this env var on
+# Apple's gcc. <hans@at.or.at>
+export MACOSX_DEPLOYMENT_TARGET = 10.3
+
VPATH = ../obj:./
OBJ_DIR = ../obj
BIN_DIR = ../bin
@@ -149,9 +154,8 @@ BINARYMODE=@binarymode@
ABOUT_FILE=$(DESTDIR)$(pddocdir)/1.manual/1.introduction.txt
install: all
install -d $(DESTDIR)$(libpdbindir)
- install $(BIN_DIR)/$(GUINAME) $(DESTDIR)$(libpdbindir)/$(GUINAME)
+ -install $(BIN_DIR)/$(GUINAME) $(DESTDIR)$(libpdbindir)/$(GUINAME)
install $(BIN_DIR)/pd-watchdog $(DESTDIR)$(libpdbindir)/pd-watchdog
- install -m644 $(BIN_DIR)/pd.tk $(DESTDIR)$(libpdbindir)/pd.tk
install -d $(DESTDIR)$(bindir)
install $(BINARYMODE) $(PDEXEC) $(DESTDIR)$(bindir)/pd
install -m755 $(BIN_DIR)/pdsend $(DESTDIR)$(bindir)/pdsend
diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c
index 1f17ce70..1549f9de 100644
--- a/pd/src/s_inter.c
+++ b/pd/src/s_inter.c
@@ -272,7 +272,7 @@ void sys_setalarm(int microsec)
#endif
-#ifdef __linux
+#ifdef __linux__
#if defined(_POSIX_PRIORITY_SCHEDULING) || defined(_POSIX_MEMLOCK)
#include <sched.h>
@@ -1063,12 +1063,12 @@ int sys_startgui(const char *libdir)
if (stat(wish_paths[i], &statbuf) >= 0)
break;
}
- sprintf(cmdbuf,"\"%s\" %s/tcl/pd.tcl %d\n", wish_paths[i],
+ sprintf(cmdbuf,"\"%s\" %s/tcl/pd-gui.tcl %d\n", wish_paths[i],
libdir, portno);
#else
sprintf(cmdbuf,
"TCL_LIBRARY=\"%s/lib/tcl/library\" TK_LIBRARY=\"%s/lib/tk/library\" \
- wish \"%s/tcl/pd.tcl\" %d\n",
+ wish \"%s/tcl/pd-gui.tcl\" %d\n",
libdir, libdir, libdir, portno);
#endif
sys_guicmd = cmdbuf;
@@ -1116,7 +1116,7 @@ int sys_startgui(const char *libdir)
strcpy(scriptbuf, "\"");
strcat(scriptbuf, libdir);
- strcat(scriptbuf, "/" PDTCLDIR "pd.tcl\"");
+ strcat(scriptbuf, "/" PDTCLDIR "pd-gui.tcl\"");
sys_bashfilename(scriptbuf, scriptbuf);
sprintf(portbuf, "%d", portno);
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 058f0232..a1e5af2a 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -483,12 +483,12 @@ void sys_findprogdir(char *progname)
"gui" directory. In "simple" unix installations, the layout is
.../bin/pd
.../bin/pd-watchdog (etc)
- .../tcl/pd.tcl
+ .../tcl/pd-gui.tcl
.../doc
and in "complicated" unix installations, it's:
.../bin/pd
.../lib/pd/bin/pd-watchdog
- .../lib/tcl/pd.tcl
+ .../lib/tcl/pd-gui.tcl
.../lib/pd/doc
To decide which, we stat .../lib/pd; if that exists, we assume it's
the complicated layout. In MSW, it's the "simple" layout, but