%.redacted.forsafety: %.redactgraph
./$< $(REDACT) consistency printforforsafety $o
+%.redacted.shellvars: %.redactgraph
+ ./$< $(REDACT) consistency printforshellscript $o
+
%.redacted.segjoins: %.redactgraph
./$< $(REDACT) consistency printforlayoutsegjoins $o
output("end\n");
}
+static void printforshellscript(void) {
+ Node *node;
+ Edge *edge;
+ EdgeEnd *edgeend;
+ int side, weight, i;
+ Segment *segment;
+ MovFeat *movfeat;
+
+ FOR_ALL_NODES(node) {
+ FOR_EDGES(edge, node,side,edgeend) {
+ output("l");
+ segment= edge->subseg->segment;
+ output(segment->segname);
+ if (segment->n_movfeats>1) {
+ if (!segment->starfeature) {
+ fprintf(stderr,"printforforsafety before movfeatsplitedges!\n");
+ exit(8);
+ }
+ weight= 1;
+ FOR_SEGMENT_MOVFEATS(i,movfeat, segment) {
+ if (!movfeat->movfeat) continue;
+ output("%s%d", movfeat->movfeat,
+ (edge->movpos / weight) % movfeat->n_positions);
+ weight *= movfeat->n_positions;
+ }
+ }
+ output("=%d\n", (int)edge->distance);
+ }
+ }
+}
+
static void printforlayoutsegjoins(void) {
Node *node;
EdgeEnd *edgeend, *edgeend2;
#define OI(x) { #x, x },
OI(printforneato)
OI(printforforsafety)
+ OI(printforshellscript)
OI(printforlayoutsegjoins)
OI(consistency)
OI(movfeatsplitedges)