view Mac/Python/macsetfiletype.c @ 2183:62bdded5f00a legacy-trunk

modernized/rationalized, added PyMac_BuildOSType
author Guido van Rossum <guido@python.org>
date Wed, 18 Jan 1995 23:57:26 +0000
parents 8da03decef59
children fc6e96221088
line wrap: on
line source


/*
 *  macsetfiletype - Set the mac's idea of file type
 *
 */
 
#include "macdefs.h"

int
setfiletype(name, creator, type)
char *name;
long creator, type;
{
	FInfo info;
	unsigned char *pname;
	
	pname = (StringPtr) Pstring(name);
	if ( GetFInfo(pname, 0, &info) < 0 )
		return -1;
	info.fdType = type;
	info.fdCreator = creator;
	return SetFInfo(pname, 0, &info);
}