--- nono/lib/textscreen.cpp 2026/04/29 17:04:31 1.1.1.2 +++ nono/lib/textscreen.cpp 2026/04/29 17:04:34 1.1.1.3 @@ -1,9 +1,9 @@ // // nono -// Copyright (C) 2018 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // -#include "header.h" #include "textscreen.h" // @@ -54,14 +54,6 @@ TextScreen::Clear() } } -// 現在位置を移動 -void -TextScreen::Locate(int x, int y) -{ - X = x; - Y = y; -} - // 現在のカーソル位置に1文字出力する。 // カーソルは一つ移動する。 // foldmode = false なら、移動後右もしくは下にはみ出しても何もしない。 @@ -101,10 +93,10 @@ TextScreen::Puts(const char *str) // テキストスクリーンに文字列を出力する。 // 右もしくは下にはみ出した場合は無視する。 void -TextScreen::Puts(uint attr, const char *str) +TextScreen::Puts(TA attr, const char *str) { while (*str != '\0') { - Putc(attr | *str++); + Putc(((uint)attr) | *str++); } } @@ -139,7 +131,7 @@ TextScreen::Print(int x, int y, const ch // テキストスクリーンに座標と属性を指定して、書式付き文字列を出力する。 void -TextScreen::Print(int x, int y, uint attr, const char *fmt, ...) +TextScreen::Print(int x, int y, TA attr, const char *fmt, ...) { char buf[1024]; va_list ap;