From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8114 invoked by alias); 31 Jul 2007 18:42:41 -0000 Received: (qmail 8102 invoked by uid 22791); 31 Jul 2007 18:42:39 -0000 X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS,TW_FH X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 31 Jul 2007 18:42:33 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l6VIgU6c013235 for ; Tue, 31 Jul 2007 14:42:30 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6VIgUaD024613 for ; Tue, 31 Jul 2007 14:42:30 -0400 Received: from tow.toronto.redhat.com (tow.toronto.redhat.com [172.16.14.160]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l6VIgTUZ012096 for ; Tue, 31 Jul 2007 14:42:30 -0400 Message-ID: <46AF8295.30105@redhat.com> Date: Tue, 31 Jul 2007 18:42:00 -0000 From: Nurdin Premji User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: frysk@sourceware.org Subject: fhpd: HpdCommandParser added. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00246.txt.bz2 I've added an fhpd command option parser that is heavily based on the getopt option parser, (but the help option will not exit the fhpd) The only assumption made by this parser is that options are located at the end of the command. There is also the ability to add a '--' and anything preceding that is considered to be part of the command arguments. So: command --variable will assume 'variable' is an option, whereas command --variable -- will assume '--variable' is a command argument. Currently the disassemble command is the only one to use this parser, but it should be easy to switch other commands over, CLIHandler has a parser added into it.