Changeset 21759 for branches/gcc-kmk/tools/common
- Timestamp:
- Oct 29, 2011, 4:27:13 PM (14 years ago)
- Location:
- branches/gcc-kmk/tools/common
- Files:
-
- 12 edited
-
kError.cpp (modified) (1 diff)
-
kFile.cpp (modified) (17 diffs)
-
kFileDef.cpp (modified) (5 diffs)
-
kFileDef.h (modified) (1 diff)
-
kFileFormatBase.cpp (modified) (2 diffs)
-
kFileLX.cpp (modified) (3 diffs)
-
kFileLX.h (modified) (1 diff)
-
kFilePE.cpp (modified) (3 diffs)
-
kFilePE.h (modified) (1 diff)
-
kFileSDF.cpp (modified) (3 diffs)
-
kFileSDF.h (modified) (1 diff)
-
kTypes.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/tools/common/kError.cpp
r8003 r21759 16 16 * Header Files * 17 17 *******************************************************************************/ 18 #ifdef __EMX__ 19 #define __OS2DEF__ 20 #define OS2EMX_PLAIN_CHAR 21 #endif 18 22 #include <os2.h> 23 19 24 #include <string.h> 20 25 #include <stdio.h> -
branches/gcc-kmk/tools/common/kFile.cpp
r8003 r21759 19 19 * Header Files * 20 20 *******************************************************************************/ 21 #ifdef __EMX__ 22 #define __OS2DEF__ 23 #define OS2EMX_PLAIN_CHAR 24 #endif 21 25 #include <os2.h> 22 26 … … 45 49 * @remark 46 50 */ 47 KBOOL kFile::refreshFileStatus() 51 KBOOL kFile::refreshFileStatus() throw (kError) 48 52 { 49 53 if (fStdDev) … … 68 72 * @returns Success indicator. 69 73 */ 70 KBOOL kFile::position() 74 KBOOL kFile::position() throw (kError) 71 75 { 72 76 /* … … 254 258 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 255 259 */ 256 kFile::kFile(const char *pszFilename, KBOOL fReadOnly/*=TRUE*/) 260 kFile::kFile(const char *pszFilename, KBOOL fReadOnly/*=TRUE*/) throw (kError) 257 261 : fReadOnly(fReadOnly), 258 262 fStatusClean(FALSE), … … 332 336 * @param cbBuffer Amount of bytes to read. 333 337 */ 334 int kFile::read(void *pvBuffer, long cbBuffer) 338 int kFile::read(void *pvBuffer, long cbBuffer) throw (kError) 335 339 { 336 340 ULONG cbRead; … … 427 431 * @param off Absolute file offset. 428 432 */ 429 int kFile::readAt(void *pvBuffer, long cbBuffer, long off) 433 int kFile::readAt(void *pvBuffer, long cbBuffer, long off) throw (kError) 430 434 { 431 435 if (set(off)) … … 477 481 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 478 482 */ 479 int kFile::readln(char *pszBuffer, long cchBuffer) throw(kError)483 int kFile::readln(char *pszBuffer, long cchBuffer) 480 484 { 481 485 long cbRead; … … 558 562 * @param cbBuffer Amount of bytes to write. 559 563 */ 560 int kFile::write(const void *pv, long cb) 564 int kFile::write(const void *pv, long cb) throw (kError) 561 565 { 562 566 if (fReadOnly) … … 678 682 * @param off Absolute file offset. 679 683 */ 680 int kFile::writeAt(const void *pvBuffer, long cbBuffer, long off) 684 int kFile::writeAt(const void *pvBuffer, long cbBuffer, long off) throw (kError) 681 685 { 682 686 if (set(off)) … … 788 792 * @param off Relative reposition. 789 793 */ 790 int kFile::move(long off) 794 int kFile::move(long off) throw (kError) 791 795 { 792 796 if ((off + offVirtual) & 0x80000000UL) /* above 2GB or negative */ … … 814 818 * @param off New file position. 815 819 */ 816 int kFile::set(long off) 820 int kFile::set(long off) throw (kError) 817 821 { 818 822 if (off < 0) … … 839 843 * @remark Will only throw error if refreshFileStatus failes. 840 844 */ 841 int kFile::end() 845 int kFile::end() throw (kError) 842 846 { 843 847 if (!refreshFileStatus()) … … 872 876 * @remark Will only throw error if refreshFileStatus failes. 873 877 */ 874 long kFile::getSize() 878 long kFile::getSize() throw (kError) 875 879 { 876 880 if (!refreshFileStatus()) … … 886 890 * @remark Will only throw error if refreshFileStatus failes. 887 891 */ 888 long kFile::getPos() const 892 long kFile::getPos() const throw (kError) 889 893 { 890 894 return offVirtual; … … 898 902 * @remark Will only throw error if refreshFileStatus failes. 899 903 */ 900 KBOOL kFile::isEOF() 904 KBOOL kFile::isEOF() throw (kError) 901 905 { 902 906 #if 0 … … 954 958 * @remark May throw errors. 955 959 */ 956 void *kFile::mapFile(const char *pszFilename) 960 void *kFile::mapFile(const char *pszFilename) throw (kError) 957 961 { 958 962 kFile file(pszFilename); … … 968 972 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 969 973 */ 970 void kFile::mapFree(void *pvFileMapping) 974 void kFile::mapFree(void *pvFileMapping) throw (kError) 971 975 { 972 976 if (pvFileMapping) -
branches/gcc-kmk/tools/common/kFileDef.cpp
r9164 r21759 119 119 120 120 121 kFileDef::kFileDef(kFile *pFile) :121 kFileDef::kFileDef(kFile *pFile) throw (kError) : 122 122 kFileFormatBase(pFile), 123 123 pszType(NULL), pszModName(NULL), pszBase(NULL), pszCode(NULL), pszData(NULL), pszDescription(NULL), … … 137 137 * Destructor. Frees used memory. 138 138 */ 139 kFileDef::~kFileDef() 139 kFileDef::~kFileDef() throw (kError) 140 140 { 141 141 if (pszType != NULL) delete pszType; … … 182 182 * @remark throws errorcode on error (TODO: errorhandling) 183 183 */ 184 void kFileDef::read(kFile *pFile) 184 void kFileDef::read(kFile *pFile) throw (kError) 185 185 { 186 186 char *pszTmp; … … 445 445 * @remark tabs are expanded. string is trimmed. comments removed. 446 446 */ 447 char *kFileDef::readln(kFile *pFile, char *pszBuffer, int cbBuffer) 447 char *kFileDef::readln(kFile *pFile, char *pszBuffer, int cbBuffer) throw (kError) 448 448 { 449 449 int i; … … 700 700 * @remark 701 701 */ 702 KBOOL kFileDef::makeWatcomLinkFileAddtion(kFile *pOut, int enmOS) 702 KBOOL kFileDef::makeWatcomLinkFileAddtion(kFile *pOut, int enmOS) throw(kError) 703 703 { 704 704 PDEFSEGMENT pSeg; -
branches/gcc-kmk/tools/common/kFileDef.h
r9162 r21759 105 105 /**@cat Constructor/Destructor */ 106 106 kFileDef(kFile *pFile) throw(kError); 107 virtual ~kFileDef() ;107 virtual ~kFileDef() throw (kError); 108 108 109 109 /** @cat Module information methods. */ -
branches/gcc-kmk/tools/common/kFileFormatBase.cpp
r8003 r21759 30 30 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 31 31 */ 32 kFileFormatBase::kFileFormatBase(kFile *pFile) 32 kFileFormatBase::kFileFormatBase(kFile *pFile) throw (kError) 33 33 : pFile(pFile) 34 34 { … … 42 42 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 43 43 */ 44 kFileFormatBase::~kFileFormatBase() 44 kFileFormatBase::~kFileFormatBase() throw (kError) 45 45 { 46 46 if (pFile) -
branches/gcc-kmk/tools/common/kFileLX.cpp
r8003 r21759 256 256 * @param pszFilename LX executable image name. 257 257 */ 258 kFileLX::kFileLX(const char *pszFilename) :258 kFileLX::kFileLX(const char *pszFilename) throw (kError) : 259 259 kFileFormatBase(NULL), pvBase(NULL) 260 260 { … … 292 292 * @param pFile Pointer to opened LX file. 293 293 */ 294 kFileLX::kFileLX(kFile *pFile) :294 kFileLX::kFileLX(kFile *pFile) throw (kError) : 295 295 kFileFormatBase(pFile), pvBase(NULL) 296 296 { … … 330 330 * Destructor. 331 331 */ 332 kFileLX::~kFileLX() 332 kFileLX::~kFileLX() throw (kError) 333 333 { 334 334 if (pvBase != NULL) -
branches/gcc-kmk/tools/common/kFileLX.h
r8003 r21759 22 22 kFileLX(const char *pszFilename) throw (kError); 23 23 kFileLX(kFile *pFile) throw (kError); 24 ~kFileLX() ;24 ~kFileLX() throw (kError); 25 25 26 26 /** @cat Module information methods. */ -
branches/gcc-kmk/tools/common/kFilePE.cpp
r8003 r21759 36 36 * @remark throws errorcode 37 37 */ 38 kFilePE::kFilePE(kFile *pFile) :38 kFilePE::kFilePE(kFile *pFile) throw (kError) : 39 39 kFileFormatBase(pFile), 40 40 pvBase(NULL), … … 93 93 94 94 /* read sections */ 95 for (int i = 0; i < pehdr.FileHeader.NumberOfSections; i++) 95 int i; 96 for (i = 0; i < pehdr.FileHeader.NumberOfSections; i++) 96 97 { 97 98 unsigned long cbSection; … … 148 149 * Destructor. 149 150 */ 150 kFilePE::~kFilePE() 151 kFilePE::~kFilePE() throw (kError) 151 152 { 152 153 if (pvBase) -
branches/gcc-kmk/tools/common/kFilePE.h
r8003 r21759 67 67 public: 68 68 kFilePE(kFile *pFile) throw (kError); 69 virtual ~kFilePE() ;69 virtual ~kFilePE() throw (kError); 70 70 71 71 /** @cat Module information methods. */ -
branches/gcc-kmk/tools/common/kFileSDF.cpp
r8003 r21759 67 67 * 68 68 */ 69 void kFileSDF::parseSDFFile(void *pvFile) 69 void kFileSDF::parseSDFFile(void *pvFile) throw (kError) 70 70 { 71 71 /* … … 160 160 * @remark Will throw error codes. 161 161 */ 162 kFileSDF::kFileSDF(kFile *pFile) :162 kFileSDF::kFileSDF(kFile *pFile) throw (kError) : 163 163 kFileFormatBase(pFile), papStructs(NULL), pHdr(NULL), paTypes(NULL) 164 164 { … … 205 205 206 206 207 kFileSDF::~kFileSDF() 207 kFileSDF::~kFileSDF() throw (kError) 208 208 { 209 209 if (papStructs); -
branches/gcc-kmk/tools/common/kFileSDF.h
r8003 r21759 81 81 public: 82 82 kFileSDF(kFile *pFile) throw (kError); 83 ~kFileSDF() ;83 ~kFileSDF() throw (kError); 84 84 85 85 /** @cat Debug Type information methods. */ -
branches/gcc-kmk/tools/common/kTypes.h
r21350 r21759 54 54 55 55 /******************************************************************************* 56 * GNU C++ Compilers * 57 *******************************************************************************/ 58 #ifdef __GNUC__ 59 60 #define INLINE static inline 61 #define KLIBCALL _Optlink 62 INLINE void INT3() { __asm__ __volatile__ ("int3\n\tnop"); } 63 64 typedef unsigned long KSIZE; 65 typedef unsigned long KBOOL; 66 67 #endif 68 69 70 /******************************************************************************* 56 71 * Common stuff * 57 72 *******************************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.
