]>
granicus.if.org Git - graphviz/commit
Fixes a bug (# unknown) where tcldot or any gv language binding couldn't
write dot,xdot,plain,canon to memory or to Tcl_Channels.
Problem was that agwrite() used fprintf() & putc() directly to an output file.
Fix is to add an output discipline to libgraph so that we can provide our own fwrite() equiv.
The discipline defaults to regular fwrite() and ferror() for backward compat.
Adds new functions to libgraph:
extern void agsetodisc(
size_t (*fwrite) (FILE *fp, const char *s, size_t len),
int (*ferror) (FILE *fp));
extern void agfprintf(FILE *fp, const char *format, ...);
extern int agputs(const char *s, FILE *fp);
extern int agputc(int c, FILE *fp);
13 files changed: