cpython/Mac/Python/macsetfiletype.c
Guido van Rossum 2d16703d65 gestaltmodule.c: interface to Gestalt Manager.
macosmodule.c: interface to random collection of Managers.
macsetfiletype.c: set file type, for import.c.
1994-09-16 10:54:21 +00:00

25 lines
375 B
C

/*
* 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);
}