diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-09-29 15:07:41 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-09-29 15:07:41 +0200 |
commit | 5401c6b04ae1c34c16119afaa58e7a54959f62ee (patch) | |
tree | d490be49c0d573030e8aa6ee0e12cba61ef6f122 /debian/patches/slabinfo0002-ddb-fix-line-formatting.patch | |
parent | d4daf0fa04f3e560f113ae5b6e48e15054bf62f7 (diff) |
add patch series
Diffstat (limited to 'debian/patches/slabinfo0002-ddb-fix-line-formatting.patch')
-rw-r--r-- | debian/patches/slabinfo0002-ddb-fix-line-formatting.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/slabinfo0002-ddb-fix-line-formatting.patch b/debian/patches/slabinfo0002-ddb-fix-line-formatting.patch new file mode 100644 index 0000000..036c7c7 --- /dev/null +++ b/debian/patches/slabinfo0002-ddb-fix-line-formatting.patch @@ -0,0 +1,44 @@ +From 229a5da62cba72e1aad3606a8d2015a9d5504e7b Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Tue, 29 Sep 2015 14:48:35 +0200 +Subject: [PATCH gnumach 2/4] ddb: fix line formatting + +Previously, a newline was printed eagerly once a line was filled with +`db_max_width-1' characters. This prevents the line from being filled +completely, and inserts an erroneous newline if the user fills a line +and prints a newline then. + +* ddb/db_output.c (db_putchar): Insert newlines lazily, so that no +automatic break is inserted if the user prints a newline at the end of +a full line. +--- + ddb/db_output.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ddb/db_output.c b/ddb/db_output.c +index be5319d..546019b 100644 +--- a/ddb/db_output.c ++++ b/ddb/db_output.c +@@ -143,16 +143,16 @@ db_putchar(int c) /* character to output */ + * Use tabs if possible. + */ + db_force_whitespace(); +- cnputc(c); +- db_output_position++; + if (db_max_width >= DB_MIN_MAX_WIDTH +- && db_output_position >= db_max_width-1) { ++ && db_output_position > db_max_width) { + /* auto new line */ + cnputc('\n'); + db_output_position = 0; + db_last_non_space = 0; + db_output_line++; + } ++ cnputc(c); ++ db_output_position++; + db_last_non_space = db_output_position; + } + else if (c == '\n') { +-- +2.1.4 + |