diff options
-rwxr-xr-x | logdrake | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -52,10 +52,7 @@ sub translate { $::isInstall and die "Not supported during install.\n"; -$::isFile = ($::File) = "@ARGV" =~ /--file (.+)/; -if ($::isFile) { - print "isFile mode : $::File\n"; -} +my $in = 'interactive'->vnew('su', 'default'); $::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; if ($::isEmbedded) { @@ -64,17 +61,16 @@ if ($::isEmbedded) { print "mcc pid\t$::CCPID\n"; } -my $in = 'interactive'->vnew('su', 'default'); - -local $_ = join '', @ARGV; +#- parse arguments list. +for (@ARGV) { + /^--version$/ and die 'version: $Id$ '."\n"; + /^--help$/ and die 'logdrake [--version] [--file=myfyle] [--word=myword]'; + /^--file=(.*)$/ and do { $::isFile = ($::File) = $1; next }; + /^--word=(.*)$/ and do { $::isWord = ($::Word) = $1; next }; +} -/-h/ and die sprintf( _("usage: logdrake [--version]\n")); -/-version/ and die 'version: $Id$ '."\n"; $::isTail=1 if ($::isFile); -#/-t/; - $|= 1 if ($::isTail); -print "isTail mode\n" if ($::isTail); my $h=chomp_(`hostname -s`); my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; @@ -241,7 +237,8 @@ sub parse_file { my $ey = $e_yes->get_chars(0, -1); my $en = $e_no->get_chars(0, -1); $ey =~ s/ OR /\|/; - + $ey = $ey .($::Word) if ($::isWord); + if ($cal_mode) { my ($year, $month, $day) = $cal->get_date(); $ey= $months[$month]."\\s{1,2}$day\\s.*$ey\n"; @@ -395,6 +392,9 @@ sub destroy_window { # log # $Log$ +# Revision 1.24 2001/09/03 20:26:25 yduret +# fix +# # Revision 1.23 2001/08/28 15:43:01 yduret # fix window size in embedded mode # |