From a4f8c7af3baba2179f6de2f198be23860f3803bc Mon Sep 17 00:00:00 2001 From: root Date: Sun, 14 Sep 2014 00:29:23 +0000 Subject: initial commit --- sass.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sass.c (limited to 'sass.c') diff --git a/sass.c b/sass.c new file mode 100644 index 0000000..dde8409 --- /dev/null +++ b/sass.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include + + +int main (int argc, char **argv) { + struct sass_file_context *ctx = sass_new_file_context(); + ctx->input_path = argv[1]; + sass_compile_file(ctx); + if (ctx->error_status) { + if (ctx->error_message) { + fprintf(stderr,"%s\n", ctx->error_message); + } + else { + fprintf(stderr,"An error occured; no error message available\n"); + } + return 1; + } + + else if (ctx->output_string) { + fprintf(stdout, "%s", ctx->output_string); + } + + sass_free_file_context(ctx); + return 0; +} -- cgit v1.2.3