Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lua
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

examples

a collection of code snippets and examples

To build an example run

c2c

in the directory of the example. The output can be found in a subdir 'output/'

comment_strip

Tool to strip comment lines from c-like code

event

An event framework, based on libevent

file_ops

Example showing how to open and mmap a file

json_parser

A fast minimalistic JSON parser

list

Implementation of the Linux kernel (embedded, doubly-linked) list. It also uses the to_container builtin function.

logger

Basic logging framework

longjmp

Demo of working longjmp()

signals

Signal handling example

socket

Open a server socket and listen to it

string_buffer

A very simple StringBuffer showing off struct functions

unit_tests

showing of incremental arrays, used to store unit tests

cross-compilation example

To show working cross-compilation to ARM, install the arm cross toolchain in Ubuntu 17.04 with

sudo apt-get install gcc-arm-linux-gnueabi qemu-user

Then cross compile the examples with

c2c -b build_arm.toml

This should even work for the lua example that uses a lua library.

About

a collection of code snippets and examples

Topics

Resources

Releases

No releases published
You can’t perform that action at this time.