comparison Mac/Python/macsetfiletype.c @ 1892:eec0dc5aba60 legacy-trunk

gestaltmodule.c: interface to Gestalt Manager. macosmodule.c: interface to random collection of Managers. macsetfiletype.c: set file type, for import.c.
author Guido van Rossum <guido@python.org>
date Fri, 16 Sep 1994 10:54:21 +0000
parents
children 275951b08608
comparison
equal deleted inserted replaced
1891:24ae7af40a09 1892:eec0dc5aba60
1
2 /*
3 * macsetfiletype - Set the mac's idea of file type
4 *
5 */
6
7 #include <Files.h>
8 #include <pascal.h>
9
10 int
11 setfiletype(name, creator, type)
12 char *name;
13 long creator, type;
14 {
15 FInfo info;
16 unsigned char *pname;
17
18 pname = c2pstr(name);
19 if ( GetFInfo(pname, 0, &info) < 0 )
20 return -1;
21 info.fdType = type;
22 info.fdCreator = creator;
23 return SetFInfo(pname, 0, &info);
24 }
25