[Pdbg] [RFC][PATCH] WIP: Refactor commands and command argument parsing

Balbir Singh bsingharora at gmail.com
Wed May 30 18:57:40 AEST 2018


On Wed, May 30, 2018 at 2:26 PM, Alistair Popple <alistair at popple.id.au> wrote:
> ---
>  Makefile.am  |   2 +-
>  src/cfam.c   |  52 ++++++----------------
>  src/main.c   |  49 ++++++---------------
>  src/opt.c    | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  src/opt.h    |  96 +++++++++++++++++++++++++++++++++++++++++
>  src/reg.c    | 137 +++++++++++++++++++---------------------------------------
>  src/ring.c   |  32 +++-----------
>  src/scom.c   |  51 +++++-----------------
>  src/thread.c |  35 ++++++---------
>  9 files changed, 334 insertions(+), 259 deletions(-)
>  create mode 100644 src/opt.c
>  create mode 100644 src/opt.h

Without a changelog it's really hard to review the
intention/improvement. Having said that print_cmds_usage() is ugliest
function I've seen written in all of pdbg (please find a better way to
do this). There's a bit of type dependency in parsing, but I guess
it's the lack of proper type inference semantics.

Balbir Singh.


More information about the Pdbg mailing list