diff options
author | fcolin | 2007-02-01 12:59:59 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 12:59:59 +0000 |
commit | 67abfec93d33a97a97433e01d9efa78ab430ea45 (patch) | |
tree | d95e9e73ceaafaaa419449207a23a7b68742ff28 /Ivy/IvyApplication.cxx | |
parent | 1da73b3dd4ed8ef47e7b1367ad99c5c1070423ff (diff) | |
download | ivy-cplusplus-67abfec93d33a97a97433e01d9efa78ab430ea45.zip ivy-cplusplus-67abfec93d33a97a97433e01d9efa78ab430ea45.tar.gz ivy-cplusplus-67abfec93d33a97a97433e01d9efa78ab430ea45.tar.bz2 ivy-cplusplus-67abfec93d33a97a97433e01d9efa78ab430ea45.tar.xz |
Utilisateur : Fcolin Date : 14/11/02 Heure : 15:45 Archivé dans $/Bus/Ivy Commentaire: (vss 16)
Diffstat (limited to 'Ivy/IvyApplication.cxx')
-rw-r--r-- | Ivy/IvyApplication.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Ivy/IvyApplication.cxx b/Ivy/IvyApplication.cxx index c4d4ed0..96023c7 100644 --- a/Ivy/IvyApplication.cxx +++ b/Ivy/IvyApplication.cxx @@ -11,6 +11,16 @@ #define ARG_START "\002"
#define ARG_END "\003"
+static char * firstArg( char *s, const char *separator )
+{
+ char *ptr = s;
+
+ while ( *ptr && *ptr != *separator )
+ ptr++;
+ if ( *ptr == *separator )
+ return ptr++ ;
+ else return NULL;
+}
/*
function like strok but do not eat consecutive separator
*/
@@ -97,7 +107,7 @@ void IvyApplication::OnReceive(char * line) #endif //IVY_DEBUG
err = sscanf( line ,"%d %d", &kind_of_msg, &id);
- arg = strstr( line , ARG_START );
+ arg = firstArg( line , ARG_START );
if ( (err != 2) || (arg == NULL) )
{
TRACE("Quitting bad format %s\n", line);
|