-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experimental relations operators support
- Loading branch information
Showing
10 changed files
with
233 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <string.h> | ||
#include "io.h" | ||
|
||
#define MAX_FILE_SIZE 65535 | ||
char* read_file( FILE* file ) { | ||
char* str ; | ||
size_t read_size; | ||
str = (char*) malloc( MAX_FILE_SIZE + 1 ); | ||
read_size = fread( str, 1, MAX_FILE_SIZE, file ); | ||
str[ read_size ] = 0; | ||
return str; | ||
|
||
/*size_t buf_size = 64; | ||
size_t read_size = 0; | ||
char *str; | ||
str = (char*) malloc( buf_size ); | ||
read_size += fread( str, 1, buf_size, file ); | ||
while( !feof( file )) { | ||
buf_size *=2; | ||
str = (char*) realloc(str, buf_size ); | ||
read_size += fread( str + buf_size /2 - 1 , 1, buf_size /2 + 1, file ); | ||
} | ||
str[ read_size ] = 0; | ||
return str;*/ | ||
} | ||
|
||
void write_bytecode( bytecode_t* bytecode ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef FILE_IO | ||
#define FILE_IO | ||
|
||
#include <stdio.h> | ||
#include "bytecode.h" | ||
|
||
char* read_file( FILE* file ); | ||
void write_bytecode( bytecode_t* bytecode ); | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters