view Mac/Python/macsetfiletype.c @ 2091:b4d982c648bb legacy-trunk

1995 copyright
author Guido van Rossum <guido@python.org>
date Sun, 08 Jan 1995 14:33:34 +0000
parents 275951b08608
children 8da03decef59
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) c2pstr(name);
	if ( GetFInfo(pname, 0, &info) < 0 )
		return -1;
	info.fdType = type;
	info.fdCreator = creator;
	return SetFInfo(pname, 0, &info);
}