• Patch: Elm ME+ 2.5 PLalpha62 -> Elm ME+ 2.5 PLalpha63 [2/7] (5/5)

    From Kari Hurtta@21:1/5 to All on Wed Jan 3 13:51:04 2024
    [continued from previous message]

    + inc_pager_param_value_refcount(ret);
    +
    + return ret;
    + }
    +
    + /* Increments refcount */
    + struct pager_param_value * pgrng_binding_search_helper(backlink,
    + next_pos,
    + found_pos)
    + struct pgrng_bfr_binding * backlink;
    + int * next_pos /* iterator */;
    + int * found_pos /* -1 if not found */;
    + {
    + struct pager_param_value * ret = NULL;
    + int min_pos = 0;
    + int found = -1;
    +
    + if (PGRNG_BFR_magic != backlink->magic)
    + panic("PAGER RANGE PANIC",__FILE__,__LINE__,
    + "pgrn_binding_get_value",
    + "Bad magic number (pgrng_bfr_binding)",0);
    +
    + if (found_pos)
    + *found_pos = -1;
    +
    + if (next_pos) {
    + min_pos = *next_pos;
    +
    + if (min_pos < 0)
    + panic("PAGER RANGE PANIC",__FILE__,__LINE__,
    + "pgrn_binding_get_value",
    + "Bad start index",0);
    +
    + *next_pos = -1;
    + }
    +
    + if (backlink->values) {
    + int i;
    +
    + for (i = 0; i < backlink->value_count; i++) {
    +
    + if (min_pos <= backlink->values[i].buffer_index &&
    + (-1 == found ||
    + backlink->values[i].buffer_index < found)
    + ) {
    +
    + ret = backlink->values[i].value;
    + found = backlink->values[i].buffer_index;
    +
    + if (next_pos)
    + *next_pos = found +1;
    + if (found_pos)
    + *found_pos = found;
    +
    + if (min_pos == backlink->values[i].buffer_index)
    + break;
    + }
    + }
    + }
    +
    + if (ret)
    + inc_pager_param_value_refcount(ret);
    +
    + return ret;
    + }
    +
    +

    /*
    * Local Variables:
    Index: elmME+.2.5.alpha63-cvs/lib/posixsig.c
    *** elmME+.2.5.alpha62/lib/posixsig.c Wed Jan 31 20:07:25 2018
    --- elmME+.2.5.alpha63-cvs/lib/posixsig.c Wed Dec 13 18:55:32 2023 ***************
    *** 1,7 ****
    ! static char rcsid[] = "@(#)$Id: posixsig.c,v 2.8 2018/01/31 18:07:25 hurtta Exp $";

    /******************************************************************************
    ! * The Elm (ME+) Mail System - $Revision: 2.8 $ $State: Exp $
    *
    * Modified by: Kari Hurtta <hurtta+elm@siilo.FMI.FI>
    * (was hurtta+elm@posti.FMI.FI, hurtta+elm@ozone.FMI.FI)
    --- 1,7 ----
    ! static char rcsid[] = "@(#)$Id: posixsig.c,v 2.9 2023/12/13 16:55:32 hurtta Exp $";

    /******************************************************************************
    ! * The Elm (ME+) Mail System - $Revision: 2.9 $ $State: Exp $
    *
    * Modified by: Kari Hurtta <hurtta+elm@siilo.FMI.FI>
    * (was hurtta+elm@posti.FMI.FI, hurtta+elm@ozone.FMI.FI)
    ***************
    *** 233,273 ****
    }
    #endif

    - int convert_status(status,exit_code)
    - #if defined(BSD_TYPE) && !defined(WEXIT