summaryrefslogtreecommitdiffstats
path: root/src/util/vercmp.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-10 21:26:17 -0500
committerDan McGee <dan@archlinux.org>2011-10-12 14:18:38 -0500
commit61c6ae01b3315c5db38ef5d313ac6f0b75fe2209 (patch)
treeedc99d6fd4ee10353e7231d4fcdb85042380b3d6 /src/util/vercmp.c
parentd3d3b861ac2c4ce63c306e00395945bfa3c1b6c6 (diff)
downloadpacman-61c6ae01b3315c5db38ef5d313ac6f0b75fe2209.tar.xz
VerbosePkgLists: format table lines in i18n-compatible way
This had the unfortunate implementation detail that depended on the strings having 1 byte == 1 column hold true. As we know, this is not at all the case once you move past the base ASCII character set. Reimplement this whole thing so it doesn't depend on format strings at all. Instead, simply calculate the max column widths, and then when displaying each row add the correct amount of padding using UTF-8 safe string length functions. Before: 名字 旧版本新版本 净变化 下载大小 libgee 0.6.2.1-1 0.60 MiB 0.10 MiB libsocialweb 0.25.19-2 1.92 MiB 0.23 MiB folks 0.6.3.2-1 1.38 MiB 0.25 MiB After: 名字 旧版本 新版本 净变化 下载大小 libgee 0.6.2.1-1 0.60 MiB 0.10 MiB libsocialweb 0.25.19-2 1.92 MiB 0.23 MiB folks 0.6.3.2-1 1.38 MiB 0.25 MiB Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util/vercmp.c')
0 files changed, 0 insertions, 0 deletions