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

Diff for /group3/wine/dlls/cabinet/tests/tvfs.c between version 1.5 and 1.6

version 1.5, 2005/02/26 03:39:29 version 1.6, 2005/02/26 04:24:52
Line 91 
Line 91 
                /* File did not exist */                /* File did not exist */
                if ((flags & O_CREAT) == 0) {                if ((flags & O_CREAT) == 0) {
                        /* ENOENT */                        /* ENOENT */
           #ifdef DEBUG
           printf("tvfs_open returning -1\n");
           #endif
                        return -1;                        return -1;
                }                }
                inode = tvfs_create(fname, 0, 0);                inode = tvfs_create(fname, 0, 0);
Line 100 
Line 103 
            handler->pos=0;            handler->pos=0;
            h = nfiles++;            h = nfiles++;
            handles[h] = handler;            handles[h] = handler;
           #ifdef DEBUG
           printf("tvfs_open returning with %d\n", h);
           #endif
   
            return h;            return h;
 } }
  
Line 142 
Line 149 
  
 /* Compare given file with given contents, return 0 on equal, else nonzero */ /* Compare given file with given contents, return 0 on equal, else nonzero */
 int tvfs_compare(const char *fname, const char *buf, int len){ int tvfs_compare(const char *fname, const char *buf, int len){
   
       char filebuf[MAXFLEN];
   
         for (inode=0; inode<nfiles; inode++) {
                  if (!files[inode])
                          continue;
                  if (!strcmp(files[inode]->fname, fname))
                                                   break;       }
   
   
         #ifdef DEBUG         #ifdef DEBUG
         printf("tvfs_compare called with %s, %d, %d\n", fname, buf, len);         printf("tvfs_compare called with %s, %d, %d\n", fname, buf, len);
         #endif         #endif
Line 206 
Line 223 
  
 unsigned int tvfs_write(int h, void *buf, unsigned int len) unsigned int tvfs_write(int h, void *buf, unsigned int len)
 { {
   
      int inode = handles[h]->inode;
      int pos = handles[h]->pos;
   
         printf("tvfs_write called with %d, %d, %d\n", h, buf, len);         printf("tvfs_write called with %d, %d, %d\n", h, buf, len);
   
           memcpy(files[inode]->buf+pos, buf, len);
           files[inode]->bytes_used += len;
   
         return len;         return len;
         /* return -1 to simulate diskfull or some other error */         /* return -1 to simulate diskfull or some other error */
 } }


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

Rizwan Kassim
Powered by
ViewCVS 0.9.2