Kaydet (Commit) 33d1ad28 authored tarafından Jack Jansen's avatar Jack Jansen

Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls,…

Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls, which are carbon-compatible.
üst ee6eeb18
...@@ -42,14 +42,17 @@ char *name; ...@@ -42,14 +42,17 @@ char *name;
long creator, type; long creator, type;
{ {
FInfo info; FInfo info;
FSSpec fss;
unsigned char *pname; unsigned char *pname;
pname = (StringPtr) Pstring(name); pname = (StringPtr) Pstring(name);
if ( GetFInfo(pname, 0, &info) < 0 ) if (FSMakeFSSpec(0, 0, pname, &fss) < 0 )
return -1;
if ( FSpGetFInfo(&fss, &info) < 0 )
return -1; return -1;
info.fdType = type; info.fdType = type;
info.fdCreator = creator; info.fdCreator = creator;
return SetFInfo(pname, 0, &info); return FSpSetFInfo(&fss, &info);
} }
long long
...@@ -58,9 +61,12 @@ char *name; ...@@ -58,9 +61,12 @@ char *name;
{ {
FInfo info; FInfo info;
unsigned char *pname; unsigned char *pname;
FSSpec fss;
pname = (StringPtr) Pstring(name); pname = (StringPtr) Pstring(name);
if ( GetFInfo(pname, 0, &info) < 0 ) if (FSMakeFSSpec(0, 0, pname, &fss) < 0 )
return -1;
if ( FSpGetFInfo(&fss, &info) < 0 )
return -1; return -1;
return info.fdType; return info.fdType;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment