Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 1995 19:31:01 +0200 (MET DST)
From:      Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
To:        freebsd-current@FreeBSD.org (FreeBSD Current Users' list)
Subject:   Strange code in last commit for pkg_ui.c
Message-ID:  <199505261731.TAA05836@keltia.frmug.fr.net>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505261731.TAA05836>