diff options
author | fcolin | 2005-08-10 09:52:18 +0000 |
---|---|---|
committer | fcolin | 2005-08-10 09:52:18 +0000 |
commit | c271c5a2383450c2a39e126ebef38d8dd2e2f8e6 (patch) | |
tree | 46eaf3e4a9fc79a47bfd9e8942cef981908f304f /src/ivyprobe.c | |
parent | b0954d7461dc709cd1a43097c260c8e8b0183cee (diff) | |
download | ivy-c-c271c5a2383450c2a39e126ebef38d8dd2e2f8e6.zip ivy-c-c271c5a2383450c2a39e126ebef38d8dd2e2f8e6.tar.gz ivy-c-c271c5a2383450c2a39e126ebef38d8dd2e2f8e6.tar.bz2 ivy-c-c271c5a2383450c2a39e126ebef38d8dd2e2f8e6.tar.xz |
remplacement argc argv par IvyArgument
Diffstat (limited to 'src/ivyprobe.c')
-rw-r--r-- | src/ivyprobe.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/ivyprobe.c b/src/ivyprobe.c index 076b97b..c163577 100644 --- a/src/ivyprobe.c +++ b/src/ivyprobe.c @@ -85,12 +85,19 @@ void BindCallback(IvyClientPtr app, void *user_data, IvyBindEvent event, char * IvyGetApplicationName(app),regexp,sevent); } -void Callback (IvyClientPtr app, void *user_data, int argc, char *argv[]) +void Callback (IvyClientPtr app, void *user_data, IvyArgument args) { - int i; - printf ("%s sent %d args:",IvyGetApplicationName(app),argc); - for (i = 0; i < argc; i++) - printf(" '%s'",argv[i]); + IvyArgument arg; + int len; + const void* value; + printf ("%s sent:",IvyGetApplicationName(app)); + arg = IvyArgumentGetChildrens ( args ) ; + while( arg ) + { + IvyArgumentGetValue( arg, &len, &value ); + printf(" '%.*s'",len, (char*)value ); + arg = IvyArgumentGetNextChild( arg ); + } printf("\n"); } @@ -118,7 +125,7 @@ void HandleStdin (Channel channel, IVY_HANDLE fd, void *data) if (!line) { #ifdef WIN32 #else - IvyChannelClose (channel); + IvyChannelRemove (channel); #endif IvyStop(); return; @@ -276,7 +283,7 @@ void ApplicationCallback (IvyClientPtr app, void *user_data, IvyApplicationEvent /* printf("Application(%s): End Messages\n",appname);*/ if (app_count == wait_count) - IvyChannelOpen (0, NULL, NULL, HandleStdin); + IvyChannelAdd (0, NULL, NULL, HandleStdin); break; case IvyApplicationDisconnected: @@ -371,7 +378,7 @@ int main(int argc, char *argv[]) /* use Thread to Read StdIn */ CraeteStdinThread(); #else - IvyChannelOpen (0, NULL, NULL, HandleStdin); + IvyChannelAdd (0, NULL, NULL, HandleStdin); #endif |