From 00b0b5a898d9a705092704cb234ca5a5cdd6570b Mon Sep 17 00:00:00 2001 From: lecoanet Date: Mon, 24 Jan 2005 14:21:48 +0000 Subject: Fixes for the conditional compilation of the atc code. --- Perl/Makefile.PL.in | 16 ++++++++-------- aclocal.m4 | 4 ++-- configure | 4 ++-- debian/changelog | 12 +++++++++++- generic/tkZinc.c | 12 ++++++++++++ 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/Perl/Makefile.PL.in b/Perl/Makefile.PL.in index 2a56071..611dddb 100644 --- a/Perl/Makefile.PL.in +++ b/Perl/Makefile.PL.in @@ -24,15 +24,15 @@ if (!$TkLibDir) print "Configuring version $VERSION for $platform platform...\n"; print "Using $TkLibDir as Tk library...\n"; -my @GENERIC_C = ('Track.c', 'Tabular.c', 'Reticle.c', 'Map.c', 'Rectangle.c', 'Arc.c', 'Curve.c', - 'Item.c', 'PostScript.c', 'MapInfo.c', 'Attrs.c', 'Draw.c', 'Geo.c', 'List.c', +my @GENERIC_C = ('Tabular.c', 'Rectangle.c', 'Arc.c', 'Curve.c', + 'Item.c', 'PostScript.c', 'Attrs.c', 'Draw.c', 'Geo.c', 'List.c', 'perfos.c', 'Transfo.c', 'Group.c', 'Icon.c', 'Text.c', 'Image.c', 'Color.c', 'Field.c', 'Triangles.c', 'Window.c', 'tkZinc.c'); my @LIBTESS_C = ('dict.c', 'geom.c', 'memalloc.c', 'mesh.c', 'normal.c', 'priorityq.c', 'render.c', 'sweep.c', 'tess.c', 'tessmono.c'); -my @OM_C = ('OverlapMan.c'); +my @ATC_C = ('OverlapMan.c', 'Track.c', 'Reticle.c', 'Map.c', 'MapInfo.c'); my @WIN_C = ('WinPort.c'); @@ -79,7 +79,7 @@ sub get_flags { my %DEF_FLAGS = ('GL' => 1, 'SHAPE' => 1, 'GL_DAMAGE' => 1, - 'OM' => 1 + 'ATC' => 1 ); foreach my $arg (@ARGV) { @@ -91,9 +91,9 @@ sub get_flags { $DEF_FLAGS{'GL_DAMAGE'} = 0; } } - elsif ($name =~ /(with-om)/i) { + elsif ($name =~ /(with-atc)/i) { if ($value =~ /no/i) { - $DEF_FLAGS{'OM'} = 0; + $DEF_FLAGS{'ATC'} = 0; } } elsif ($name =~ /(with-shape)/i) { @@ -119,8 +119,8 @@ sub get_flags { print "$flag=", $DEF_FLAGS{$flag} ? 'ok' : 'no', " "; if ($DEF_FLAGS{$flag}) { $defines = $defines . " " . "-D$flag"; - if ($flag eq 'OM') { - push @C, @OM_C + if ($flag eq 'ATC') { + push @C, @ATC_C } } } diff --git a/aclocal.m4 b/aclocal.m4 index 9b0ed73..2cc42b6 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -115,8 +115,8 @@ AC_DEFUN(ZINC_ENABLE_GL, [ AC_MSG_CHECKING([for build with the ATC extensions]) AC_ARG_ENABLE(atc, - [ --enable-atc build with ATC extensions [[no]]], - [tcl_ok=$enableval], [tcl_ok=no]) + [ --enable-atc build with ATC extensions [[yes]]], + [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "no"; then Atc_SOURCES= AC_MSG_RESULT([no]) diff --git a/configure b/configure index 68d8714..549b138 100755 --- a/configure +++ b/configure @@ -34,7 +34,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-gl build with openGL support (yes,no,damage) [[no]]" ac_help="$ac_help - --enable-atc build with ATC extensions [[no]]" + --enable-atc build with ATC extensions [[yes]]" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -4282,7 +4282,7 @@ if test "${enable_atc+set}" = set; then enableval="$enable_atc" tcl_ok=$enableval else - tcl_ok=no + tcl_ok=yes fi if test "$tcl_ok" = "no"; then diff --git a/debian/changelog b/debian/changelog index 3f56f78..a8ae2bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,15 @@ zinc-tk (3.3.01) unstable; urgency=low + * All the ATC specific code in now optional. To remove it add + --enable-atc=no to the configure invocation. In Perl you have + to say perl Makefile.PL with-atc=no. + * Changed the method used to position the label wrt the track + position. Now regarless of its shape and its angular position, + the label is maintained at the requested distance. + * Corrected a nasty memory leak in the Curve geometry management. + It affected only the simple curves, convex with only one contour. + This bug might be the source of some performance problems observed + lately. * Debug.pm (D.Etienne) - built code correctly manages transformations. - the transformation matrix can be displayed. @@ -8,7 +18,7 @@ zinc-tk (3.3.01) unstable; urgency=low coordinates. - added the -expandTagsField option to configure the tags display in the attributes window. - + -- Patrick Lecoanet Mon, 11 Nov 2004 17:10:07 +0200 zinc-tk (3.3.0) unstable; urgency=low diff --git a/generic/tkZinc.c b/generic/tkZinc.c index f184fb6..a5af97d 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -338,6 +338,7 @@ static Tk_ConfigSpec config_specs[] = { "600", Tk_Offset(ZnWInfo, insert_on_time), 0, NULL}, {TK_CONFIG_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", "2", Tk_Offset(ZnWInfo, text_info.insert_width), 0, NULL}, +#ifdef ATC {TK_CONFIG_CUSTOM, "-mapdistancesymbol", "mapDistanceSymbol", "MapDistanceSymbol", "AtcSymbol19", Tk_Offset(ZnWInfo, map_distance_symbol), TK_CONFIG_NULL_OK, &bitmapOption}, @@ -346,6 +347,7 @@ static Tk_ConfigSpec config_specs[] = { Tk_Offset(ZnWInfo, map_text_font), 0, NULL}, {TK_CONFIG_INT, "-overlapmanager", "overlapManager", "OverlapManager", "1", Tk_Offset(ZnWInfo, om_group_id), 0, NULL}, +#endif {TK_CONFIG_INT, "-pickaperture", "pickAperture", "PickAperture", "1", Tk_Offset(ZnWInfo, pick_aperture), 0, NULL}, {TK_CONFIG_CUSTOM, "-relief", "relief", "Relief", @@ -358,18 +360,22 @@ static Tk_ConfigSpec config_specs[] = { "", Tk_Offset(ZnWInfo, region), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_CUSTOM, "-selectbackground", "selectBackground", "Foreground", "#a0a0a0", Tk_Offset(ZnWInfo, text_info.sel_color), 0, &gradientOption}, +#ifdef ATC {TK_CONFIG_DOUBLE, "-speedvectorlength", "speedVectorLength", "SpeedVectorLength", "3", Tk_Offset(ZnWInfo, speed_vector_length), 0, NULL}, +#endif {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", NULL, Tk_Offset(ZnWInfo, take_focus), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_CUSTOM, "-tile", "tile", "Tile", "", Tk_Offset(ZnWInfo, tile), 0, &imageOption}, +#ifdef ATC {TK_CONFIG_INT, "-trackvisiblehistorysize", "trackVisibleHistorySize", "TrackVisibleHistorySize", "6", Tk_Offset(ZnWInfo, track_visible_history_size), 0, NULL}, {TK_CONFIG_INT, "-trackmanagedhistorysize", "trackManagedHistorySize", "TrackManagedHistorySize", "6", Tk_Offset(ZnWInfo, track_managed_history_size), 0, NULL}, {TK_CONFIG_CUSTOM, "-tracksymbol", "trackSymbol", "TrackSymbol", "AtcSymbol15", Tk_Offset(ZnWInfo, track_symbol), TK_CONFIG_NULL_OK, &bitmapOption}, +#endif {TK_CONFIG_PIXELS, "-width", "width", "Width", "10c", Tk_Offset(ZnWInfo, opt_width), 0, NULL}, {TK_CONFIG_CALLBACK, "-xscrollcommand", "xScrollCommand", "ScrollCommand", @@ -6538,6 +6544,7 @@ Configure(Tcl_Interp *interp,/* Used for error reporting. */ } wi->font_tfi = ZnGetTexFont(wi, wi->font); } +#ifdef ATC if (CONFIG_PROBE(MAP_TEXT_FONT_SPEC) || !wi->map_font_tfi) { if (wi->map_font_tfi) { ZnFreeTexFont(wi->map_font_tfi); @@ -6545,6 +6552,7 @@ Configure(Tcl_Interp *interp,/* Used for error reporting. */ wi->map_font_tfi = ZnGetTexFont(wi, wi->map_text_font); } #endif +#endif /* * Maintain the pick aperture within meaningful bounds. @@ -6831,6 +6839,7 @@ Configure(Tcl_Interp *interp,/* Used for error reporting. */ } wi->font_tfi = ZnGetTexFont(wi, wi->font); } +#ifdef ATC if ((mask & CONFIG_MAP_FONT) || !wi->map_font_tfi) { if (wi->map_font_tfi) { ZnFreeTexFont(wi->map_font_tfi); @@ -6838,6 +6847,7 @@ Configure(Tcl_Interp *interp,/* Used for error reporting. */ wi->map_font_tfi = ZnGetTexFont(wi, wi->map_text_font); } #endif +#endif if ((mask & CONFIG_TILE) || init) { char *tile_name; @@ -8124,10 +8134,12 @@ Destroy(char *mem_ptr) /* Info about the widget. */ ZnFreeTexFont(wi->font_tfi); wi->font_tfi = NULL; } +#ifdef ATC if (wi->map_font_tfi) { ZnFreeTexFont(wi->map_font_tfi); wi->map_font_tfi = NULL; } +#endif /* * Remove the widget from the context list and * free the context if no more widgets are active. -- cgit v1.1