aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/gwin_console.c')
-rw-r--r--src/gwin/gwin_console.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/gwin/gwin_console.c b/src/gwin/gwin_console.c
index 2d99b153..7bd0780e 100644
--- a/src/gwin/gwin_console.c
+++ b/src/gwin/gwin_console.c
@@ -79,7 +79,7 @@
#if GWIN_CONSOLE_ESCSEQ
// Convert escape sequences to attributes
- static bool_t ESCtoAttr(char c, uint8_t *pattr) {
+ static gBool ESCtoAttr(char c, uint8_t *pattr) {
uint8_t attr;
attr = pattr[0];
@@ -105,12 +105,12 @@
attr &= ~ESC_BOLD;
break;
default:
- return FALSE;
+ return gFalse;
}
if (attr == pattr[0])
- return FALSE;
+ return gFalse;
pattr[0] = attr;
- return TRUE;
+ return gTrue;
}
static color_t ESCPrintColor(GConsoleObject *gcw) {
@@ -348,7 +348,7 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p
#if GWIN_CONSOLE_USE_HISTORY
gc->buffer = 0;
#if GWIN_CONSOLE_HISTORY_ATCREATE
- gwinConsoleSetBuffer(&gc->g, TRUE);
+ gwinConsoleSetBuffer(&gc->g, gTrue);
#endif
#endif
@@ -376,11 +376,11 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p
#endif
#if GWIN_CONSOLE_USE_HISTORY
- bool_t gwinConsoleSetBuffer(GHandle gh, bool_t onoff) {
+ gBool gwinConsoleSetBuffer(GHandle gh, gBool onoff) {
#define gcw ((GConsoleObject *)gh)
if (gh->vmt != &consoleVMT)
- return FALSE;
+ return gFalse;
// Do we want the buffer turned off?
if (!onoff) {
@@ -388,12 +388,12 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p
gfxFree(gcw->buffer);
gcw->buffer = 0;
}
- return FALSE;
+ return gFalse;
}
// Is the buffer already on?
if (gcw->buffer)
- return TRUE;
+ return gTrue;
// Get the number of characters that fit in the x direction
#if GWIN_CONSOLE_HISTORY_AVERAGING
@@ -408,12 +408,12 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p
// Allocate the buffer
if (!(gcw->buffer = gfxAlloc(gcw->bufsize)))
- return FALSE;
+ return gFalse;
// All good!
gh->flags &= ~GCONSOLE_FLG_OVERRUN;
gcw->bufpos = 0;
- return TRUE;
+ return gTrue;
#undef gcw
}
@@ -676,7 +676,7 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
va_list ap;
char *p, *s, c, filler;
int i, precision, width;
- bool_t is_long, left_align;
+ gBool is_long, left_align;
long l;
#if GWIN_CONSOLE_USE_FLOAT
float f;
@@ -689,7 +689,7 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
return;
va_start(ap, fmt);
- while (TRUE) {
+ while (gTrue) {
c = *fmt++;
if (c == 0) {
va_end(ap);
@@ -702,10 +702,10 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
p = tmpbuf;
s = tmpbuf;
- left_align = FALSE;
+ left_align = gFalse;
if (*fmt == '-') {
fmt++;
- left_align = TRUE;
+ left_align = gTrue;
}
filler = ' ';
if (*fmt == '0') {
@@ -714,7 +714,7 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
}
width = 0;
- while (TRUE) {
+ while (gTrue) {
c = *fmt++;
if (c >= '0' && c <= '9')
c -= '0';
@@ -726,7 +726,7 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
}
precision = 0;
if (c == '.') {
- while (TRUE) {
+ while (gTrue) {
c = *fmt++;
if (c >= '0' && c <= '9')
c -= '0';
@@ -739,7 +739,7 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
}
/* Long modifier.*/
if (c == 'l' || c == 'L') {
- is_long = TRUE;
+ is_long = gTrue;
if (*fmt)
c = *fmt++;
}
@@ -808,7 +808,7 @@ void gwinPrintf(GHandle gh, const char *fmt, ...) {
i = (int)(p - s);
if ((width -= i) < 0)
width = 0;
- if (left_align == FALSE)
+ if (!left_align)
width = -width;
if (width < 0) {
if (*s == '-' && filler == '0') {