This file contains hidden or 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
/* Based on code by user DorianRudolph on GitHub | |
https://gist.github.com/DorianRudolph/ca283dfdfd185bc812b7 | |
*/ | |
/* | |
TODO: | |
- use menu key as a Fn key to enable multimedia control | |
- Fn+F1 = toggle mute | |
- Fn+F2 = vol up | |
- Fn+F3 = vol dn |
This file contains hidden or 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
/* Build with google benchmark */ | |
#include "benchmark/benchmark.h" | |
#include <ctype.h> | |
#include <errno.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> |
This file contains hidden or 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
Index: include/clang/AST/RecursiveASTVisitor.h | |
=================================================================== | |
--- include/clang/AST/RecursiveASTVisitor.h (revision 315357) | |
+++ include/clang/AST/RecursiveASTVisitor.h (working copy) | |
@@ -2147,6 +2147,7 @@ | |
DEF_TRAVERSE_STMT(DoStmt, {}) | |
DEF_TRAVERSE_STMT(ForStmt, {}) | |
DEF_TRAVERSE_STMT(GotoStmt, {}) | |
+DEF_TRAVERSE_STMT(ComeFromStmt, {}) | |
DEF_TRAVERSE_STMT(IfStmt, {}) |
This file contains hidden or 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 <stdio.h> | |
struct error_code { | |
int code; | |
}; | |
struct error_context { | |
const struct error_code *code; | |
const char *msg; | |
const char *file; |
This file contains hidden or 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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <benchmark/benchmark.h> | |
unsigned int odd_constant = 0xdeadbeef | 1; | |
static unsigned int hash_crc32_orig(const void *keyptr) | |
{ | |
unsigned int hash = odd_constant; |
This file contains hidden or 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 <alloca.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct tmpvar_hook { | |
void *ptr; | |
struct tmpvar_hook *next; | |
}; | |
static void tmpvar_hook_free(struct tmpvar_hook **hook) { |
This file contains hidden or 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 <stdio.h> | |
#include <stdbool.h> | |
struct coro { | |
void *state; | |
}; | |
struct range_coro { | |
struct coro base; | |
int cur, max, step; |
This file contains hidden or 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
/* link with liblwan and google benchmark */ | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <benchmark/benchmark.h> | |
extern "C" { | |
#include <lwan-coro.h> | |
} | |
struct coro *coro; |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; |
This file contains hidden or 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
project lwan { | |
language = c | |
} | |
configure { | |
# If matched, creates a HAVE_SQLITE define in the config file, | |
# and enables a SQLITE feature that can be used for dependency | |
# testing, and, if linking against this library, adds automatically | |
# its CFLAGS and LDFLAGS. | |
pkg_config sqlite3 { |