view Mac/Python/macsetfiletype.c @ 2226:c2d18b58232e legacy-trunk

added printf -- hack for Think C to init stdwin and stdio
author Guido van Rossum <guido@python.org>
date Sun, 22 Jan 1995 18:38:12 +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);
}