From a0d0374d0c0a15286b0f064a6dbdb20c450dbe2b Mon Sep 17 00:00:00 2001 From: Mathieu L Bouchard <matju@artengine.ca> Date: Sat, 2 Aug 2014 14:21:27 -0400 Subject: [PATCH] remove unused vars & add comments about Qt cmdline opts --- pd/src/s_inter.c | 3 +-- pd/src/s_main.c | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c index fc6bc1d98..d7c0e8e0f 100644 --- a/pd/src/s_inter.c +++ b/pd/src/s_inter.c @@ -505,7 +505,6 @@ void socketreceiver_read(t_socketreceiver *x, int fd) socketreceiver_getudp(x, fd); else /* TCP ("streaming") socket protocol */ { - char *semi; int readto = (x->sr_inhead >= x->sr_intail ? INBUFSIZE : x->sr_intail-1); int ret; @@ -663,7 +662,7 @@ void blargh(void) { void sys_vgui(char *fmt, ...) { - int msglen, bytesleft, headwas, nwrote; + int msglen; va_list ap; if (sys_nogui) diff --git a/pd/src/s_main.c b/pd/src/s_main.c index 5b3700f84..b53a1ab9f 100644 --- a/pd/src/s_main.c +++ b/pd/src/s_main.c @@ -13,6 +13,8 @@ #include <fcntl.h> #include <stdlib.h> +#define UNISTD + #ifdef UNISTD #include <unistd.h> #endif @@ -444,6 +446,15 @@ static char *(usagemessage[]) = { "\n", }; +#ifdef QTGUI +// -nogui applies only to Tk until further notice. +// -qtcanvas should open a Qt window for every pd canvas (two toolkits at once) +// more options could go here, to enable a Qt main window, menus, dialogues. +// those are transitory options, until Tk is removed, at which point +// -nogui will apply to Qt, -guiport and -guiport will be removed, and +// all transitory options will be removed. +#endif + static void sys_parsedevlist(int *np, int *vecp, int max, char *str) { int n = 0; @@ -481,8 +492,8 @@ static int sys_getmultidevchannels(int n, int *devlist) INSTALL_PREFIX. In MSW, we don't try to use INSTALL_PREFIX. */ void sys_findprogdir(char *progname) { - char sbuf[FILENAME_MAX], sbuf2[FILENAME_MAX], *sp; - char *lastslash; + char sbuf[FILENAME_MAX], sbuf2[FILENAME_MAX]; + //char *lastslash; #ifdef UNISTD struct stat statbuf; #endif @@ -577,8 +588,6 @@ static int sys_mmio = 0; int sys_argparse(int argc, char **argv) { - char sbuf[MAXPDSTRING]; - int i; while ((argc > 0) && **argv == '-') { if (!strcmp(*argv, "-r") && argc > 1 && @@ -1081,7 +1090,7 @@ static void sys_afterargparse(void) sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0); } -static void sys_addreferencepath(void) -{ - char sbuf[MAXPDSTRING]; -} +//static void sys_addreferencepath(void) +//{ +// char sbuf[MAXPDSTRING]; +//} -- GitLab