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 151 152 153 154 155 156 157 158 159 160 161
|
2000-08-22 Bruce Guenter <bruce@bruce-guenter.dyndns.org>
* Added the missing accessor for the internal "errnum" data member
to the fdibuf and fdobuf classes.
2000-08-10 Bruce Guenter <bruce@bruce-guenter.dyndns.org>
* fdibuf.cc (read_large): Fixed a bug in the increment of data.
* fdibuf_mystring.cc (getline): Reduced some of the expressions
into variables.
2000-04-08 Bruce Guenter <bguenter@bguenter.pointsnorth.com>
* fdibuf.cc (read_large): Fixed bug: count needed to be
incremented after reading data in.
2000-04-07 Bruce Guenter <bguenter@bguenter.pointsnorth.com>
* fdobuf_signed.cc (operator<<): Immediately output a '-' for
negative numbers rather than storing a negative flag for later.
* fdobuf_unsigned.cc (operator<<): Moved the integer versions of
this operator into their own modules.
* fdobuf_seek.cc (seek): Moved this routine out of fdobuf.cc
* fdibuf.cc (read_large): Added this routine to read in a chunk of
data larger than the size of the buffer.
2000-04-06 Bruce Guenter <bguenter@bguenter.pointsnorth.com>
* fdibuf_netstring.cc (getnetstring): Moved this routine into its
own source file.
* fdobuf.cc (write_large): Added this routine to write out a chunk
of data larger than the size of the buffer, to avoid doing extra
copies.
(write): Removed an extraneous code segment.
* fdobuf.h: Moved the fdobuf declarations here.
* fdibuf.h: Moved the fdibuf declarations here.
* fdbuf.h: Removed extraneous fdobuf declaration.
1999-07-08 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf.cc (write): Optimized this routine better for the case
where the amount of data to be written will fit inside the buffer.
1999-07-05 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdbuf.h (fdobuf,fdibuf): Made some of the routines here virtual
in order to extend it properly.
Added "tell()" operations to both fdibuf and fdobuf to indicate
the current logical read/write point.
1999-07-04 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf_chownmod.cc: Added two new routines chown and chmod,
which operate directly on the open fd.
1999-06-30 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdibuf_mystring.cc (getline): Make this routine return the
number of bytes actually read, including the delimiter, even
though the delimiter is not added to the returned string.
1999-06-29 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdibuf.cc (fdibuf): Added a 'seekfwd' function to seek forwards
"o" bytes.
* fdibuf_mystring.cc (getline): Added locking and set the count
properly.
1999-06-28 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdibuf.cc (get): Make sure count is set for get.
1999-06-06 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdbuf.cc (fdbuf): Fixed long-standing bug -- I forgot to delete
the buffer in the destructor.
(close): Modified the code to ensure that the fd is not closed
twice (as would happen when destructing the fdbuf).
1999-05-31 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf.cc: Redefined flush as nflush; added sync code to nflush;
made flush and sync call nflush; added mutex lock calls to all
public methods.
* fdibuf.cc: Added mutex lock calls to all public methods.
* fdbuf.cc: Added debugging implementations of lock() and unlock()
mutex operators (to be removed before real use).
1999-05-28 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf.cc (fdobuf): Fixed missing initialization of bufpos in
one of the two constructors.
1999-05-01 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf.cc (fdobuf): Added an optional "mode" parameter which
defaults to 0666, which is the permissions for the new file.
(sync): Wrote this function to fsync the file descriptor.
1999-04-27 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdbuf.h (fdobuf): Removed definition for sync and nonblock mode,
as they won't be handled correctly in the writing code.
1999-04-03 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf.cc (operator<<): Wrote an operator for signed and
unsigned longs, with overloaded functions for ints and shorts that
promote the parameters to longs.
(write): Wrote a write routine specifically for a single
character.
1999-04-01 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf.cc: Fixed handling of seek by adding a "bufpos" indicator
that points to the current position in the buffer at which writes
should go. buflength is effectively the maximum value of bufpos
between flushes.
* fdibuf.cc (get): Renamed getchar to get (to be potentially
overloaded with other types).
* fdbuf.h (fdbuf): Removed a bunch of write methods and replaced
them with "operator<<", with similar capability to iostreams
methods of the same names.
* fdobuf.cc (endl): Wrote this manipulator to write an end-of-line
and flush the buffer.
1999-03-31 Bruce Guenter <bguenter@mikhail.qcc.sk.ca>
* fdobuf_mystring.cc: Moved all the mystring-specific code from
fdobuf.cc into this module to lessen link problems.
* fdibuf_mystring.cc: Moved all the mystring-specific code from
fdibuf.cc into this module to lessen link problems.
* fdobuf.cc (seek): Wrote this seek routine to allow movement in
an output file buffer.
* fdibuf.cc (seek): Generalized the rewind routine to allow
arbitrary seeks. It also checks to see if the seek point is
within the current buffer and if so just repositions its
pointers.
* fdbuf.h: If BUFSIZE is not defined, set it here to 4096.
(class fdbuf ): Rename length, start, and size to buflength,
bufstart, and bufsize. Add a new field "offset" to indicate the
current file seek offset.
|