9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

unutf.c (289B)


      1 /*
      2  * stupid little program to pipe unicode chars through 
      3  * when converting to non-utf compilers.
      4  */
      5 #include <u.h>
      6 #include <libc.h>
      7 #include <bio.h>
      8 
      9 Biobuf bin;
     10 
     11 void
     12 main(void)
     13 {
     14 	int c;
     15 
     16 	Binit(&bin, 0, OREAD);
     17 	while((c = Bgetrune(&bin)) >= 0)
     18 		print("0x%ux\n", c);
     19 	exits(0);
     20 }