• Patch: Elm ME+ 2.5 PLalpha63 -> Elm ME+ 2.5 PLalpha64 [3/4] (5/5)

    From Kari Hurtta@21:1/5 to All on Tue Jul 2 20:52:51 2024
    [continued from previous message]

    ! LINES-1, 0, CATGETS(elm_msg_cat, ElmSet,
    ! ElmReadingInMessage,
    ! "Reading in %S, message: ."),
    ! counter->truncated_name ? counter->truncated_name : name);

    - menu_GetXYLocation(page,
    - &(counter->count_x),&(counter->count_y));
    - counter->count_y--;
    - counter->lastpercent = -1;
    - menu_CleartoEOLN(page);
    }

    ! menu_PutLineX(page,
    ! counter->count_x, counter->count_y,
    ! FRM("%d (%02d%%) "), count,percent);
    !
    ! if (skipcount > 0 || percent2 >= 0) {
    ! int add = 12 - ((skipcount >= 100) ? 1 : 0)
    ! - ((skipcount >= 1000) ? 1 : 0)
    ! + ((count >= 10000) ? 1 : 0);
    !

    menu_PutLineX(page,
    ! counter->count_x, counter->count_y+add,
    CATGETS(elm_msg_cat, ElmSet,
    ElmSkippingInMessage,
    " %d (%02d%%) skipped "),
    skipcount,percent2);

    !
    }

    if (initialize) {
    --- 998,1218 ----
    width = COLUMNS - 53
    - ((skipcount >= 10000) ? 1 : 0)
    - ((count >= 10000) ? 1 : 0);


    !

    ! if (count > 0)
    ! total += count;
    ! if (counter->previous_messages > 0) {
    ! total += counter->previous_messages;
    ! d4 = digits(counter->previous_messages) +1;
    }
    +
    + /* Another way */

    ! d1 = digits(count);
    ! d2 = digits(skipcount);
    ! d5 = digits(total);

    ! have_skipped = (skipcount > 0 || percent2 >= 0);

    ! do {
    ! if (recalculate) {
    ! DPRINT(Debug,10,(&Debug, "reading_updater: recalculate loop #%d\n", ! recalculate));
    ! }
    !
    ! if (num_messages > 0) {
    ! d3 = digits(num_messages);
    !
    ! /* num_messages do not truncate filename,
    ! but it is printed if there is enough
    ! space
    ! */
    !
    ! w = COLUMNS - counter->prompt_factor - 2 * d3 - d4;
    !
    !
    ! } else
    ! w = COLUMNS - counter->prompt_factor - d1 - d2;
    !
    ! if (have_skipped) {
    !
    !