summaryrefslogtreecommitdiff
path: root/img/dist/IM/impath.in
diff options
context:
space:
mode:
Diffstat (limited to 'img/dist/IM/impath.in')
-rw-r--r--img/dist/IM/impath.in81
1 files changed, 68 insertions, 13 deletions
diff --git a/img/dist/IM/impath.in b/img/dist/IM/impath.in
index aa4909df..dfe6f308 100644
--- a/img/dist/IM/impath.in
+++ b/img/dist/IM/impath.in
@@ -5,7 +5,7 @@
###
### Author: Internet Message Group <img@mew.org>
### Created: Apr 23, 1997
-### Revised: Apr 14, 2000
+### Revised: Dec 7, 2002
###
BEGIN {
@@ -13,7 +13,7 @@ BEGIN {
@im_src_siteperl@
};
-my $VERSION = "impath version 20000414(IM141)";
+my $VERSION = "impath version 20021207(IM142)";
$Prog = 'impath';
@@ -33,11 +33,10 @@ use vars qw($Prog $EXPLANATION @OptConfig
## Environments
##
-$EXPLANATION = "
-$Prog :: Internet Message Path
-$VERSION
+$EXPLANATION = "$VERSION
+print full pathnames of a mail/news folder
-usage: $Prog [options] [folder]
+Usage: $Prog [OPTIONS] [FOLDER]
";
@OptConfig =(
@@ -111,7 +110,7 @@ exit $EXIT_SUCCESS;
## --path
##
-sub show_path () {
+sub show_path() {
print "MailPath=" . mail_path() . "\n";
print "NewsPath=" . news_path() . "\n";
print "InboxFolder=" . inbox_folder() . "\n";
@@ -130,17 +129,17 @@ sub show_path () {
## --list
##
-sub imfolders ($$) {
- my ($folder, $prefix) = @_;
+sub imfolders($$) {
+ my($folder, $prefix) = @_;
$FOLDER_ROOT = get_impath($folder);
$FOLDER_ROOT =~ s:/$::;
dig_dir($FOLDER_ROOT, $prefix);
}
-sub dig_dir ($$) {
- my ($abs_dir, $p) = @_;
+sub dig_dir($$) {
+ my($abs_dir, $p) = @_;
my @direntries;
- my ($child, $rel_dir);
+ my($child, $rel_dir);
opendir(DIR, $abs_dir);
@direntries = sort(grep(-d "$abs_dir/$_" && $_ ne '.' && $_ ne '..',
@@ -158,7 +157,7 @@ sub dig_dir ($$) {
###
### do things like mhpath.
###
-sub impath ($@) {
+sub impath($@) {
my $folder = shift;
my @msgs = @_;
@@ -171,6 +170,62 @@ sub impath ($@) {
}
}
+__END__
+
+=head1 NAME
+
+impath - print full pathnames of a mail/news folder
+
+=head1 SYNOPSIS
+
+B<impath> [OPTIONS] [FOLDER]
+
+=head1 DESCRIPTION
+
+The I<impath> command expands a mail/news folder to a file path,
+or list up folders.
+
+This command is provided by IM (Internet Message).
+
+=head1 OPTIONS
+
+=over 5
+
+=item I<-s, --src=FOLDER>
+
+Set source folder. Default value is "+inbox".
+"--src=+xxx" is equivalent to "+xxx".
+
+=item I<-l, --list={on,off}>
+
+Show list of folders.
+
+=item I<-p, --path={on,off}>
+
+Show important paths.
+
+=item I<-v, --verbose={on,off}>
+
+Print verbose messages when running.
+
+=item I<--debug=DEBUG_OPTION>
+
+Print debug messages when running.
+
+=item I<-h, --help>
+
+Display help message and exit.
+
+=back
+
+=head1 COPYRIGHT
+
+IM (Internet Message) is copyrighted by IM developing team.
+You can redistribute it and/or modify it under the modified BSD
+license. See the copyright file for more details.
+
+=cut
+
### Copyright (C) 1997, 1998, 1999 IM developing team
### All rights reserved.
###