From: Joey Schulze Date: Mon, 4 Feb 2008 08:43:56 +0000 (+0000) Subject: Must not initialise the terminal if it's not needed, otherwise the X-Git-Url: https://git.infodrom.org/?p=infodrom.org%2Fservice.infodrom.org;a=commitdiff_plain;h=c7a75d13faaec13f87c75f7ff364146546c7dc5d Must not initialise the terminal if it's not needed, otherwise the program cannot start without /dev/tty --- diff --git a/src/InfoCon/buch/infocon b/src/InfoCon/buch/infocon index 95326b6..8534e2b 100755 --- a/src/InfoCon/buch/infocon +++ b/src/InfoCon/buch/infocon @@ -1,7 +1,7 @@ #! /usr/bin/perl # infocon - Admin-Tool for InfoCon -# Copyright (c) 1998-2003,2005-7 Martin Schulze +# Copyright (c) 1998-2003,2005-8 Martin Schulze # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ if (!$dbh) { } @categories = (); +$term = undef; sub sdate { @@ -266,6 +267,8 @@ sub buchung_input @categories = get_categories unless @categories; my @descriptions = get_descriptions; + $term = new Term::ReadLine '' unless $term; + $term->addhistory($_) foreach (@categories); $term->addhistory($_) foreach (@descriptions); @@ -358,7 +361,6 @@ sub usage exit 0; } -$term = new Term::ReadLine ''; $i = 0; $opt_all = 0; $opt_verbose = 0;