Skip to content

Instantly share code, notes, and snippets.

/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
#!/usr/bin/tcc -run
/*
* ^^ If you don't know tcc, you should.
*
* This program is a wrapper around make(1), it parses recursive make
* output and try to generate valid pathnames for errors generated by
* the compiler for relative pathnames.
* It keep tracks (well it tries to) of parallel make jobs and try to
* look in the directory for all the running jobs for a matching
* pathnames, then doctor the error message with the 'real' pathname.
@buserror
buserror / Compiler Abuse
Created December 31, 2019 23:44
On a G4, the pipelining was crucial. And on a 8 channel 24 bits (well 32) audio path, it was even more so.
/*
* Clip_48_8.cpp
* EZ8AudioDriver
*
* Created by Michel on Sun Oct 06 2002.
* Copyright (c) 2002 __MyCompanyName__. All rights reserved.
*
*/
#include <libkern/OSTypes.h>
@buserror
buserror / clocks.c
Last active May 17, 2018 11:28
proposal for the clock table
struct rzn1_bitsel {
uint16_t sel;
uint16_t gate[2][5];
};
struct rzn1_gate {
uint16_t gate, reset, ready, midle,
scon, mirack, mistat;
};
/*
* make tea CFLAGS="-std=gnu99"
*
* ./tea "hello there how r You" -d "FOF5;?9#LDQ2'MAI\LT286+]\$63@Q;JG"
*
* XXTEA Encoder/decoder test program
* (C) Michel Pollet <[email protected]>
*/
#include <stdint.h>
#include <stdio.h>
@buserror
buserror / jit_code.c
Created March 1, 2017 08:11
For Sprity
static const void * jt[342] = {
[0x0000]= &&f0000,
[0x0001]= &&f0002,
[0x0002]= &&f0004,
[0x0003]= &&f0006,
[0x0004]= &&f0008,
[0x0005]= &&f000a,
[0x0006]= &&f000c,
[0x0007]= &&f000e,
[0x0008]= &&f0010,
@buserror
buserror / clock.c
Created February 2, 2017 16:27
protothreads, aka duff's device in use...
/*
*
* Ascii art http://www.network-science.de/ascii/ (font "mini")
*
* -Wall -g -Os -std=gnu99 -mcall-prologues -DF_CPU=8000000
* 8366 118 1373 9857 2681 atmega644_sure_led_clock.axf
*
* -mcall-prologues -fno-inline-small-functions \
* -ffunction-sections -fdata-sections \
* -Wl,--relax,--gc-sections \
@buserror
buserror / boxmaker.js
Created November 11, 2015 06:28
millcrum.com small test to generate boxes
// examples/all_objects.millcrum - sample showing every basic object and operation
// create the tool options
// units: mm or inch
// diameter: tool diameter in mm or inch
// passDepth: depth to cut per pass in mm or inch, if a cut operation has a deeper depth then multiple passes will occur
// step: how far the bit should step for pocket operations, between 0 and 1 (full step)
// rapid: how fast the tool should move when it is not cutting
// plunge: how fast the tool should move down on the Z axis when cutting
// cut: how fast the tool should move on the X and Y axes when cutting
// zClearance: how high above the surface the tool should be when not cutting
@buserror
buserror / gist:7336713
Created November 6, 2013 14:16
quick compilation patch
From 3e76304ff29e91507aa275dfcdff77cab7109ae3 Mon Sep 17 00:00:00 2001
From: michel <[email protected]>
Date: Wed, 6 Nov 2013 14:21:03 +0000
Subject: [PATCH] freetype-gl: fix on modern mesa
GL_TYPE is already taken, apparently
---
shared/libfreetype-gl/vertex-attribute.c | 20 ++++++++++----------
shared/libfreetype-gl/vertex-attribute.h | 26 +++++++++++++-------------
2 files changed, 23 insertions(+), 23 deletions(-)
@buserror
buserror / gist:3129219
Created July 17, 2012 12:47
cortex-m4/stm32f4 longjmp/setjmp implementation with FPU store/restore
/*
* tested with gcc on an stm32f4
* Michel Pollet <[email protected]>
*/
#if defined(__VFP_FP__)
typedef long __jmp_buf[10 + 8 + 1]; // d8-d15 fpu + fpscr
#else
typedef long __jmp_buf[10];
#endif