From b6be4717e17ba2000012b8a49a7d3f7117dc41a2 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Mon, 21 Aug 2006 11:58:22 +0000 Subject: Signature for ZnSetLabelFromOm has been extended with a reason parameter. This patch makes this parameter a permanent part of the signature. It'll not be possible to suppress it by the OM_TECH define. In this way the interface is more predictible, the signature is constant. --- generic/Track.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'generic/Track.c') diff --git a/generic/Track.c b/generic/Track.c index 8fb3e0c..911a2c0 100644 --- a/generic/Track.c +++ b/generic/Track.c @@ -1976,16 +1976,13 @@ ZnSendTrackToOm(void *ptr, ********************************************************************************** */ void -ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ - void *item, - int rho, - int theta -#ifdef OM_TECH - , char *reason /* Technical data explaining algorithm processing */ -#endif - ) +ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ + void *item, + int rho, + int theta, + char *reason) /* Technical data explaining algorithm processing */ { - TrackItem track = (TrackItem) item; + TrackItem track = (TrackItem) item; theta %= 360; if (theta < 0) { @@ -2002,10 +1999,12 @@ ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ } #ifdef OM_TECH /* Setup reason regardless of redrawing options. */ - if (!track->omtechstuff) { - track->omtechstuff = ZnMalloc( (OMTECHSTUFFLEN + 1) * sizeof(char)); + if (reason) { + if (!track->omtechstuff) { + track->omtechstuff = ZnMalloc( (OMTECHSTUFFLEN + 1) * sizeof(char)); + } + strncpy(track->omtechstuff, reason, OMTECHSTUFFLEN); } - strncpy(track->omtechstuff, reason, OMTECHSTUFFLEN); #endif } -- cgit v1.1