summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-02-02 17:01:54 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-02-02 17:01:54 +0100
commitaf3a1f3e50687b2e413bb9eb66b754986940086e (patch)
treeb253096ca70bf1e4681634e9704db646d3541c95
parent09e15d84e8feedc86359e9fb506d7822f4cd178a (diff)
console: move kmscon_console_rotate to *_newline
We do no rotation so rename the function to the more appropriate name kmscon_console_newline. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
-rw-r--r--src/console.c4
-rw-r--r--src/console.h2
-rw-r--r--src/console_cell.c2
-rw-r--r--tests/test_buffer.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/console.c b/src/console.c
index 58b3fce..f3a57e0 100644
--- a/src/console.c
+++ b/src/console.c
@@ -241,7 +241,7 @@ void kmscon_console_write(struct kmscon_console *con, kmscon_symbol_t ch)
con->cursor_y++;
if (con->cursor_y >= con->cells_y) {
con->cursor_y--;
- kmscon_buffer_rotate(con->cells);
+ kmscon_buffer_newline(con->cells);
}
}
@@ -258,6 +258,6 @@ void kmscon_console_newline(struct kmscon_console *con)
con->cursor_y++;
if (con->cursor_y >= con->cells_y) {
con->cursor_y--;
- kmscon_buffer_rotate(con->cells);
+ kmscon_buffer_newline(con->cells);
}
}
diff --git a/src/console.h b/src/console.h
index d230aae..d29b81a 100644
--- a/src/console.h
+++ b/src/console.h
@@ -66,7 +66,7 @@ void kmscon_buffer_write(struct kmscon_buffer *buf, unsigned int x,
unsigned int y, kmscon_symbol_t ch);
kmscon_symbol_t kmscon_buffer_read(struct kmscon_buffer *buf, unsigned int x,
unsigned int y);
-void kmscon_buffer_rotate(struct kmscon_buffer *buf);
+void kmscon_buffer_newline(struct kmscon_buffer *buf);
/* console objects */
diff --git a/src/console_cell.c b/src/console_cell.c
index db08fc7..2e13cd9 100644
--- a/src/console_cell.c
+++ b/src/console_cell.c
@@ -608,7 +608,7 @@ kmscon_symbol_t kmscon_buffer_read(struct kmscon_buffer *buf, unsigned int x,
return line->cells[x].ch;
}
-void kmscon_buffer_rotate(struct kmscon_buffer *buf)
+void kmscon_buffer_newline(struct kmscon_buffer *buf)
{
struct line *line, *nl;
int ret;
diff --git a/tests/test_buffer.c b/tests/test_buffer.c
index b99ed6b..bf43f00 100644
--- a/tests/test_buffer.c
+++ b/tests/test_buffer.c
@@ -83,7 +83,7 @@ static void test1(struct kmscon_buffer *buf)
kmscon_buffer_write(buf, 0, 0, ch);
kmscon_buffer_write(buf, 9, 2, ch);
kmscon_buffer_write(buf, 4, 4, ch);
- kmscon_buffer_rotate(buf);
+ kmscon_buffer_newline(buf);
print_buf(buf);
kmscon_buffer_resize(buf, 5, 3);
print_buf(buf);
@@ -91,7 +91,7 @@ static void test1(struct kmscon_buffer *buf)
print_buf(buf);
kmscon_buffer_write(buf, 15, 1, ch);
print_buf(buf);
- kmscon_buffer_rotate(buf);
+ kmscon_buffer_newline(buf);
print_buf(buf);
}