VirtualBox

Ignore:
Timestamp:
Sep 22, 2016 11:01:17 AM (8 years ago)
Author:
vboxsync
Message:

OpenGL: fixed the most annoying coding style flaws, mainly removing spaces after '(' and before ')', no semantic change

Location:
trunk/src/VBox/Additions/common/crOpenGL/pack
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/pack.py

    r63939 r63942  
    2929
    3030print("""
    31 static void __fillin( int offset, char *name, SPUGenericFunction func )
     31static void __fillin(int offset, char *name, SPUGenericFunction func)
    3232{
    33     _cr_pack_table[offset].name = crStrdup( name );
     33    _cr_pack_table[offset].name = crStrdup(name);
    3434    _cr_pack_table[offset].fn = func;
    3535}""")
     
    5151        continue
    5252    if func_name in pack_specials:
    53         print('\t__fillin( %3d, "%s", (SPUGenericFunction) packspu_%s );' % (index, func_name, func_name ))
     53        print('\t__fillin(%3d, "%s", (SPUGenericFunction) packspu_%s);' % (index, func_name, func_name ))
    5454    else:
    55         print('\t__fillin( %3d, "%s", (SPUGenericFunction) (pack_spu.swap ? crPack%sSWAP : crPack%s) );' % (index, func_name, func_name, func_name ))
    56 print('\t__fillin( %3d, NULL, NULL );' % num_funcs)
     55        print('\t__fillin(%3d, "%s", (SPUGenericFunction) (pack_spu.swap ? crPack%sSWAP : crPack%s));' % (index, func_name, func_name, func_name ))
     56print('\t__fillin(%3d, NULL, NULL);' % num_funcs)
    5757print('}')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py

    r63939 r63942  
    164164for func_name in apiutil.AllSpecials( "packspu_vertex" ):
    165165    params = apiutil.Parameters(func_name)
    166     print('void PACKSPU_APIENTRY packspu_%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params) ))
     166    print('void PACKSPU_APIENTRY packspu_%s(%s)' % ( func_name, apiutil.MakeDeclarationString(params) ))
    167167    print('{')
    168168    print('\tif (pack_spu.swap)')
    169169    print('\t{')
    170     print('\t\tcrPack%sSWAP( %s );' % ( func_name, apiutil.MakeCallString( params ) ))
     170    print('\t\tcrPack%sSWAP(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    171171    print('\t}')
    172172    print('\telse')
    173173    print('\t{')
    174     print('\t\tcrPack%s( %s );' % ( func_name, apiutil.MakeCallString( params ) ))
     174    print('\t\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    175175    print('\t}')
    176176    print('\tRunState();')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_flush.py

    r63939 r63942  
    2828for func_name in apiutil.AllSpecials( "packspu_flush" ):
    2929    params = apiutil.Parameters(func_name)
    30     print('void PACKSPU_APIENTRY packspu_%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params)))
     30    print('void PACKSPU_APIENTRY packspu_%s(%s)' % ( func_name, apiutil.MakeDeclarationString(params)))
    3131    print('{')
    3232    print('\tGET_THREAD(thread);')
    3333    print('\tif (pack_spu.swap)')
    3434    print('\t{')
    35     print('\t\tcrPack%sSWAP( %s );' % ( func_name, apiutil.MakeCallString( params ) ))
     35    print('\t\tcrPack%sSWAP(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    3636    print('\t}')
    3737    print('\telse')
    3838    print('\t{')
    39     print('\t\tcrPack%s( %s );' % ( func_name, apiutil.MakeCallString( params ) ))
     39    print('\t\tcrPack%s(%s);' % ( func_name, apiutil.MakeCallString( params ) ))
    4040    print('\t}')
    4141    print('\tpackspuFlush( (void *) thread );')
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py

    r63939 r63942  
    8686
    8787    if "get" in apiutil.Properties(func_name):
    88         print('%s PACKSPU_APIENTRY packspu_%s( %s )' % ( return_type, func_name, apiutil.MakeDeclarationString( params ) ))
     88        print('%s PACKSPU_APIENTRY packspu_%s(%s)' % ( return_type, func_name, apiutil.MakeDeclarationString( params ) ))
    8989        print('{')
    9090        print('\tGET_THREAD(thread);')
     
    195195        print('\tif (pack_spu.swap)')
    196196        print('\t{')
    197         print('\t\tcrPack%sSWAP( %s );' % (func_name, apiutil.MakeCallString( params ) ))
     197        print('\t\tcrPack%sSWAP(%s);' % (func_name, apiutil.MakeCallString( params ) ))
    198198        print('\t}')
    199199        print('\telse')
    200200        print('\t{')
    201         print('\t\tcrPack%s( %s );' % (func_name, apiutil.MakeCallString( params ) ))
     201        print('\t\tcrPack%s(%s);' % (func_name, apiutil.MakeCallString( params ) ))
    202202        print('\t}')
    203203        print('\tpackspuFlush( (void *) thread );')
     
    217217            print('\tif (pack_spu.swap)')
    218218            print('\t{')
    219             print('\t\tfor (i = 0 ; i < %s ; i++)' % limit)
     219            print('\t\tfor (i = 0; i < %s; i++)' % limit)
    220220            print('\t\t{')
    221221            if params[-2][1].find( "double" ) > -1:
     
    229229                print('\tif (pack_spu.swap)')
    230230                print('\t{')
    231                 print('\t\tfor (i = 0 ; i < __numValues( pname ) ; i++)')
     231                print('\t\tfor (i = 0; i < __numValues(pname); i++)')
    232232                print('\t\t{')
    233233                if simple_swaps[index] == 'SWAPDOUBLE':
     
    240240            print('\tif (pack_spu.swap)')
    241241            print('\t{')
    242             print('\t\tfor (i = 0 ; i < crStateHlpComponentsCount(pname) ; i++)')
     242            print('\t\tfor (i = 0; i < crStateHlpComponentsCount(pname); i++)')
    243243            print('\t\t{')
    244244            if hard_funcs[func_name] == 'SWAPDOUBLE':
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_proto.py

    r63939 r63942  
    4343        return_type = apiutil.ReturnType(func_name)
    4444        params = apiutil.Parameters(func_name)
    45         print('extern %s PACKSPU_APIENTRY packspu_%s( %s );' % ( return_type, func_name, apiutil.MakeDeclarationString(params) ))
     45        print('extern %s PACKSPU_APIENTRY packspu_%s(%s);' % ( return_type, func_name, apiutil.MakeDeclarationString(params) ))
    4646
    4747
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