aboutsummaryrefslogtreecommitdiff
path: root/generic/Track.c
diff options
context:
space:
mode:
authorlecoanet2006-08-21 11:58:22 +0000
committerlecoanet2006-08-21 11:58:22 +0000
commitb6be4717e17ba2000012b8a49a7d3f7117dc41a2 (patch)
treec3a836acdfea7bf68da521e9ad11c2db5a4a64dc /generic/Track.c
parent713f652a337df3ebfe4714bb14f09f7d6441090c (diff)
downloadtkzinc-b6be4717e17ba2000012b8a49a7d3f7117dc41a2.zip
tkzinc-b6be4717e17ba2000012b8a49a7d3f7117dc41a2.tar.gz
tkzinc-b6be4717e17ba2000012b8a49a7d3f7117dc41a2.tar.bz2
tkzinc-b6be4717e17ba2000012b8a49a7d3f7117dc41a2.tar.xz
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.
Diffstat (limited to 'generic/Track.c')
-rw-r--r--generic/Track.c23
1 files changed, 11 insertions, 12 deletions
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
}