view libinterp/config-features.sh @ 18963:a30e1d20fd3c

Freset: properly reset graphics objects (bug #35511) * graphics.in.h (base_graphics_object, graphics_object, root): add new method "get_factory_defaults_list" to retrieve factory defaults as property_list * graphics.in.h (base_graphics_object::reset_default_properties (void)): move definition to graphics.cc * graphics.cc (xreset_default_properties): new function to set a list of prop/val * graphics.cc (base_graphics_object::reset_default_properties): use xreset_default_properties, override with parents' defaults * graphics.cc (root_figure::reset_default_properties, figure::reset_default_properties, uitoolbar::reset_default_properties): same as above but first empty local defaults * graphics.cc (axes_figure::reset_default_properties): same as above but use "propeties.set_defaults" to reset properties to their factory value. * graphics.cc (axes_figure::properties::set_defaults): new "reset" mode, that does the same as "replace" but x/y/zlabels and title are reset instead of being deleting/recreating. * graphics.cc: add %!tests for Freset
author pantxo <pantxo.diribarne@gmail.com>
date Fri, 21 Mar 2014 11:05:28 +0100
parents 2a4f83826024
children
line wrap: on
line source

#! /bin/sh

set -e
AWK=${AWK:-awk}

conffile=$1

cat << EOF
// DO NOT EDIT!  Generated automatically from $conffile by Make."

#include "oct-map.h"
#include "ov.h"

octave_scalar_map
octave_config_features (void)
{
  octave_scalar_map m;

EOF

$AWK \
  '/#define HAVE_/ {
     sub (/HAVE_/, "", $2);
     printf ("  m.assign (\"%s\", octave_value (true));\n", $2);
   }
   /\/\* #undef HAVE_/ {
     sub (/HAVE_/, "", $3);
     printf ("  m.assign (\"%s\", octave_value (false));\n", $3);
   } {
   }' $conffile

cat << EOF

  return m;
}
EOF