(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 1.4 and 1.6

version 1.4, 2005/02/04 09:30:15 version 1.6, 2005/02/11 04:57:17
Line 65 
Line 65 
         FDIDestroy         FDIDestroy
 */ */
  
 /* Currently dummy function pointers */  /* Currently mostly dummy function pointers */
  
 FNALLOC(dummy_alloc) {  FNALLOC(debug_alloc) {
         printf("FNALLOC just called with %d\n",cb);         printf("FNALLOC just called with %d\n",cb);
         return 0;          return malloc(cb);
 } }
  
 FNFREE(dummy_free) {  FNFREE(debug_free) {
         printf("FNFREE just called with %d\n",pv);         printf("FNFREE just called with %d\n",pv);
           free(pv);
         return;         return;
 } }
  
   /*
   It is not necessary for these functions to actually call _open etc.; these functions could instead call fopen, fread, fwrite, fclose, and fseek, or CreateFile, ReadFile, WriteFile, CloseHandle, and SetFilePointer, etc.  However, the parameters and return codes will have to be translated appropriately (e.g. the file open mode passed in to pfnopen).
   */
   
 FNOPEN(dummy_open) { FNOPEN(dummy_open) {
          printf("FNOPEN just called with %d, %d, %d\n",pszFile, oflag, pmode);          printf("FNOPEN just called with %d, %d, %d\n",pszFile, oflag, pmode);
         return 0;         return 0;
 } }
  
 FNREAD(dummy_read) { FNREAD(dummy_read) {
 /*       printf("FNREAD just called with %d, %d, %d\n",hf, pv, cb);           printf("   FNREAD just called with %d, %d, %d\n",hf, pv, cb);
          return void;          return 0;
 */      return 0;  
 } }
  
 FNWRITE(dummy_write) { FNWRITE(dummy_write) {
 /*       printf("FNWRITE just called with %d, %d, %d\n",hf, pv, cb);           printf("   FNWRITE just called with %d, %d, %d\n",hf, pv, cb);
          return void;          return 0;
 */      return 0;  
 } }
  
  
 FNCLOSE(dummy_close) { FNCLOSE(dummy_close) {
 /*       printf("FNCLOSE just called with %d\n",hf);           printf("   FNCLOSE just called with %d\n",hf);
         return void;          return 0;
 */      return 0;  
 } }
  
 FNSEEK(dummy_seek) { FNSEEK(dummy_seek) {
 /*       printf("FNSEEK just called with %d, %d, %d\n",hf, dist, seektype);           printf("   FNSEEK just called with %d, %d, %d\n",hf, dist, seektype);
         return void;          return 0;
 */      return 0;  
 } }
  
 HFDI my_hfdi;  HFDI hfdi_386, hfdi_286, hfdi_unknown;
 /* yes its global and ugly */ /* yes its global and ugly */
  
 static void TestDestroy(void) { static void TestDestroy(void) {
Line 118 
Line 119 
                 EDIT : Causes GPL if FDIDestroy is called on an invalid pointer.                 EDIT : Causes GPL if FDIDestroy is called on an invalid pointer.
                 ok( 0 == FDIDestroy(0), "Return true incorrectly in TestDestroy()!\n");                 ok( 0 == FDIDestroy(0), "Return true incorrectly in TestDestroy()!\n");
                 */                 */
         ok(FDIDestroy(my_hfdi), "Failed on destroying test hfdi!\n");  
           ok(FDIDestroy(hfdi_unknown), "FDIDestroy (CPU = unknown) failed!\n");
           printf("Ending TestDestroy()\n");
  
 } }
  
Line 128 
Line 131 
  
         printf("Starting TestCreate()\n");         printf("Starting TestCreate()\n");
  
         my_hfdi = FDICreate(          hfdi_unknown = FDICreate(
                 dummy_alloc,                  debug_alloc,
                 dummy_free,                  debug_free,
                 dummy_open,                 dummy_open,
                 dummy_read,                 dummy_read,
                 dummy_write,                 dummy_write,
                 dummy_close,                 dummy_close,
                 dummy_seek,                 dummy_seek,
                 cpu80386,                  cpuUNKNOWN,
                 &error_structure                 &error_structure
         );         );
           ok(hfdi_unknown != NULL,"FDICreate (CPU = unknown) failed!\n");
   
   
  
         ok(my_hfdi != NULL,"FDICreate failed!\n");  
  
         printf("Ending TestCreate()\n");         printf("Ending TestCreate()\n");
 } }


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

Rizwan Kassim
Powered by
ViewCVS 0.9.2