Home

Awesome

cbrainfuck

Build Status Issues Licence

cbrainfuck is a brainfuck interpreter written in C

Detail: This is the project I chose to do just as a way to learn how to use git and github, so all I want to test about project management tools and git/github I will do here

Example

#include <stdio.h>
#include <stdlib.h>

#include "include/cbrainfuck.h"

// argv[1] should be the cbrainfuck code file
// argv[2] should be the input file
int main(int argc, char **argv) {
    char *s;
    s = interpreter(argv[1], (argc > 2 ? argv[2] : "/dev/stdin"));

    if (_ERRORS_) {
        fprintf(stderr, "%s\n", _MESSAGE_);
        return 1;
    } else {
        printf ("%s", s);
        free(s);
    }

    return 0;
}

Some sources

Licence

Copyright (c) 2015 Vitor Rodrigues (tkovs)

Released under the MIT licence