# HG changeset patch # User HackBot # Date 1468141122 0 # Node ID 345fd6459206327b59209a67542dbeb5d2ad20bb # Parent 2eddfbfc5c40a7b555c91331010703a4cecb493f ` ( cd share; bash ./configure ) diff -r 2eddfbfc5c40 -r 345fd6459206 share/candide --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/candide Sun Jul 10 08:58:42 2016 +0000 @@ -0,0 +1,32 @@ +#!/bin/bash +# compile c from stdin +# candide, kinda + +readinput () { + while read -r -e || { printf %s "$REPLY"; false; } ; do + printf '%s\n' "$REPLY" + done +} + +c=$(readinput) +if ! [[ $c ]] || ! out=$(mktemp); then + echo Error >&2 + exit 1 +fi + +# if you don't write 'main' it assumes that you're writing a full program (with free includes) +# this allows you to use other functions and stuff +# it will get false positives, but who cares? +if [[ $c != *main* ]]; then c=$(cat <