potion  0.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
contrib.c File Reference

stuff written by other folks, seen on blogs, etc. More...

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "config.h"
#include <sys/mman.h>
+ Include dependency graph for contrib.c:

Go to the source code of this file.

Macros

#define ONEMASK   ((size_t)(-1) / 0xFF)
 

Functions

size_t potion_cp_strlen_utf8 (const char *_s)
 wonderful utf-8 counting trickery by colin percival More...
 
void * potion_mmap (size_t length, const char exec)
 
int potion_munmap (void *mem, size_t len)
 

Detailed Description

stuff written by other folks, seen on blogs, etc.

Definition in file contrib.c.

Macro Definition Documentation

#define ONEMASK   ((size_t)(-1) / 0xFF)

Definition at line 9 of file contrib.c.

Function Documentation

size_t potion_cp_strlen_utf8 ( const char *  _s)

wonderful utf-8 counting trickery by colin percival

http://www.daemonology.net/blog/2008-06-05-faster-utf8-strlen.html

Definition at line 17 of file contrib.c.

void* potion_mmap ( size_t  length,
const char  exec 
)

Definition at line 89 of file contrib.c.

int potion_munmap ( void *  mem,
size_t  len 
)

Definition at line 101 of file contrib.c.