X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fssic.pl;h=81bb50dfdcdc29868805a5e6374b78d6862894a6;hb=874cafcd1d826d03066055b80c7900cae706f9c8;hp=2f3744e8a4e80310e87c135235a2e0037b559e26;hpb=1d1bd008953e9e9a7fc5dd71698d65b72d24fd37;p=ssic.git diff --git a/src/ssic.pl b/src/ssic.pl index 2f3744e..81bb50d 100755 --- a/src/ssic.pl +++ b/src/ssic.pl @@ -105,14 +105,14 @@ sub warning { my ($fmt, @args) = @_; - printf("ssic: Warning: " . $fmt, @args); + printf(STDERR "ssic: Warning: " . $fmt, @args); } sub error { my ($status, $fmt, @args) = @_; - printf("ssic: Error: " . $fmt, @args); + printf(STDERR "ssic: Error: " . $fmt, @args); exit($status); } @@ -173,10 +173,9 @@ sub compile } if ($output ne "-") { close($output_fh); - } - - if (not rename($output . "~", $output)) { - error(4, "%s: %s\n", $output, $!); + if (not rename($output . "~", $output)) { + error(4, "%s: %s\n", $output, $!); + } } }