This file contains 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 CARRAYMACROS_H | |
#define CARRAYMACROS_H 1 | |
#include <inttypes.h> | |
#include <stdio.h> | |
#define ARRAY_SIZE(array) array ## _num | |
#define ARRAY_MAX(array) array ## _max | |
#define ARRAY_CDECL(array, type) \ |
This file contains 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
# This is a comment | |
# Plain constant: | |
Dummystring = "foobar" | |
# Parameters to be injected from outside (CLI or another processor) and their respective types: | |
Parameters { | |
target_file: string, | |
integration_time: uint32 | |
} |
This file contains 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
ins NOP() | |
{ | |
/* Empty */ | |
} | |
ins END() | |
{ | |
goto end_eval; | |
} |
This file contains 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
<?php | |
public function getService($service) | |
{ | |
if(isset($this->_instances[$service])) | |
{ | |
return $this->_instances[$service]; | |
} | |
if( ! isset($this->_loaders[$service])) |
This file contains 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
<?php | |
namespace React\EventLoop; | |
use libev\EventLoop; | |
use libev\IOEvent; | |
class LibevLoop | |
{ | |
protected $loop = null; |
This file contains 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
<?php | |
/** | |
* Creates a HTTP response to be sent as the response. | |
* | |
* @param resource The socket connection stream | |
* @param array array(response_code, array(header_title => header_content), content) | |
* @return string | |
*/ | |
protected function httpResponse($conn, array $response) | |
{ |
This file contains 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
<?php | |
/* | |
* Created by Martin Wernståhl on 2011-04-25. | |
* Copyright (c) 2011 Martin Wernståhl. | |
* All rights reserved. | |
*/ | |
namespace Inject\Stack\Middleware; | |
use \Inject\Stack\MiddlewareInterface; |
This file contains 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
/* Function to calcuate the n first fibonacci numbers */ | |
Frame *fib_frame = malloc(sizeof(Frame)); | |
Frame_init(fib_frame); | |
uint32_t prevfr = Frame_allocVariable(fib_frame); | |
/* No continuations called here, so we can get away with not allocating space for return values */ | |
uint32_t varsum = Frame_allocVariable(fib_frame); | |
uint32_t varn = Frame_allocVariable(fib_frame); | |
uint32_t vara = Frame_allocVariable(fib_frame); | |
uint32_t varb = Frame_allocVariable(fib_frame); |
This file contains 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 <inttypes.h> | |
#include <stdio.h> | |
#define Util_StaticAssert_CONCAT_(a, b) a##b | |
#define Util_StaticAssert_CONCAT(a, b) Util_StaticAssert_CONCAT_(a, b) | |
#define Util_StaticAssert(e, msg) \ | |
enum { Util_StaticAssert_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) } |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
#include <sys/mman.h> | |
typedef uint8_t Register; | |
#define Register_lowBits(r) (r & 0x7) |