Date:2013-01-30 14:13:14 (6 years 7 months ago)
Author:Werner Almesberger
Commit:5733b607218abc31bd20bea0f5d9f2891f026c30
Message:prod/doc/figfilt: script to filter portions of a FIG file based on keys in comments

This file is part of the production documentation build process but was
never committed.
Files: prod/doc/figfilt (1 diff)

Change Details

prod/doc/figfilt
1#!/usr/bin/perl
2$key = shift @ARGV;
3$skip = 0;
4$skipping = 0;
5while (<>) {
6    if (/^#/ && $. != 1) {
7        $skip = $_ !~ /$key/;
8        print unless $skip;
9        next;
10    }
11    if (/^\s/) {
12        print unless $skipping;
13        next;
14    }
15    print unless $skip;
16    $skipping = $skip;
17    $skip = 0;
18}

Archive Download the corresponding diff file



interactive