<commit_before>#!/bin/sh
#
#       libssh2 compilation script for the OS/400.
#

SCRIPTDIR=`dirname "${0}"`
. "${SCRIPTDIR}/initscript.sh"
cd "${TOPDIR}/src"


#       Function to extract external prototypes from header files.
#       Input: concatenated header files.
#       Output: external prototypes, one per (long) line.

extproto()
{
        sed -e 'x;G;s/^\n//;s/\n/ /g'                                   \
            -e 's#[[:space:]]*/\*[^*]*\(\*\([^/*][^*]*\)\{0,1\}\)*\*/[[:space:]]*##g' \
            -e 'h'                                                      \
            -e '/\/\*/!{'                                               \
            -e '/^#/{s/^.*[^\\]$//;h;d'                                 \
            -e '}'                                                      \
            -e 's/\\$//'                                                \
            -e ':loop1'                                                 \
            -e '/;/{'                                                   \
            -e 's/^[^;]*;//;x;s/;.*//'                                  \
            -e '/^[[:space:]]*LIBSSH2_API[[:space:]].*(/{'              \
            -e 's/^[[:space:]]*LIBSSH2_API[[:space:]]*//'               \
            -e 's/[[:space:]]*$//'                                      \
            -e 's/[[:space:]][[:space:]]*/ /g'                          \
            -e 'p'                                                      \
            -e '}'                                                      \
            -e 'g;bloop1'                                               \
            -e '}'                                                      \
            -e '}'                                                      \
            -n
}

#       Need to have IFS access to the mih/modasa header file.

if action_needed modasa.mih '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/MODASA.MBR'
then    rm -f modasa.mih
        ln -s '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/MODASA.MBR' modasa.mih
fi


#      Create and compile the identification source file.<commit_msg>os400: do not miss some external prototypes<commit_after>#!/bin/sh
#
#       libssh2 compilation script for the OS/400.
#

SCRIPTDIR=`dirname "${0}"`
. "${SCRIPTDIR}/initscript.sh"
cd "${TOPDIR}/src"


#       Function to extract external prototypes from header files.
#       Input: concatenated header files.
#       Output: external prototypes, one per (long) line.

extproto()
{
        sed -e 'x;G;s/^\n//;s/\n/ /g'                                   \
            -e 's#[[:space:]]*/\*[^*]*\(\*\([^/*][^*]*\)\{0,1\}\)*\*/[[:space:]]*##g' \
            -e 'h'                                                      \
            -e '/\/\*/!{'                                               \
            -e '/^#/{s/^.*[^\\]$//;h;d'                                 \
            -e '}'                                                      \
            -e 's/[{}]/;/g;s/\\$//'                                     \
            -e ':loop1'                                                 \
            -e '/;/{'                                                   \
            -e 's/^[^;]*;//;x;s/;.*//'                                  \
            -e '/^[[:space:]]*LIBSSH2_API[[:space:]].*(/{'              \
            -e 's/^[[:space:]]*LIBSSH2_API[[:space:]]*//'               \
            -e 's/[[:space:]]*$//'                                      \
            -e 's/[[:space:]][[:space:]]*/ /g'                          \
            -e 'p'                                                      \
            -e '}'                                                      \
            -e 'g;bloop1'                                               \
            -e '}'                                                      \
            -e '}'                                                      \
            -n
}

#       Need to have IFS access to the mih/modasa header file.

if action_needed modasa.mih '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/MODASA.MBR'
then    rm -f modasa.mih
        ln -s '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/MODASA.MBR' modasa.mih
fi


#      Create and compile the identification source file.
{'fraction_non_alphanumeric': 0.1682554814108675, 'fraction_numerical': 0.005958055290753098, 'mean_word_length': 0.6160954948016942, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 47, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5240992', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1124, 'n_words': 201}