Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
CODE structure changes --- an overview 
--------------------------------------

.... important info if you want to work on gnuplot or merge in patches.
.... made against gnuplot versions before 3.8e

As of November 1st, 2000, a large set of reorganizational changes to
the gnuplot source code, formerly known as 'the axis branch', were
folded into the main source tree. This was tagged as beta version 3.8e
of the program. Due to the massive amount of changes, this will likely
break most patches built against any previous version of gnuplot. To
help others in resolving the conflicts that arise, I've set up this
description.

The change that is most likely to break your patches is that many
variables formerly in setshow.h were renamed and grouped into an array
of structures.  All status that is set/saved for each individual axis
got moved. A little overview:

  autoscale_*		--> axis_array[].autoscale
  *format		--> [].formatstring
  format_is_numeric[*]  --> [].format_is_numeric
  is_log_*		--> [].log
  base_log_*		--> [].base
  log_base_log_*	--> [].log_base
  *label		--> [].label
  *min			--> [].set_min
  *max			--> [].set_max
  min_array[]		--> [].min
  max_array[]		--> [].max
  writeback_min[]	--> [].writeback_min
  writeback_max[]	--> [].writeback_max
  *zeroaxis		--> [].zeroaxis
  *tics			--> [].ticmode
  rotate_*tics		--> [].tic_rotate
  m*tics		--> [].minitics
  m*tfreq		--> [].mtic_freq
  *ticdef		--> [].ticdef
  timefmt		--> [].timefmt    --- one per axis, now!
  datatype[]		--> [].is_timedata

Other, general changes: 

1) All status variables for features that have an axis name
   in 'set' are now contained in axis.c, and declared
   in axis.h. Some internal status variables also were moved there.
2) plot.h is no longer the 'master include file'. The big collection of
   type definitions is now in a new file 'gp_types.h'. Only relatively
   few sources will now want to #include "plot.h", but most will need
   "gp_types.h". It's often indirectly pulled in through other headers.
3) setshow.h now only declares variables that *do* belong to set.c and
   show.c. All the global status variables are now kept in their
   respective implementation modules.
4) Global variables are now all declared in the .h file of their 'home'
   module (i.e. if the definition is in foo.c, the decl is in foo.h). 
5) Frequently repeated code blocks, like log()/pow() conversion of
   values for log axes, are now macros in axis.h or functions in
   the axis module.
6) reset_command() moved from set.c to unset.c
7) Many status variables and implementations for graphical plot elements
   that are not axis-specific (the timestamp, the key, the border, and
   some others) are now in the new source module 'gadgets.h'.
8) there's a header file 'version.h' now for the stuff exported by
   'version.c'. 
9) Variables and functions only used by one particular source file
    have been moved into that and made 'static', to improve mutual
    isolation of the individual source modules.
10) Series of #defines that represent different cases have been turned
    into enums. This makes for easier debugging, and better compiler
    warnings if you forget to handle some case.
11) Default/initial values of variables to be influenced by 'reset'
    usually have a #define in the .h that is used for both, to avoid
    'reset' and the initialization getting out of synch.
12) Types not needed outside a certain module are defined in the source,
    where no other modules sees them, rather than in the header.
13) If an int was used as a yes/no flag, only, I made it a TBOOLEAN.




Details, by file:
=================

now in axis.c/h:(new)
  type axis
  enum AXIS_INDEX
  AXIS_ARRAY_SIZE
  t_ticseries_type
  types ticmark, ticdef, en_minitics_status, tic_callback, AXIS_DEFAULTS
  DEFAULT_AXIS_STRUCT
  axis_array[]    --- what it all started about
  axis_defaults[] 
  INIT_AXIS_ARRAY() --- set a field a given initial value, for all axes
  axisname_tbl[] --- for parsing
  ticscale, miniticscale, tic_in --- tic-related variables
  default_axis_ticdef, default_axis_label --- for unset/reset
  default_axis_zeroaxis, default_grid_lp --- dito
  DEF_FORMAT, TIMEFMT --- dito
  grid_selection, grid_lp, mgrid_lp, polar_grid_angle --- 'set grid'
  tic_start, tic_direction, tic_text, rotate_tics, tic_hjust, ... 
  tic_vjust, tic_mirror --- globals for tic callbacks
  x_axis, y_axis, z_axis --- 'current' x, y and z axis index
  X_AXIS, Y_AXIS, Z_AXIS --- quick-access macros axis_array[x_axis] etc.
  AXIS_MAP, AXIS_MAPBACK --- user <-> term coord mapping
  map_x, map_y --- their old names
  AXIS_WRITEBACK()
  AXIS_DO_LOG(), AXIS_UNDO_LOG() --- log() a value for an axis' logbas
  AXIS_LOG_VALUE(), AXIS_DE_LOG_VALUE() --- same, but test if necessary
  AXIS_INIT3D, AXIS_INIT2D --- prepare axis for use
  ... and lots of others --- go read axis.h yourself :-)

 
removed from command.c: 
  c_dummy_var[][]
now in command.c: 
  replot_disabled, MAX_TOKENS 

removed from contour.c:
  num_approx_points
  bspline_order
now in contour.c:
  contour_format
  contour_kind
  contour_levels_kind
  contour_levels
  contour_order
  contour_pts
  (dyn_)contour_levels_list

removed from datafile.c:
  df_timecol
now in datafile.c:
  missing_val
  plotted_data_from_stdin
  df_axis
renamed: pipe_open -> df_pipe_open

now in eval.c/h:
  udft_entry
  udvt_entry
  argument
  FUNC_PTR
  ft_entry

now in gadgets.c/h:
  types position_type, position, text_label, arrow_def, linestyle_def
  types en_key_horizontal_position, en_key_sample_positioning, key_type
  type label_struct
  EMPTY_LABELSTRUCT --- for initializing/unset/reset
  key, key_user_pos, key_vpos, key_hpos, key_just, key_swidth
  key_vert_factor, key_width_fix, key_reverse, key_title
  default_keybox_lp, key_box  --- status variables of 'set key'
  xleft, xright, ybot, ytop: the graph boundary
  xsize, ysize, ysize, aspect_ratio ---  'set size'
  xoffset, xoffset --- 'set offset'
  lmargin, bmargin,rmargin,tmargin --- set dito
  first_arrow
  first_label
  first_linestyle
  title
  timelabel, timelabel_rotate, timelabel_bottom --- 'set timedate'
  polar, parametric
  zero --- 'set zero'
  draw_border, border_lp
  clip_lines1, clip_lines2, clip_points
  samples_1, samples_2, SAMPLES
  ang2rad --- 'set angle'
  data_style, func_style --- 'set style data/func'
  suppressMove
  draw_clip_line, clip_line, clip_point --- moved from util3d.h
  clip_put_text, clip_put_text_just --- dito (used for 2D, too)
  clip_move, clip_vector --- from graph3d.h (also 2D usage)

now in time.c/gp_time.h:
  ZERO_YEAR
  JAN_FIRST_WDAY 
  SEC_OFFS_SYS
  YEAR_SEC
  MON_SEC
  WEEK_SEC
  DAY_SEC

removed from graph3d.c/h:
  suppress_move
  hidden_active
  hidden_no_update
  map3d_xy() --- moved to util3d
  map3d_z(), dbl_raise() --- unused, anyway
  draw_bottom_grid() --- renamed, now draw3d_graphbox()
  setlinestyle()
  map_x3d & friend macros
  move_pos_x, move_pos_y
  clip_move(), clip_vector()
now in graph3d.c/h:
  types t_contour_placement, gnuplot_contours, iso_curve, surface_points
  xscale3d, yscale3d, zscale3d
  draw_contour
  label_contours
  draw_surface
  hidden3d
  surface_rot_z
  surface_rot_x
  surface_scale
  surface_zscale
  ticslevel
  ISOSAMPLES
  iso_samples_1
  iso_samples_2  
  cntr3d_linespoints() --- new
  cntr3d_dots()	--- new
  setup_3d_box_corners --- new
  find_maxl_cntr() --- static, moved from misc.c
  find_maxl_keys3d() --- static, moved from misc.c
  right_x, right_y, front_x, front_y --- static, new

removed from graphics.c/h:
  statics tic_start, tic_direction, tic_text, rotate_tics, ...
  tic_hjust, tic_vjust, tic_mirror, ...
  ticfmt, timelevel, ticstep --- now function-local
  min_array, max_array, log_array, base_array, scale[] ...
  log_base_array --- now in 'axis' structure.
  x_axis, y_axis --- now in axis.c
  mant_exp() --- now static in axis.c
  time_tic_just(), timetic_format(), fixup_range() --- dito 
  set_tic(), setup_tics(), gen_tics() --- dito
  gprintf() --- now in axis.c (but may not stay there)
  CheckLog()  --- renamed, now in axis.c
  write_multiline() --- now in term.c
  xleft, xright, xtop, xbot --- now in gadgets.c
  dbl_raise() --- unused
now in graphics.c/h:
  type curve_points
  loff, roff, toff, boff
  bar_size
  find_maxl_keys() --- static, moved from misc.c
  default_font
  
removed from hidden3d.h:
  type vertex --- now in util3d.h
  
now in internal.h:
  undefined

removed from misc.c/h:
  static find_maxl_cntr(), find_maxl_keys3d() --- now in graph3d
  static find_maxl_keys() --- now in graphics
  cp_alloc(), cp_extend(), cp_free() --- now in plot2d
  sp_alloc(), sp_extend(), sp_free() --- now in plot3d
  gp_strcspn --- now in stdfn
now in misc.c/h:
  get_style() --- from set.c
  lp_use_properties() --- from set.c
  lp_parse --- from set.c

now in parse.c/h:
  c_dummy_var[]
  set_dummy_var[]
  is_jump()

removed from plot.c/h:
  PROGRAM --- now in show
  PROMPT --- now in command
  SAMPLES --- now in gadgets
  ISO_SAMPLES
  ZERO
  TERM
  TBOOLEAN 
  DTRUE
  DEG2RAD()
  MIN_CRV_POINTS
  MIN_SRF_POINTS
  INT_STR_LEN()
  PATH_CONCAT()
  CONCAT
  CONCAT3
  MAX_LINE_LEN
  MAX_TOKENS 
  MAX_ID_LEN
  MAX_AT_LEN
  NO_CARET --- now in util.h
  MAX_NUM_VAR
  FIRST_AXES --- now in axis
  FIRST_Z_AXIS etc. --- now in axis
  GPHUGE --- now in syscfg
  HUGE_VAL, VERYLARGE --- dito
  coordval --- dito
  GPMAX(), GPMIN(), inrange() --- now in stdfn
  is_comment(), is_system() --- now in syscfg
  is_jump() --- now in parse
  ... lots of types --- now in gp_types.h, or gadgets.h
  type termentry/TERMENTRY --- now in term_api.h
  ... all declarations of variables from other sources --- now there

removed from plot2d.c/h:
  INIT_ARRAYS(), CHECK_REVERSE(), LOAD_RANGE() --- now in axis
  STORE_WITH_LOG_AND_FIXUP_RANGE() --- dito
  FIXUP_RANGE_FOR_LOG() --- dito
  WRITEBACK(), SAVE_WRITEBACK() --- renamed, now in axis
now in plot2d.c/h:
  boxwidth
  cp_alloc()
  cp_extend()
  cp_free()

removed from plot3d.c/h:
  INIT_ARRAYS(), CHECK_REVERSE(), LOAD_RANGE() --- now in axis
  STORE_WITH_LOG_AND_FIXUP_RANGE() --- dito
  FIXUP_RANGE_FOR_LOG() --- dito
  WRITEBACK SAVE_WRITEBACK() --- renamed, now in axis 
  (yes, these were duplicates in plot2d and plot3d...)
now in plot3d.c/h:
  mapping3d
  dgrid3d_row_fineness
  dgrid3d_col_fineness
  dgrid3d_norm_value
  dgrid3d
  calculate_set_of_isolines() --- new, isolated from eval_plots()
  sp_alloc(),  sp_extend(),  sp_free() --- from misc
  sp_replace() --- new

removed from save.c:
  SAVE_NUM_OR_TIME() --- now in setshow.h

removed from set.c/setshow.h:
  GET_NUM_OR_TIME() --- now in axis
  reset_command --- now in unset
  get_writeback_min() and friends --- renamed, now in axis

and many globals that are now structure elements in the axis_array[]:
  autoscale_*		--> axis_array[].autoscale
  *format		--> [].formatstring
  format_is_numeric[*]  --> [].format_is_numeric
  is_log_*		--> [].log
  base_log_*		--> [].base
  log_base_log_*	--> [].log_base
  *label		--> [].label
  *min			--> [].set_min
  *max			--> [].set_max
  min_array[]		--> [].min
  max_array[]		--> [].max
  writeback_min[]	--> [].writeback_min
  writeback_max[]	--> [].writeback_max
  *zeroaxis		--> [].zeroaxis
  *tics			--> [].ticmode
  rotate_*tics		--> [].tic_rotate
  m*tics		--> [].minitics
  m*tfreq		--> [].mtic_freq
  *ticdef		--> [].ticdef
  timefmt		--> [].timefmt    --- one per axis, now!
  datatype[]		--> [].is_timedata

all other globals from set.c went to graph2d if they were 2D-releated,
graph3d if 3D, gadgets if used by both 2D and 3D.

now in stdfn.c/h:
  gp_strcspn()
  INT_STR_LEN
  PATH_CONCAT
  inrange
  GPMAX
  GPMIN

now in syscfg.h:
  GPHUGE, GPFAR
  coordval
  MAX_NUM_VAR
  RETSIGTYPE
  type sortfunc
  GP_INLINE
  TRUE, FALSE, TBOOLEAN

removed from tables.h:
  set_encoding_tbl, set_encoding_id --- now in term_api.h
  
now in term.c/term_api.h:
  *term, term_options
  *outstr
  multiplot
  ignore_enhanced_text
  encoding, encoding_names
  set_encoding_tbl, set_encoding_id
  write_multiline
  types JUSTIFY, VERT_JUSTIFY, lp_style_type, TERMENTRY/termentry
  
in unset.c:
  unset_mtics(), unset_tics(), unset_timedata() and others ---
    replace lots of functions by one, taking an axis_index argument

now in util.c:
  graph_error() --- from graphics

removed from util3d.c:
  clip_point(), draw_clip_line(), clip_put_text(), ...
  clip_put_text_just(), clip_line() --- caused problems with hidden3d
now in util3d.c:
  type vertex --- from hidden3d
  FLAG_VERTEX_AS_UNDEFINED(), VERTEX_IS_UNDEFINED, V_EQUAL --- dito
  TERMCOORD() --- dito
  map3d_xyz 
  map3d_xy --- from graph3d
  draw3d_line() --- new
  draw3d_line_unconditional() --- new
  draw3d_point() --- new --- these replace the old, removed ones


If you've read all through this, you're one determined person ---
congratulations.

Hans-Bernhard Broeker ([email protected])
Even if all the snow were burnt, ashes would remain.





[[[[ unsubscribe from info-gnuplot-beta via [email protected] ]]]]