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



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


--- 
+++ 
@@ -4,8 +4,7 @@
  *
  */
  
-#include <Files.h>
-#include <pascal.h>
+#include "macdefs.h"
 
 int
 setfiletype(name, creator, type)
@@ -15,7 +14,7 @@
 	FInfo info;
 	unsigned char *pname;
 	
-	pname = c2pstr(name);
+	pname = (StringPtr) c2pstr(name);
 	if ( GetFInfo(pname, 0, &info) < 0 )
 		return -1;
 	info.fdType = type;
Make it work under MPW too.
