/usr/include/octave-4.0.0/octave/pager.h is in liboctave-dev 4.0.0-3ubuntu9.
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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | /*
Copyright (C) 1993-2015 John W. Eaton
This file is part of Octave.
Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with Octave; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>.
*/
#if !defined (octave_pager_h)
#define octave_pager_h 1
#include <iosfwd>
#include <sstream>
#include <string>
#include <sys/types.h>
class
OCTINTERP_API
octave_pager_buf : public std::stringbuf
{
public:
octave_pager_buf (void) : std::stringbuf (), diary_skip (0) { }
void flush_current_contents_to_diary (void);
void set_diary_skip (void);
protected:
int sync (void);
private:
size_t diary_skip;
};
class
OCTINTERP_API
octave_pager_stream : public std::ostream
{
protected:
octave_pager_stream (void);
public:
~octave_pager_stream (void);
static void flush_current_contents_to_diary (void);
static void set_diary_skip (void);
static std::ostream& stream (void);
static void reset (void);
private:
void do_flush_current_contents_to_diary (void);
void do_set_diary_skip (void);
void do_reset (void);
static octave_pager_stream *instance;
static bool instance_ok (void);
static void cleanup_instance (void) { delete instance; instance = 0; }
octave_pager_buf *pb;
// No copying!
octave_pager_stream (const octave_pager_stream&);
octave_pager_stream& operator = (const octave_pager_stream&);
};
class
OCTINTERP_API
octave_diary_buf : public std::stringbuf
{
public:
octave_diary_buf (void) : std::stringbuf () { }
protected:
int sync (void);
};
class
OCTINTERP_API
octave_diary_stream : public std::ostream
{
protected:
octave_diary_stream (void);
public:
~octave_diary_stream (void);
static std::ostream& stream (void);
static void reset (void);
private:
void do_reset (void);
static octave_diary_stream *instance;
static bool instance_ok (void);
static void cleanup_instance (void) { delete instance; instance = 0; }
octave_diary_buf *db;
// No copying!
octave_diary_stream (const octave_diary_stream&);
octave_diary_stream& operator = (const octave_diary_stream&);
};
#define octave_stdout (octave_pager_stream::stream ())
#define octave_diary (octave_diary_stream::stream ())
extern OCTINTERP_API void flush_octave_stdout (void);
#endif
|