- Timestamp:
- Jan 18, 2007, 7:45:58 PM (14 years ago)
- Location:
- zzuf/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/src/fd.c
r1695 r1697 61 61 /* Create lock. This lock variable is used to disable file descriptor 62 62 * creation wrappers. For instance on Mac OS X, fopen() calls open() 63 * and we don’t want open() to do any zzuf-related stuff. */ 64 static int create_lock; 63 * and we don’t want open() to do any zzuf-related stuff, fopen() takes 64 * care of everything. */ 65 static int create_lock = 0; 65 66 66 67 static int32_t seed = DEFAULT_SEED; … … 276 277 277 278 if(fd == -1) 278 create_lock = 1;279 create_lock++; 279 280 else 280 files[fds[fd]].locked = 1;281 files[fds[fd]].locked++; 281 282 } 282 283 … … 287 288 288 289 if(fd == -1) 289 create_lock = 0;290 create_lock--; 290 291 else 291 files[fds[fd]].locked = 0;292 files[fds[fd]].locked--; 292 293 } 293 294 -
zzuf/trunk/src/lib-stream.c
r1695 r1697 555 555 return __srefill_orig(fp); 556 556 557 tmp = _zz_islocked(fd);558 557 _zz_lock(fd); 559 558 ret = __srefill_orig(fp); 560 559 newpos = lseek(fd, 0, SEEK_CUR); 561 if(!tmp) 562 _zz_unlock(fd); 560 _zz_unlock(fd); 563 561 if(ret != EOF) 564 562 {
Note: See TracChangeset
for help on using the changeset viewer.