synce-mcfs/000075500000000000000000000000001162005265000131205ustar00rootroot00000000000000synce-mcfs/README000064400000000000000000000024431162005265000140030ustar00rootroot00000000000000SynCE-mcvf 0.1.1 by Michael Lashkevich, 10.06.2003 Midnight Commander virtual filesystem for SynCE INTRODUCTION The package "synce-mcvf" makes it possible to open the Windows CE filesystem of your Pocket PC as a Midnight Commander virtual filesystem, once you connected to your Pocket PC using SynCE. After installing this package you can use "cd #synce" or "cd #synceroot" to enter the filesystem of the Windows CE. cd #synce works faster and changes directory to "\My Documents". cd #synceroot starts much slower and enters the root directory ("\") of Windows CE. The last is intended for administrative use only. INSTALLATION Please, install SynCE package to make connection to your Pocket PC. Then follow the instructions: 1. Enter your UNIX system as a root. 2. Unpack the archive: tar zxvf synce-mcfs.tar.gz 2. Change directory cd /mc/extfs where is tipically "/usr/share", "/usr/lib", "/usr/local/share", or "/usr/local/lib". 3. Copy the contents of the archive into this directory, e.g.: cp /root/synce-mcfs/src/* . 4. Add the file "extfs.ini.add" to "extfs.ini" at the end: cat extfs.ini.add >> extfs.ini Installation is completed. BUG REPORTS Please, report all bugs to Michael Lashkevich synce-mcfs/src/000075500000000000000000000000001162005265000137075ustar00rootroot00000000000000synce-mcfs/src/extfs.ini.add000064400000000000000000000001101162005265000162600ustar00rootroot00000000000000 # For SynCE UNIX <-> Windows CE Pocket PC communicator synce synceroot synce-mcfs/src/synce000075500000000000000000000044461162005265000147660ustar00rootroot00000000000000#! /usr/bin/perl -w # # External filesystem for Windows CE, using SynCE, version 0.1.1, # by Michael Lashkevich on 10.06.2003 # # Opens the "\My Documents" directory. # You have to establish SynCE connection before changin directory # to #synce # # These mtools components must be in PATH for this to work $pls = "pls"; $pcp = "pcp"; $prm = "prm"; $pmkdir = "pmkdir"; $prmdir = "prmdir"; SWITCH: for ( $ARGV[0] ) { /list/ && do { @dirs = get_dirs(""); while ($dir = shift(@dirs)) { push @dirs, get_dirs("$dir"); } exit 0; }; /mkdir/ && do { shift; shift; exit 1 if scalar(@ARGV) != 1; system("$pmkdir \"$ARGV[0]\" >/dev/null"); exit 0; }; /rmdir/ && do { shift; shift; exit 1 if scalar(@ARGV) != 1; system("$prmdir \"$ARGV[0]\" >/dev/null"); exit 0; }; /rm/ && do { shift; shift; exit 1 if scalar(@ARGV) != 1; system("$prm \"$ARGV[0]\" >/dev/null"); exit 0; }; /copyout/ && do { shift; shift; exit 1 if scalar(@ARGV) != 2; ( $src, $dest ) = @ARGV; system("$pcp \":My Documents/$src\" $dest >/dev/null"); exit 0; }; /copyin/ && do { shift; shift; exit 1 if scalar(@ARGV) != 2; ( $dest, $src ) = @ARGV; system("$pcp $src \":My Documents/$dest\" >/dev/null"); exit 0; }; /.*/ && do { # an unfamiliar command exit 1; }; } sub get_dirs { my ($path, $name, $pathname, $type0, $type2, $size, $datetime, @lst, @rv); $path = shift(@_); @rv = (); open(FILE,"$pls -a \"/My Documents/$path\" |"); while ( ) { chomp(); /^ / && next; # ignore `non-file' lines /^$/ && next; # ignore empty lines /^\.\.?/ && next; # ignore `.' and `..' $name = substr($_,60); $pathname = $path.$name; $type0 = substr($_,0,1); $type2 = substr($_,2,1); $datetime = substr($_,28,6).substr($_,43,5).substr($_,34,9); $size = substr($_,14,8); if ($type0 =~ 'D' or $type2 =~ 'D') { printf("drwxr-xr-x 1 %-8d %-8d %-8d %s %s\n", 0, 0, 0, $datetime, $pathname); push @rv, $pathname; } else { printf("-rw-r--r-- 1 %-8d %-8d %s %s %s\n", 0, 0, $size, $datetime, $pathname); } } close(FILE); return @rv; } 1; synce-mcfs/src/synceroot000075500000000000000000000045321162005265000156660ustar00rootroot00000000000000#! /usr/bin/perl -w # # External filesystem for Windows CE, using SynCE, version 0.1.1, # by Michael Lashkevich on 10.06.2003 # # In contrast to #synce it opens the root ("\") directory and, therefore, # 'cd #synceroot' works slower than 'cd #synce'. # You have to establish SynCE connection before changin directory # to #synceroot. # # These mtools components must be in PATH for this to work $pls = "pls"; $pcp = "pcp"; $prm = "prm"; $pmkdir = "pmkdir"; $prmdir = "prmdir"; SWITCH: for ( $ARGV[0] ) { /list/ && do { @dirs = get_dirs(""); while ($dir = shift(@dirs)) { push @dirs, get_dirs("$dir"); } exit 0; }; /mkdir/ && do { shift; shift; exit 1 if scalar(@ARGV) != 1; system("$pmkdir \"$ARGV[0]\" >/dev/null"); exit 0; }; /rmdir/ && do { shift; shift; exit 1 if scalar(@ARGV) != 1; system("$prmdir \"$ARGV[0]\" >/dev/null"); exit 0; }; /rm/ && do { shift; shift; exit 1 if scalar(@ARGV) != 1; system("$prm \"$ARGV[0]\" >/dev/null"); exit 0; }; /copyout/ && do { shift; shift; exit 1 if scalar(@ARGV) != 2; ( $src, $dest ) = @ARGV; system("$pcp \":/$src\" $dest >/dev/null"); exit 0; }; /copyin/ && do { shift; shift; exit 1 if scalar(@ARGV) != 2; ( $dest, $src ) = @ARGV; system("$pcp $src \":/$dest\" >/dev/null"); exit 0; }; /.*/ && do { # an unfamiliar command exit 1; }; } sub get_dirs { my ($path, $name, $pathname, $type0, $type2, $size, $datetime, @lst, @rv); $path = shift(@_); @rv = (); open(FILE,"$pls -a \"/$path\" |"); while ( ) { chomp(); /^ / && next; # ignore `non-file' lines /^$/ && next; # ignore empty lines /^\.\.?/ && next; # ignore `.' and `..' $name = substr($_,60); $pathname = $path.$name; $type0 = substr($_,0,1); $type2 = substr($_,2,1); $datetime = substr($_,28,6).substr($_,43,5).substr($_,34,9); $size = substr($_,14,8); if ($type0 =~ 'D' or $type2 =~ 'D') { printf("drwxr-xr-x 1 %-8d %-8d %-8d %s %s\n", 0, 0, 0, $datetime, $pathname); push @rv, $pathname; } else { printf("-rw-r--r-- 1 %-8d %-8d %s %s %s\n", 0, 0, $size, $datetime, $pathname); } } close(FILE); return @rv; } 1;