diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-02 19:08:53 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-02 19:08:53 +0200 |
commit | 00f3bc3b9d4e74d089a76d1a31f74f3a4207b541 (patch) | |
tree | 09e8b20b480866a058571083643e29d53607510a /src/lib/eiotas_particle.c | |
parent | 722cc78e6f2105108225212a0960f1b928fa71f2 (diff) | |
download | edoors-00f3bc3b9d4e74d089a76d1a31f74f3a4207b541.zip edoors-00f3bc3b9d4e74d089a76d1a31f74f3a4207b541.tar.gz |
add eiotas_particle_destination_set and tests
Diffstat (limited to 'src/lib/eiotas_particle.c')
-rw-r--r-- | src/lib/eiotas_particle.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c index f29eeda..5f67ad7 100644 --- a/src/lib/eiotas_particle.c +++ b/src/lib/eiotas_particle.c @@ -185,6 +185,18 @@ EAPI void eiotas_particle_split_dst(Eiotas_Particle *particle) } } +EAPI void eiotas_particle_destination_set(Eiotas_Particle *particle, const char *destination) +{ + char *dst, *sep; + + dst = (char*)destination; + for(; *dst==' '; dst++) /* eat leading spaces */; + sep = dst; + for(; (*sep && *sep!=' '); sep++) /* search destination end */; + add_destination(particle,dst,(sep-dst)); + particle->cur_dst = eina_array_count_get(particle->dsts)-1; +} + EAPI void eiotas_particle_destinations_add(Eiotas_Particle *particle, const char* destinations) { char *dst, *sep; |