VirtualBox

Ignore:
Timestamp:
Oct 20, 2017 8:33:43 AM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/drm: fix source transformation script for DOS line endings.
bugref:8524: Additions/linux: play nicely with distribution-installed

Our script for transforming vboxvideo code from our coding style to the
kernel one matched on end-of-line markers but did not take into account
that there might be DOS-style Ctrl-M characters before them. This change
drops matching end-of-line altogether except in one harmless case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/indent.sed

    r69034 r69138  
    4343}
    4444/^\/\* \$Id:.*\*\/$/d
    45 /^typedef .* HGSMIOFFSET;$/d
    46 /^typedef .* HGSMISIZE;$/d
    47 s/^#\( *\)include <\([^/]*\)>$/#\1include "\2"/g
     45/^typedef .* HGSMIOFFSET;/d
     46/^typedef .* HGSMISIZE;/d
     47s/^#\( *\)include <\([^/]*\)>/#\1include "\2"/g
    4848
    4949# File names:
     
    8888s/\bVBVO_PORT_WRITE_U16\b *( *\(\b[^(),]*\b\) *, *\(\b[^(),]*\b\) *)/outw(\2, \1)/g
    8989s/\bVBVO_PORT_WRITE_U32\b *( *\(\b[^(),]*\b\) *, *\(\b[^(),]*\b\) *)/outl(\2, \1)/g
     90s/\bVBVO_PORT_WRITE_U[0-9]*\b/VBVO_PORT_WRITE_statement_should_be_on_one_line/g
    9091
    9192# Macros:
    9293s/\b_1K\b/1024/g
    9394s/\b_4M\b/4*1024*1024/g
    94 s/\bAssert\b\([^;]*\);$/WARN_ON_ONCE(!(\1));/g
     95s/\bAssert\b\([^;]*\);/WARN_ON_ONCE(!(\1));/g
    9596s/\bAssertCompile\b/assert_compile/g
    9697s/\bAssertCompileSize\b/assert_compile_size/g
    97 s/\bAssertPtr\b\([^;]*\);$/WARN_ON_ONCE(!(\1));/g
     98s/\bAssertPtr\b\([^;]*\);/WARN_ON_ONCE(!(\1));/g
    9899/AssertPtrNullReturnVoid/d
    99 s/\bAssertRC\b\([^;]*\);$/WARN_ON_ONCE(RT_FAILURE\1);/g
     100s/\bAssertRC\b\([^;]*\);/WARN_ON_ONCE(RT_FAILURE\1);/g
     101s/\bAssertRC\b/Assert_RC_statement_should_be_on_one_line/g
    100102s/\bDECLCALLBACK\b(\([^)]*\))/\1/g
    101103s/\bDECLCALLBACKMEMBER\b(\([^,)]*\), *\([^,)]*\))/\1 (*\2)/g
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