summaryrefslogtreecommitdiff
path: root/src/j2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/j2.c')
-rw-r--r--src/j2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/j2.c b/src/j2.c
index 0ed7db8..4803abb 100644
--- a/src/j2.c
+++ b/src/j2.c
@@ -78,7 +78,7 @@ int j2_cat(char* path) {
varstart = j2_strstr(line);
if(!varstart) {
- printf("%s", line);
+ fputs(line, stdout);
continue;
}
varend = j2_readvar(varstart, buf, J2_MAXBUF);
@@ -87,13 +87,13 @@ int j2_cat(char* path) {
// (this overwrites the first { that opens the variable def)
*varstart = '\0';
// Because of the inserted null byte, this will print from byte 0 to there
- printf("%s", line);
+ fputs(line, stdout);
// Execute the variable directive and print the output
if(strncmp(buf, "shell ", 6) == 0) {
// Execute the provided shell command and print that
value = runsh(&buf[6]);
- printf("%s", value);
+ fputs(value, stdout);
free(value);
} else {
// Print the referenced environment variable

Generated by cgit