]> granicus.if.org Git - python/commitdiff
Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls, which...
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 2 Jun 2000 21:29:59 +0000 (21:29 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 2 Jun 2000 21:29:59 +0000 (21:29 +0000)
Mac/Python/macsetfiletype.c

index cb2d8226656786e39620ff04caa97b7037c197a9..c4b114fff72432460eca063347dda385bb39c3f9 100644 (file)
@@ -42,14 +42,17 @@ char *name;
 long creator, type;
 {
        FInfo info;
+       FSSpec fss;
        unsigned char *pname;
        
        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;
        info.fdType = type;
        info.fdCreator = creator;
-       return SetFInfo(pname, 0, &info);
+       return FSpSetFInfo(&fss, &info);
 }
 
 long
@@ -58,9 +61,12 @@ char *name;
 {
        FInfo info;
        unsigned char *pname;
+       FSSpec fss;
        
        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 info.fdType;
 }