VirtualBox

Changeset 93191 in vbox for trunk


Ignore:
Timestamp:
Jan 11, 2022 11:25:35 PM (3 years ago)
Author:
vboxsync
Message:

Main/UnattendedScript: Added @@VBOX_INSERT[expr]@@ and @@VBOX_COND[expr]@@, merging the variable & condition lookup with the previous replacement getter. Added simple testcase for checking the basics. [build fixes] bugref:9781

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UnattendedScript.cpp

    r93190 r93191  
    119119            size_t       cchPlaceholder    = sizeof(g_szPrefix) - 1;
    120120            char         ch;
    121             while (   offPlaceholder + cchPlaceholder < cchTemplate
     121            while (   offPlaceholder + cchPlaceholder < cchMaxPlaceholder
    122122                   && (ch = pszPlaceholder[cchPlaceholder]) != '\0'
    123123                   && (RT_C_IS_PRINT(ch) || RT_C_IS_SPACE(ch))
     
    338338     * Check for an escaping suffix.  Drop the '@@'.
    339339     */
    340     size_t const    cchFullPlaceholder = cchPlaceholder;
    341340    kEvalEscaping_T enmEscaping;
    342341#define PLACEHOLDER_ENDS_WITH(a_szSuffix) \
     
    467466     * @@VBOX_INSERT[expr]ATTRIB_DQ@@:
    468467     */
    469     size_t const    cchFullPlaceholder = cchPlaceholder;
    470468    kEvalEscaping_T enmEscaping;
    471469#define PLACEHOLDER_ENDS_WITH(a_szSuffix) \
     
    591589
    592590/*static */ DECLCALLBACK(int)
    593 UnattendedScriptTemplate::queryVariableForExpr(const char *pchName, size_t cchName, void *pvUser, char **ppszValue)
     591UnattendedScriptTemplate::queryVariableForExpr(const char *pchName, size_t cchName, void *pvUser, char **ppszValue) RT_NOEXCEPT
    594592{
    595593    UnattendedScriptTemplate *pThis = (UnattendedScriptTemplate *)pvUser;
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