From f77b2a5a5412c2f4ae18dc2cca7c2662e5536944 Mon Sep 17 00:00:00 2001
From: Miller Puckette <msp@ucsd.edu>
Date: Wed, 16 Jan 2008 13:48:43 -0800
Subject: [PATCH] 0.41-0 test 11

---
 doc/5.reference/declare-help.pd | 13 ++++++++++---
 src/m_pd.h                      |  2 +-
 src/s_file.c                    |  3 +++
 src/s_main.c                    |  3 +++
 4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/doc/5.reference/declare-help.pd b/doc/5.reference/declare-help.pd
index b91ca7164..2e427b521 100644
--- a/doc/5.reference/declare-help.pd
+++ b/doc/5.reference/declare-help.pd
@@ -1,8 +1,7 @@
-#N canvas 103 177 645 448 12;
+#N canvas 103 177 618 583 12;
 #X declare;
 #X obj 48 10 declare;
 #X text 120 11 - set environment for loading patch;
-#X text 376 406 updated for Pd version 0.4;
 #X text 44 40 A declare object adds one or more directories to the
 search path \, and/or pre-loads one or more libraries ("extensions")
 to Pd in preparation for opening the patch from a file. Usage is "declare
@@ -12,7 +11,6 @@ to Pd in preparation for opening the patch from a file. Usage is "declare
 #X text 31 146 -path;
 #X text 31 162 -stdpath;
 #X text 129 146 add to search path \, relative to the patch;
-#X text 129 163 add to search path \, relative to the Pd;
 #X text 129 182 load a library \, relative to the patch;
 #X text 129 199 load a library \, relative to Pd;
 #X text 40 231 (for any of these you may use a full pathname such as
@@ -24,3 +22,12 @@ supporting files in a subdirectory "more" \, you can put an object
 loaded. Or \, if you have zexy installed in the directory extra/zexy
 (in the Pd installation") you can get it using "declare -stdpath extra/zexy".
 ;
+#X text 129 163 add to search path \, relative to Pd;
+#X text 367 557 updated for Pd version 0.41;
+#X text 42 395 WARNING: you might want to avoid putting "declare" statements
+inside abstractions \, as their effects will extend to the calling
+patch. As of version 0.41 \, "declare path" is ignored inside abstractions
+\, although \, probably unwisely \, "-stdpath" takes effect (on the
+calling patch as well as the abstraction.);
+#X text 42 494 BUG: The name "-stdpath" is confusing \, as it has a
+quite different effect from "-stdpath" on the pd command line.;
diff --git a/src/m_pd.h b/src/m_pd.h
index 25d811279..e7417da76 100644
--- a/src/m_pd.h
+++ b/src/m_pd.h
@@ -11,7 +11,7 @@ extern "C" {
 #define PD_MAJOR_VERSION 0
 #define PD_MINOR_VERSION 41
 #define PD_BUGFIX_VERSION 0
-#define PD_TEST_VERSION "test10"
+#define PD_TEST_VERSION "test11"
 
 /* old name for "MSW" flag -- we have to take it for the sake of many old
 "nmakefiles" for externs, which will define NT and not MSW */
diff --git a/src/s_file.c b/src/s_file.c
index c81d423b8..fe266b371 100644
--- a/src/s_file.c
+++ b/src/s_file.c
@@ -28,6 +28,9 @@
 #include <windows.h>
 #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;
 t_symbol *sys_flags = &s_;
diff --git a/src/s_main.c b/src/s_main.c
index 3002937f1..d8d8602d1 100644
--- a/src/s_main.c
+++ b/src/s_main.c
@@ -21,6 +21,9 @@
 #include <windows.h>
 #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;
 char pd_compiletime[] = __TIME__;
-- 
GitLab