我正在使用这个打印语句:
printf(
"%5.2lf %'15llu %'13llu %5.2lf %'15llu "
"%'11u %'11u %'11u %'11u %'11u %'11u %'11u %'11u %'11u %'11u "
"%'11u %'9u %'11u %'9u\n",
(p->cbDecomp) ? 100.0 * ((double)p->cbComp)/p->cbDecomp : 0, p->cbDecomp, p->cbComp,
(p->cbDecompDup) ? 100.0 * ((double)p->cbComp)/p->cbDecompDup : 0, p->cbDecompDup,
p->cbIndFile, p->cbUdhFile, p->cUid, p->cFreeUid, p->cDups, cbUid, cbUdh, p->cTbl, p->cTblDel, cbTbl,
p->cTblBuckets, p->cMaxTblInBucket, p->cUdhBuckets, p->cMaxUdhInBucket);
但是得到这个输出:
atp 001 0.39 1094017024 4281732 0.39 1110155264 9111191 7510837 267094 0 3940 1335470 3205128 352190 0 3521900 131072 13 131072 11
atp 002 0.33 40898560 133896 0.33 40935424 355600 253716 9985 0 9 49925 119820 15297 0 152970 4096 13 4096 9
atp 003 0.38 690307072 2640414 0.38 694116352 5763359 4680853 168532 0 930 842660 2022384 237391 0 2373910 65536 15 65536 11
atp 004 0.70 661450752 4613727 0.69 667181056 5614000 6574177 161487 0 1399 807435 1937844 277030 0 2770300 16384 33 8192 42
分隔数千组的逗号没有出现!我认为这与语言环境有关,但我对语言环境一无所知。
[c698174@shldvgfas023] $ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
[c698174@shldvgfas023] $ cat /proc/version
Linux version 2.6.32-236.el6.sf599499.x86_64 (mockbuild@x86-012.build.bos.redhat.com) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Thu May 10 12:52:20 EDT 2012
有谁知道如何得到我的逗号???