ttest.c - iomenu - interactive terminal-based selection menu HTML git clone git://bitreich.org/iomenu git://hg6vgqziawt5s4dj.onion/iomenu DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- ttest.c (413B) --- 1 #include <stdio.h> 2 #include <wchar.h> 3 #include "utf8.h" 4 5 int 6 main(void) 7 { 8 int c, col, o, off; 9 char s[] = "\t\t浪漫的夢想"; 10 11 for (off = 0; off < 15; off++) { 12 for (col = off + 1; col < 30; col++) { 13 for (c = 0; c < col; c++) 14 putchar(c % 8 == 0 ? '>' : '_'); 15 printf(" %d\n", col); 16 for (o = 0; o < off; o++) 17 putchar('.'); 18 printf("%.*s\n\n", utf8_col(s, col, off), s); 19 } 20 } 21 return 0; 22 }