Fix of cl_cmdline::syntax_match
authordrdani <drdani@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 7 Jan 2003 09:01:20 +0000 (09:01 +0000)
committerdrdani <drdani@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 7 Jan 2003 09:01:20 +0000 (09:01 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2142 4a8a32a2-be11-0410-ad9d-d568d2c75423

sim/ucsim/.version
sim/ucsim/NEWS
sim/ucsim/cmd.src/command.cc
sim/ucsim/libtool
sim/ucsim/sim.src/arg.cc

index d366d3218ac9cdd1727ed04817298d2e9b303852..edb78d6cf0c488cfad7a168f7df0eabbcb60985d 100644 (file)
@@ -1 +1 @@
-0.4.1-pre4
+0.4.1-pre5
index 66ca2bfec3b0fc6ec6014997335ec21981633d21..d62e965b3a6a1859b7f52c2c0e35b53a097f1196 100644 (file)
@@ -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.
index 87ce4568c818ac18f9dd098d6d038e207fb8c0f9..e58a225118a3a6ed9476154613b3ff84cd53b54e 100644 (file)
@@ -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);
index 9cf63f6e4d87069f8e6fae0431ad742a6707e0d5..e4d98b96fd316ae0da84464a2d690224ddd66746 100755 (executable)
@@ -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?
index 9e359f736a881a2bc416dff8ef37640444b03175..8777353cc9c41308ad2dd7b4b081464ccc81cdcc 100644 (file)
@@ -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