1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Changing from long to ssize_t (int) for write(), print(), println() return.

This commit is contained in:
David A. Mellis
2011-08-26 14:20:41 -04:00
parent 3f0b7f21c2
commit 929597375b
23 changed files with 123 additions and 121 deletions

View File

@ -58,16 +58,16 @@ boolean File::isDirectory(void) {
}
long File::write(uint8_t val) {
ssize_t File::write(uint8_t val) {
return write(&val, 1);
}
long File::write(const char *str) {
ssize_t File::write(const char *str) {
return write((const uint8_t *) str, strlen(str));
}
long File::write(const uint8_t *buf, size_t size) {
long t;
ssize_t File::write(const uint8_t *buf, size_t size) {
ssize_t t;
if (!_file) return -1;
t = _file->write(buf, size);
if (t < 0) return t - 1;