VirtualBox

Changeset 2349 in kBuild


Ignore:
Timestamp:
May 17, 2009 11:13:35 AM (16 years ago)
Author:
bird
Message:

kdev.e: deal with multiple mlcomment and linecomment entries in 14+.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VSlickMacros/kdev.e

    r2243 r2349  
    185185    {
    186186        /* multiline */
     187#if __VERSION__>=14.0
     188        _str aComments[];
     189        GetComments(aComments, "mlcomment", sLexer)
     190        for (i = 0; i < aComments._length(); i++)
     191            if (!pos("documentation", aComments[i]) > 0)
     192            {
     193                sLine = aComments[i];
     194                break;
     195            }
     196        if (sLine != '')
     197#else
    187198        rc = _ini_get_value(slick_path_search("user.vlx"), sLexer, 'mlcomment', sLine);
    188199        if (rc)
    189200            rc = _ini_get_value(slick_path_search("vslick.vlx"), sLexer, 'mlcomment', sLine);
    190201        if (!rc)
     202#endif
    191203        {
    192204            sLeft  = strip(word(sLine, 1));
     
    197209
    198210        /* failed, try single line. */
     211#if __VERSION__>=14.0
     212        GetComments(aComments, "linecomment", sLexer)
     213        for (i = 0; i < aComments._length(); i++)
     214            if (!pos("documentation", aComments[i]) > 0)
     215            {
     216                sLine = aComments[i];
     217                break;
     218            }
     219        if (sLine != '')
     220#else
    199221        rc = _ini_get_value(slick_path_search("user.vlx"), sLexer, 'linecomment', sLine);
    200222        if (rc)
    201223            rc = _ini_get_value(slick_path_search("vslick.vlx"), sLexer, 'linecomment', sLine);
    202224        if (!rc)
     225#endif
    203226        {
    204227            sLeft = strip(word(sLine, 1));
     
    11721195    int     iCursorLine;
    11731196    int     iPadd = k_alignup(11, p_SyntaxIndent);
     1197
    11741198    /* look for parameters */
    11751199    boolean fFoundFn = !k_func_goto_nearest_function();
     
    11961220        {
    11971221            _str sName, sType, sDefault;
    1198             if (!k_func_enumparams(sArgs, i, sType, sName, sDefault)
     1222            if (   !k_func_enumparams(sArgs, i, sType, sName, sDefault)
    11991223                && iPadd2 < length(sName))
    12001224                iPadd2 = length(sName);
    12011225        }
    12021226        iPadd2 = k_alignup((iPadd + iPadd2), p_SyntaxIndent);
     1227        if (iPadd2 < 28)
     1228            iPadd2 = k_alignup(28, p_SyntaxIndent);
    12031229
    12041230        /*
     
    12101236            if (!k_func_enumparams(sArgs, i, sType, sName, sDefault))
    12111237            {
    1212                 _str sStr3 = '';
     1238                _str sStr3 = '.';
    12131239                if (sDefault != "")
    12141240                    sStr3 = '(default='sDefault')';
Note: See TracChangeset for help on using the changeset viewer.

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