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
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
#define LUA_LIB | |
#include <lua.h> | |
#include <lauxlib.h> | |
static lua_Integer posrelat(lua_Integer pos, size_t len) { | |
if (pos >= 0) return pos; | |
else if (0u - (size_t)pos > len) return 0; | |
else return (lua_Integer)len + pos + 1; | |
} |
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
#ifndef lua_bufflib_h | |
#define lua_bufflib_h | |
#define LUA_LIB | |
#include <lua.h> | |
#include <lauxlib.h> | |
#define BUFFER_LIBNAME "buffer" |
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
@rd /s /q obj 2>nul | |
@md obj | |
@cd obj | |
gcc -O2 -c -DFREEGLUT_EXPORTS ../src/*.c -I../include | |
gcc -mdll -o ../freeglut32.dll *.o^ | |
-Wl,--enable-stdcall-fixup,--out-implib,libfreeglut32.a^ | |
-lopengl32 -lgdi32 -lwinmm | |
gcc -O2 -c -DFREEGLUT_STATIC ../src/*.c -I../include |
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
Lua52/ | |
*.a |
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
@set LUAVER=lua52 | |
@if "%1x" == "x" ( | |
set LUADIR=D:\%LUAVER%\ | |
) else set LUADIR=%1\%LUAVER%\ | |
@echo install Lua to %LUADIR% ... | |
@echo create directories ... | |
@mkdir %LUADIR% 2>nul | |
@mkdir %LUADIR%include 2>nul | |
@mkdir %LUADIR%clibs 2>nul | |
@mkdir %LUADIR%lua 2>nul |
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
*.exe | |
*.dll | |
tags* | |
objs |
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 <string.h> | |
#define COMP_MAX 50 | |
#define ispathsep(ch) ((ch) == '/' || (ch) == '\\') | |
#define iseos(ch) ((ch) == '\0') | |
#define ispathend(ch) (ispathsep(ch) || iseos(ch)) | |
char *normpath(char *out, const char *in) { |
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
test | |
tags* | |
*.exe | |
*.dll | |
*.obj | |
*.so | |
*.o |