OSDN Git Service

Adding licence text and comments
authorKimmo Varis <kimmov@gmail.com>
Fri, 22 Aug 2003 21:58:37 +0000 (21:58 +0000)
committerKimmo Varis <kimmov@gmail.com>
Fri, 22 Aug 2003 21:58:37 +0000 (21:58 +0000)
Src/files.cpp
Src/files.h
Src/readme.txt

index 3a16489..5b4ab00 100644 (file)
@@ -1,6 +1,33 @@
+/////////////////////////////////////////////////////////////////////////////
+//    License (GPLv2+):
+//    This program is free software; you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation; either version 2 of the License, or (at
+//    your option) any later version.
+//    
+//    This program is distributed in the hope that it will be useful, but
+//    WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program; if not, write to the Free Software
+//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+/////////////////////////////////////////////////////////////////////////////
+/** 
+ * @file  files.cpp
+ *
+ * @brief Code file routines
+ */
+// RCS ID line follows -- this is updated by CVS
+// $Id$
+
 #include "stdafx.h"
 #include "files.h"
 
+/**
+ * @brief Open file as memory-mapped file
+ */
 BOOL files_openFileMapped(MAPPEDFILEDATA *fileData)
 {
        DWORD dwProtectFlag = 0;
@@ -83,6 +110,9 @@ BOOL files_openFileMapped(MAPPEDFILEDATA *fileData)
        return bSuccess;
 }
 
+/**
+ * @brief Close memory-mapped file
+ */
 BOOL files_closeFileMapped(MAPPEDFILEDATA *fileData, DWORD newSize, BOOL flush)
 {
        BOOL bSuccess = TRUE;
@@ -116,9 +146,11 @@ BOOL files_closeFileMapped(MAPPEDFILEDATA *fileData, DWORD newSize, BOOL flush)
        return bSuccess;
 }
 
-// Reads different EOL formats and returns length of EOL
-// This function is safe: it first checks that there are unread bytes,
-// so that we do not read past EOF
+/**
+ * @brief Reads different EOL formats and returns length of EOL
+ * @note This function is safe: it first checks that there are unread bytes,
+ * @note so that we do not read past EOF
+ */
 int files_readEOL(TCHAR *lpLineEnd, DWORD bytesLeft, BOOL bEOLSensitive)
 {
        int eolBytes = 0;
@@ -164,11 +196,14 @@ int files_readEOL(TCHAR *lpLineEnd, DWORD bytesLeft, BOOL bEOLSensitive)
        return eolBytes;
 }
 
+/**
+ * @brief Checks memory-mapped file for a binary data
+ * @note This does not work for UNICODE files
+ * @note as WinMerge is not compiled UNICODE enabled
+ */
 int files_binCheck(MAPPEDFILEDATA *fileData)
 {
        // Use unsigned type for binary compare
-       // Note that this does not work for UNICODE files
-       // as WinMerge is not compiled UNICODE enabled
        TBYTE *lpByte = (TBYTE *)fileData->pMapBase;
        BOOL bBinary = FALSE;
        DWORD dwBytesRead = 0;
index 0b1b3f5..aa356f9 100644 (file)
@@ -1,6 +1,33 @@
+/////////////////////////////////////////////////////////////////////////////
+//    License (GPLv2+):
+//    This program is free software; you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation; either version 2 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful, but
+//    WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//    General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program; if not, write to the Free Software
+//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+/////////////////////////////////////////////////////////////////////////////
+/** 
+ * @file  files.h
+ *
+ * @brief Declaration file for file routines
+ */
+// RCS ID line follows -- this is updated by CVS
+// $Id$
+
 #ifndef _FILES_H_INCLUDED
 #define _FILES_H_INCLUDED
 
+/**
+ * @brief File-operation return-statuses
+ */
 enum
 {
        FRESULT_ERROR = 0,
@@ -8,6 +35,11 @@ enum
        FRESULT_BINARY
 };
 
+/**
+ * @brief Memory-mapped file information
+ * When memory-mapped file is created, related information is
+ * stored to this structure.
+ */
 struct MAPPEDFILEDATA
 {
        TCHAR fileName[_MAX_PATH];
index 978f777..d49b5eb 100644 (file)
@@ -2,6 +2,8 @@
  PATCH: [ 787495 ] Create diffutils class (CDiffWrapper)
   WinMerge: Merge.dsp MergeDoc.h MergeDoc.cpp
    Added: DiffWrapper.h DiffWrapper.cpp
+ Adding licence text and comments
+  WinMerge: files.h files.cpp
 
 2003-08-20 Perry
  PATCH: [ 791924 ] Fix sorting when columns are reordered