Commit c17685b0 by Hampton Catlin

two basic tests that pass

parent 554ae5c6
......@@ -4,10 +4,10 @@ CFLAGS=-I. -Wall -g
BIN=bin/
sassc: sassc.o
$(CC) $(CFLAGS) -o $(BIN)sassc sassc.o libsass.o
$(CC) $(CFLAGS) -o $(BIN)sassc sassc.o libsass.o context.o
sassc.o: libsass.o
libsass.o: bstr
libsass.o: context.o
bstr: bstr/bsafe.o
bstr/bsafe.o:
......
......@@ -50,7 +50,7 @@ sass_context *sass_make_context_from_string(char *src) {
return ctx;
}
void *sass_free_context(sass_context *ctx) {
void sass_free_context(sass_context *ctx) {
free(ctx->src);
free(ctx);
}
......
#include "libsass.h"
char * sass_file_compile(char *filepath, int options) {
sass_context *ctx = sass_make_context_from_file(filepath);
return ctx->src;
}
char * sass_string_compile(char *input, int options) {
return input;
sass_context *ctx = sass_make_context_from_string(input);
return ctx->src;
}
\ No newline at end of file
#include "bstr/bstrlib.h"
#include "context.h"
char * sass_file_compile(char *filepath, int options);
char * sass_string_compile(char *input, int options);
#include "libsass.h"
#include <stdio.h>
int main()
int main(int argc, char **argv)
{
sass_string_compile("I love Sass!\n", 0);
return 0;
char *filename = argv[1];
char *output = sass_file_compile(filename, 0);
printf("%s", output);
return 0;
}
\ No newline at end of file
a {
color: blue;
}
\ No newline at end of file
a {
color: blue;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment