Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Last active October 22, 2020 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trass3r/0852b71d59f318b8ac1f6e5a5c8ebc57 to your computer and use it in GitHub Desktop.
Save Trass3r/0852b71d59f318b8ac1f6e5a5c8ebc57 to your computer and use it in GitHub Desktop.
# defines to enum
#define ([A-Z0-9_]+)(\s+)([0-9a-z_| ()]+) *
\t$1 =$2$3,
# find added empty lines in a patch
^\+\s*$\n
# use preincrement in for loop instead of postincrement
(for\s*\(.+;\s*)(\w+)\+\+\s*\)
\1++\2\)
# ddraw call forwarding:
::([^(]+\(.*\))\r\n\{
$0\n\treturn _org->$1;
# fixup arguments
([,(])[^,]+ ([^,)]+)
$1$2
# function pointer to method
(.+)\(WINAPI\* (.+)\)\r\n\t
$1 WINAPI $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment