mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gestaltmodule.c: interface to Gestalt Manager.
macosmodule.c: interface to random collection of Managers. macsetfiletype.c: set file type, for import.c.
This commit is contained in:
parent
bf677edc45
commit
2d16703d65
3 changed files with 475 additions and 0 deletions
25
Mac/Python/macsetfiletype.c
Normal file
25
Mac/Python/macsetfiletype.c
Normal file
|
|
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue