Skip to content

Commit

Permalink
Merge pull request #59 from elliotchance/jorbs
Browse files Browse the repository at this point in the history
Jorbs: stdio/puts.c
  • Loading branch information
elliotchance authored Apr 23, 2017
2 parents 1c7ea51 + e41fdd3 commit 778a44c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions ast/function_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ var builtInFunctionDefinitions = []string{
// stdio.h
"int printf() -> fmt.Printf",
"int scanf() -> fmt.Scanf",
"int puts(const char *) -> fmt.Println",
}

// getFunctionDefinition will return nil if the function does not exist (is not
Expand Down
8 changes: 8 additions & 0 deletions tests/stdio/puts.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This program actually still works without including stdio.h but it should be
// here for consistency.
#include <stdio.h>

int main() {
puts("c2go");
return 0;
}

0 comments on commit 778a44c

Please sign in to comment.