Kaydet (Commit) 384d9e41 authored tarafından Eike Rathke's avatar Eike Rathke

preserve and renumber duplicate values

Change-Id: I5c805fb7d60d8bae7109e3910f7bb0b5dd142909
üst 882a0ad9
......@@ -10,6 +10,10 @@
#
# Consecutively number a series of defines, for example sc/inc/globstr.hrc
# Duplicated values are renumbered but preserved, i.e. for ...START and ...END
# definitions, and commented with "XXX was duplicate".
# To insert and renumber use a higher value for the inserted definition than
# any other used, for example 9999.
# WARNING: this does not expect other defines in between and would mess around
# with them.
......@@ -25,13 +29,16 @@ BEGIN {
if (dup[a[3]])
{
dupmsg = " // XXX was duplicate " a[3] " of " dup[a[3]];
a[3] = map[a[3]];
}
else
{
dup[a[3]] = a[2];
dupmsg = "";
++id;
map[a[3]] = id;
a[3] = id;
}
a[3] = ++id;
lastline = s[0];
for (i=1; i<=n; ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment