Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4416
Modified Files: Tag: devel_0_37 s_main.c s_print.c Log Message: small fixes for Matju's changes to compile under Windows
Index: s_print.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_print.c,v retrieving revision 1.1.1.1.16.3 retrieving revision 1.1.1.1.16.4 diff -C2 -d -r1.1.1.1.16.3 -r1.1.1.1.16.4 *** s_print.c 21 Feb 2004 19:37:24 -0000 1.1.1.1.16.3 --- s_print.c 19 Mar 2004 18:48:20 -0000 1.1.1.1.16.4 *************** *** 10,13 **** --- 10,18 ---- #include <errno.h>
+ /* T.Grill - windows compatibility for Matju's console */ + #ifdef _MSC_VER + #define vsnprintf _vsnprintf + #endif + /* T.Grill - linked list structure */ typedef struct s_printhook t_printhook; *************** *** 214,221 **** char *special = "{}[]\"\n"; int console_li_old = console_li; console_li += vsnprintf(console_line+console_li, console_ln-console_li, fmt, ap); console_line[console_ln-1]=0; if (!strchr(&console_line[console_li_old],'\n')) return; ! int countbrace=0, i, n = strlen(console_line); for (i=n-1; i>=0; i--) if (strchr(special,console_line[i])) countbrace++; while (n+countbrace>=(int)sizeof(console_line)) n--; --- 219,228 ---- char *special = "{}[]\"\n"; int console_li_old = console_li; + int countbrace, i, n; console_li += vsnprintf(console_line+console_li, console_ln-console_li, fmt, ap); console_line[console_ln-1]=0; if (!strchr(&console_line[console_li_old],'\n')) return; ! countbrace=0; ! n = strlen(console_line); for (i=n-1; i>=0; i--) if (strchr(special,console_line[i])) countbrace++; while (n+countbrace>=(int)sizeof(console_line)) n--;
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.1.1.4.2.11 retrieving revision 1.1.1.4.2.12 diff -C2 -d -r1.1.1.4.2.11 -r1.1.1.4.2.12 *** s_main.c 22 Feb 2004 17:36:51 -0000 1.1.1.4.2.11 --- s_main.c 19 Mar 2004 18:48:20 -0000 1.1.1.4.2.12 *************** *** 32,35 **** --- 32,47 ---- #endif
+ #ifdef MSW + /* T.Grill - for Matju's GUI stuff */ + static void setenv(const char *envname, const char *envval, int overwrite) + { + /* always overwrite as used by Matju */ + char tmp[256]; /* maximum length not checked */ + sprintf(tmp,"%s=%s",envname,envval); + putenv(tmp); + } + #endif + + void pd_init(void); int sys_argparse(int argc, char **argv);