From 7baa382a1f393b1bff53e269adba2ab194e45574 Mon Sep 17 00:00:00 2001 From: damiano Date: Fri, 19 Feb 1999 09:45:03 +0000 Subject: L'argument bus est retiré de IvyInit (ivy.c, ivy.h, ivyprobe.c) La variable DefaultIvyBus est maintenant de la forme ":" (ivy.c) Les fichiers debian/* ont été corrigés pour le paquetage 3.0 (tag V3_0) --- src/Makefile | 7 ------- src/ivy.c | 10 ++++++++-- src/ivyprobe.c | 10 +++++----- 3 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 715c9af..51bb206 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,13 +25,6 @@ GOBJ = ivyloop.o timer.o ivysocket.o givy.o XTOBJ = ivyxtloop.o ivysocket.o ivy.o TARGETS = ivyprobe ivyxtprobe -ifneq (strip $(MAJOR),) -MAJOR=1 -endif -ifneq (strip $(MINOR),) -MINOR=3 -endif - .c.o: $(CC) -fPIC $(CFLAGS) -c $*.c diff --git a/src/ivy.c b/src/ivy.c index f5595f5..db52a86 100644 --- a/src/ivy.c +++ b/src/ivy.c @@ -39,8 +39,14 @@ #define ARG_START "\002" #define ARG_END "\003" - -static char* DefaultIvyBus = "127.255.255.255"; +#define DEFAULT_DOMAIN 127.255.255.255 + +/* stringification et concatenation du domaine et du port en 2 temps : + * Obligatoire puisque la substitution de domain, et de bus n'est pas + * effectuée si on stringifie directement dans la macro GenerateIvyBus */ +#define str(bus) #bus +#define GenerateIvyBus(domain,bus) str(domain)##":"str(bus) +static char* DefaultIvyBus = GenerateIvyBus(DEFAULT_DOMAIN,DEFAULT_BUS); typedef enum { diff --git a/src/ivyprobe.c b/src/ivyprobe.c index f3d1bee..970d5b2 100644 --- a/src/ivyprobe.c +++ b/src/ivyprobe.c @@ -193,17 +193,17 @@ int main(int argc, char *argv[]) int c; int timer_test = 0; char dbuf [1024] = ""; - const char* domains = 0; + const char* bus = 0; while ((c = getopt(argc, argv, "d:b:w:t")) != EOF) switch (c) { case 'b': bport = atoi(optarg) ; break; case 'd': - if (domains) + if (bus) strcat (dbuf, ","); else - domains = dbuf; + bus = dbuf; strcat (dbuf, optarg); break; case 'w': @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) cntx = XtCreateApplicationContext(); IvyXtChannelAppContext (cntx); #endif - IvyInit ("IVYPROBE", bport, "IVYPROBE READY", ApplicationCallback,NULL,NULL,NULL); + IvyInit ("IVYPROBE", "IVYPROBE READY", ApplicationCallback,NULL,NULL,NULL); for (; optind < argc; optind++) IvyBindMsg (Callback, NULL, argv[optind]); @@ -231,7 +231,7 @@ int main(int argc, char *argv[]) IvyChannelSetUp (0, NULL, NULL, HandleStdin); #endif - IvyStart (domains); + IvyStart (bus); if (timer_test) { #ifndef XTMAINLOOP -- cgit v1.1