From owner-cvs-all@FreeBSD.ORG Thu May 25 07:23:15 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6908016A421; Thu, 25 May 2006 07:23:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59D5043D55; Thu, 25 May 2006 07:23:14 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k4P7NB8G034695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 May 2006 11:23:12 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k4P7NBBt034694; Thu, 25 May 2006 11:23:11 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 25 May 2006 11:23:11 +0400 From: Gleb Smirnoff To: Ganbold Message-ID: <20060525072311.GG27819@FreeBSD.org> References: <200605241446.k4OEkvo0011251@repoman.freebsd.org> <44751F01.4030702@micom.mng.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <44751F01.4030702@micom.mng.net> User-Agent: Mutt/1.5.6i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/ngctl config.c connect.c debug.c dot.c list.c main.c mkpeer.c msg.c name.c ngctl.h rmhook.c show.c shutdown.c status.c types.c write.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2006 07:23:15 -0000 On Thu, May 25, 2006 at 12:05:37PM +0900, Ganbold wrote: G> Gleb, G> G> I modified my previous patch accordingly. Hopefully it follows style(9) G> more; removed typedef, changed function names to follow original G> function naming styles in code, space after return statements according G> to style(9). I am working on your patch now. I'm doing some minor changes to match style of surrounding code, and also moving to queue(3) instead of home-made linked list. G> - return(CMDRTN_USAGE); G> + return (CMDRTN_USAGE); Let's commit these style changes later. G> diff -u /usr/src/usr.sbin/ngctl/main.c /usr/home/tsgan/ngctl/main.c G> --- /usr/src/usr.sbin/ngctl/main.c Wed May 24 23:46:55 2006 G> +++ /usr/home/tsgan/ngctl/main.c Thu May 25 11:47:59 2006 G> @@ -50,6 +50,7 @@ G> #include G> #include G> #include G> +#include G> #include G> G> #include G> @@ -61,6 +62,13 @@ G> #define WHITESPACE " \t\r\n\v\f" G> #define DUMP_BYTES_PER_LINE 16 G> G> +/* Previously issued commands list */ G> +struct cmdlist { G> + char *cmd; /* command */ G> + struct cmdlist *prev; /* previous command */ G> + struct cmdlist *next; /* next command */ G> +}; G> + Yes, yes. This is what I'm tending to do. Do not touch ngctl.h, since this type is private to main.c I lowercased CMDLIST, too. :) G> +static int ScanCmd(char *cmd, struct cmdlist **curr); I uppercased "s" and "c" in this function too. Damn, haven't you rooted my notebook? :) Please wait for me to send you a patch converted to queue(3) macro, and then continue discussion. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE