From owner-freebsd-current Fri May 26 10:32:34 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA01020 for current-outgoing; Fri, 26 May 1995 10:32:34 -0700 Received: from ibp.ibp.fr (ibp.ibp.fr [132.227.60.30]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA01007 for ; Fri, 26 May 1995 10:32:25 -0700 Received: from blaise.ibp.fr (blaise.ibp.fr [132.227.60.1]) by ibp.ibp.fr (8.6.12/jtpda-5.0) with ESMTP id TAA06488 for ; Fri, 26 May 1995 19:31:56 +0200 Received: from (uucp@localhost) by blaise.ibp.fr (8.6.12/jtpda-5.0) with UUCP id TAA27435 for freebsd-current@FreeBSD.ORG; Fri, 26 May 1995 19:31:56 +0200 Received: (from roberto@localhost) by keltia.frmug.fr.net (8.6.11/keltia-uucp-1.21) id TAA05836 for freebsd-current@FreeBSD.ORG; Fri, 26 May 1995 19:31:02 +0200 From: Ollivier Robert Message-Id: <199505261731.TAA05836@keltia.frmug.fr.net> Subject: Strange code in last commit for pkg_ui.c To: freebsd-current@FreeBSD.org (FreeBSD Current Users' list) Date: Fri, 26 May 1995 19:31:01 +0200 (MET DST) Reply-To: roberto@keltia.freenix.fr (Ollivier Robert) X-Operating-System: FreeBSD 2.0-BUILT-19950526 ctm#715 X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1395 Sender: current-owner@FreeBSD.org Precedence: bulk The last commit in pkg_manage/pkg_ui.c broke it. 213 [19:24] root@keltia:usr.sbin/pkg_manage# make cc -O -m486 -pipe -Wall -Wstrict-prototypes -DHELP_PATH=\"/usr/share/misc/pkg_manage/\" -I/usr/src/usr.sbin/pkg_manage/../../gnu/lib/libdialog -I/usr/src/usr.sbin/pkg_manage/../../lib/libncurses -c /usr/src/usr.sbin/pkg_manage/pkg_ui.c /usr/src/usr.sbin/pkg_manage/pkg_ui.c: In function `install_batch': /usr/src/usr.sbin/pkg_manage/pkg_ui.c:221: parse error before `else' *** Error code 1 Stop. The related piece of code seems strange : 1. it lacks a '}' just before the marked "else", 2. the code in the "if" section and the code in the "else" section are the same !? StartDir is not used anymore... while (!quit) { if (StartDir) { use_helpline("Select directory where the pkg's reside"); if (dialog_dselect(".", "*.tgz")) { quit = TRUE; } else { install_pkgs_indir(); } >>> else { <<< use_helpline("Select directory where the pkg's reside"); if (dialog_dselect(".", "*.tgz")) { quit = TRUE; } else { install_pkgs_indir(); } } } -- Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.frmug.fr.net FreeBSD keltia 2.0-BUILT-19950526 #13: Fri May 26 00:52:59 MET DST 1995