diff options
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macsetfiletype.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c new file mode 100644 index 0000000000..7ba70807d5 --- /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); +} + |