This file is indexed.

/usr/include/yacas/platfileio.h is in yacas 1.3.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#ifndef YACAS_PLATFILEIO_H
#define YACAS_PLATFILEIO_H

#include <fstream>
#include <iostream>

class LispLocalFile: public LispBase {
public:
    LispLocalFile(
        LispEnvironment& environment,
        const std::string& fname,
        bool read,
        const std::vector<std::string>& dirs);
    virtual ~LispLocalFile();

    virtual void Delete();

private:
    // not implemented
    LispLocalFile(const LispLocalFile& aOther);
    LispLocalFile& operator=(const LispLocalFile&);

public:
    std::fstream stream;
    LispEnvironment& environment;
};


class StdFileInput : public LispInput
{
public:
  virtual LispChar Next();
  virtual LispChar Peek();
  virtual bool EndOfStream();
  void Rewind();
  virtual const LispChar* StartPtr();
  virtual std::size_t Position();
  virtual void SetPosition(std::size_t aPosition);

protected:
    StdFileInput(std::istream&, InputStatus& aStatus);
    StdFileInput(LispLocalFile& aFile,InputStatus& aStatus);

    std::istream& stream;
};


/** CachedStdFileInput : same as StdFileInput, but with caching
 * for speed */
class CachedStdFileInput: public StdFileInput {
public:
    CachedStdFileInput(LispLocalFile& aFile,InputStatus& aStatus);

    LispChar Next();
    LispChar Peek();
    bool EndOfStream() const;
    void Rewind();
    const LispChar* StartPtr();
    std::size_t Position() const;
    void SetPosition(std::size_t aPosition);

private:
    // not implemented
    CachedStdFileInput(const CachedStdFileInput&);
    CachedStdFileInput& operator=(const CachedStdFileInput&);

    std::vector<LispChar> _buf;
    std::size_t iCurrentPos;
};

//class StdFileOutput: public LispOutput {
//public:
//    StdFileOutput(LispLocalFile& aFile);
//    StdFileOutput(std::ostream&);
//
//    virtual void PutChar(LispChar aChar);
//
//    std::ostream& stream;
//};
//
//class StdUserOutput: public StdFileOutput {
//public:
//    StdUserOutput():
//        StdFileOutput(std::cout)
//    {
//    }
//};

class StdUserInput: public StdFileInput {
public:
    StdUserInput(InputStatus& aStatus):
        StdFileInput(std::cin, aStatus)
    {
    }
};

class CachedStdUserInput: public StdUserInput {
public:
    CachedStdUserInput(InputStatus& aStatus);

    virtual LispChar Next();
    virtual LispChar Peek();
    virtual bool EndOfStream() const;
    void Rewind();
    virtual const LispChar* StartPtr();
    virtual std::size_t Position() const;

private:
    LispString iBuffer;
    std::size_t iCurrentPos;
};


std::string InternalFindFile(const LispChar* fname, const std::vector<std::string>& dirs);

#endif