xmlterm changes only (not part of the default build).

Deleted files (xls, xcat) to be moved to new "scripts" directory.
This commit is contained in:
svn%xmlterm.org 2000-02-29 15:46:02 +00:00
Родитель 12aa4e52d1
Коммит 692b620ae9
3 изменённых файлов: 0 добавлений и 197 удалений

Просмотреть файл

@ -1,31 +0,0 @@
#!/bin/csh
# xcat.csh: a C-shell XMLterm wrapper for the UNIX "cat" command
# Usage: xcat.csh <filename1> <filename2> ...
##set echocmd="/usr/bin/echo"
set echocmd="/bin/echo -e"
foreach file ($*)
set ext=${file:e}
set firstchar = `echo $file|cut -c1`
if ("$firstchar" == "/") then
set url="file:$file"
else
set url="file:$PWD/$file"
endif
switch ($ext)
case "gif":
case "png":
# Is this a security risk??? Perhaps display using IFRAME?
$echocmd "\033{S${LTERM_COOKIE}\007\c"
cat <<EOF
<IMG SRC='$url'>
EOF
$echocmd '\000\c'
breaksw
default:
cat $file
endsw
end

Просмотреть файл

@ -1,85 +0,0 @@
#!/usr/bin/perl
# xls: an XMLterm wrapper for the UNIX "ls" command
# Usage: xls [-c|--cols] [-h|help] [-i||--iconic] [-w|--window]
use Cwd;
use Getopt::Long;
Getopt::Long::config('bundling');
$options = "@ARGV";
&GetOptions("cols|c=i", "help|h!", "iconic|i!", "window|w!");
if ($opt_help) {
print "Usage: xls [-c|--cols] [-i|--iconic] [-w|--window]\n";
exit;
}
# Icon details
#$imgdir="chrome://xmlterm/skin/default/images"
$imgdir = "file:/usr/share/pixmaps/mc";
($img{'directory'}, $img{'executable'}, $img{'plainfile'}) =
('i-directory.png', 'i-executable.png', 'i-regular.png');
$ncols = 5;
$ncols = $opt_cols if ($opt_cols);
$cookie = $ENV{LTERM_COOKIE}; # XMLTerm cookie
print "\e{S$cookie\a"; # HTML stream escape sequence
print "<TABLE FRAME=none BORDER=0>";
print "<COLGROUP COLSPAN=$ncols WIDTH=1*>";
$dir = cwd();
$rowimg = "";
$rowtxt = "";
$nfile = 0;
foreach $file (glob("$dir/*")) { # for each file in current directory
if (-d $file) { # directory
$filetype = "directory";
$sendtxt = "cd $file; xls $options";
$sendimg = "file:/usr/share/pixmaps/mc/i-directory.png";
} elsif (-x $file) { # executable
$filetype = "executable";
$sendtxt = "$file";
} else { # plain file
$filetype = "plainfile";
$sendtxt = "";
}
@comps = split(m./.,$file);
$tail = $comps[$#comps]; # file name
if ($opt_window) {
$sendcmd = "createln";
} else {
$sendcmd = "sendln";
}
$clickcmd = qq%onclick="return clickXMLTerm('$sendcmd',-1,'$sendtxt')"%;
$rowimg .= "<TD><IMG SRC='$imgdir/$img{$filetype}' $clickcmd>";
$rowtxt .= "<TD><SPAN CLASS='$filetype' $clickcmd>";
$rowtxt .= "$tail</SPAN>";
$nfile++;
if (($nfile % $ncols) == 0) { # print complete table row
print "<TR>$rowimg" if ($opt_iconic) ;
print "<TR>$rowtxt";
$rowimg = "";
$rowtxt = "";
}
}
if (length($rowtxt) != 0) {
print "<TR>$rowimg" if ($opt_iconic) ;
print "<TR>$rowtxt";
}
print "</TABLE>";
print "\000"; # Terminate HTML stream

Просмотреть файл

@ -1,81 +0,0 @@
#!/bin/csh
# xls.csh: a C-shell XMLterm wrapper for the UNIX "ls" command
# Usage: xls.csh [-i] [-x]
set files=(`/bin/ls -d $cwd/*`)
set ncols=4
##set echocmd="/usr/bin/echo"
set echocmd="/bin/echo -e"
set iconic=0
set create=0
set options=""
foreach arg ($*)
switch ($arg)
case "-i":
set iconic=1
set options=($options $arg)
breaksw
case "-c":
set create=1
set options=($options $arg)
breaksw
endsw
end
$echocmd "\033{S${LTERM_COOKIE}\007\c"
$echocmd '<TABLE FRAME=none BORDER=0>'
$echocmd "<COLGROUP COLSPAN=$ncols WIDTH=1*>"
set rowimg=""
set rowtxt=""
set nfile=0
foreach file ($files)
if (-d $file) then #directory
set filetype="directory"
set sendtxt="cd $file; xls $options"
set sendimg="file:/usr/share/pixmaps/mc/i-directory.png"
# set sendimg="chrome://xmlterm/skin/default/images/ficon3.gif"
else if (-x $file) then #executable
set filetype="executable"
set sendtxt="$file"
set sendimg="file:/usr/share/pixmaps/mc/i-executable.png"
else #plain file
set filetype="plainfile"
set sendtxt=""
set sendimg="file:/usr/share/pixmaps/mc/i-regular.png"
endif
set tail=${file:t}
if ($create) then
set cmd="createln"
else
set cmd="sendln"
endif
set clickcmd="onclick="'"'"return clickXMLTerm('$cmd',-1,'$sendtxt')"'"'
set rowimg="${rowimg}<TD><IMG SRC='$sendimg' $clickcmd>"
set rowtxt="${rowtxt}<TD><SPAN CLASS='$filetype' $clickcmd>"
set rowtxt="${rowtxt}$tail<SPAN/>"
@ nfile++
if (($nfile % $ncols) == 0) then
if ($iconic) $echocmd "<TR>$rowimg"
$echocmd "<TR>$rowtxt"
set rowimg=""
set rowtxt=""
endif
end
if ("$rowtxt" != "") then
if ($iconic) $echocmd "<TR>$rowimg"
$echocmd "<TR>$rowtxt"
endif
$echocmd '</TABLE>'
$echocmd '\000\c'