From owner-freebsd-ports Thu Oct 25 0:30: 6 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 95FC337B405 for ; Thu, 25 Oct 2001 00:30:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9P7U1n32237; Thu, 25 Oct 2001 00:30:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8472237B403 for ; Thu, 25 Oct 2001 00:25:49 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9P7PnR31723; Thu, 25 Oct 2001 00:25:49 -0700 (PDT) (envelope-from nobody) Message-Id: <200110250725.f9P7PnR31723@freefall.freebsd.org> Date: Thu, 25 Oct 2001 00:25:49 -0700 (PDT) From: Peter Johnson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/31487: licq-qt-gui plugin does not parse local arguments correctly Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31487 >Category: ports >Synopsis: licq-qt-gui plugin does not parse local arguments correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 25 00:30:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Peter Johnson >Release: 4.4-STABLE >Organization: >Environment: FreeBSD bilogic.org 4.4-STABLE FreeBSD 4.4-STABLE #8: Fri Sep 28 18:39:47 CDT 2001 freebsd@bilogic.org:/usr/obj/usr/src/sys/WORKSTATION i386 >Description: Arguments to be passed to the qt-gui plugin to licq do not get parsed, except for -h (which is parsed separately). Thus it's impossible to set the gui style using -g, for example, using a command line like "licq -p qt-gui -- -g GTK". >How-To-Repeat: Try to use the "local" qt-gui options when starting licq. >Fix: The cause is the getopt() call in CLicqGui::CLicqGui() in licq-1.0.3/plugins/qt-gui-1.0.3/src/licqgui.cpp, line 193. As getopt() is called earlier in licq execution, it needs to be reinitialized to work properly--if not reinitialized, the getopt() call simply returns -1 on the first invocation, so none of the arguments are processed. The fix is to add: optreset=1; optind=1; immediately prior to the getopt() call. These two assignments, as the getopt(3) manpage notes, reset getopt() so it can be used a second time in the same program. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message