This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
""" | |
Clang MicrosoftMangle verification script | |
Requirements: | |
* cl.exe and clang.exe must be accessible via %PATH% | |
* strings.exe utility from SysInternals suite | |
* xargs.exe from gnuwin32 or mingw sys | |
Description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From de33fd77983d89cbf42c0710aec4b0ef2cff6a52 Mon Sep 17 00:00:00 2001 | |
From: pravic <ehysta@gmail.com> | |
Date: Sat, 21 Sep 2013 12:49:49 +0400 | |
Subject: [PATCH] fix long double for MSVC 12 (2013) | |
--- | |
dmd2/root/port.c | 8 +++++--- | |
vcbuild/strtold.c | 2 +- | |
2 files changed, 6 insertions(+), 4 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <vector> | |
// 1. std::basic_string have continuos storage | |
std::wstring GetWindowTextW(HWND hWnd) | |
{ | |
std::wstring text(::GetWindowTextLengthW(hWnd), L'\0'); | |
size_t len = ::GetWindowTextW(hWnd, &text[0], text.size()); | |
text.resize(len); | |
return std::move(text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[lang = "sized"] | |
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"] | |
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable | |
pub trait Sized { | |
// Empty. | |
} | |
pub trait Clone : Sized { | |
fn clone(&self) -> Self; | |
#[inline(always)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'check.c' | |
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" | |
target triple = "i686-pc-windows-msvc18.0.0" | |
; Function Attrs: nounwind | |
define i32 @main() #0 { | |
entry: | |
%retval = alloca i32, align 4 | |
store i32 0, i32* %retval, align 4 | |
%call = call x86_fastcallcc i32 @"\01@outer_call@12"(i32 inreg 1, i8 inreg zeroext 2, i16 zeroext 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::mem::size_of; | |
#[repr(C)] | |
pub enum POption<T> { | |
PSome(T), | |
} | |
#[repr(C)] | |
pub struct SOption<T>(T); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
int verify(const char* input) { | |
std::vector<char> stack; | |
while(const char c = *input++) { | |
if (c == '(' || c == '[' || c == '<') { | |
stack.push_back(c); | |
} else if (c == ')' || c == ']' || c == '>') { | |
if (stack.empty()) { return 0; } | |
char& prev = stack.back(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/sciter-win-main.cpp b/include/sciter-win-main.cpp | |
index 9f2699e..104b70a 100644 | |
--- a/include/sciter-win-main.cpp | |
+++ b/include/sciter-win-main.cpp | |
@@ -1,4 +1,6 @@ | |
-#include "stdafx.h" | |
+// It is better to disable stdafx.h by default. | |
+// And enable it explicitly via /Fstdafx.h compiler option (C/C++ - Advanced - Force Include File). | |
+// #include "stdafx.h" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "scwindemo" | |
version = "0.1.0" | |
[dependencies] | |
sciter-rs = "0.4.16" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_xml_snippet(root): | |
snippet = {} | |
description = None | |
for node in root: | |
if node.tag == 'content': | |
snippet['body'] = list(node.text.lstrip().splitlines()) | |
elif node.tag == 'tabTrigger': | |
snippet['prefix'] = node.text |
OlderNewer