Changeset 4358 for trunk/tools/common/kFile.cpp
- Timestamp:
- Oct 2, 2000, 6:01:40 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/common/kFile.cpp
r4129 r4358 1 /* $Id: kFile.cpp,v 1. 4 2000-08-31 03:00:12bird Exp $1 /* $Id: kFile.cpp,v 1.5 2000-10-02 04:01:39 bird Exp $ 2 2 * 3 3 * kFile - Simple (for the time being) file class. 4 4 * 5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@ pmsc.no)5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no) 6 6 * 7 7 * Project Odin Software License can be found in LICENSE.TXT … … 26 26 #include <stdio.h> 27 27 28 #include <kFile.h> 28 #include "kFile.h" 29 30 /******************************************************************************* 31 * Global Variables * 32 *******************************************************************************/ 33 kFile kFile::StdIn((HFILE)0, TRUE); 34 kFile kFile::StdOut((HFILE)1, FALSE); 35 kFile kFile::StdErr((HFILE)2, FALSE); 29 36 30 37 … … 37 44 BOOL kFile::refreshFileStatus() 38 45 { 46 if (fStdDev) 47 return fStatusClean = TRUE; 48 39 49 if (!fStatusClean) 40 50 { … … 77 87 } 78 88 89 /** 90 * Creates a kFile object for a file that is opened allready. 91 * Intended use for the three standard handles only. 92 * 93 * @returns <object> with state updated. 94 * @param pszFilename Filename. 95 * @param fReadOnly TRUE: Open the file readonly. 96 * FALSE: Open the file readwrite appending 97 * existing files. 98 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 99 */ 100 kFile::kFile(HFILE hFile, BOOL fReadOnly) 101 : fReadOnly(fReadOnly), 102 fStatusClean(FALSE), 103 fThrowErrors(FALSE), 104 offVirtual(0), 105 offReal(0), 106 pszFilename(NULL), 107 hFile(hFile), 108 fStdDev(TRUE) 109 { 110 if (!refreshFileStatus()) 111 throw ((int)rc); 112 this->pszFilename = strdup(""); 113 } 114 79 115 80 116 /** … … 86 122 * FALSE: Open the file readwrite appending 87 123 * existing files. 88 * @author knut st. osmundsen (knut.stange.osmundsen@ pmsc.no)124 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 89 125 */ 90 126 kFile::kFile(const char *pszFilename, BOOL fReadOnly/*=TRUE*/) … … 94 130 offVirtual(0), 95 131 offReal(0), 96 pszFilename(NULL) 132 pszFilename(NULL), 133 fStdDev(FALSE) 97 134 { 98 135 ULONG fulOpenFlags;
Note:
See TracChangeset
for help on using the changeset viewer.