On 25.11.2015 4:31, Andrey Chernov wrote: > 4) The whole processing looks overcomplicated and not effective. What > about this instead? > for (i = 0; i < 12; i++) { > count wcswidth() of each month and store it in wab_months_width[]. > count max_width_month. > } > for (i = 0; i < 12; i++) { > if ((n = max_width_month - wab_months_width[i]) > 0) > call wcscat(wab_months[i], L" ") n times. > } Last line can be optimized further: wcslcat(wab_months[i], L" "/* MAX_ABMON_WIDTH */, n); -- http://ache.vniz.net/
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC