71
This commit is contained in:
@@ -7,6 +7,3 @@
|
||||
// just sleeping function
|
||||
// dont set 'milisec' > 1000 for good perfomance
|
||||
void msleep(uint8 sec, uint16 milisec);
|
||||
|
||||
//djb2 hash function from http://www.cse.yorku.ca/~oz/hash.html
|
||||
uint32 hash(char *str);
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "base.h"
|
||||
|
||||
uint32 hash(char *str){
|
||||
uint32 hash=5381;
|
||||
char c;
|
||||
while (c=*str++)
|
||||
hash=((hash << 5) + hash) + c; //hash=hash*33^c
|
||||
return hash;
|
||||
}
|
||||
@@ -11,5 +11,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define CHOOSE(B, Y, N) __builtin_choose_expr(B, Y, N)
|
||||
|
||||
#define IFTYPE(X, T) __builtin_types_compatible_p(typeof(X), T)
|
||||
#define dbg(N) printf("\e[95m%d\n",N)
|
||||
|
||||
#define dbg(N) printf("\e[95m%d\n",N)
|
||||
|
||||
Reference in New Issue
Block a user