summaryrefslogtreecommitdiff
path: root/intl/po2tbl.sed
blob: 93c0435f4de9e9ed48d294b1b7e9f5f6b41935ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
1 {
  i\
/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot.  */\
\
#if HAVE_CONFIG_H\
# include <config.h>\
#endif\
\
#include "libgettext.h"\
\
const struct _msg_ent _msg_tbl[] = {
  h
  s/.*/0/
  x
}
/^msgid/ {
  s/msgid[ 	]*\(".*"\)/  {\1/
  tb
  :b
  N
  s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
  ta
  s/\(.*\)\n.*/\1/
  bc
  :a
  s/\(.*\)\(\n.*\)/\1\\\2/
  P
  s/.*\n\(.*\)/\1/
  tb
  :c
  x
  td
  :d
  s/9\(_*\)$/_\1/
  td
  s/^\(_*\)$/0\1/
  s/8\(_*\)$/9\1/
  s/7\(_*\)$/8\1/
  s/6\(_*\)$/7\1/
  s/5\(_*\)$/6\1/
  s/4\(_*\)$/5\1/
  s/3\(_*\)$/4\1/
  s/2\(_*\)$/3\1/
  s/1\(_*\)$/2\1/
  s/0\(_*\)$/1\1/
  s/_/0/g
  x
  G
  s/\(.*\)\n\([0-9]*\)/\1, \2},/
  s/\(.*\)"$/\1/
  p
}
$ {
  i\
};\

  g
  s/0*\(.*\)/int _msg_tbl_length = \1;/p
}
d