[Python-checkins] CVS: python/dist/src/Mac/Contrib/osam ScriptRunner.c,1.1.1.1,1.1.1.1.4.1
Jack Jansen
jackjansen@users.sourceforge.net
Thu, 19 Jul 2001 14:03:22 -0700
Update of /cvsroot/python/python/dist/src/Mac/Contrib/osam
In directory usw-pr-cvs1:/tmp/cvs-serv11582/Python/Mac/Contrib/osam
Modified Files:
Tag: release21-maint
ScriptRunner.c
Log Message:
Converted the project to CW6 (it hadn't been compiled
in a long time), added a carbon target and added 2 missing
routines in Carbon.
Index: ScriptRunner.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Contrib/osam/ScriptRunner.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.4.1
diff -C2 -r1.1.1.1 -r1.1.1.1.4.1
*** ScriptRunner.c 1998/08/18 14:56:35 1.1.1.1
--- ScriptRunner.c 2001/07/19 21:03:19 1.1.1.1.4.1
***************
*** 22,26 ****
--- 22,45 ----
#include <resources.h>
+ #ifdef TARGET_API_MAC_CARBON
+ static
+ p2cstr(StringPtr p)
+ {
+ unsigned char *c = p;
+ int len = c[0];
+ strncpy((char *)c+1, (char *)c, len);
+ c[len] = 0;
+ }
+ static c2pstr(const char *cc)
+ {
+ char *c = (char *)cc; /* Ouch */
+ int len = strlen(c);
+
+ if ( len > 255 ) len = 255;
+ strncpy(c, c+1, len);
+ c[0] = len;
+ }
+ #endif
OSAError LoadScriptingComponent (ComponentInstance * scriptingComponent);