./psenlarge ${LARGE_PS_FACTOR} $< $o
%.raw.neato: %.redactgraph
- ./$< consistency printforneato $o
+ ./$< -t$@ consistency printforneato $o
%.redacted.neato: %.redactgraph
- ./$< $(REDACT) consistency printforneato $o
+ ./$< -t$@ $(REDACT) consistency printforneato $o
%.summary.neato: %.redactgraph
- ./$< $(REDACT) consistency printforneatosumm $o
+ ./$< -t$@ $(REDACT) consistency printforneatosumm $o
%.redacted.forsafety: %.redactgraph
./$< $(REDACT) consistency printforforsafety $o
#define MMALLOC(sz) mmalloc(sz,__FILE__,__LINE__)
#define MREALLOC(p,sz) mrealloc(p,sz,__FILE__,__LINE__)
+static const char *title= "L";
+
static void *mmalloccheck(void *p, const char *op, size_t sz,
const char *file, int line) {
if (p) return p;
Edge *edge;
int side;
- output("digraph L {\n");
+ output("digraph \"%s\" {\n", title);
FOR_ALL_NODES(node) {
output(" n%sO [label=\"%s\"];\n"
Edge *edge;
int side;
- output("digraph L {\n");
+ output("digraph \"%s\" {\n", title);
FOR_ALL_NODES(node) {
output(" n%s [shape=circle, style=filled, color=grey,"
const OpInfo *oi;
fprintf(stderr,
- "usage: .../redactgraph <operation> [<operation>...]\n"
+ "usage: .../redactgraph [<options>] <operation> [<operation>...]\n"
+ "options:\n"
+ " -t<title> title for neato (must have no metachars for \"...\")\n"
"operations:\n");
for (oi=opinfos; oi->name; oi++) {
fprintf(stderr," %s\n",oi->name);
const OpInfo *oi;
const char *arg;
+ while ((arg= argv[1]) && arg[0]=='-') {
+ if (!strcmp(arg,"-")) break;
+ ++argv;
+ if (!strcmp(arg,"--")) break;
+ if (arg[1]=='t') { title= arg+2; }
+ else { usage(); }
+ }
+
if (!argv[0] || !argv[1]) usage();
while ((arg= *++argv)) {