Cleaned up read tag and call tag to compile.
This commit is contained in:
1 parent
666a12e16b
commit
49edce1f34
4 files changed
+8
-8
No files matched your search
+2
-1
@@ -1,5 +1,6 @@
|
||||
#include "__read.h"
|
||||
#include "Exception.h"
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -10,7 +11,7 @@ namespace jet {
|
||||
throw coreutils::Exception("file keyword must be specified.");
|
||||
if(hasContainer)
|
||||
throw coreutils::Exception("read tag does not have a container.");
|
||||
fd = open(variables["file"], O_RDONLY);
|
||||
fd = open(variables["file"].c_str(), O_RDONLY);
|
||||
while(len = read(fd, &buffer, sizeof(buffer - 1))) {
|
||||
buffer[len] = 0;
|
||||
out << buffer;
|
||||
|
||||
Reference in new issue
Block a user