Michael Adam
88dbe04c81
buffer: untangle assignment and check.
...
Michael
2009-08-04 23:47:27 +02:00
Michael Adam
f5c80119ca
buffer: add two explicit casts to reduce compiler warnings in makenewline().
...
Michael
2009-08-04 23:47:27 +02:00
Michael Adam
25344751eb
buffer: untangle assignment from check in makenewline().
...
For better debuggability.
Michael
2009-08-04 23:47:27 +02:00
Mukund Sivaraman
024b317de0
Convert tabs to spaces
2008-12-08 13:39:44 +00:00
Mukund Sivaraman
4c1ede779e
Break at 80 columns
2008-12-08 12:26:08 +00:00
Mukund Sivaraman
a257703e59
Reformat code to GNU coding style
...
This is a commit which simply ran all C source code files
through GNU indent. No other modifications were made.
2008-12-01 15:01:11 +00:00
Mukund Sivaraman
82cd6c765b
Move buffer to the heap due to its size
2008-08-24 11:38:59 +05:30
Mukund Sivaraman
249d4b7f33
Updated copyright, license notices in source code
...
The notices have been changed to a more GNU look. Documentation
comments have been separated from the copyright header. I've tried to
keep all copyright notices intact. Some author contact details have
been updated.
2008-05-24 13:35:49 +05:30
Robert James Kaes
c0299e1868
* [Indent] Ran Source Through indent
...
I re-indented the source code using indent with the following options:
indent -kr -bad -bap -nut -i8 -l80 -psl -sob -ss -ncs
There are now _no_ tabs in the source files, and all indentation is
eight spaces. Lines are 80 characters long, and the procedure type is
on it's own line. Read the indent manual for more information about
what each option means.
2005-08-15 03:54:31 +00:00
Robert James Kaes
aee5a63849
Removed unnecessary casts (mostly dealing with memory allocation.) I
...
should never have added them in the first place. They don't really
buy anything, and they can hide bugs.
2004-02-13 21:27:42 +00:00
Robert James Kaes
6aaa863432
Added appropriate casts from (void*) so that the code will compile
...
cleanly with a C++ compiler. (Tested using GCC 3.3)
2003-07-31 23:38:28 +00:00
Robert James Kaes
391a408eee
Fixed a tonne of spelling mistakes.
2002-05-24 04:45:32 +00:00
Robert James Kaes
9d0c65ad86
Fixed up the header includes for the new layout.
...
Changed one line of code to make it explicit how the pointers are to be
updated.
2002-05-23 18:22:48 +00:00
Robert James Kaes
bb9f206529
Moved the definition of the struct buffer_s into the buffer.c file and out
...
of the buffer.h file. This also required the removal of the BUFFER_SIZE
macro, and replace it with the buffer_size() function.
2002-05-14 00:43:38 +00:00
Robert James Kaes
7240af4333
Changed the calls to write() to send() so that we can use send(...,
...
MSG_NOSIGNAL) and not get signals sent to the process. (easier for
debugging and the system doesn't need to worry about signals.)
2001-12-19 20:41:28 +00:00
Robert James Kaes
a03a1d3847
Fixed a problem with not buffering more than 2K (which is obviously a
...
problem. :)
2001-11-26 01:39:07 +00:00
Robert James Kaes
e9cfd1f82e
makenewline() now copies the data into the structure rather than just
...
storing the pointer to the data.
add_to_buffer() is now exported.
Renamed writebuff() and readbuff() to write_buffer() and read_buffer().
2001-11-25 22:05:42 +00:00
Robert James Kaes
787ece6c01
Reformated text.
2001-11-22 00:31:10 +00:00
Robert James Kaes
270af08171
Removed the buffer_size() function and turned it into BUFFER_SIZE() macro.
...
Moved the struct buffer_s into the header file. Added more assert() calls
to better document the assumptions the functions make. Removed incorrect
code in remove_from_buffer() which was never actually called anyway.
2001-11-05 15:23:05 +00:00
Robert James Kaes
f8d43bd423
Lowered the size of the read buffer to 2K since Ethernet seems to work
...
with 1400 byte segments.
2001-10-25 04:39:10 +00:00
Robert James Kaes
b7b4d08758
Error message cleanup to make the information more informative.
2001-10-24 00:37:23 +00:00
Robert James Kaes
26587ef1e7
Fixed a problem where a full buffer on the read side would cause the
...
connection to be closed.
2001-10-18 21:45:54 +00:00
Robert James Kaes
1c8dcecf82
Removed the log message when unable to allocate memory.
2001-09-15 21:24:18 +00:00
Robert James Kaes
dab361f764
When logging an error indicate the file descriptor and the error number.
2001-09-14 19:49:10 +00:00
Robert James Kaes
f8edd2d8b4
Switched the memory allocation for the large strings to heap based instead
...
of stack based.
2001-09-11 19:26:49 +00:00
Robert James Kaes
8aca9455b2
Style stuff.
2001-09-11 04:38:23 +00:00
Robert James Kaes
0668e42e8f
Changed all the mallocs and callocs to use the new safemalloc and
...
safecalloc.
2001-09-08 18:58:37 +00:00
Robert James Kaes
1a9dc4e7e8
Error message cleanup.
2001-09-07 04:21:07 +00:00
Robert James Kaes
23c08ca3ee
Changed the types for various variables. Some the functions had the
...
variable types changed as well.
2001-05-27 02:23:08 +00:00
Robert James Kaes
d32e0d1ccb
Added ASSERT statements.
2001-05-23 18:01:23 +00:00
Robert James Kaes
b7f7599d76
Cleaned up the source so that the internal structure is no exposed by the
...
buffer.h header.
2000-09-11 23:41:32 +00:00
Robert James Kaes
ae347fc87a
Added the working_* fields as a scratch pad for readline().
2000-03-31 20:09:19 +00:00
Steven Young
37e63909c0
This commit was generated by cvs2svn to compensate for changes in r2,
...
which included commits to RCS files with non-trunk default branches.
2000-02-16 17:32:49 +00:00