diff options
-rw-r--r-- | src/j2.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |