wm: teppich

Download patch

ref: b9d66bc012e6a431a75bf4d9a138cf6c2a8eb6f6
parent: 723dcdf945237c6fa70e4f964cfce71d963ec90f
author: mkf <mkf@cloud9p.org>
date: Fri Nov 24 03:45:46 EST 2023

cmd/echo: use new printf functions :^)

--- a/cmd/echo.c
+++ b/cmd/echo.c
@@ -1,7 +1,6 @@
 #include <u.h>
 #include <libc.h>
 
-#include <vga.h>
 #include <bitmap.h>
 
 void
@@ -8,20 +7,22 @@
 echo_main(int argc, char **argv)
 {
 	int i;
-	void (*puts)(char*);
-	
-	puts = vga_puts;
+
 	i = 1;
 	if(argc >= 1 && !strcmp(argv[1], "-b"))
 	{
-		puts = bitputs;
 		i = 2;
+		while(i < argc)
+		{
+			bitputs(argv[i]);
+			i++;
+		}
 	}
 	
 	while(i < argc)
 	{
-		puts(argv[i]);
-		puts(" ");
+		printf("%s", argv[i]);
+		printf(" ");
 		i++;
 	}