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
obj-m := chipid.o |
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 "hashtable.h" | |
#include <stdlib.h> | |
#include <string.h> | |
#define ht_isfree(node) ((node)->key == HT_NOKEY) | |
#define ht_keysize(ht, n) (sizeof(HashKey)+ht->vsize)*(n) |
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
local parse_declare | |
local function parse_typespec(decl, s, pos) | |
-- typespec: cv_decl* spec cv_decl* | |
-- cv_decl: 'const' | 'volatile' | |
while true do | |
local spec, newpos = s:match("^%s*([%w_]+)%s*()", pos) | |
if not spec then break end | |
if spec == "const" then |
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
#define LUA_LIB | |
#include "lbind.h" | |
#include "gl_2_0_core.h" | |
static int opengl_loaded = 0; | |
#define NANOVG_GL2_IMPLEMENTATION | |
#include "nanovg/src/nanovg_gl.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
#include <stdio.h> | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include "../src/nanovg.h" | |
#define NANOVG_GL2_IMPLEMENTATION | |
#include "../src/nanovg_gl.h" | |
/*#include "../example/perf.h"*/ | |
struct Lyrics { | |
int time; |
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 "acllib.h" | |
#include <stdio.h> | |
static void draw(const char *s, int x, int y) { | |
POINT points[1000]; | |
setPenStyle(PEN_STYLE_NULL); | |
while (*s) { | |
if (*s == 'M') { | |
int i = 0, pos; | |
sscanf(s, "M %ld,%ld %n", &points[i].x, &points[i].y, &pos); |
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
#define LUA_LIB | |
#include <lua.h> | |
#include <lauxlib.h> | |
#include "minizip/unzip.h" | |
#include "minizip/ioapi_mem.h" | |
#include <string.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
/* kit - a simple type system | |
* Xavier Wang (c) 2015, MIT license | |
* | |
* kit is a simple library for a type system, inspired by llib[1]. | |
* it can be used to simplifiy developing. kit offers: | |
* - ref-counted object/array | |
* - pointer-compare symbol | |
* - array of refs (refarray) support | |
* - a object pool implement | |
* - a hashtable implement |
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
local sleep, get_time | |
local math_floor = math.floor | |
if not jit then -- not LuaJIT? | |
return require "timer.c" | |
elseif jit.os == "Windows" then | |
local ffi = require "ffi" | |
ffi.cdef [[ | |
void __stdcall Sleep(unsigned dwMilliseconds); | |
unsigned __stdcall GetTickCount(void); |
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
#define LUA_LIB | |
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
#include <Tcl.h> | |
#include <ctype.h> | |
#include <string.h> |