From c90d8612e7797fa6b1c43f4f078db2282af54bb7 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 15 Oct 1996 00:52:21 +0000 Subject: [PATCH] General code cnd formatting clean up. --- sys/arch/arm32/dev/console/debugconsole.c | 22 +++------------ sys/arch/arm32/dev/console/dumb.c | 33 +++++++++++----------- sys/arch/arm32/vidc/console/debugconsole.c | 22 +++------------ sys/arch/arm32/vidc/console/dumb.c | 33 +++++++++++----------- 4 files changed, 40 insertions(+), 70 deletions(-) diff --git a/sys/arch/arm32/dev/console/debugconsole.c b/sys/arch/arm32/dev/console/debugconsole.c index f3f70751285e..cc4425d6ea2a 100644 --- a/sys/arch/arm32/dev/console/debugconsole.c +++ b/sys/arch/arm32/dev/console/debugconsole.c @@ -1,4 +1,4 @@ -/* $NetBSD: debugconsole.c,v 1.3 1996/10/13 03:06:03 christos Exp $ */ +/* $NetBSD: debugconsole.c,v 1.4 1996/10/15 00:52:21 mark Exp $ */ /* * Copyright (c) 1994-1995 Melvyn Tang-Richardson @@ -49,8 +49,6 @@ #include #include -#define TOTTY 0x02 - /* * This code allows the kernel developer to have a 'nice' virtual * console for debugging information. @@ -68,21 +66,9 @@ void dprintf(fmt, va_alist) char *fmt; { - if ( debug_vc==0 ) + if (debug_vc==0) return; - dumb_putstring ( fmt, strlen(fmt), debug_vc ); -/* - va_list *ap; - - if ( debug_tty == NULL ) - return; - - va_start(ap, fmt); - printf(fmt, TOTTY, debug_tty, ap); - va_end(ap); -*/ + dumb_putstring(fmt, strlen(fmt), debug_vc); } - -#endif - +#endif /* DEBUGTERM */ diff --git a/sys/arch/arm32/dev/console/dumb.c b/sys/arch/arm32/dev/console/dumb.c index b34130d6c868..40adc43b98a3 100644 --- a/sys/arch/arm32/dev/console/dumb.c +++ b/sys/arch/arm32/dev/console/dumb.c @@ -1,4 +1,4 @@ -/* $NetBSD: dumb.c,v 1.3 1996/04/26 20:59:07 mark Exp $ */ +/* $NetBSD: dumb.c,v 1.4 1996/10/15 00:52:22 mark Exp $ */ /* * Copyright (c) 1994-1995 Melvyn Tang-Richardson @@ -71,18 +71,17 @@ do_scrollup(vc) { if (vc==vconsole_current) - vc->SCROLLUP ( vc, 0, vc->ychars-1 ); + vc->SCROLLUP(vc, 0, vc->ychars-1); vc->ycur=vc->ychars-1; - if ( ((vc->flags)&(LOSSY)) == 0 ) { + if (((vc->flags)&(LOSSY)) == 0) { int counter; - for ( counter=vc->xchars; counter < ((vc->ychars)*(vc->xchars)); counter++ ) { + for (counter=vc->xchars; counter < ((vc->ychars)*(vc->xchars)); counter++) vc->charmap[counter-vc->xchars] = vc->charmap[counter]; - } - for ( counter=vc->xchars*(vc->ychars-1); counter < (vc->xchars*vc->ychars); counter++ ) { + + for (counter=vc->xchars*(vc->ychars-1); counter < (vc->xchars*vc->ychars); counter++) vc->charmap[counter]=0x20; - } } } @@ -94,22 +93,22 @@ do_render(c, vc) /* THE RENDER STAGE **********************************/ if ((c>=0x20)&&(c<=0x7f)) { if (((vc->flags)&(LOSSY))==0) { - vc->charmap[ vc->xcur + vc->ycur*vc->xchars ] = c | 7<<8; + vc->charmap[vc->xcur + vc->ycur*vc->xchars] = c | 7<<8; } - if ( vc==vconsole_current ) - vc->RENDER ( vc, c ); + if (vc==vconsole_current) + vc->RENDER(vc, c); vc->xcur++; } - if ( vc->xcur >= vc->xchars ) { + if (vc->xcur >= vc->xchars) { vc->xcur=0; vc->ycur++; } - if ( vc->ycur >= vc->ychars ) { - do_scrollup ( vc ); + if (vc->ycur >= vc->ychars) { + do_scrollup(vc); vc->xcur=0; vc->ycur=vc->ychars-1; } @@ -124,13 +123,13 @@ TERMTYPE_PUTSTRING(string, length, vc) { char c; - while ( ((c=*(string++))!=0) && ((length--)>0)) { + while (((c=*(string++))!=0) && ((length--)>0)) { if ((c<31)||(c>127)) c='*'; switch (c) { case 0x0a: vc->ycur++; - if ( vc->ycur>=vc->ychars ) { - do_scrollup ( vc ); + if (vc->ycur>=vc->ychars) { + do_scrollup(vc); vc->ycur=vc->ychars-1; } break; @@ -140,7 +139,7 @@ TERMTYPE_PUTSTRING(string, length, vc) break; default: - do_render ( c, vc ); + do_render(c, vc); break; } } diff --git a/sys/arch/arm32/vidc/console/debugconsole.c b/sys/arch/arm32/vidc/console/debugconsole.c index f3f70751285e..cc4425d6ea2a 100644 --- a/sys/arch/arm32/vidc/console/debugconsole.c +++ b/sys/arch/arm32/vidc/console/debugconsole.c @@ -1,4 +1,4 @@ -/* $NetBSD: debugconsole.c,v 1.3 1996/10/13 03:06:03 christos Exp $ */ +/* $NetBSD: debugconsole.c,v 1.4 1996/10/15 00:52:21 mark Exp $ */ /* * Copyright (c) 1994-1995 Melvyn Tang-Richardson @@ -49,8 +49,6 @@ #include #include -#define TOTTY 0x02 - /* * This code allows the kernel developer to have a 'nice' virtual * console for debugging information. @@ -68,21 +66,9 @@ void dprintf(fmt, va_alist) char *fmt; { - if ( debug_vc==0 ) + if (debug_vc==0) return; - dumb_putstring ( fmt, strlen(fmt), debug_vc ); -/* - va_list *ap; - - if ( debug_tty == NULL ) - return; - - va_start(ap, fmt); - printf(fmt, TOTTY, debug_tty, ap); - va_end(ap); -*/ + dumb_putstring(fmt, strlen(fmt), debug_vc); } - -#endif - +#endif /* DEBUGTERM */ diff --git a/sys/arch/arm32/vidc/console/dumb.c b/sys/arch/arm32/vidc/console/dumb.c index b34130d6c868..40adc43b98a3 100644 --- a/sys/arch/arm32/vidc/console/dumb.c +++ b/sys/arch/arm32/vidc/console/dumb.c @@ -1,4 +1,4 @@ -/* $NetBSD: dumb.c,v 1.3 1996/04/26 20:59:07 mark Exp $ */ +/* $NetBSD: dumb.c,v 1.4 1996/10/15 00:52:22 mark Exp $ */ /* * Copyright (c) 1994-1995 Melvyn Tang-Richardson @@ -71,18 +71,17 @@ do_scrollup(vc) { if (vc==vconsole_current) - vc->SCROLLUP ( vc, 0, vc->ychars-1 ); + vc->SCROLLUP(vc, 0, vc->ychars-1); vc->ycur=vc->ychars-1; - if ( ((vc->flags)&(LOSSY)) == 0 ) { + if (((vc->flags)&(LOSSY)) == 0) { int counter; - for ( counter=vc->xchars; counter < ((vc->ychars)*(vc->xchars)); counter++ ) { + for (counter=vc->xchars; counter < ((vc->ychars)*(vc->xchars)); counter++) vc->charmap[counter-vc->xchars] = vc->charmap[counter]; - } - for ( counter=vc->xchars*(vc->ychars-1); counter < (vc->xchars*vc->ychars); counter++ ) { + + for (counter=vc->xchars*(vc->ychars-1); counter < (vc->xchars*vc->ychars); counter++) vc->charmap[counter]=0x20; - } } } @@ -94,22 +93,22 @@ do_render(c, vc) /* THE RENDER STAGE **********************************/ if ((c>=0x20)&&(c<=0x7f)) { if (((vc->flags)&(LOSSY))==0) { - vc->charmap[ vc->xcur + vc->ycur*vc->xchars ] = c | 7<<8; + vc->charmap[vc->xcur + vc->ycur*vc->xchars] = c | 7<<8; } - if ( vc==vconsole_current ) - vc->RENDER ( vc, c ); + if (vc==vconsole_current) + vc->RENDER(vc, c); vc->xcur++; } - if ( vc->xcur >= vc->xchars ) { + if (vc->xcur >= vc->xchars) { vc->xcur=0; vc->ycur++; } - if ( vc->ycur >= vc->ychars ) { - do_scrollup ( vc ); + if (vc->ycur >= vc->ychars) { + do_scrollup(vc); vc->xcur=0; vc->ycur=vc->ychars-1; } @@ -124,13 +123,13 @@ TERMTYPE_PUTSTRING(string, length, vc) { char c; - while ( ((c=*(string++))!=0) && ((length--)>0)) { + while (((c=*(string++))!=0) && ((length--)>0)) { if ((c<31)||(c>127)) c='*'; switch (c) { case 0x0a: vc->ycur++; - if ( vc->ycur>=vc->ychars ) { - do_scrollup ( vc ); + if (vc->ycur>=vc->ychars) { + do_scrollup(vc); vc->ycur=vc->ychars-1; } break; @@ -140,7 +139,7 @@ TERMTYPE_PUTSTRING(string, length, vc) break; default: - do_render ( c, vc ); + do_render(c, vc); break; } }