#include #include "hackterm.h" int PSprtscr(cmd) const char *cmd; { int i,j; FILE *p; if (print_screen) { putp(print_screen); return 0; } p = popen(cmd,"w"); if (!p) return -1; for (i = 0; i < PSrows; ++i) { for (j = 0; j < PScols; ++j) fputc(toprt(curscr->data[curscr->d[i].data + j]),p); fputc('\n',p); } return pclose(p); }