Cleaned up demos, various build fixes
[urisagit/Stem.git] / demo / chat_demo
diff --git a/demo/chat_demo b/demo/chat_demo
deleted file mode 100755 (executable)
index 435af50..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/local/bin/perl -s
-
-$line_cnt = 10 ;
-$offset = 175 ;
-$base_off = 0 ;
-$xskip = ( $^O eq 'solaris' ) ? 600 : 500 ;
-
-print "CHAT DEMO\n" ;
-
-use File::Basename qw( basename );
-$ENV{PATH} .= ':' . basename( $0 ) . ':.';
-for my $prog qw( run_stem xterm telnet ) {
-    die "Can't find $prog in PATH\n" if
-        system( "which $prog >/dev/null 2>&1" ) != 0;
-}
-
-my @children ;
-
-$SIG{ 'INT' } = \&cleanup ;
-
-if ( $s ) {
-
-       $ssfe = 'ssfe' ;
-       $prompt = '-prompt Stem:' ;
-       $prompt2 = '-prompt Chat:' ;
-       $echo = 'console_echo=1'
-}
-
-foreach $cmd ( split /\n/, <<EOT ) {
-xterm -T Chat -n Chat -geometry 80x40+XSKIP+0 -e $ssfe $prompt run_stem $echo chat
-xterm -T A -n A -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6666
-xterm -T B -n B -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6667
-xterm -T C -n C -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6668
-xterm -T D -n D -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6669
-EOT
-
-       $cmd =~ s/XSKIP/$xskip/ ;
-
-       $cmd =~ s/LINE/$line_cnt/ ;
-       $cmd =~ s/OFF/$base_off/ and $base_off += $offset ;
-
-print "$cmd\n" ;
-
-       @cmd = split ' ', $cmd ;
-
-       s/:/: / for @cmd ;
-
-       fork_exec( @cmd ) ;
-       sleep 4 unless $cmd =~ /localhost/ ;
-}
-
-1 while wait() != -1;
-
-exit;
-
-
-
-sub cleanup {
-
-       print "clean up\n" ;
-
-       kill 9, @children ;
-
-       wait ;  
-       exit ;
-
-}
-
-sub fork_exec {
-
-       my( @exec ) = @_ ;
-
-       if ( $pid = fork() ) {
-
-               push @children, $pid ;
-               return ;
-       }
-
-       exec @exec ;
-}