~ubuntu-branches/ubuntu/quantal/9base/quantal

« back to all changes in this revision

Viewing changes to troff/cvt

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-11-07 12:25:14 UTC
  • mfrom: (6.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091107122514-tcw4u4ha2w2xbbnn
Tags: 1:4-1
* Adding maintainer homepage field to control.
* Marking maintainer homepage field to be also included in binary
  packages and changelog.
* Adding README.source.
* Merging upstream version 4.
* Adding sh4 to explicit architecture list (Closes: #545772).
* Moving maintainer homepage field from control to copyright.
* Updating README.source.
* Updating homepage field in control.
* Removing manpage patch, went upstream.
* Removing kfreebsd.patch, went upstream.
* Generalizing manpage moving in rules.
* Moving base directory from /usr/lib/9base to /usr/lib/plan9 for
  consistency reasons.
* Prefixing manpages with plan9 instead of 9base for consistency
  reasons.
* Bumping versioned build-depends on debhelper.
* Making internal mkMAP and sendcover scripts executable.
* Adding patch to adjust shebang in newly included troff commands.
* Updating lintian-overrides.
* Making buildd-depends on quilt versioned.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
awk '
 
3
 
 
4
/^{/ {
 
5
        if (prev != "") {
 
6
                # comments can be trouble (e.g. ffree())
 
7
                if ( (c = match(prev, /\/\*.*\*\/$/)) != 0 ) {
 
8
                        comment = substr(prev, c)
 
9
                        sub(/\/\*.*\*\/$/, "", prev)
 
10
                } else comment = ""
 
11
 
 
12
                x = prev
 
13
 
 
14
                # isolate argument list
 
15
                sub(/^[^(]*\(/, "", x)
 
16
                sub(/\)[^)]*$/, "", x)
 
17
 
 
18
                # find the names in it
 
19
                n = split(x, args)
 
20
                arglist = ""
 
21
                for (i = 2; i <= n; i += 2)
 
22
                        arglist = arglist args[i]
 
23
                gsub(/\(\*f\)\(Tchar\)/, "f", arglist)  # special case for n4.c
 
24
                gsub(/\[[0-9]+\]/, "", arglist)         #     for n8.c
 
25
                gsub(/[*()\[\]]/, "", arglist)          # discard noise characters *()[]
 
26
                gsub(/,/, ", ", arglist)                # space nicely
 
27
                sub(/\(.*\)/, "(" arglist ")", prev)    # reconstruct
 
28
                print prev comment
 
29
 
 
30
                # argument declarations
 
31
                gsub(/,/, ";", x)
 
32
                gsub(/\(\*f\)\(Tchar\)/, "(*f)()", x)   # special case for n4.c
 
33
                if (x != "")
 
34
                        print "\t" x ";"
 
35
        }
 
36
        prev = $0
 
37
        next
 
38
}
 
39
 
 
40
{       print prev
 
41
        prev = $0
 
42
}
 
43
 
 
44
END { print prev }
 
45
' $*