iplot.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #define arc(_x,_y,_X,_Y,_u,_v,_r) printf("a %d %d %d %d %d %d %d\n",_x,_y,_X,_Y,_u,_v,_r)
  10. #define box(_x,_y,_X,_Y) printf("bo %d %d %d %d\n", _x,_y,_X,_Y)
  11. #define bspline(_num,_ff) {printf("bs {\n"); putnum(_num,_ff); printf("}\n");}
  12. #define call(_sname,_x) printf("ca %s %d\n", _sname,_x)
  13. #define cfill(_s) printf("cf %s\n", _s)
  14. #define circle(_x,_y,_r) printf("ci %d %d %d\n", _x,_y,_r)
  15. #define closepl() printf("cl\n")
  16. #define color(_s) printf("co %s\n", _s)
  17. #define cspline(_num,_ff) {printf("cs {\n"); putnum(_num,_ff); printf("}\n");}
  18. #define pdefine(_sname, _str) printf("de %s {\n%s\n",_sname, _str)
  19. #define dspline(_num,_ff) {printf("ds {\n");putnum(_num,_ff);printf("}\n");}
  20. #define erase() printf("e\n")
  21. #define ffill(_s) printf("ff %s\n", _s)
  22. #define fill(_num,_ff) {printf("fi {\n"); putnum(_num,_ff); printf("}\n");}
  23. #define fpoly(_s) printf("fp %s\n", _s)
  24. #define frame(_x,_y,_X,_Y) printf("fr %g %g %g %g\n", _x,_y,_X,_Y)
  25. #define fspline(_s) printf("fs %s\n", _s)
  26. #define grade(_x) printf("g %d\n", _x)
  27. #define idle()
  28. #define line(_x1,_y1,_x2,_y2) printf("li %d %d %d %d\n", _x1,_y1,_x2,_y2)
  29. #define lspline(_num,_ff) {printf("ls {\n"); putnum(_num,_ff); printf("}\n");}
  30. #define move(_x, _y) printf("m %d %d\n", _x, _y)
  31. #define openpl() printf("o\n")
  32. #define parabola(_x,_y,_X,_Y,_u,_v) printf("\npa %d %d %d %d %d %d\n", _x,_y,_X,_Y,_u,_v)
  33. #define pen(_s) printf("pe %s\n", _s)
  34. #define point(_x,_y) printf("poi %d %d\n", _x,_y)
  35. #define poly(_num,_ff) {printf("pol {\n"); putnum(_num,_ff); printf("}\n");}
  36. #define ppause() printf("pp\n")
  37. #define range(_x,_y,_X,_Y) printf("ra %d %d %d %d\n", _x,_y,_X,_Y)
  38. #define restore() printf("re\n")
  39. #define rmove(_x,_y) printf("rm %d %d\n", _x,_y)
  40. #define rvec(_x,_y) printf("rv %d %d\n", _x,_y)
  41. #define save() printf( "sa\n")
  42. #define sbox(_x,_y,_X,_Y) printf("sb %d %d %d %d\n", _x,_y,_X,_Y)
  43. #define spline(_num,_ff) {printf("sp {\n"); putnum(_num,_ff); printf("}\n");}
  44. #define text(_s) {if(*(_s) == ' ')printf("t \"%s\"\n",_s); else printf("t %s\n", _s); }
  45. #define vec(_x,_y) printf("v %d %d\n", _x,_y)
  46. void putnum(int [], double *[]);
  47. char *whoami(void);