Permalink
Browse files

Replace display.c with display.zig

  • Loading branch information...
tiehuis committed Jul 19, 2017
1 parent c74cba4 commit 8a8f571d7802dd416b81269830ccd7313b810b51
Showing with 11 additions and 9 deletions.
  1. +4 −3 build.zig
  2. +0 −6 display.c
  3. +7 −0 display.zig
View
@@ -4,13 +4,13 @@ pub fn build(b: &Builder) {
const exe = b.addCExecutable("main");
b.addCIncludePath(".");
exe.addCompileFlags([][]const u8 {
"-std=c99"
"-std=c99",
"-nostdlib",
});
const source_files = [][]const u8 {
"compute_helper.c",
"display.c",
"main.c"
"main.c",
};
for (source_files) |source| {
@@ -19,6 +19,7 @@ pub fn build(b: &Builder) {
const zig_source_files = [][]const u8 {
"compute.zig",
"display.zig",
};
for (zig_source_files) |source| {
View
@@ -1,6 +0,0 @@
#include <stdio.h>
void display_char(char c)
{
printf("%c\n", c);
}
View
@@ -0,0 +1,7 @@
const std = @import("std");
const printf = std.io.stdout.printf;
export fn display_char(c: u8)
{
%%printf("{c}\n", c);
}

0 comments on commit 8a8f571

Please sign in to comment.