aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-04-27 21:16:25 +0000
committerN.N. <matju@users.sourceforge.net>2009-04-27 21:16:25 +0000
commit422b07621e8199dc0644fee37b6c6c7d1b1d81ea (patch)
tree184091984ff3972a792da7bc2633c718f55b24a1 /desiredata/src
parent3075700fe36cc99e2081fac39c9a23255ca2d539 (diff)
duh (fix previous commit about -stdout)
svn path=/trunk/; revision=11181
Diffstat (limited to 'desiredata/src')
-rw-r--r--desiredata/src/desire.c4
-rw-r--r--desiredata/src/s_main.c6
-rw-r--r--desiredata/src/s_stuff.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/desiredata/src/desire.c b/desiredata/src/desire.c
index f03b3775..bdbc60c5 100644
--- a/desiredata/src/desire.c
+++ b/desiredata/src/desire.c
@@ -7184,11 +7184,11 @@ extern "C" void glob_init () {
/* formerly s_print.c */
t_printhook sys_printhook;
-int sys_printtofh = -1; /* send to console by default */
+FILE *sys_printtofh = 0; /* send to console by default */
static void dopost(const char *s) {
if (sys_printhook) sys_printhook(s);
- else if (sys_printtofh<0) fprintf(stderr, "%s", s);
+ else if (sys_printtofh) fprintf(sys_printtofh, "%s", s);
else {
std::ostringstream t;
for(int i=0; s[i]; i++) {
diff --git a/desiredata/src/s_main.c b/desiredata/src/s_main.c
index 05228d7c..a4e1f22a 100644
--- a/desiredata/src/s_main.c
+++ b/desiredata/src/s_main.c
@@ -521,13 +521,13 @@ int sys_argparse(int argc, char **argv) {
if (ARG("-noloadbang",1)) {sys_noloadbang = 1; NEXT(1);}
if (ARG("-nogui",1)) {
fprintf(stderr,"Warning: -nogui is obsolete: nowadays it does just like -stderr instead\n");
- sys_printtofh = 2; NEXT(1);}
+ sys_printtofh = stderr; NEXT(1);}
if (ARG("-guiport",2)) {
if (sscanf(argv[1], "%d", &sys_guisetportnumber)<1) goto usage;
NEXT(2);
}
- if (ARG("-stdout",1)) {sys_printtofh = 1; NEXT(1);}
- if (ARG("-stderr",1)) {sys_printtofh = 2; NEXT(1);}
+ if (ARG("-stdout",1)) {sys_printtofh = stdout; NEXT(1);}
+ if (ARG("-stderr",1)) {sys_printtofh = stderr; NEXT(1);}
if (ARG("-guicmd",2)) {
fprintf(stderr,"Warning: -guicmd ignored");
NEXT(2);
diff --git a/desiredata/src/s_stuff.h b/desiredata/src/s_stuff.h
index aa5f8a4d..5a1c0ce3 100644
--- a/desiredata/src/s_stuff.h
+++ b/desiredata/src/s_stuff.h
@@ -267,7 +267,7 @@ void sys_save_audio_params(t_audiodevs *in, t_audiodevs *out, int rate, int d
/* s_file.c */
typedef void (*t_printhook)(const char *s);
extern t_printhook sys_printhook; /* set this to override printing */
-extern int sys_printtofh;
+extern FILE *sys_printtofh;
#ifdef MSW
#define vsnprintf _vsnprintf /* jsarlo -- alias this name for msw */
#endif