plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

t12.c (600B)


      1 #include "a.h"
      2 
      3 /*
      4  * 12. Overstrike, bracket, line-drawing, graphics, and zero-width functions.
      5  */
      6 
      7 /*
      8 	\o'asdf'
      9 	\zc
     10 	\b'asdf'
     11 	\l'Nc'
     12 	\L'Nc'
     13 	\D'xxx'
     14 */
     15 
     16 int
     17 e_o(void)
     18 {
     19 	pushinputstring(getqarg());
     20 	return 0;
     21 }
     22 
     23 int
     24 e_z(void)
     25 {
     26 	getnext();
     27 	return 0;
     28 }
     29 
     30 int
     31 e_b(void)
     32 {
     33 	pushinputstring(getqarg());
     34 	return 0;
     35 }
     36 
     37 int
     38 e_l(void)
     39 {
     40 	getqarg();
     41 	return 0;
     42 }
     43 
     44 int
     45 e_L(void)
     46 {
     47 	getqarg();
     48 	return 0;
     49 }
     50 
     51 int
     52 e_D(void)
     53 {
     54 	getqarg();
     55 	return 0;
     56 }
     57 
     58 void
     59 t12init(void)
     60 {
     61 	addesc('o', e_o, 0);
     62 	addesc('z', e_z, 0);
     63 	addesc('b', e_b, 0);
     64 	addesc('l', e_l, 0);
     65 	addesc('L', e_L, 0);
     66 	addesc('D', e_D, 0);
     67 }