--------------------- PatchSet 8722 Date: 2006/10/24 19:18:36 Author: serassio Branch: nt Tag: (none) Log: Ran indent Members: src/disk.c:1.13.8.3->1.13.8.4 src/structs.h:1.81.2.36->1.81.2.37 src/fs/coss/aio_win32.c:1.1.2.7->1.1.2.8 Index: squid/src/disk.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/disk.c,v retrieving revision 1.13.8.3 retrieving revision 1.13.8.4 diff -u -r1.13.8.3 -r1.13.8.4 --- squid/src/disk.c 24 Oct 2006 19:15:09 -0000 1.13.8.3 +++ squid/src/disk.c 24 Oct 2006 19:18:36 -0000 1.13.8.4 @@ -1,6 +1,6 @@ /* - * $Id: disk.c,v 1.13.8.3 2006/10/24 19:15:09 serassio Exp $ + * $Id: disk.c,v 1.13.8.4 2006/10/24 19:18:36 serassio Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -74,10 +74,10 @@ errno = 0; #ifdef _SQUID_MSWIN_ if (overlapped) - fd = aio_open(path, mode); + fd = aio_open(path, mode); else #endif - fd = open(path, mode, 0644); + fd = open(path, mode, 0644); statCounter.syscalls.disk.opens++; if (fd < 0) { debug(50, 3) ("file_open: error opening file %s: %s\n", path, @@ -89,7 +89,7 @@ fd_open(fd, FD_FILE, path); } if (overlapped) - fd_table[fd].flags.overlapped = 1; + fd_table[fd].flags.overlapped = 1; return fd; } @@ -135,10 +135,10 @@ fd_close(fd); #ifdef _SQUID_MSWIN_ if (overlapped) - aio_close(fd); + aio_close(fd); else #endif - close(fd); + close(fd); statCounter.syscalls.disk.closes++; } @@ -224,24 +224,24 @@ Overlapped.OffsetHigh = 0; #endif Overlapped.hEvent = 0; - WriteFile((HANDLE) _get_osfhandle(fd), /* handle to file */ - fdd->write_q->buf + fdd->write_q->buf_offset, /* data buffer */ + WriteFile((HANDLE) _get_osfhandle(fd), /* handle to file */ + fdd->write_q->buf + fdd->write_q->buf_offset, /* data buffer */ (size_t) (fdd->write_q->len - fdd->write_q->buf_offset), /* number of bytes to write */ - NULL, /* number of bytes written */ - &Overlapped); /* overlapped buffer */ + NULL, /* number of bytes written */ + &Overlapped); /* overlapped buffer */ - if (!GetOverlappedResult((HANDLE) _get_osfhandle(fd), /* handle to file */ - &Overlapped, /* overlapped buffer */ - &len, /* bytes transferred */ - TRUE)) { /* wait option */ - WIN32_maperror(GetLastError()); - len = -1; - } + if (!GetOverlappedResult((HANDLE) _get_osfhandle(fd), /* handle to file */ + &Overlapped, /* overlapped buffer */ + &len, /* bytes transferred */ + TRUE)) { /* wait option */ + WIN32_maperror(GetLastError()); + len = -1; + } } else { #endif - if (fdd->write_q->file_offset != -1) + if (fdd->write_q->file_offset != -1) lseek(fd, fdd->write_q->file_offset, SEEK_SET); - len = FD_WRITE_METHOD(fd, + len = FD_WRITE_METHOD(fd, fdd->write_q->buf + fdd->write_q->buf_offset, fdd->write_q->len - fdd->write_q->buf_offset); #ifdef _SQUID_MSWIN_ @@ -418,32 +418,32 @@ Overlapped.OffsetHigh = 0; #endif Overlapped.hEvent = 0; - F->disk.offset = ctrl_dat->file_offset; - ReadFile((HANDLE) _get_osfhandle(fd), /* handle to file */ - ctrl_dat->buf, /* data buffer */ + F->disk.offset = ctrl_dat->file_offset; + ReadFile((HANDLE) _get_osfhandle(fd), /* handle to file */ + ctrl_dat->buf, /* data buffer */ (size_t) (ctrl_dat->req_len), /* number of bytes to write */ - NULL, /* number of bytes written */ - &Overlapped); /* overlapped buffer */ + NULL, /* number of bytes written */ + &Overlapped); /* overlapped buffer */ - errno = 0; - if (!GetOverlappedResult((HANDLE) _get_osfhandle(fd), /* handle to file */ - &Overlapped, /* overlapped buffer */ - &len, /* bytes transferred */ - TRUE)) { /* wait option */ - WIN32_maperror(GetLastError()); - len = -1; - } + errno = 0; + if (!GetOverlappedResult((HANDLE) _get_osfhandle(fd), /* handle to file */ + &Overlapped, /* overlapped buffer */ + &len, /* bytes transferred */ + TRUE)) { /* wait option */ + WIN32_maperror(GetLastError()); + len = -1; + } } else { #endif - if (F->disk.offset != ctrl_dat->file_offset) { + if (F->disk.offset != ctrl_dat->file_offset) { debug(6, 3) ("diskHandleRead: FD %d seeking to offset %d\n", - fd, (int) ctrl_dat->file_offset); - lseek(fd, ctrl_dat->file_offset, SEEK_SET); /* XXX ignore return? */ + fd, (int) ctrl_dat->file_offset); + lseek(fd, ctrl_dat->file_offset, SEEK_SET); /* XXX ignore return? */ statCounter.syscalls.disk.seeks++; F->disk.offset = ctrl_dat->file_offset; - } - errno = 0; - len = FD_READ_METHOD(fd, ctrl_dat->buf, ctrl_dat->req_len); + } + errno = 0; + len = FD_READ_METHOD(fd, ctrl_dat->buf, ctrl_dat->req_len); #ifdef _SQUID_MSWIN_ } #endif Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.81.2.36 retrieving revision 1.81.2.37 diff -u -r1.81.2.36 -r1.81.2.37 --- squid/src/structs.h 24 Oct 2006 19:15:09 -0000 1.81.2.36 +++ squid/src/structs.h 24 Oct 2006 19:18:36 -0000 1.81.2.37 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.81.2.36 2006/10/24 19:15:09 serassio Exp $ + * $Id: structs.h,v 1.81.2.37 2006/10/24 19:18:36 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -886,7 +886,7 @@ unsigned int nodelay:1; unsigned int close_on_exec:1; unsigned int backoff:1; /* keep track of whether the fd is backed off */ - unsigned int overlapped:1; + unsigned int overlapped:1; } flags; comm_pending read_pending; comm_pending write_pending; Index: squid/src/fs/coss/aio_win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/coss/Attic/aio_win32.c,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- squid/src/fs/coss/aio_win32.c 24 Oct 2006 19:15:10 -0000 1.1.2.7 +++ squid/src/fs/coss/aio_win32.c 24 Oct 2006 19:18:36 -0000 1.1.2.8 @@ -1,6 +1,6 @@ /* - * $Id: aio_win32.c,v 1.1.2.7 2006/10/24 19:15:10 serassio Exp $ + * $Id: aio_win32.c,v 1.1.2.8 2006/10/24 19:18:36 serassio Exp $ * * DEBUG: section 81 aio_xxx() POSIX emulation on Windows * AUTHOR: Guido Serassio @@ -165,11 +165,11 @@ if ((hndl = CreateFile(path, /* file name */ dwDesiredAccess, /* access mode */ - 0, /* share mode */ - NULL, /* SD */ + 0, /* share mode */ + NULL, /* SD */ dwCreationDisposition, /* how to create */ FILE_FLAG_OVERLAPPED, /* file attributes */ - NULL /* handle to template file */ + NULL /* handle to template file */ )) != INVALID_HANDLE_VALUE) { fd = _open_osfhandle((long) hndl, 0); debug(81, 5) ("aio_open: FD %d\n", fd); @@ -202,11 +202,11 @@ if ((hndl = CreateFile(path, /* file name */ dwDesiredAccess, /* access mode */ - 0, /* share mode */ - NULL, /* SD */ + 0, /* share mode */ + NULL, /* SD */ dwCreationDisposition, /* how to create */ FILE_FLAG_OVERLAPPED, /* file attributes */ - NULL /* handle to template file */ + NULL /* handle to template file */ )) != INVALID_HANDLE_VALUE) { fd = _open_osfhandle((long) hndl, 0); debug(81, 5) ("aio_open: FD %d\n", fd); @@ -237,6 +237,7 @@ fd_close(fd); statCounter.syscalls.disk.closes++; } + #endif #endif /* _SQUID_MSWIN_ */