*** empty log message ***

svn path=/trunk/boinc/; revision=2838
This commit is contained in:
Jeff Cobb 2003-12-30 19:39:25 +00:00
parent 2e433b6cac
commit 8d1f80b8d0
2 changed files with 23 additions and 1 deletions

View File

@ -46,6 +46,7 @@ int MFILE::printf(const char* format, ...) {
va_end(ap);
n = strlen(buf2);
buf = (char*)realloc(buf, len+n);
if(!buf) return -1;
strncpy(buf+len, buf2, n);
len += n;
return k;
@ -53,6 +54,7 @@ int MFILE::printf(const char* format, ...) {
size_t MFILE::write(const void *ptr, size_t size, size_t nitems) {
buf = (char *)realloc( buf, len+(size*nitems) );
if(!buf) return -1;
memcpy( buf+len, ptr, size*nitems );
len += size*nitems;
return nitems;
@ -60,6 +62,7 @@ size_t MFILE::write(const void *ptr, size_t size, size_t nitems) {
int MFILE::_putchar(char c) {
buf = (char*)realloc(buf, len+1);
if(!buf) return EOF;
buf[len] = c;
len++;
return c;
@ -68,9 +71,10 @@ int MFILE::_putchar(char c) {
int MFILE::puts(const char* p) {
int n = strlen(p);
buf = (char*)realloc(buf, len+n);
if(!buf) return EOF;
strncpy(buf+len, p, n);
len += n;
return 0;
return n;
}
int MFILE::close() {

View File

@ -8774,6 +8774,24 @@ Gary 25 Dec 2003
- BOINC release 2.16 for windows, Linux, solaris, mac os x 10.3
(os x 10.2 compatability will come soon)
Jeff 30 Dec 2003
- Check for buffer reallocation errors in MFILE functions and return values
that mimic the normal system versions of these functions.
Functions that were changed: * indicates a change.
function successful return failure return
-------------- ------------------ --------------
MFILE::printf() num bytes output -1 *
MFILE::write() num bytes output -1 *
MFILE::putchar(c) c EOF *
MFILE::puts(s) strlen(s) * EOF *
MFILE::puts() used to return 0 on success. I greped both astropulse
and seti_boinc code and found no current use of this function.
api/
mfile.C
David 30 Dec 2003
- added optional <disabled>1</disabled> flag to daemons and tasks
in config.xml. (would prefer "<disabled/>", but couldn't