cal: add a unicode test

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-01-31 00:10:18 +01:00
parent e17764c8fb
commit ed910c750d
3 changed files with 46 additions and 3 deletions

View File

@@ -113,7 +113,10 @@ int cal_main(int argc UNUSED_PARAM, char **argv)
if (argv[2]) {
bb_show_usage();
}
month = xatou_range(*argv++, 1, 12);
if (!(flags & 2)) { /* no -y */
month = xatou_range(*argv, 1, 12);
}
argv++;
}
year = xatou_range(*argv, 1, 9999);
}