about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-07-27 15:40:52 -0500
committerCase Duckworth2022-07-27 15:40:52 -0500
commit3a97dd1cfcebeb6e8cc2f6b2966fe5af415da265 (patch)
tree817348d02cb2eb1d2ee1fb85a14e8a48eefd2844
parentInitial commit (diff)
downloadshin-3a97dd1cfcebeb6e8cc2f6b2966fe5af415da265.tar.gz
shin-3a97dd1cfcebeb6e8cc2f6b2966fe5af415da265.zip
Detect getline() errors
-rwxr-xr-xshin2
1 files changed, 1 insertions, 1 deletions
diff --git a/shin b/shin index b966091..9ba488b 100755 --- a/shin +++ b/shin
@@ -12,7 +12,7 @@ FNR == 1 { outfile = FILENAME; sub(/in$/, "", outfile) }
12{ print($0) > outfile } 12{ print($0) > outfile }
13/^#</ { 13/^#</ {
14 inclfile = shin_resolve(substr($0, 3)) 14 inclfile = shin_resolve(substr($0, 3))
15 while (getline l < inclfile) print(l) > outfile 15 while ((getline l < inclfile) > 0) print(l) > outfile
16 close(inclfile) 16 close(inclfile)
17 sub(/</, ">", $0) 17 sub(/</, ">", $0)
18 print > outfile 18 print > outfile