t12.c 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #include "a.h"
  10. /*
  11. * 12. Overstrike, bracket, line-drawing, graphics, and zero-width functions.
  12. */
  13. /*
  14. \o'asdf'
  15. \zc
  16. \b'asdf'
  17. \l'Nc'
  18. \L'Nc'
  19. \D'xxx'
  20. */
  21. int
  22. e_o(void)
  23. {
  24. pushinputstring(getqarg());
  25. return 0;
  26. }
  27. int
  28. e_z(void)
  29. {
  30. getnext();
  31. return 0;
  32. }
  33. int
  34. e_b(void)
  35. {
  36. pushinputstring(getqarg());
  37. return 0;
  38. }
  39. int
  40. e_l(void)
  41. {
  42. getqarg();
  43. return 0;
  44. }
  45. int
  46. e_L(void)
  47. {
  48. getqarg();
  49. return 0;
  50. }
  51. int
  52. e_D(void)
  53. {
  54. getqarg();
  55. return 0;
  56. }
  57. void
  58. t12init(void)
  59. {
  60. addesc('o', e_o, 0);
  61. addesc('z', e_z, 0);
  62. addesc('b', e_b, 0);
  63. addesc('l', e_l, 0);
  64. addesc('L', e_L, 0);
  65. addesc('D', e_D, 0);
  66. }