From: drdani Date: Tue, 7 Jan 2003 09:01:20 +0000 (+0000) Subject: Fix of cl_cmdline::syntax_match X-Git-Url: https://git.gag.com/?p=fw%2Fsdcc;a=commitdiff_plain;h=0a602d50e5d325591873e6ef4a92b023539b2136 Fix of cl_cmdline::syntax_match git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2142 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/sim/ucsim/.version b/sim/ucsim/.version index d366d321..edb78d6c 100644 --- a/sim/ucsim/.version +++ b/sim/ucsim/.version @@ -1 +1 @@ -0.4.1-pre4 +0.4.1-pre5 diff --git a/sim/ucsim/NEWS b/sim/ucsim/NEWS index 66ca2bfe..d62e965b 100644 --- a/sim/ucsim/NEWS +++ b/sim/ucsim/NEWS @@ -2,8 +2,13 @@ Redirection of output of commands. + 0.4.1-pre4 Redesigned of option handling. Start of libtool introduction. + +0.4.1-pre5 + +Fix of cl_cmdline::syntax_match. diff --git a/sim/ucsim/cmd.src/command.cc b/sim/ucsim/cmd.src/command.cc index 87ce4568..e58a2251 100644 --- a/sim/ucsim/cmd.src/command.cc +++ b/sim/ucsim/cmd.src/command.cc @@ -363,6 +363,7 @@ cl_cmdline::syntax_match(class cl_uc *uc, char *syntax) char *p= syntax; int iparam= 0; class cl_cmd_arg *parm= (class cl_cmd_arg *)(params->at(iparam)); + bool match; while (*p && parm) { @@ -371,19 +372,25 @@ cl_cmdline::syntax_match(class cl_uc *uc, char *syntax) switch (*p) { case SY_ADDR: - if (!uc || !parm->as_address(uc)) - return(DD_FALSE); + match= parm->as_address(uc); + if (!match) + return(match); //printf("ADDRESS match %lx\n",parm->value.address); break; case SY_MEMORY: - if (!uc || !parm->as_memory(uc)) + match= parm->as_memory(uc); + if (!match) return(DD_FALSE); //printf("MEMORY match %s\n",parm->value.memory->class_name); break; case SY_BIT: - if (!uc || !parm->as_bit(uc)) + if (!parm->as_bit(uc)) return(DD_FALSE); break; + } + switch (*p) + { + case SY_ADDR: case SY_MEMORY: case SY_BIT: break; case SY_NUMBER: if (!parm->as_number()) return(DD_FALSE); diff --git a/sim/ucsim/libtool b/sim/ucsim/libtool index 9cf63f6e..e4d98b96 100755 --- a/sim/ucsim/libtool +++ b/sim/ucsim/libtool @@ -1,7 +1,7 @@ #! /bin/sh # libtool - Provide generalized library-building support services. -# Generated automatically by (GNU 0.4.1-pre4) +# Generated automatically by (GNU 0.4.1-pre5) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. @@ -64,7 +64,7 @@ AR="ar" AR_FLAGS="cru" # The default C compiler. -CC="gcc-3.0" +CC="gcc" # Is the compiler the GNU C compiler? with_gcc=yes @@ -113,7 +113,7 @@ libext="a" exeext="" # Additional compiler flags for building library objects. -pic_flag=" -fPIC" +pic_flag=" -fPIC" pic_mode=default # Does compiler simultaneously support -c and -o options? diff --git a/sim/ucsim/sim.src/arg.cc b/sim/ucsim/sim.src/arg.cc index 9e359f73..8777353c 100644 --- a/sim/ucsim/sim.src/arg.cc +++ b/sim/ucsim/sim.src/arg.cc @@ -130,7 +130,8 @@ cl_cmd_arg::~cl_cmd_arg(void) bool cl_cmd_arg::as_address(class cl_uc *uc) { - return(get_address(uc, &(value.address))); + bool b= get_address(uc, &(value.address)); + return(b); } bool