Make a guess:

	return nil;
#endif
}

long File::length() const {
#ifndef MAC
    return rep_->info_.st_size;
#else
	return 0;
#endif
}

void File::close() {
#ifndef MAC
    FileInfo* i = rep_;
    if (i->fd_ >= 0) {
	if (i->map_ != nil) {
#ifdef HAVE_SYS_MMAN_H // #if defined(SGI) || defined(__alpha)
	    munmap(i->map_, int(i->info_.st_size));
#endif
	}
	if (i->buf_ != nil) {
	    delete [] i->buf_;
	}
#ifdef WIN32
	_close(i->fd_);
#else
	::close(i->fd_);
#endif
	i->fd_ = -1;
    }
#endif
}

void File::limit(unsigned int buffersize) {
#ifndef MAC
    rep_->limit_ = buffersize;
#endif
}

FileInfo* File::rep() const { 
#ifndef MAC
	return rep_; 
#else
	return nil;
#endif
}

/* class InputFile */

InputFile::InputFile(FileInfo* i) : File(i) { }
InputFile::~InputFile() { }

InputFile* InputFile::open(const String& name) {
	 CopyString* s = new CopyString(name);
#ifndef MAC

#if defined(WIN32) && !defined(__MWERKS__) && !defined(CYGWIN)
	 int fd = _open((char*)s->string(), O_RDONLY);
#else
    /* cast to workaround DEC C++ prototype bug */
    int fd = ::open((char*)s->string(), O_RDONLY);
#endif
    if (fd < 0) {
	delete s;
	return nil;
    }
    FileInfo* i = new FileInfo(s, fd);
    if (fstat(fd, &i->info_) < 0) {
	delete s;
	delete i;
	return nil;
    }
    return new InputFile(i);
#else
	return nil;
#endif
}

int InputFile::read(const char*& start) {
#ifndef MAC
    FileInfo* i = rep();
    int len = (int)(i->info_.st_size);
    if (i->pos_ >= len) {
	return 0;
    }
    if (i->limit_ != 0 && len > i->limit_) {
	len = (int)(i->limit_);
    }
#if HAVE_SYS_MMAN_H // #if defined(SGI) || defined(__alpha)
    i->map_ = (char*)mmap(0, len, PROT_READ, MAP_PRIVATE, i->fd_, i->pos_);
    if ((long)(i->map_) == -1) {
	return -1;
    }
    start = i->map_;
#else
    if (i->buf_ == nil) {
	i->buf_ = new char[len];
    }
    start = i->buf_;
#ifdef WIN32
    len = _read(i->fd_, i->buf_, len);
#else
    len = ::read(i->fd_, i->buf_, len);
#endif /* WIN32 */

#endif
    i->pos_ += len;
    return len;
#else 
	return 0;
#endif
}

/* class StdInput */

#if !MAC
StdInput::StdInput() : InputFile(new FileInfo(new CopyString("-stdin"), 0)) { }
#endif
StdInput::~StdInput() { }

long StdInput::length() const { return -1; }

int StdInput::read(const char*& start) {
#ifndef MAC
    FileInfo* i = rep();
    if (i->buf_ == nil) {
	if (i->limit_ == 0) {
	    i->limit_ = BUFSIZ;
	}
	i->buf_ = new char[i->limit_];
    }

#ifdef WIN32
    int nbytes = _read(i->fd_, (char*)i->buf_, i->limit_);
#else
    int nbytes = ::read(i->fd_, (char*)i->buf_, i->limit_);
#endif /* WIN32 */

    if (nbytes > 0) {
	start = (const char*)(i->buf_);
    }
    return nbytes;
#else
	return 0;
#endif
}