Skip to content

Instantly share code, notes, and snippets.

View Bigcheese's full-sized avatar

Michael Spencer Bigcheese

View GitHub Profile
#!/bin/sh
#
# git-svn-diff
# Generate an SVN-compatible diff against the tip of the tracking branch
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 's/.*:refs\/remotes\///'`
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH)`
git diff --no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) $* |
sed -e "s/^+++ .*/& (working copy)/" -e "s/^--- .*/& (revision $REV)/" \
-e "s/^diff --git [^[:space:]]*/Index:/" \
-e "s/^index.*/===================================================================/" \
@Bigcheese
Bigcheese / freya-server-client.txt
Created January 25, 2012 18:58
LII Freya server<->client packets.
//from WP669f by Sauron
//[GS_T25] 'GS3' GS T2.5 (T2 Freya) protocol 216 (..)
[client]
00=Logout:
01=AttackRequest:d(ObjectID)d(OrigX)d(OrigY)d(OrigZ)c(AttackClick)
03=ReqStartPledgeWar:s(PledgeName)
04=ReqReplyStartPledgeWar:s(RequestorName)d(Answer)
05=ReqStopPledgeWar:s(PledgeName)
06=ReqReplyStopPledgeWar:s(RequestorName)d(Answer)
07=ReqSurrenderPledgeWar:s(PledgeName)
MS clang version 3.1 () (based on LLVM 3.1git)
Target: i386-unknown-linux
Thread model: posix
"../clang/bin/Debug/clang.exe" "-cc1" "-triple" "i386-unknown-linux" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "gcc-toolchain.cpp" "-mrelocation-model" "static" "-mdisable-fp-elim" "-masm-verbose" "-mconstructor-aliases" "-target-cpu" "pentium4" "-momit-leaf-frame-pointer" "-resource-dir" "../clang/bin/Debug\\..\\lib\\clang\\3.1" "-fmodule-cache-path" "C:\\Users\\mspencer\\AppData\\Local\\Temp\\clang-module-cache" "-internal-isystem" "C:\\Users\\mspencer\\Projects\\llvm-project\\clang\\test\\Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5" "-internal-isystem" "C:\\Users\\mspencer\\Projects\\llvm-project\\clang\\test\\Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/i686-linux-gnu" "-internal-isystem" "C:\\Users\\mspencer\\Projects\\llvm-project\\clang\\test\\D
Item 1: C++11 solves by providing <type_traits>, and is going to fully solve eventually.
Item 2: It's easy to write a C++03 library to do this, even easier in C++11 (with Lambdas).
Item 3: ok, it's easier when your language is used by fewer people and you also implement the compiler.
Item 4: True
Item 5: C++11
Item 6: True
Item 7: C++11
Item 8: Not required by standard
Item 9: unsigned char, by definition
Item 10: C++11
handler 3 11 // @TALKED
// BB#0: // %entry
push_event
push_const 296
add
fetch_i
push_reg_sp
fetch_i
push_const 5
func_call 3735928559
SizeofPointer 8
SharedFactoryVersion 69
NPCHVersion 79
NASCVersion 2
NPCEventHVersion 2
Debug 0
handler 3 29 // @TALKED
// BB#0: // %entry
push_event
SizeofPointer 8
SharedFactoryVersion 69
NPCHVersion 79
NASCVersion 2
NPCEventHVersion 2
Debug 0
handler 3 7 // @TALKED
// BB#0: // %entry
push_event
/// Some crazy header.
struct CreatureData {
const char padding[8];
double x;
double y;
double z;
// etc...
};
std::stable_sort(Symbs.begin(), Symbs.end(), static_cast<bool(*)(const llvm::object::coff_symbol*, const llvm::object::coff_symbol*)>([](const llvm::object::coff_symbol *A, const llvm::object::coff_symbol *B) -> bool {
// code...
}));
diff --git a/llvm/lib/Support/Windows/PathV2.inc b/llvm/lib/Support/Windows/PathV2.inc
index e9ce5d9..66b8d84 100644
--- a/llvm/lib/Support/Windows/PathV2.inc
+++ b/llvm/lib/Support/Windows/PathV2.inc
@@ -301,11 +301,21 @@ error_code rename(const Twine &from, const Twine &to) {
if (error_code ec = UTF8ToUTF16(f, wide_from)) return ec;