summaryrefslogtreecommitdiffstats
path: root/Mac/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-09-16 10:54:21 (GMT)
committerGuido van Rossum <guido@python.org>1994-09-16 10:54:21 (GMT)
commit2d16703d654e773b09fd73e66ef663a2d5256768 (patch)
tree4d5540e7ae487d5ffc93b050d763db08b2f829d7 /Mac/Python
parentbf677edc45a08e61bc3147b65b6d9e40e07ba26e (diff)
downloadcpython-2d16703d654e773b09fd73e66ef663a2d5256768.zip
cpython-2d16703d654e773b09fd73e66ef663a2d5256768.tar.gz
cpython-2d16703d654e773b09fd73e66ef663a2d5256768.tar.bz2
gestaltmodule.c: interface to Gestalt Manager.
macosmodule.c: interface to random collection of Managers. macsetfiletype.c: set file type, for import.c.
Diffstat (limited to 'Mac/Python')
-rw-r--r--Mac/Python/macsetfiletype.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c
new file mode 100644
index 0000000..7ba7080
--- /dev/null
+++ b/Mac/Python/macsetfiletype.c
@@ -0,0 +1,25 @@
+
+/*
+ * macsetfiletype - Set the mac's idea of file type
+ *
+ */
+
+#include <Files.h>
+#include <pascal.h>
+
+int
+setfiletype(name, creator, type)
+char *name;
+long creator, type;
+{
+ FInfo info;
+ unsigned char *pname;
+
+ pname = c2pstr(name);
+ if ( GetFInfo(pname, 0, &info) < 0 )
+ return -1;
+ info.fdType = type;
+ info.fdCreator = creator;
+ return SetFInfo(pname, 0, &info);
+}
+