29static ssize_t
outfn (
void* sp,
const char *buf,
size_t nbyte,
void* dp)
31 if (nbyte > (
size_t)INT_MAX) {
34 return printf(
"<stdout>%.*s", (
int)nbyte, buf);
37static ssize_t errfn (
void* sp,
const char *buf,
size_t nbyte,
void* dp)
39 if (nbyte > (
size_t)INT_MAX) {
42 return fprintf(stderr,
"<stderr>%.*s", (
int)nbyte, buf);
45static int iofread(
void *chan,
char *buf,
int bufsize)
47 return (
int)fread(buf, 1, (
size_t)bufsize, chan);
52 return fputs(
str, chan);
65main (
int argc,
char* argv[])
82 fprintf(stderr,
"rv %d\n", rv);
91main (
int argc,
char* argv[])
static Agiodisc_t gprIoDisc
abstract graph C library, Cgraph API
static NORETURN void graphviz_exit(int status)
Agraph_t * agread(void *chan, Agdisc_t *disc)
constructs a new graph
int gvpr(int argc, char *argv[], gvpropts *uopts)
graph pattern scanning and processing language API, main function gvpr
static ssize_t outfn(void *sp, const char *buf, size_t nbyte, void *dp)
textitem scanner parser str
static int iofread(void *chan, char *buf, int bufsize)
static int ioflush(void *chan)
static int ioputstr(void *chan, const char *str)