summaryrefslogtreecommitdiffstats
path: root/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
diff options
context:
space:
mode:
authorrunge <runge>2007-12-16 18:32:19 +0000
committerrunge <runge>2007-12-16 18:32:19 +0000
commit899c920eb4708e525c6555e2a6f043c3f999bbcb (patch)
treea9f7f19ba7e01ac0b16fd0c726b1eca7d08320bf /x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
parent3d0bd73627f7aa19d45488eeee49781ca9faa0f8 (diff)
downloadlibtdevnc-899c920eb4708e525c6555e2a6f043c3f999bbcb.tar.gz
libtdevnc-899c920eb4708e525c6555e2a6f043c3f999bbcb.zip
Fixes for MacOSX 10.5. Improve usage of x11 viewer on macosx.
Diffstat (limited to 'x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer')
-rwxr-xr-xx11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer14
1 files changed, 13 insertions, 1 deletions
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
index 7bf11a7..5dd525c 100755
--- a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
@@ -907,8 +907,20 @@ sub xfer {
close($out);
}
'
- echo "$cod" > $tf
+ # xpg_echo will expand \n \r, etc.
+ # try to unset and then test for it.
+ shopt -u xpg_echo >/dev/null 2>&1
+ v='print STDOUT "abc\n";'
+ echo "$v" > $tf
chmod 700 $tf
+
+ lc=`wc -l $tf | awk '{print $1}'`
+ if [ "X$lc" = "X1" ]; then
+ echo "$cod" > $tf
+ else
+ printf "%s" "$cod" > $tf
+ echo "" >> $tf
+ fi
# prime perl
perl -e 'use IO::Socket::INET; select(undef, undef, undef, 0.01)' >/dev/null 2>&1
}