Changeset 20723


Ignore:
Timestamp:
2009-09-28T13:12:33+13:00 (13 years ago)
Author:
kjdon
Message:

changed print_txt_usage to output the description if its defined in options. no longer needs an extra parameter to be set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/printusage.pm

    r14965 r20723  
    170170    my $options = shift(@_);
    171171    my $params = shift(@_);
    172     my $programdesc = shift(@_);
    173172
    174173    # this causes us to automatically send output to a pager, if one is
     
    193192    my $programname = $options->{'name'};
    194193    my $programargs = $options->{'args'};
     194    my $programdesc = $options->{'desc'};
    195195
    196196    # Find the length of the longest option string
     
    201201
    202202    # Produce the usage information using the data structure above
    203     if ($programdesc) {
     203    if (defined($programdesc)) {
    204204    &gsprintf(STDERR, $programname . ": $options->{'desc'}\n\n");
    205205    }
Note: See TracChangeset for help on using the changeset viewer.