Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5154 in orxonox.OLD for trunk


Ignore:
Timestamp:
Aug 27, 2005, 2:00:47 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better comparison

Location:
trunk/src/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/shell.cc

    r5152 r5154  
    8383  ShellCommand<Shell>::registerCommand("testB", CL_SHELL, &Shell::testB);
    8484  ShellCommand<Shell>::registerCommand("testF", CL_SHELL, &Shell::testF);
     85  ShellCommand<Shell>::registerCommand("testSF", CL_SHELL, &Shell::testSF);
    8586}
    8687
     
    109110  PRINTF(3)("This is the Test for one Float '%f'\n", f);
    110111}
     112
     113void Shell::testSF (const char* s, float f)
     114{
     115  PRINTF(3)("This is the Test for one String '%s' and one Float '%f'\n",s , f);
     116}
     117
    111118
    112119
  • trunk/src/util/shell.h

    r5152 r5154  
    4343    void testB (bool b);
    4444    void testF (float f);
     45    void testSF (const char* s, float f);
    4546
    4647    void activate();
  • trunk/src/util/shell_command.cc

    r5148 r5154  
    152152        while(*commandBegin == ' ')
    153153          commandBegin++;
    154         if (strncmp (commandBegin, elem->getName(), strlen(elem->getName())))
     154        if (strncmp (commandBegin, elem->getName(), strlen(elem->getName())) ||
     155            *(commandBegin + strlen(elem->getName())) != ' ' &&
     156            *(commandBegin + strlen(elem->getName())) != '\0')
    155157        {
    156158          elem = iterator->nextElement();
Note: See TracChangeset for help on using the changeset viewer.