|
From: Andre R. <and...@us...> - 2004-10-29 19:58:40
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3038 Modified Files: fileverbs.c filedialog.c resources.c fileops.c Log Message: Fixed GCC compiler warnings. Index: resources.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/resources.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** resources.c 23 Oct 2004 22:50:19 -0000 1.2 --- resources.c 29 Oct 2004 19:58:27 -0000 1.3 *************** *** 218,222 **** return (false); ! /*SetResInfo (hresource, id, bsname); /*set the name of the resource*/ ChangedResource (hresource); --- 218,222 ---- return (false); ! //SetResInfo (hresource, id, bsname); /*set the name of the resource*/ ChangedResource (hresource); Index: fileops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileops.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fileops.c 23 Oct 2004 22:18:51 -0000 1.3 --- fileops.c 29 Oct 2004 19:58:27 -0000 1.4 *************** *** 1410,1447 **** } /*largefilebuffer*/ - /* - static boolean xlargefilebuffer (Handle *hbuffer) { - - /* - allocate a "large" buffer for a file copy or some kind of transfer. - - we compact the application heap, and then ask for half of what's - available, divisble by 1024. - - we think this is a particularly efficient size for the FS routines. - is it? - - 12/30/91 dmb: generate memoryerror when returning false. - %/ - - register long ctbytes; - - ctbytes = CompactMem (maxSize); /*compact the heap, find out how much is free%/ - - ctbytes = ctbytes / 2; /*we'll ask for approx half of the memory available%/ - - if (ctbytes < 1024) { /*couldn't allocate a minimum size block%/ - - memoryerror (); - - *hbuffer = nil; - - return (false); - } - - ctbytes = (ctbytes / 1024) * 1024; /*an even multiple of 1024%/ - - return (newhandle (ctbytes, hbuffer)); /*shouldn't fail at this point, but let's be sure%/ - } /*xlargefilebuffer*/ #ifdef MACVERSION --- 1410,1413 ---- *************** *** 1888,1892 **** /* ! if (!directorytopath (dirid, vnum, bspath)) /*shouldn't fail%/ errcode = dirNFErr; */ --- 1854,1858 ---- /* ! if (!directorytopath (dirid, vnum, bspath)) /%shouldn't fail%/ errcode = dirNFErr; */ *************** *** 2272,2301 **** - /* - boolean renamevolume (bsoldname, bsnewname) bigstring bsoldname, bsnewname; { - - /* - 6/x/91 mao - %/ - - short vnum; - HParamBlockRec pb; - - if (!pathtovolume (bsoldname, &vnum)) - return (false); - - clearbytes (&pb, sizeof (pb)); - - pb.volumeParam.ioVRefNum = vnum; - - if (oserror (PBHGetVInfoSync (&pb))) - return (false); - - pb.volumeParam.ioNamePtr = bsnewname; - - return (!oserror (PBSetVInfoSync (&pb))); - } /*renamevolume*/ - - boolean lockvolume (const tyfilespec *fs, boolean fllock) { #ifdef MACVERSION --- 2238,2241 ---- *************** *** 2346,2383 **** - /* - static boolean xlockvolume (bigstring bsname, boolean fllock) { - - /* - 6/x/91 mao - %/ - - short vnum; - HParamBlockRec pb; - - if (!pathtovolume (bsname, &vnum)) - return (false); - - clearbytes (&pb, sizeof (pb)); - - pb.volumeParam.ioVRefNum = vnum; - - if (oserror (PBHGetVInfoSync (&pb))) - return (false); - - if (fllock) - BitSet (&pb.volumeParam.ioVAtrb, 0); - else - BitClr (&pb.volumeParam.ioVAtrb, 0); - - if (oserror (PBSetVInfoSync (&pb))) - return (false); - - PBFlushVolSync (&pb); - - return (true); - } /*lockvolume*/ - - #ifdef WIN95VERSION boolean findapplication (OSType creator, tyfilespec *fsapp) { --- 2286,2289 ---- *************** *** 2440,2444 **** boolean drivenumtovolname (short drivenum, bigstring bsvol) { ! ParamBlockRec pb; clearbytes (&pb, sizeof (pb)); --- 2346,2350 ---- boolean drivenumtovolname (short drivenum, bigstring bsvol) { ! HParamBlockRec pb; clearbytes (&pb, sizeof (pb)); *************** *** 2570,2574 **** ! /* static boolean getdesktopdatabasepath (short vnum, DTPBRec *dt) { --- 2476,2481 ---- ! #if 0 ! static boolean getdesktopdatabasepath (short vnum, DTPBRec *dt) { *************** *** 2581,2584 **** --- 2488,2493 ---- } /*getdesktopdatabasepath*/ + #endif + boolean getfilecomment (const tyfilespec *fs, bigstring bscomment) { *************** *** 2835,2843 **** #ifdef NEWFILESPECTYPE ! boolean fileparsevolname (bigstring bspath, long *vnum, bigstring bsvol) { #else ! boolean fileparsevolname (bigstring bspath, short *vnum, bigstring bsvol) { #endif ! /* convert a full path, which might contain a volume name at the beginning --- 2744,2752 ---- #ifdef NEWFILESPECTYPE ! boolean fileparsevolname (bigstring bspath, long *vnum, bigstring bsvol) #else ! boolean fileparsevolname (bigstring bspath, short *vnum, bigstring bsvol) #endif ! { /* convert a full path, which might contain a volume name at the beginning *************** *** 2861,2865 **** short ix = 1; bigstring bsvolname; ! ParamBlockRec pb; short drivenum; bigstring bs; --- 2770,2774 ---- short ix = 1; bigstring bsvolname; ! HParamBlockRec pb; short drivenum; bigstring bs; *************** *** 3058,3062 **** } /*getfileparentfolder*/ ! /* boolean getdefaultpath (bigstring bs) { --- 2967,2973 ---- } /*getfileparentfolder*/ ! ! #if 0 ! boolean getdefaultpath (bigstring bs) { *************** *** 3075,3078 **** --- 2986,2993 ---- return (filegetpath (pb.fileParam.ioVRefNum, bs)); } /*getdefaultpath*/ + + #endif + + #endif Index: fileverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileverbs.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fileverbs.c 23 Oct 2004 22:19:25 -0000 1.2 --- fileverbs.c 29 Oct 2004 19:58:27 -0000 1.3 *************** *** 2176,2180 **** ! /* static boolean writewholefileverb (hdltreenode hparam1, tyvaluerecord *v) { --- 2176,2181 ---- ! #if 0 ! static boolean writewholefileverb (hdltreenode hparam1, tyvaluerecord *v) { *************** *** 2197,2201 **** */ - /* tyfilespec fs; tyvaluerecord val; --- 2198,2201 ---- *************** *** 2217,2220 **** --- 2217,2222 ---- } /*writewholefileverb*/ + #endif + static boolean comparefilesverb (hdltreenode hparam1, tyvaluerecord *v) { *************** *** 2406,2410 **** register hdltreenode hp1 = hparam1; register tyvaluerecord *v = vreturned; - register short errornum = 0; setbooleanvalue (false, v); /*by default, file functions return false*/ --- 2408,2411 ---- Index: filedialog.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/filedialog.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** filedialog.c 23 Oct 2004 22:17:48 -0000 1.2 --- filedialog.c 29 Oct 2004 19:58:27 -0000 1.3 *************** *** 490,500 **** */ - //register short id; - Point pt = {-1, -1}; - short cttypes = -1; - OSType *types = nil; Str255 bs; - //DlgHookYDUPP sfhook = nil; - //FileFilterYDUPP sffilefilter = nil; tysfdata sfdata; FSSpec *fs = &sfdata.sfreply.sfFile; --- 490,494 ---- *************** *** 503,506 **** --- 497,501 ---- long appA5; #endif + //move the switch statement to below because it's smarter to call it there when using //the new routines for Nav services. *************** *** 1085,1089 **** SInt32 hSize = (sizeof(NavTypeList) + sizeof(OSType) * (filetypes->cttypes - 1)); ! newhandle(hSize, &typeList); typesP = (NavTypeListPtr) *((Handle) typeList); --- 1080,1084 ---- SInt32 hSize = (sizeof(NavTypeList) + sizeof(OSType) * (filetypes->cttypes - 1)); ! newhandle(hSize, (Handle*) &typeList); typesP = (NavTypeListPtr) *((Handle) typeList); |