Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14392
Modified Files: Tag: desiredata desire.c s_inter.c s_main.c Log Message: reenabled startup reply
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.5.4.10.2.25.2.9 retrieving revision 1.5.4.10.2.25.2.10 diff -C2 -d -r1.5.4.10.2.25.2.9 -r1.5.4.10.2.25.2.10 *** s_inter.c 3 Dec 2006 15:08:23 -0000 1.5.4.10.2.25.2.9 --- s_inter.c 3 Dec 2006 16:45:51 -0000 1.5.4.10.2.25.2.10 *************** *** 647,656 **** if (sys_hipriority) sys_setpriority(); setuid(getuid()); ! /* ! char buf[256], buf2[256]; ! sys_get_audio_apis(buf); ! sys_get_midi_apis(buf2); ! sys_vgui("pdtk_pd_startup {%s} %s %s\n", pd_version, buf, buf2); ! */ return 0; } --- 647,651 ---- if (sys_hipriority) sys_setpriority(); setuid(getuid()); ! return 0; }
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.7.4.17.2.22.2.11 retrieving revision 1.7.4.17.2.22.2.12 diff -C2 -d -r1.7.4.17.2.22.2.11 -r1.7.4.17.2.22.2.12 *** s_main.c 3 Dec 2006 15:08:23 -0000 1.7.4.17.2.22.2.11 --- s_main.c 3 Dec 2006 16:45:51 -0000 1.7.4.17.2.22.2.12 *************** *** 64,70 **** char *sys_guicmd; t_symbol *sys_libdir; ! t_namelist *sys_externlist; ! static t_namelist *sys_openlist=NULL; ! static t_namelist *sys_messagelist; static int sys_version;
--- 64,70 ---- char *sys_guicmd; t_symbol *sys_libdir; ! t_namelist *sys_externlist =0; ! t_namelist *sys_openlist =0; ! t_namelist *sys_messagelist=0; static int sys_version;
*************** *** 118,168 **** /* } jsarlo */
- static void openit(const char *dirname, const char *filename) - { - char dirbuf[MAXPDSTRING], *nameptr; - int fd = open_via_path(dirname, filename, "", dirbuf, &nameptr, - MAXPDSTRING, 0); - if (fd) - { - close (fd); - glob_evalfile(0, gensym(nameptr), gensym(dirbuf)); - } - else - error("%s: can't open", filename); - } - - extern t_text *sys_netreceive; - extern t_socketreceiver *sys_socketreceiver; - t_socketreceiver *netreceive_newest_receiver(t_text *x); - - /* this should be rethought for multi-client */ - void glob_initfromgui(void *dummy, t_symbol *s) - { - char cwd[666]; - t_namelist *nl; - getcwd(cwd,665); - sys_socketreceiver=netreceive_newest_receiver(sys_netreceive); - //fprintf(stderr,"sys_socketreceiver=%p\n",sys_socketreceiver); - - /* load dynamic libraries specified with "-lib" args */ - for (nl = sys_externlist; nl; nl = nl->nl_next) - if (!sys_load_lib(cwd, nl->nl_string, 0)) - post("%s: can't load library", nl->nl_string); - /* open patches specifies with "-open" args */ - for (nl = sys_openlist; nl; nl = nl->nl_next) - openit(cwd, nl->nl_string); - namelist_free(sys_openlist); - sys_openlist = 0; - /* send messages specified with "-send" args */ - for (nl = sys_messagelist; nl; nl = nl->nl_next) { - t_binbuf *b = binbuf_new(); - binbuf_text(b, nl->nl_string, strlen(nl->nl_string)); - binbuf_eval(b, 0, 0, 0); - binbuf_free(b); - } - namelist_free(sys_messagelist); - sys_messagelist = 0; - } - static void sys_afterargparse(void);
--- 118,121 ----
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.17 retrieving revision 1.1.2.217.2.18 diff -C2 -d -r1.1.2.217.2.17 -r1.1.2.217.2.18 *** desire.c 3 Dec 2006 04:04:18 -0000 1.1.2.217.2.17 --- desire.c 3 Dec 2006 16:45:49 -0000 1.1.2.217.2.18 *************** *** 7700,7703 **** --- 7700,7746 ---- }
+ static void openit(const char *dirname, const char *filename) { + char dirbuf[MAXPDSTRING], *nameptr; + int fd = open_via_path(dirname,filename,"",dirbuf,&nameptr,MAXPDSTRING,0); + if (fd) { + close(fd); + glob_evalfile(0, gensym(nameptr), gensym(dirbuf)); + } else { + error("%s: can't open", filename); + } + } + + extern "C" t_socketreceiver *netreceive_newest_receiver(t_text *x); + + /* this should be rethought for multi-client */ + void glob_initfromgui(void *dummy, t_symbol *s) { + char buf[256], buf2[256]; + char cwd[666]; + t_namelist *nl; + getcwd(cwd,665); + sys_socketreceiver=netreceive_newest_receiver(sys_netreceive); + //fprintf(stderr,"sys_socketreceiver=%p\n",sys_socketreceiver); + /* load dynamic libraries specified with "-lib" args */ + for (nl = sys_externlist; nl; nl = nl->nl_next) + if (!sys_load_lib(cwd, nl->nl_string, 0)) + post("%s: can't load library", nl->nl_string); + /* open patches specified with "-open" args */ + for (nl = sys_openlist; nl; nl = nl->nl_next) openit(cwd, nl->nl_string); + namelist_free(sys_openlist); + sys_openlist = 0; + /* send messages specified with "-send" args */ + for (nl = sys_messagelist; nl; nl = nl->nl_next) { + t_binbuf *b = binbuf_new(); + binbuf_text(b, nl->nl_string, strlen(nl->nl_string)); + binbuf_eval(b, 0, 0, 0); + binbuf_free(b); + } + namelist_free(sys_messagelist); + sys_messagelist = 0; + sys_get_audio_apis(buf); + sys_get_midi_apis(buf2); + sys_vgui("pd_startup {%s} %s %s\n", pd_version, buf, buf2); + } + extern "C" { void glob_watchdog(t_pd *dummy);