Don't reference removed files in Makefile
[python/dscho.git] / Mac / Python / macsetfiletype.c
blob38b51ba33a5a0c5399ef39c9a5ea07c086b481d7
2 /*
3 * macsetfiletype - Set the mac's idea of file type
5 */
7 #include "macdefs.h"
9 int
10 setfiletype(name, creator, type)
11 char *name;
12 long creator, type;
14 FInfo info;
15 unsigned char *pname;
17 pname = (StringPtr) Pstring(name);
18 if ( GetFInfo(pname, 0, &info) < 0 )
19 return -1;
20 info.fdType = type;
21 info.fdCreator = creator;
22 return SetFInfo(pname, 0, &info);
25 long
26 getfiletype(name)
27 char *name;
29 FInfo info;
30 unsigned char *pname;
32 pname = (StringPtr) Pstring(name);
33 if ( GetFInfo(pname, 0, &info) < 0 )
34 return -1;
35 return info.fdType;