Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5166/pd/src
Modified Files: g_editor.c m_class.c m_pd.h s_file.c s_inter.c s_main.c s_path.c u_main.tk x_connective.c Log Message: 0.41-0 test 11
Index: m_class.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_class.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** m_class.c 28 Dec 2007 03:43:05 -0000 1.8 --- m_class.c 16 Jan 2008 21:54:10 -0000 1.9 *************** *** 460,469 **** static t_symbol *symhash[HASHSIZE];
! t_symbol *dogensym(char *s, t_symbol *oldsym) { t_symbol **sym1, *sym2; unsigned int hash1 = 0, hash2 = 0; int length = 0; ! char *s2 = s; while (*s2) { --- 460,469 ---- static t_symbol *symhash[HASHSIZE];
! t_symbol *dogensym(const char *s, t_symbol *oldsym) { t_symbol **sym1, *sym2; unsigned int hash1 = 0, hash2 = 0; int length = 0; ! const char *s2 = s; while (*s2) { *************** *** 492,496 **** }
! t_symbol *gensym(char *s) { return(dogensym(s, 0)); --- 492,496 ---- }
! t_symbol *gensym(const char *s) { return(dogensym(s, 0));
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** s_main.c 28 Dec 2007 03:43:06 -0000 1.32 --- s_main.c 16 Jan 2008 21:54:11 -0000 1.33 *************** *** 22,25 **** --- 22,28 ---- #include <winbase.h> #endif + #ifdef _MSC_VER /* This is only for Microsoft's compiler, not cygwin, e.g. */ + #define snprintf sprintf_s + #endif
char *pd_version; *************** *** 173,177 **** int fd = open_via_path(dirname, filename, "", dirbuf, &nameptr, MAXPDSTRING, 0); ! if (fd) { close (fd); --- 176,180 ---- int fd = open_via_path(dirname, filename, "", dirbuf, &nameptr, MAXPDSTRING, 0); ! if (fd >= 0) { close (fd); *************** *** 296,300 **** char filename[MAXPDSTRING];
! sprintf(filename, "%s.dll", sys_externalschedlibname); sys_bashfilename(filename, filename); ntdll = LoadLibrary(filename); --- 299,303 ---- char filename[MAXPDSTRING];
! snprintf(filename, sizeof(filename), "%s.dll", sys_externalschedlibname); sys_bashfilename(filename, filename); ntdll = LoadLibrary(filename); *************** *** 387,391 **** "-lib <file> -- load object library(s)\n", "-font-size <n> -- specify default font size in points\n", ! "-font-face <name> -- specify default font (default: Bitstream Vera Sans Mono)\n", "-font-weight <name>-- specify default font weight (normal or bold)\n", "-verbose -- extra printout on startup and when searching for files\n", --- 390,394 ---- "-lib <file> -- load object library(s)\n", "-font-size <n> -- specify default font size in points\n", ! "-font-face <name> -- specify default font\n", "-font-weight <name>-- specify default font weight (normal or bold)\n", "-verbose -- extra printout on startup and when searching for files\n", *************** *** 748,752 **** argc -= 2; argv += 2; } ! else if ((!strcmp(*argv, "-font-size") || !strcmp(*argv, "-font")) && argc > 1) { sys_defaultfont = sys_nearestfontsize(atoi(argv[1])); --- 751,756 ---- argc -= 2; argv += 2; } ! else if ((!strcmp(*argv, "-font-size") || !strcmp(*argv, "-font")) ! && argc > 1) { sys_defaultfont = sys_nearestfontsize(atoi(argv[1])); *************** *** 754,758 **** argv += 2; } ! else if ((!strcmp(*argv, "-font-face") || !strcmp(*argv, "-typeface")) && argc > 1) { strncpy(sys_font,*(argv+1),sizeof(sys_font)-1); --- 758,763 ---- argv += 2; } ! else if ((!strcmp(*argv, "-font-face") || !strcmp(*argv, "-typeface")) ! && argc > 1) { strncpy(sys_font,*(argv+1),sizeof(sys_font)-1);
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** u_main.tk 28 Dec 2007 03:43:06 -0000 1.30 --- u_main.tk 16 Jan 2008 21:54:11 -0000 1.31 *************** *** 896,899 **** --- 896,910 ----
toplevel $name -menu $name.m + # if we're a mac, refuse to make window so big you can't get to + # the resizing control + if {$pd_nt == 2} { + if {$width > [winfo screenwidth $name] - 80} { + set width [expr [winfo screenwidth $name] - 80] + } + if {$height > [winfo screenheight $name] - 80} { + set height [expr [winfo screenheight $name] - 80] + } + } + # slide offscreen windows into view if {$tcl_version >= 8.4} {
Index: s_path.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_path.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** s_path.c 28 Dec 2007 03:43:06 -0000 1.14 --- s_path.c 16 Jan 2008 21:54:11 -0000 1.15 *************** *** 72,90 **** /******************* Utility functions used below ******************/
! /* copy until delimiter and return position after delimiter in string */ ! /* if it was the last substring, return NULL */ ! ! static const char* strtokcpy(char *to, const char *from, int delim) { ! int size = 0;
! while (from[size] != (char)delim && from[size] != '\0') ! size++;
! strncpy(to,from,size); ! to[size] = '\0'; ! if (from[size] == '\0') return NULL; ! if (size) return from+size+1; ! else return NULL; }
--- 72,98 ---- /******************* Utility functions used below ******************/
! /*! ! * \brief copy until delimiter ! * ! * \arg to destination buffer ! * \arg to_len destination buffer length ! * \arg from source buffer ! * \arg delim string delimiter to stop copying on ! * ! * \return position after delimiter in string. If it was the last ! * substring, return NULL. ! */ ! static const char *strtokcpy(char *to, size_t to_len, const char *from, char delim) { ! unsigned int i = 0;
! for (; i < (to_len - 1) && from[i] && from[i] != delim; i++) ! to[i] = from[i]; ! to[i] = '\0';
! if (i && from[i] != '\0') ! return from + i + 1; ! ! return NULL; }
*************** *** 134,138 **** do { ! npos = strtokcpy(temp, npos, SEPARATOR); if (! *temp) continue; nl = namelist_append(nl, temp, 0); --- 142,146 ---- do { ! npos = strtokcpy(temp, sizeof(temp), npos, SEPARATOR); if (! *temp) continue; nl = namelist_append(nl, temp, 0); *************** *** 524,537 **** t_namelist *nl;
! sprintf(buf, "list"); ! for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++) { ! if(nl->nl_string){ ! strcat(buf, " ""); ! strcat(buf, nl->nl_string); ! strcat(buf, """); ! } ! } ! sys_vgui("pd_set pd_path [%s]\n", buf); ! sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose); gfxstub_new(&glob_pdobject, (void *)glob_start_path_dialog, buf); --- 532,538 ---- t_namelist *nl;
! sys_vgui("pd_set pd_path ""\n"); ! for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++) ! sys_vgui("lappend pd_path "%s"\n", nl->nl_string); sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose); gfxstub_new(&glob_pdobject, (void *)glob_start_path_dialog, buf); *************** *** 561,574 **** t_namelist *nl;
! sprintf(buf, "list"); ! for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++) { ! if(nl->nl_string){ ! strcat(buf, " ""); ! strcat(buf, nl->nl_string); ! strcat(buf, """); ! } ! } ! sys_vgui("pd_set pd_startup [%s]\n", buf); ! sprintf(buf, "pdtk_startup_dialog %%s %d "%s"\n", sys_defeatrt, sys_flags->s_name); --- 562,568 ---- t_namelist *nl;
! sys_vgui("pd_set pd_startup ""\n"); ! for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++) ! sys_vgui("lappend pd_startup "%s"\n", nl->nl_string); sprintf(buf, "pdtk_startup_dialog %%s %d "%s"\n", sys_defeatrt, sys_flags->s_name);
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** s_inter.c 28 Dec 2007 03:43:06 -0000 1.21 --- s_inter.c 16 Jan 2008 21:54:11 -0000 1.22 *************** *** 251,260 **** { struct itimerval gonzo; #if 0 ! fprintf(stderr, "timer %d\n", microsec); #endif gonzo.it_interval.tv_sec = 0; gonzo.it_interval.tv_usec = 0; ! gonzo.it_value.tv_sec = 0; gonzo.it_value.tv_usec = microsec; if (microsec) --- 251,262 ---- { struct itimerval gonzo; + int sec = (int)(microsec/1000000); + microsec %= 1000000; #if 0 ! fprintf(stderr, "timer %d:%d\n", sec, microsec); #endif gonzo.it_interval.tv_sec = 0; gonzo.it_interval.tv_usec = 0; ! gonzo.it_value.tv_sec = sec; gonzo.it_value.tv_usec = microsec; if (microsec)
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** m_pd.h 28 Dec 2007 03:43:05 -0000 1.21 --- m_pd.h 16 Jan 2008 21:54:10 -0000 1.22 *************** *** 12,16 **** #define PD_MINOR_VERSION 41 #define PD_BUGFIX_VERSION 0 ! #define PD_TEST_VERSION "test10"
/* old name for "MSW" flag -- we have to take it for the sake of many old --- 12,16 ---- #define PD_MINOR_VERSION 41 #define PD_BUGFIX_VERSION 0 ! #define PD_TEST_VERSION "test11"
/* old name for "MSW" flag -- we have to take it for the sake of many old *************** *** 226,230 **** EXTERN void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv); EXTERN void pd_forwardmess(t_pd *x, int argc, t_atom *argv); ! EXTERN t_symbol *gensym(char *s); EXTERN t_gotfn getfn(t_pd *x, t_symbol *s); EXTERN t_gotfn zgetfn(t_pd *x, t_symbol *s); --- 226,230 ---- EXTERN void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv); EXTERN void pd_forwardmess(t_pd *x, int argc, t_atom *argv); ! EXTERN t_symbol *gensym(const char *s); EXTERN t_gotfn getfn(t_pd *x, t_symbol *s); EXTERN t_gotfn zgetfn(t_pd *x, t_symbol *s); *************** *** 418,421 **** --- 418,422 ---- EXTERN int class_isdrawcommand(t_class *c); EXTERN void class_domainsignalin(t_class *c, int onset); + EXTERN void class_set_extern_dir(t_symbol *s); #define CLASS_MAINSIGNALIN(c, type, field) \ class_domainsignalin(c, (char *)(&((type *)0)->field) - (char *)0)
Index: g_editor.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** g_editor.c 28 Dec 2007 03:43:04 -0000 1.21 --- g_editor.c 16 Jan 2008 21:54:10 -0000 1.22 *************** *** 1565,1568 **** --- 1565,1574 ---- canvas_displaceselection(x, shift ? 10 : 1, 0); } + /* if control key goes up or down, and if we're in edit mode, change + cursor to indicate how the click action changes */ + if (x && keynum == 0 && x->gl_edit && + !strncmp(gotkeysym->s_name, "Control", 7)) + canvas_setcursor(x, down ? + CURSOR_RUNMODE_NOTHING :CURSOR_EDITMODE_NOTHING); }
Index: x_connective.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_connective.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** x_connective.c 28 Dec 2007 03:43:06 -0000 1.10 --- x_connective.c 16 Jan 2008 21:54:11 -0000 1.11 *************** *** 1233,1237 **** break; } ! if (strchr("xXdiou",*str)!=0) { x->x_accept = A_FLOAT; x->x_intconvert = 1; --- 1233,1237 ---- break; } ! if (strchr("xXdiouc",*str)!=0) { x->x_accept = A_FLOAT; x->x_intconvert = 1;
Index: s_file.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_file.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** s_file.c 18 Aug 2007 23:32:44 -0000 1.11 --- s_file.c 16 Jan 2008 21:54:11 -0000 1.12 *************** *** 29,32 **** --- 29,35 ---- #include <tchar.h> #endif + #ifdef _MSC_VER /* This is only for Microsoft's compiler, not cygwin, e.g. */ + #define snprintf sprintf_s + #endif
int sys_defeatrt;