(file) Return to cabinet_fdi.c CVS log (file) (dir) Up to [RizwankCVS] / group3 / wine / dlls / cabinet / tests

Diff for /group3/wine/dlls/cabinet/tests/cabinet_fdi.c between version 2.9 and 2.10

version 2.9, 2005/02/27 08:22:01 version 2.10, 2005/02/27 08:31:36
Line 102 
Line 102 
         return 0;         return 0;
 } }
  
 FNFDINOTIFY(dummy_notification){  
         printf("   FNFDINOTIFY just called with %d, %d \n",fdint,pfdin);  
         return 0;  
 }  
  
   /*Possible non trivial addition:
   Notify receives some information about the cab file(see FDI documentation).
   Since this info is different depending on the value of fdint, and Notify should
   be generic, it is not simple or nice to check this information.
   */
 FNFDINOTIFY(notification_function) FNFDINOTIFY(notification_function)
 { {
         printf("   FNFDINOTIFY real just called with %d, %d \n",fdint,pfdin);  
         switch (fdint)         switch (fdint)
         {         {
                 case fdintCABINET_INFO:                 case fdintCABINET_INFO:
                 {                 {
                         printf(  
                                 "fdintCABINET_INFO:\n"  
                                 "-next cab name: %s\n"  
                                 "-next disk: %s\n"  
                                 "-path name: %s\n"  
                                 "-set ID: %d\n"  
                                 "-number in set: %d\n",  
                                 pfdin->psz1,  
                                 pfdin->psz2,  
                                 pfdin->psz3,  
                                 pfdin->setID,  
                                 pfdin->iCabinet  
                                 );  
                         return 0;                         return 0;
                 }                 }
                 case fdintPARTIAL_FILE:                 case fdintPARTIAL_FILE:
                 {                 {
                         printf("dintPARTIAL_FILE\n");  
                         return 0;                         return 0;
                 }                 }
                 case fdintCOPY_FILE:                 case fdintCOPY_FILE:
                 {                 {
                         int fih = 0;                         int fih = 0;
                         char target[256];                         char target[256];
                         printf(  
                                 "fdintCOPY_FILE:\n"  
                                 "-name: %s\n"  
                                 "-uncompressed size: %d\n"  
                                 "-date: %d\n"  
                                 "-time: %d\n"  
                                 "-attributes: %d\n"  
                                 "-file's folder index: %d\n",  
                                 pfdin->psz1,  
                                 pfdin->cb,  
                                 pfdin->date,  
                                 pfdin->time,  
                                 pfdin->attribs,  
                                 pfdin->iFolder  
   
                                 );  
                         sprintf(target, "./%s",pfdin->psz1);                         sprintf(target, "./%s",pfdin->psz1);
 #ifdef TVFS  
                                 fih = tvfs_open (target,                                 fih = tvfs_open (target,
                                         _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL,                                         _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL,
                                         _S_IREAD | _S_IWRITE                                         _S_IREAD | _S_IWRITE
                                                                 );                                                                 );
   
 #else  
                                 fih = real_open (target,  
                                         _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL,  
                                         _S_IREAD | _S_IWRITE  
                                                                 );  
 #endif  
                         return fih;                         return fih;
   
                 }                 }
                 case fdintCLOSE_FILE_INFO:                 case fdintCLOSE_FILE_INFO:
                 {                 {
                         char filebuf[256];                         char filebuf[256];
                         int result;                         int result;
  
                         printf(  
                                 "fdintCLOSE_FILE:\n"  
                                 "-name: %s\n"  
                                 "-handle: %d\n"  
                                 "-date: %d\n"  
                                 "-time: %d\n"  
                                 "-attributes: %d\n"  
                                 "-file's folder index: %d\n"  
                                 "-run: %d\n",  
                                 pfdin->psz1,  
                                 pfdin->hf,  
                                 pfdin->date,  
                                 pfdin->time,  
                                 pfdin->attribs,  
                                 pfdin->iFolder,  
                                 pfdin->cb  
                                 );  
   
 /* /*
         printf("Testing direct file compare and lseek of %s\n", name_simple_txt);         printf("Testing direct file compare and lseek of %s\n", name_simple_txt);
         printf("Reading and comparing file\n");         printf("Reading and comparing file\n");
Line 200 
Line 143 
         result = tvfs_compare( filebuf , file_simple_txt, size_simple_txt);         result = tvfs_compare( filebuf , file_simple_txt, size_simple_txt);
  
 */ */
 #ifdef  TVFS  
                 tvfs_close(pfdin->hf);                 tvfs_close(pfdin->hf);
 #else  
                 real_close(pfdin->hf);  
 #endif  
   
                         return TRUE;                         return TRUE;
                 }                 }
                 case fdintNEXT_CABINET:                 case fdintNEXT_CABINET:
                 {                 {
   
                         printf("fdintNEXT_CABINET\n");  
                         return 0;                         return 0;
                 }                 }
                 case fdintENUMERATE:                 case fdintENUMERATE:
                 {                 {
                                 printf("fdintENUMERATE\n");  
                                 return 0;                                 return 0;
                 }                 }
         }         }


Legend:
Removed from v.2.9  
changed lines
  Added in v.2.10

Rizwan Kassim
Powered by
ViewCVS 0.9.2