~ubuntu-branches/ubuntu/utopic/lebiniou/utopic

« back to all changes in this revision

Viewing changes to src/gen_erlang.awk

  • Committer: Package Import Robot
  • Author(s): Olivier Girondel
  • Date: 2012-04-22 22:07:40 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120422220740-xncgwhc3g71nopnu
Tags: 3.18-1
* New upstream release 3.18.
* Support older libswscale.
* Add missing Build-Depends: libfreetype6-dev, libasound2-dev,
  libpulse-dev. (Closes: #669437)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
BEGIN {
 
2
    print;
 
3
    print "cmd(To, Cmd, Arg) ->";
 
4
    print "    {biniou, node()} ! {cmd, <<To, Cmd, Arg>>}.";
 
5
}
 
6
 
 
7
 
 
8
function pmod(mod) {
 
9
    if (mod == "-")
 
10
        return;
 
11
    if (mod == "A")
 
12
        return "Alt-";
 
13
    if (mod == "C")
 
14
        return "Ctrl-";
 
15
    if (mod == "S")
 
16
        return "Shift-";
 
17
    if (mod == "CS")
 
18
        return "Ctrl-Shift-";
 
19
}
 
20
 
 
21
 
 
22
{
 
23
    if (($1 == "#") || ($0 == "") || ($1 == "-"))
 
24
        next;
 
25
  
 
26
    if ($1 == "*") {
 
27
        print "\n";
 
28
        print "%% =============== "$2" ===============";
 
29
    } else {
 
30
        print "";
 
31
        tail = substr($0, (length($1 $2 $3 $4 $5 $6) + 7));
 
32
 
 
33
        if (tail != "")
 
34
            printf "%%%% %s\n", tail;
 
35
 
 
36
        arg = substr($6, 0, 2);
 
37
        if (arg == "BA")
 
38
            printf "cmd(\"%s\") -> cmd(?%s, ?%s, ?%s);", $1, $4, $5, $6;
 
39
        else
 
40
            printf "cmd(\"%s\") -> cmd(?%s, ?%s, %s);", $1, $4, $5, $6;
 
41
    }
 
42
}
 
43
 
 
44
 
 
45
END {
 
46
    print "\ncmd(_) -> ok.";
 
47
}