* Followed Ingo's suggestion and removed the now superfluous "length" correction

in ConsoleHandle::WriteAt().
* Updated license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15581 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-12-19 09:44:52 +00:00
parent 1bd3bb1d58
commit 7a3fa7d368
13 changed files with 41 additions and 42 deletions

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef HANDLE_H #ifndef HANDLE_H
#define HANDLE_H #define HANDLE_H

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
@ -59,9 +59,6 @@ ConsoleHandle::WriteAt(void */*cookie*/, off_t /*pos*/, const void *buffer, size
} }
} }
if (length > bufferSize)
length = bufferSize;
if (length > 0) { if (length > 0) {
of_write(fHandle, string, length); of_write(fHandle, string, length);
string += length; string += length;
@ -69,6 +66,8 @@ ConsoleHandle::WriteAt(void */*cookie*/, off_t /*pos*/, const void *buffer, size
} }
if (newLine) { if (newLine) {
// this code replaces a single '\n' with '\r\n', so it
// bumps the string/bufferSize only a single character
of_write(fHandle, "\r\n", 2); of_write(fHandle, "\r\n", 2);
string++; string++;
bufferSize--; bufferSize--;

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef CONSOLE_H #ifndef CONSOLE_H
#define CONSOLE_H #define CONSOLE_H

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef MACHINE_H #ifndef MACHINE_H
#define MACHINE_H #define MACHINE_H

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef OPEN_FIRMWARE_H #ifndef OPEN_FIRMWARE_H
#define OPEN_FIRMWARE_H #define OPEN_FIRMWARE_H

View File

@ -1,6 +1,6 @@
/* /*
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */