VirtualBox

Changeset 101614 in vbox for trunk/tools/bin


Ignore:
Timestamp:
Oct 27, 2023 12:17:13 PM (13 months ago)
Author:
vboxsync
Message:

gen-slickedit-workspace.sh: DECL fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bin/gen-slickedit-workspace.sh

    r100825 r101614  
    5858MY_OPT_MINIMAL=""
    5959MY_OPT_USE_WILDCARDS="yes"
     60MY_OPT_ONLY_USERCPP=""
    6061
    6162
     
    428429    fi
    429430
    430     # Generate our
     431    # Generate our stuff.
    431432    MY_FILE="${MY_USERCPP_H}"
    432433    ${MY_CAT} > ${MY_FILE} <<EOF
     
    531532#define RT_IPRT_FORMAT_ATTR_MAYBE_NULL(a_iFmt, a_iArgs)
    532533#define RT_NOCRT(a_Name)                a_Name
     534#define DECLASM(type)                   type
    533535#define DECLINLINE(type)                inline type
    534536#define DECL_INLINE_THROW(type)         inline type
    535537#define DECL_FORCE_INLINE(type)         inline type
     538#define DECL_FORCE_INLINE_THROW(type)   inline type
    536539#define DECL_INVALID(type)              type
     540#define DECLCALLBACK(a_RetType)         a_RetType
     541#define DECLCALLBACKMEMBER(a_RetType, a_Name, a_Args)                   a_RetType (*a_Name) a_Args
     542#define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args)    a_RetType (*a_Name) a_Args
     543#define DECLR0CALLBACKMEMBER(a_RetType, a_CallConv, a_Name, a_Args)     a_RetType (*a_Name) a_Args
     544#define DECLR3CALLBACKMEMBER(a_RetType, a_CallConv, a_Name, a_Args)     a_RetType (*a_Name) a_Args
     545#define DECLRCCALLBACKMEMBER(a_RetType, a_CallConv, a_Name, a_Args)     a_RetType (*a_Name) a_Args
     546#define DECLRGCALLBACKMEMBER(a_RetType, a_CallConv, a_Name, a_Args)     a_RetType (*a_Name) a_Args
     547#define DECLCALLBACKPTR(a_RetType, a_Name, a_Args)                      a_RetType (*a_Name) a_Args
     548#define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args)       a_RetType (*a_Name) a_Args
     549#define DECLCALLBACKTYPE(a_RetType, a_Name, a_Args)                     a_RetType   a_Name  a_Args
     550#define DECLCALLBACKTYPE_EX(a_RetType, a_CallConv, a_Name, a_Args)      a_RetType   a_Name  a_Args
     551#define DECLEXPORT(a_RetType)           a_RetType
     552#define DECL_EXPORT_NOTHROW(a_RetType)  a_RetType
     553#define DECLHIDDEN(a_RetType)           a_RetType
     554#define DECL_HIDDEN_CALLBACK(a_RetType) a_RetType
     555#define DECL_HIDDEN_NOTHROW(a_RetType)  a_RetType
     556#define DECL_HIDDEN_THROW(a_RetType)    a_RetType
     557#define DECLIMPORT(a_RetType)           a_RetType
     558#define DECL_IMPORT_NOTHROW(a_RetType)  a_RetType
     559
     560#define DECLVBGL(a_RetType)             a_RetType
    537561
    538562#define PDMDEVINSINT_DECLARED           1
     
    738762        -e '/^ *# *define.*DECL/!d' \
    739763        -e '/DECLS/d' \
     764        -e '/DECLINED/d' \
    740765        -e '/DECLARE_CLS_/d' \
    741766        -e '/_SRC_POS_DECL/d' \
     
    747772        -e 's/ *VBOXCALL//' \
    748773        -e 's/ *RTCALL//' \
    749         -e '/ DECLASM(type) type/d' \
    750         -e '/define  *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
    751         -e '/define  *DECLINLINE(type)/d' \
    752         -e '/define  *DECL_FORCE_INLINE(type)/d' \
    753         -e '/  *DECL_INVALID(/d' \
     774        -e '/define  *DECLASM(/d' \
     775        -e '/define  *DECL..CALLBACKMEMBER([^)]*) *RT/d' \
     776        -e '/define  *DECLINLINE(/d' \
     777        -e '/define  *DECL_INLINE_THROW(/d' \
     778        -e '/define  *DECL_FORCE_INLINE(/d' \
     779        -e '/define  *DECL_FORCE_INLINE_THROW(/d' \
     780        -e '/define  *DECLCALLBACK(/d' \
     781        -e '/define  *DECLCALLBACKMEMBER(/d' \
     782        -e '/define  *DECLCALLBACKMEMBER_EX(/d' \
     783        -e '/define  *DECLR[03CG]CALLBACKMEMBER(/d' \
     784        -e '/define  *DECLCALLBACKPTR(/d' \
     785        -e '/define  *DECLCALLBACKPTR_EX(/d' \
     786        -e '/define  *DECLCALLBACKTYPE(/d' \
     787        -e '/define  *DECLCALLBACKTYPE_EX(/d' \
     788        -e '/define  *DECLEXPORT(/d' \
     789        -e '/define  *DECL_EXPORT_THROW(/d' \
     790        -e '/define  *DECLHIDDEN(/d' \
     791        -e '/define  *DECL_HIDDEN_CALLBACK(/d' \
     792        -e '/define  *DECL_HIDDEN_NOTHROW(/d' \
     793        -e '/define  *DECL_HIDDEN_THROW(/d' \
     794        -e '/define  *DECLIMPORT(/d' \
     795        -e '/define  *DECL_IMPORT_NOTHROW(/d' \
     796        -e '/ DECL_INVALID(/d' \
    754797        \
    755         -e 's/(type) DECLHIDDEN(type)/(type) type/' \
    756         -e 's/(type) DECLEXPORT(type)/(type) type/' \
    757         -e 's/(type) DECLIMPORT(type)/(type) type/' \
    758         -e 's/(type) DECL_HIDDEN_NOTHROW(type)/(type) type/' \
    759         -e 's/(type) DECL_EXPORT_NOTHROW(type)/(type) type/' \
    760         -e 's/(type) DECL_IMPORT_NOTHROW(type)/(type) type/' \
    761         -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \
    762         -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \
    763         -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \
    764         -e 's/(a_Type) DECL_HIDDEN_NOTHROW(a_Type)/(a_Type) a_Type/' \
    765         -e 's/(a_Type) DECL_EXPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \
    766         -e 's/(a_Type) DECL_IMPORT_NOTHROW(a_Type)/(a_Type) a_Type/' \
     798        -e 's/(\([a-zA-Z_]*\)) DECL_NOTHROW(\1)/(\1) \1/' \
     799        -e 's/(\([a-zA-Z_]*\)) DECLHIDDEN(DECL_NOTHROW(\1))/(\1) \1/' \
     800        -e 's/(\([a-zA-Z_]*\)) DECLHIDDEN(\1)/(\1) \1/' \
     801        -e 's/(\([a-zA-Z_]*\)) DECLEXPORT(\([a-zA-Z_]*\))/(\1) \1/' \
     802        -e 's/(\([a-zA-Z_]*\)) DECLIMPORT(\([a-zA-Z_]*\))/(\1) \1/' \
     803        -e 's/(\([a-zA-Z_]*\)) DECL_HIDDEN_NOTHROW(\([a-zA-Z_]*\))/(\1) \1/' \
     804        -e 's/(\([a-zA-Z_]*\)) DECL_EXPORT_NOTHROW(\([a-zA-Z_]*\))/(\1) \1/' \
     805        -e 's/(\([a-zA-Z_]*\)) DECL_IMPORT_NOTHROW(\([a-zA-Z_]*\))/(\1) \1/' \
    767806        \
    768807        --append "${MY_FILE}" \
     
    872911            ;;
    873912
     913        --only-usercpp)
     914            MY_OPT_ONLY_USERCPP=1
     915            ;;
     916
    874917        # usage
    875918        --h*|-h*|-?|--?)
     
    894937set -e
    895938
    896 
    897939#
    898940# Make sure the output directory exists, is valid and clean.
    899941#
    900 ${MY_RM} -f \
    901     "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
    902     "${MY_OUT_DIR}/${MY_WS_NAME}" \
    903     "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
     942if test -z "${MY_OPT_ONLY_USERCPP}"; then
     943    ${MY_RM} -f \
     944        "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \
     945        "${MY_OUT_DIR}/${MY_WS_NAME}" \
     946        "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`"
     947fi
    904948${MY_MKDIR} -p "${MY_OUT_DIR}"
    905949cd "${MY_OUT_DIR}"
     
    920964# Generate the projects (common code) and workspace.
    921965#
    922 my_generate_all_projects # in common-gen-workspace-projects.inc.sh
    923 my_generate_workspace
    924 
     966if test -z "${MY_OPT_ONLY_USERCPP}"; then
     967    my_generate_all_projects # in common-gen-workspace-projects.inc.sh
     968    my_generate_workspace
     969fi
    925970
    926971#
    927972# Update the history file if present.
    928973#
    929 MY_FILE="${MY_WS_NAME}histu"
    930 if test -f "${MY_FILE}"; then
    931     echo "Updating ${MY_FILE}..."
    932     ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
    933     ${MY_SED} -n \
    934         -e '/PROJECT_CACHE/d' \
    935         -e '/\[TreeExpansion2\]/d' \
    936         -e '/^\[/p' \
    937         -e '/: /p' \
    938         -e '/^CurrentProject/p' \
    939         "${MY_FILE}.old" > "${MY_FILE}"
     974if test -z "${MY_OPT_ONLY_USERCPP}"; then
     975    MY_FILE="${MY_WS_NAME}histu"
     976    if test -f "${MY_FILE}"; then
     977        echo "Updating ${MY_FILE}..."
     978        ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old"
     979        ${MY_SED} -n \
     980            -e '/PROJECT_CACHE/d' \
     981            -e '/\[TreeExpansion2\]/d' \
     982            -e '/^\[/p' \
     983            -e '/: /p' \
     984            -e '/^CurrentProject/p' \
     985            "${MY_FILE}.old" > "${MY_FILE}"
     986    fi
    940987fi
    941988
    942 
    943989#
    944990# Generate and update the usercpp.h/unxcpp.h file.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette