Ignore:
Timestamp:
Oct 29, 2011, 4:27:13 PM (14 years ago)
Author:
dmik
Message:

Make tools/common library build.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/tools/common/kFile.cpp

    r8003 r21759  
    1919*   Header Files                                                               *
    2020*******************************************************************************/
     21#ifdef __EMX__
     22#define __OS2DEF__
     23#define OS2EMX_PLAIN_CHAR
     24#endif
    2125#include <os2.h>
    2226
     
    4549 * @remark
    4650 */
    47 KBOOL   kFile::refreshFileStatus()
     51KBOOL   kFile::refreshFileStatus() throw (kError)
    4852{
    4953    if (fStdDev)
     
    6872 * @returns     Success indicator.
    6973 */
    70 KBOOL   kFile::position()
     74KBOOL   kFile::position() throw (kError)
    7175{
    7276    /*
     
    254258 * @author      knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    255259 */
    256 kFile::kFile(const char *pszFilename, KBOOL fReadOnly/*=TRUE*/)
     260kFile::kFile(const char *pszFilename, KBOOL fReadOnly/*=TRUE*/) throw (kError)
    257261:   fReadOnly(fReadOnly),
    258262    fStatusClean(FALSE),
     
    332336 * @param       cbBuffer    Amount of bytes to read.
    333337 */
    334 int             kFile::read(void *pvBuffer, long cbBuffer)
     338int             kFile::read(void *pvBuffer, long cbBuffer) throw (kError)
    335339{
    336340    ULONG   cbRead;
     
    427431 * @param       off         Absolute file offset.
    428432 */
    429 int             kFile::readAt(void *pvBuffer, long cbBuffer, long off)
     433int             kFile::readAt(void *pvBuffer, long cbBuffer, long off) throw (kError)
    430434{
    431435    if (set(off))
     
    477481 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    478482 */
    479 int             kFile::readln(char *pszBuffer, long cchBuffer) throw(kError)
     483int             kFile::readln(char *pszBuffer, long cchBuffer)
    480484{
    481485    long    cbRead;
     
    558562 * @param       cbBuffer    Amount of bytes to write.
    559563 */
    560 int             kFile::write(const void *pv, long cb)
     564int             kFile::write(const void *pv, long cb) throw (kError)
    561565{
    562566    if (fReadOnly)
     
    678682 * @param       off         Absolute file offset.
    679683 */
    680 int             kFile::writeAt(const void *pvBuffer, long cbBuffer, long off)
     684int             kFile::writeAt(const void *pvBuffer, long cbBuffer, long off) throw (kError)
    681685{
    682686    if (set(off))
     
    788792 * @param       off     Relative reposition.
    789793 */
    790 int             kFile::move(long off)
     794int             kFile::move(long off) throw (kError)
    791795{
    792796    if ((off + offVirtual) & 0x80000000UL) /* above 2GB or negative */
     
    814818 * @param       off     New file position.
    815819 */
    816 int             kFile::set(long off)
     820int             kFile::set(long off) throw (kError)
    817821{
    818822    if (off < 0)
     
    839843 * @remark      Will only throw error if refreshFileStatus failes.
    840844 */
    841 int             kFile::end()
     845int             kFile::end() throw (kError)
    842846{
    843847    if (!refreshFileStatus())
     
    872876 * @remark      Will only throw error if refreshFileStatus failes.
    873877 */
    874 long            kFile::getSize()
     878long            kFile::getSize() throw (kError)
    875879{
    876880    if (!refreshFileStatus())
     
    886890 * @remark      Will only throw error if refreshFileStatus failes.
    887891 */
    888 long            kFile::getPos() const
     892long            kFile::getPos() const throw (kError)
    889893{
    890894    return offVirtual;
     
    898902 * @remark      Will only throw error if refreshFileStatus failes.
    899903 */
    900 KBOOL           kFile::isEOF()
     904KBOOL           kFile::isEOF() throw (kError)
    901905{
    902906    #if 0
     
    954958 * @remark  May throw errors.
    955959 */
    956 void *kFile::mapFile(const char *pszFilename)
     960void *kFile::mapFile(const char *pszFilename) throw (kError)
    957961{
    958962    kFile file(pszFilename);
     
    968972 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    969973 */
    970 void kFile::mapFree(void *pvFileMapping)
     974void kFile::mapFree(void *pvFileMapping) throw (kError)
    971975{
    972976    if (pvFileMapping)
Note: See TracChangeset for help on using the changeset viewer.