File: xgraph.c

package info (click to toggle)
blockade 20041028-9
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k, lenny
  • size: 500 kB
  • ctags: 804
  • sloc: ansic: 7,485; sh: 177; makefile: 86
file content (26 lines) | stat: -rw-r--r-- 441 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Copyright status: This file is in the public domain. */

#include <stdio.h>

main(int ac, char **av)
{
 int i;
 int l;
 int n;
 int m;

 printf("\
gsave clippath flattenpath pathbbox grestore\n\
pop exch translate pop 90 rotate\n\
/p /lineto load def\n\
0 0 moveto\n\
");
 l = 0;
 n = 0;
 m = (ac < 2) ? 1 : atoi(av[1]);
 while (scanf("%x",&i) == 1)
  { if ((l++ % m) == 0) printf("%d %d p\n",n++,i);
  }
 printf("stroke\n");
 exit(0);
}